[libcamera-devel] [RFC PATCH 0/3] Add lc-compliance test for overflowing requests

Nícolas F. R. A. Prado nfraprado at collabora.com
Fri Apr 9 23:38:12 CEST 2021


This series aims to add a test to lc-compliance that checks if the pipeline
handler is able to handle more requests than it has internal buffers for [1].
This is specially concerning when buffers for the requests are allocated
elsewhere and imported for use, since the only a fixed amount of internal
buffers are allocated.

Only patch 1 adds the test. Patch 2 and 3 are specific to rkisp1 (which is what
I was testing on), but equivalents should be done for other pipelines.

The lc-compliance test relies on allocating buffers using the built-in
FrameBufferAllocator, which allocates based on the value of the
StreamConfiguration's bufferCount.

That's why patch 2 is about allowing bufferCount to be increased. So a larger
amount of buffers can be allocated.

Patch 3 makes the internal buffer allocation quantity be fixed on the minimum
amount instead of scaling along bufferCount, otherwise there would be more
internal buffers as well and the issue would be hidden. Instead, the issue
should be solved by queuing the requests until an internal buffer is available.

[1] https://bugs.libcamera.org/show_bug.cgi?id=24

Nícolas F. R. A. Prado (3):
  lc-compliance: Test queuing more requests than hardware depth
  libcamera: pipeline: rkisp1: Allow bufferCount to be user-configurable
  libcamera: pipeline: rkisp1: Make fixed amount of internal buffer
    allocation more explicit

 src/lc-compliance/simple_capture.cpp          | 25 ++++++++++-----
 src/lc-compliance/simple_capture.h            |  2 +-
 src/lc-compliance/single_stream.cpp           | 31 +++++++++++--------
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      | 13 +++-----
 src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 12 ++++---
 src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  6 ++--
 6 files changed, 51 insertions(+), 38 deletions(-)

-- 
2.31.1



More information about the libcamera-devel mailing list