From b5f0848d0fd3ef5c2a9a750b89329ac211a63462 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Fri, 28 Aug 2020 17:43:38 +0200 Subject: libcamera: raspberrypi: dmaheaps: Add isValid() Add isValid() method to verify the allocator device has been open correctly. Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Jacopo Mondi --- src/libcamera/pipeline/raspberrypi/dma_heaps.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libcamera/pipeline/raspberrypi') diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/raspberrypi/dma_heaps.h index ae6be113..79f39c51 100644 --- a/src/libcamera/pipeline/raspberrypi/dma_heaps.h +++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.h @@ -18,6 +18,7 @@ class DmaHeap public: DmaHeap(); ~DmaHeap(); + bool isValid() const { return dmaHeapHandle_ > -1; } FileDescriptor alloc(const char *name, std::size_t size); private: -- cgit v1.2.1