libcamera: ipu3: Calculate number of buffers for ImgU
Decouple the number of buffers to allocate for the ImgU from the number of buffers allocated for the CIO2. Instead of blindly following the CIO2 pick the maximum number of buffers requested for any stream facing applications. This is potentially wasteful, as each stream could allocate just as many buffers as requested by the application instead of the maximum from the set. But this is not more wasteful than what is already used by the pipeline and should be fixed on top after the decoupling of the two processing units. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
e00b7b7c1a
commit
2cd9556021
1 changed files with 5 additions and 1 deletions
|
@ -735,7 +735,11 @@ int PipelineHandlerIPU3::allocateBuffers(Camera *camera)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
bufferCount = ret;
|
bufferCount = std::max({
|
||||||
|
data->outStream_.configuration().bufferCount,
|
||||||
|
data->vfStream_.configuration().bufferCount,
|
||||||
|
data->rawStream_.configuration().bufferCount,
|
||||||
|
});
|
||||||
|
|
||||||
ret = imgu->allocateBuffers(data, bufferCount);
|
ret = imgu->allocateBuffers(data, bufferCount);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue