summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2020-08-28 17:45:28 +0200
committerJacopo Mondi <jacopo@jmondi.org>2020-08-28 18:20:33 +0200
commit6de4772f1e86e4e009d9dda441249c2139b3af85 (patch)
tree10e16dedf324b163b154dc45f3d726d05bac34ee /src
parentb5f0848d0fd3ef5c2a9a750b89329ac211a63462 (diff)
libcamera: raspberrypi: Check dma heap allocator
Check if the dmaHeap_ allocator is valid at match() time to fail earlier if its construction failed. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index c1451e71..ce43af34 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"));