[v1,0/6] vimc scaling improvements
mbox series

Message ID 20240424234224.9658-1-laurent.pinchart@ideasonboard.com
Headers show
  • vimc scaling improvements
Related show


Laurent Pinchart April 24, 2024, 11:42 p.m. UTC

This series improves the vimc pipeline handler to avoid the weird
alignment constraints related to the vimc scaler on recent kernels.

Starting in v5.16, the vimc scaler doesn't hardcoded a x3 scaling ratio,
but makes the scaling configurable by userspace through the sink pad
crop rectangle. Take advantage of this feature to lift the strange
alignment to a multiple of 6 for the stream output size. This allows
capturing all common display resolutions from the vimc pipeline handler,
which is handy to test the DRM sink in the cam application.

The improvement, in patch 6/6, breaks 4 unit tests. The series starts
with improvements and fixes to the tests to avoid those breakages
(patches 1/6 to 5/6), before changing the vimc pipeline handler
behaviour. Those test improvements would in my opinion make sense even
without patch 6/6, as they fix a race condition (3/6) or accelerate the
test runs (1/6, 4/6 and 5/6) on fast machines.

The series has been tested with the unit tests, running on my
development machine, in a local VM, and in the gitlab.freedesktop.org CI

Laurent Pinchart (6):
  test: camera: Increase timeout for vimc capture tests
  test: fence: Turn class member variable into local variable
  test: fence: Fix race condition
  test: fence: Increase timeout for fence test
  test: v4l2_videodevice: Increase timeout for vimc capture tests
  pipeline: vimc: Don't hardcode scaling factor with recent kernels

 src/libcamera/pipeline/vimc/vimc.cpp    | 47 +++++++++++++++++--------
 test/camera/buffer_import.cpp           | 21 +++++++----
 test/camera/capture.cpp                 | 22 +++++++-----
 test/fence.cpp                          | 42 +++++++++++-----------
 test/v4l2_videodevice/capture_async.cpp | 11 +++---
 5 files changed, 90 insertions(+), 53 deletions(-)

base-commit: fb74bb7df66b96dbe28702155cddfc96a1b30f78