[PATCH v2 5/5] libcamera: software_isp: Allow using dma-buffers from /dev/udmabuf

Kieran Bingham kieran.bingham at ideasonboard.com
Fri May 31 00:36:43 CEST 2024


Quoting Hans de Goede (2024-05-30 18:16:00)
> Allow the DmaBufAllocator used by the software ISP to use memfd() +
> /dev/udmabuf for the software ISP destination buffers.
> 
> This is useful on Linux distributions where normal users are not allowed
> to access /dev/dma_heap/* while they are allowed to access /dev/udmabuf.
> 

Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
>  src/libcamera/software_isp/software_isp.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp
> index b5eab670..8535db90 100644
> --- a/src/libcamera/software_isp/software_isp.cpp
> +++ b/src/libcamera/software_isp/software_isp.cpp
> @@ -66,7 +66,8 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor)
>         : debayerParams_{ DebayerParams::kGain10, DebayerParams::kGain10,
>                           DebayerParams::kGain10, 0.5f, 0 },
>           dmaHeap_(DmaBufAllocator::DmaBufAllocatorFlag::CmaHeap |
> -                  DmaBufAllocator::DmaBufAllocatorFlag::SystemHeap)
> +                  DmaBufAllocator::DmaBufAllocatorFlag::SystemHeap |
> +                  DmaBufAllocator::DmaBufAllocatorFlag::UDmaBuf)
>  {
>         if (!dmaHeap_.isValid()) {
>                 LOG(SoftwareIsp, Error) << "Failed to create DmaBufAllocator object";
> -- 
> 2.45.1
>


More information about the libcamera-devel mailing list