[libcamera-devel] [PATCH 2/3] libcamera: raspberrypi: dma_heaps: Be verbose on errors
Jacopo Mondi
jacopo at jmondi.org
Thu Aug 27 10:20:37 CEST 2020
Be a tad more verbose on failures in opening the dma_heaps allocator
devices.
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/libcamera/pipeline/raspberrypi/dma_heaps.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
index 739f05d3d4d8..500f1eac2eb8 100644
--- a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
+++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
@@ -45,9 +45,14 @@ int DmaHeap::open()
{
dmaHeapHandle_ = ::open(DMA_HEAP_CMA_NAME, O_RDWR, 0);
if (dmaHeapHandle_ == -1) {
+ LOG(RPI, Error) << "Could not open dmaHeap device "
+ << DMA_HEAP_CMA_NAME << ": "
+ << strerror(errno);
dmaHeapHandle_ = ::open(DMA_HEAP_CMA_ALT_NAME, O_RDWR, 0);
if (dmaHeapHandle_ == -1) {
- LOG(RPI, Error) << "Could not open dmaHeap device";
+ LOG(RPI, Error) << "Could not open dmaHeap device "
+ << DMA_HEAP_CMA_ALT_NAME << ": "
+ << strerror(errno);
return dmaHeapHandle_;
}
}
--
2.28.0
More information about the libcamera-devel
mailing list