Message ID | 20240530171600.259495-6-hdegoede@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
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@ideasonboard.com> > Signed-off-by: Hans de Goede <hdegoede@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 >
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@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@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";
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";
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@redhat.com> --- src/libcamera/software_isp/software_isp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)