[0/3] libcamera: Address soft ISP file seal TODO item
mbox series

Message ID 20240730232708.17399-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • libcamera: Address soft ISP file seal TODO item
Related show

Message

Laurent Pinchart July 30, 2024, 11:27 p.m. UTC
Hello,

This small series addresses one TODO item of the soft ISP, namely shrink
and grow sealing of the memfd underlying SharedMem objects.

Patch 1/3 starts by sharing the memfd handling code between the
DmaBufAllocator and SharedMem classes by moving it to a new MemFd helper
class. Patch 2/3 then addresses the TODO item, and patch 3/3 drops it
from the TODO file.

In case the value of sealing the memfd is dubious, given that shrinking
it would be shooting ourselves in the foot, we could drop patch 2/3. I
think patch 1/3 is still useful as it reduces the amount of code
duplication. Patch 3/3 should then get an updated commit message to
explain why the TODO item is dropped without being addressed.

Laurent Pinchart (3):
  libcamera: base: Add MemFd helper class
  libcamera: shared_mem_object: Prevent memfd from shrinking or growing
  libcamera: software_isp: Remove file seal TODO item

 include/libcamera/base/memfd.h      |  34 +++++++++
 include/libcamera/base/meson.build  |   1 +
 src/libcamera/base/memfd.cpp        | 112 ++++++++++++++++++++++++++++
 src/libcamera/base/meson.build      |   1 +
 src/libcamera/dma_buf_allocator.cpp |  46 +-----------
 src/libcamera/shared_mem_object.cpp |  22 ++----
 src/libcamera/software_isp/TODO     |  19 -----
 7 files changed, 158 insertions(+), 77 deletions(-)
 create mode 100644 include/libcamera/base/memfd.h
 create mode 100644 src/libcamera/base/memfd.cpp


base-commit: 7f33dfc100b2da0f158494534138a2d8b4f95100
prerequisite-patch-id: a6b8d233e4722c8092fc8a9bf64221ab23dc465f