[libcamera-devel] [PATCH v2 0/5] libcamera: pipeline: Add internal request queue

Nícolas F. R. A. Prado nfraprado at collabora.com
Wed Sep 1 00:37:00 CEST 2021


This series adds an internal request queue for the vimc, uvcvideo,
rkisp1 and simple pipeline handlers. Each patch is independent of the
others, but I've grouped them in this series because they're very
similar, so it should ease the review.

Additionally, patch 5 documents this pattern in the pipeline-handler
guide so that future pipeline handlers also implement it.

Note: starting in v2 this series actually depends on [1], due to the
usage of buffer slots counters for the VIMC, UVC and simple pipeline
handlers, which rely on constants defined in that series.

Note: the simple pipeline handler patch wasn't tested since I don't have
any of the hardware targeted by it.

The patches here are based on these patches that added the same functionality
for the ipu3 pipeline handler: 5a9d19210fad ("libcamera: pipeline: ipu3: Try
queuing pending requests if a buffer is available") and 89dae5844964
("libcamera: pipeline: ipu3: Store requests in the case a buffer shortage").

With these patches applied, the lc-compliance test from [1] passes in
all pipeline handlers, even if the number of buffer slots in them is
lowered below 8.

[1] https://lists.libcamera.org/pipermail/libcamera-devel/2021-August/023773.html

Previous standalone versions of the patches: uvcvideo [2] and rkisp1 [3]

[2] https://lists.libcamera.org/pipermail/libcamera-devel/2021-July/022029.html
[3] https://lists.libcamera.org/pipermail/libcamera-devel/2021-July/022135.html

Changes in v2:
(thanks to Laurent)
- Added a counter to keep track of the number of available buffer slots
  in the VIMC and UVC pipeline handlers
- Moved processControls() from PipelineHandlerVimc to VimcCameraData
- Moved cancellation of pending requests to after video devices stop
- Added patch for the simple pipeline handler
- Added patch to document this pattern in the pipeline-handler guide

Nícolas F. R. A. Prado (5):
  libcamera: pipeline: vimc: Add internal request queue
  libcamera: pipeline: uvcvideo: Add internal request queue
  libcamera: pipeline: rkisp1: Add internal request queue
  libcamera: pipeline: simple: Add internal request queue
  Documentation: guides: pipeline-handler: Document internal queue
    pattern

 Documentation/guides/pipeline-handler.rst    | 129 ++++++++++----
 src/libcamera/pipeline/rkisp1/rkisp1.cpp     |  73 ++++++--
 src/libcamera/pipeline/simple/simple.cpp     | 101 ++++++++---
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp |  98 +++++++++--
 src/libcamera/pipeline/vimc/vimc.cpp         | 167 +++++++++++++------
 5 files changed, 436 insertions(+), 132 deletions(-)

-- 
2.33.0



More information about the libcamera-devel mailing list