[v3,0/2] Add DmaSyncer
mbox series

Message ID 20241121055436.2502314-1-chenghaoyang@chromium.org
Headers show
Series
  • Add DmaSyncer
Related show

Message

Harvey Yang Nov. 21, 2024, 5:51 a.m. UTC
Hi folks,

This series of patches follows the discussion with Kieran in patch [1],
which adds a helper function and a helper class to make synchronizing
DMA buffers easier.

The second patch updates debayer_cpu to utilize the new helper class.
The following mtkisp7 pipeline handler will also depend on the helper
class.

I put the function in DmaBufAllocator and the helper class in the same
file for now. Let me know if I should put them elsewhere.

This passes gitlab pipeline:
https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1314375

Milan, I didn't add your review tag on the first patch, as there are
quite some changes after Kieran's comments, FYI.

v3:
- Migrate static function sync in DmaBufAllocator to a private function
  in DmaSyncer.


BR,
Harvey

Harvey Yang (2):
  DmaBufAllocator: Add Dma Buffer synchronization function & helper
    class
  debayer_cpu: Replace syncing DMABUFs with DmaSyncer

 .../libcamera/internal/dma_buf_allocator.h    | 21 ++++++
 src/libcamera/dma_buf_allocator.cpp           | 75 +++++++++++++++++++
 src/libcamera/software_isp/debayer_cpu.cpp    | 29 ++-----
 3 files changed, 104 insertions(+), 21 deletions(-)