summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/rkisp1/rkisp1.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-11-25 22:14:40 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-01-12 16:10:37 +0100
commit007517618c8440d09cfd39db5dbf451e87ef703a (patch)
treec946dbcd940f14988881c48ac03b37c50796db18 /src/libcamera/pipeline/rkisp1/rkisp1.cpp
parentde9243bdc1986c57bee4dae3a5ba4fc8fc4293fe (diff)
ipa: Switch to FrameBuffer interface
Switch the IPA interfaces and implementations to use the Framebuffer interface. - The IPA interface is switched to use the simpler FrameBuffer::Plane container when carrying dmabuf descriptions (fd and length) over the pipeline/IPA boundary. - The RkISP1 IPA implementation takes advantage of the new simpler and safer (better control over file descriptors) FrameBuffer interface. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/rkisp1/rkisp1.cpp')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 7e41222e..d7ee95de 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -687,14 +687,22 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera,
}
for (unsigned int i = 0; i < stream->configuration().bufferCount + 1; i++) {
+ FrameBuffer::Plane plane;
+ plane.fd = FileDescriptor(paramPool_.buffers()[i].planes()[0].dmabuf());
+ plane.length = paramPool_.buffers()[i].planes()[0].length();
+
data->ipaBuffers_.push_back({ .id = RKISP1_PARAM_BASE | i,
- .memory = paramPool_.buffers()[i] });
+ .planes = { plane } });
paramBuffers_.push(new Buffer(i));
}
for (unsigned int i = 0; i < stream->configuration().bufferCount + 1; i++) {
+ FrameBuffer::Plane plane;
+ plane.fd = FileDescriptor(statPool_.buffers()[i].planes()[0].dmabuf());
+ plane.length = statPool_.buffers()[i].planes()[0].length();
+
data->ipaBuffers_.push_back({ .id = RKISP1_STAT_BASE | i,
- .memory = statPool_.buffers()[i] });
+ .planes = { plane } });
statBuffers_.push(new Buffer(i));
}