[v2,0/4] libcamera: Address soft ISP file seal TODO item
mbox series

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

Message

Laurent Pinchart July 31, 2024, 1:59 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/4 starts by sharing the memfd handling code between the
DmaBufAllocator and SharedMem classes by moving it to a new MemFd helper
class. Patch 2/4 then applies a suggestion from Nicolas to improve code
readability. Patch 3/4 addresses the TODO item, and patch 4/4 finally
drops it from the TODO file.

Could someone test this with the soft ISP to make sure I haven't broken
anything ?

Laurent Pinchart (4):
  libcamera: base: Add MemFd helper class
  libcamera: base: memfd: Handle uClibc compatibility with function
    wrapper
  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        | 123 ++++++++++++++++++++++++++++
 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, 169 insertions(+), 77 deletions(-)
 create mode 100644 include/libcamera/base/memfd.h
 create mode 100644 src/libcamera/base/memfd.cpp


base-commit: 98b01768397f982bd177b55e9bc67002b645b4d0

Comments

Milan Zamazal July 31, 2024, 2:56 p.m. UTC | #1
Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:

> 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/4 starts by sharing the memfd handling code between the
> DmaBufAllocator and SharedMem classes by moving it to a new MemFd helper
> class. Patch 2/4 then applies a suggestion from Nicolas to improve code
> readability. Patch 3/4 addresses the TODO item, and patch 4/4 finally
> drops it from the TODO file.
>
> Could someone test this with the soft ISP to make sure I haven't broken
> anything ?

Tested-by: Milan Zamazal <mzamazal@redhat.com>

> Laurent Pinchart (4):
>   libcamera: base: Add MemFd helper class
>   libcamera: base: memfd: Handle uClibc compatibility with function
>     wrapper
>   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        | 123 ++++++++++++++++++++++++++++
>  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, 169 insertions(+), 77 deletions(-)
>  create mode 100644 include/libcamera/base/memfd.h
>  create mode 100644 src/libcamera/base/memfd.cpp
>
>
> base-commit: 98b01768397f982bd177b55e9bc67002b645b4d0
Hans de Goede July 31, 2024, 6:58 p.m. UTC | #2
Hi,

On 7/31/24 3:59 PM, Laurent Pinchart wrote:
> 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/4 starts by sharing the memfd handling code between the
> DmaBufAllocator and SharedMem classes by moving it to a new MemFd helper
> class. Patch 2/4 then applies a suggestion from Nicolas to improve code
> readability. Patch 3/4 addresses the TODO item, and patch 4/4 finally
> drops it from the TODO file.
> 
> Could someone test this with the soft ISP to make sure I haven't broken
> anything ?

I have given this a test on an IPU6 system and everything still works:

Tested-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans




> 
> Laurent Pinchart (4):
>   libcamera: base: Add MemFd helper class
>   libcamera: base: memfd: Handle uClibc compatibility with function
>     wrapper
>   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        | 123 ++++++++++++++++++++++++++++
>  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, 169 insertions(+), 77 deletions(-)
>  create mode 100644 include/libcamera/base/memfd.h
>  create mode 100644 src/libcamera/base/memfd.cpp
> 
> 
> base-commit: 98b01768397f982bd177b55e9bc67002b645b4d0