[libcamera-devel] [PATCH v2 3/3] libcamera: raspberrypi: Check dma heap allocator
Jacopo Mondi
jacopo at jmondi.org
Fri Aug 28 17:51:36 CEST 2020
Check if the dmaHeap_ allocator is valid at match() time to fail
earlier if its construction failed.
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index c1451e71b587..ce43af345f53 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -904,6 +904,8 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)
return false;
std::unique_ptr<RPiCameraData> data = std::make_unique<RPiCameraData>(this);
+ if (!data->dmaHeap_.isValid())
+ return false;
/* Locate and open the unicam video streams. */
data->unicam_[Unicam::Embedded] = RPiStream("Unicam Embedded", unicam_->getEntityByName("unicam-embedded"));
--
2.28.0
More information about the libcamera-devel
mailing list