summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHarvey Yang <chenghaoyang@chromium.org>2024-12-11 08:44:27 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2025-01-07 09:46:34 +0000
commit545046a41e1767fa601c4e82608053f1912146af (patch)
tree5f77a2bfec9b2eff8306d27e091465229791b85c /include
parent4f9d8a63017d5217fcae1c55da3d4c9d1a04c469 (diff)
DmaBufAllocator: Make DmaSyncer non-copyable
As DmaSyncer does sync start/end in the c'tor/d'tor, copying a DmaSyncer instance would trigger sync end earlier than expected. This patch makes it non-copyable to avoid the issue. Fixes: 39482d59fe71 ("DmaBufAllocator: Add Dma Buffer synchronization function & helper class") Signed-off-by: Harvey Yang <chenghaoyang@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/dma_buf_allocator.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/libcamera/internal/dma_buf_allocator.h b/include/libcamera/internal/dma_buf_allocator.h
index fc5de2c1..d26f8a74 100644
--- a/include/libcamera/internal/dma_buf_allocator.h
+++ b/include/libcamera/internal/dma_buf_allocator.h
@@ -60,9 +60,14 @@ public:
explicit DmaSyncer(SharedFD fd, SyncType type = SyncType::ReadWrite);
+ DmaSyncer(DmaSyncer &&other) = default;
+ DmaSyncer &operator=(DmaSyncer &&other) = default;
+
~DmaSyncer();
private:
+ LIBCAMERA_DISABLE_COPY(DmaSyncer)
+
void sync(uint64_t step);
SharedFD fd_;