summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-06-10 16:50:26 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-04 23:05:05 +0200
commit1af788a8fb37bd5695b572bb3506409949c06485 (patch)
treefe97948c9d8cac8f25152bc37047c5331e8a24bf /src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
parent415ac123997f86ebf6d7994020fd017a6bfa5f27 (diff)
libcamera: pipeline: raspberrypi: DmaHeaps: Use UniqueFD for a file descriptor
Manages a file descriptor owned by DmaHeaps for a dma handle by UniqueFD. Furthermore, DmaHeaps::alloc() creates a new file descriptor and the returned file descriptor is owned by a caller. This also clarifies it by changing the returned value to UniqueFD. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/pipeline/raspberrypi/raspberrypi.cpp')
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index f4ddcc04..6debea63 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1393,7 +1393,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)
/* Allocate the lens shading table via dmaHeap and pass to the IPA. */
if (!lsTable_.isValid()) {
- lsTable_ = dmaHeap_.alloc("ls_grid", ipa::RPi::MaxLsGridSize);
+ lsTable_ = FileDescriptor(dmaHeap_.alloc("ls_grid", ipa::RPi::MaxLsGridSize));
if (!lsTable_.isValid())
return -ENOMEM;