blob: 79f39c5153d39f0fe965e9399eb22b802dfafcb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2020, Raspberry Pi (Trading) Limited
*
* dma_heaps.h - Helper class for dma-heap allocations.
*/
#ifndef __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__
#define __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__
#include <libcamera/file_descriptor.h>
namespace libcamera {
namespace RPi {
class DmaHeap
{
public:
DmaHeap();
~DmaHeap();
bool isValid() const { return dmaHeapHandle_ > -1; }
FileDescriptor alloc(const char *name, std::size_t size);
private:
int dmaHeapHandle_;
};
} /* namespace RPi */
} /* namespace libcamera */
#endif /* __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__ */
|