libcamera: Rename DmaHeap class to DmaBufAllocator

Users of the DmaHeap class really just want some way to allocate
dma-buffers from userspace. This can also be done by using /dev/udmabuf
instead of using /dev/dma_heap/*.

Rename DmaHeap class to DmaBufAllocator in preparation of adding
/dev/udmabuf support.

And update the DmaHeap class docs to match including replacing references
to "dma-heap type" with "dma-buf provider".

This is a pure automated rename on the code ('s/DmaHeap/DmaBufAllocator/')
+ file renames + doc updates. There are no functional changes.

The DmaBufAllocator objects in vc4.cpp and software_isp.cpp are left named
dmaHeap_ to keep the changes to those 2 files to a minimum.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # Lenovo-x13s
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Hans de Goede
2024-06-03 13:12:57 +02:00
committed by Kieran Bingham
parent 6cd17515ff
commit 447da4a11f
9 changed files with 209 additions and 211 deletions

View File

@@ -66,7 +66,8 @@ LOG_DEFINE_CATEGORY(SoftwareIsp)
* handler
*/
SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor)
: dmaHeap_(DmaHeap::DmaHeapFlag::Cma | DmaHeap::DmaHeapFlag::System)
: dmaHeap_(DmaBufAllocator::DmaBufAllocatorFlag::CmaHeap |
DmaBufAllocator::DmaBufAllocatorFlag::SystemHeap)
{
/*
* debayerParams_ must be initialized because the initial value is used for
@@ -86,7 +87,7 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor)
}
if (!dmaHeap_.isValid()) {
LOG(SoftwareIsp, Error) << "Failed to create DmaHeap object";
LOG(SoftwareIsp, Error) << "Failed to create DmaBufAllocator object";
return;
}