[PATCH v2 5/5] libcamera: software_isp: Allow using dma-buffers from /dev/udmabuf
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sat Jun 1 15:55:59 CEST 2024
Hi Hans,
Thank you for the patch.
On Thu, May 30, 2024 at 07:16:00PM +0200, Hans de Goede wrote:
> 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.
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.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";
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list