[libcamera-devel] [PATCH v2 2/3] libcamera: raspberrypi: dmaheaps: Add isValid()

Kieran Bingham kieran.bingham at ideasonboard.com
Fri Aug 28 18:03:07 CEST 2020


Hi Jacopo,

On 28/08/2020 17:00, Jacopo Mondi wrote:
> On Fri, Aug 28, 2020 at 05:51:35PM +0200, Jacopo Mondi wrote:
>> Add isValid() method to verify the allocator device has been open
>> correctly.
>>
>> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
>> ---
>>  src/libcamera/pipeline/raspberrypi/dma_heaps.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/raspberrypi/dma_heaps.h
>> index ae6be1135f17..119abd26ed31 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();
>> +	int isValid() const { return dmaHeapHandle_ > -1; }
> 
> Maybe bool ?
> 

With that changed,

Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

>>  	FileDescriptor alloc(const char *name, std::size_t size);
>>
>>  private:
>> --
>> 2.28.0
>>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
> 

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list