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>
This commit is contained in:
committed by
Laurent Pinchart
parent
415ac12399
commit
1af788a8fb
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user