libcamera: internal: Move dma_heaps.[h, cpp] to common directories
DmaHeap class is useful outside the RPi pipeline handler too. Move dma_heaps.h and dma_heaps.cpp to common directories. Update the build files and RPi vc4 pipeline handler accordingly. Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sc8280xp Lenovo x13s Tested-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
d89b15a612
commit
6062ada2f5
28
include/libcamera/internal/dma_heaps.h
Normal file
28
include/libcamera/internal/dma_heaps.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
/*
|
||||
* Copyright (C) 2020, Raspberry Pi Ltd
|
||||
*
|
||||
* dma_heaps.h - Helper class for dma-heap allocations.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <libcamera/base/unique_fd.h>
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
class DmaHeap
|
||||
{
|
||||
public:
|
||||
DmaHeap();
|
||||
~DmaHeap();
|
||||
bool isValid() const { return dmaHeapHandle_.isValid(); }
|
||||
UniqueFD alloc(const char *name, std::size_t size);
|
||||
|
||||
private:
|
||||
UniqueFD dmaHeapHandle_;
|
||||
};
|
||||
|
||||
} /* namespace libcamera */
|
||||
@@ -25,6 +25,7 @@ libcamera_internal_headers = files([
|
||||
'device_enumerator.h',
|
||||
'device_enumerator_sysfs.h',
|
||||
'device_enumerator_udev.h',
|
||||
'dma_heaps.h',
|
||||
'formats.h',
|
||||
'framebuffer.h',
|
||||
'ipa_manager.h',
|
||||
|
||||
Reference in New Issue
Block a user