libcamera/test
Naushir Patuck 96c0eb338e libcamera: delayed_controls: Add notion of priority write
If an exposure time change adjusts the vblanking limits, and we set both
VBLANK and EXPOSURE controls through the VIDIOC_S_EXT_CTRLS ioctl, the
latter may fail if the value is outside of the limits calculated by the
old VBLANK value. This is a limitation in V4L2 and cannot be fixed by
setting VBLANK before EXPOSURE in a single VIDIOC_S_EXT_CTRLS ioctl.

The workaround here is to have the DelayedControls object mark the
VBLANK control as "priority write", which then write VBLANK separately
from (and ahead of) any other controls. This way, the sensor driver will
update the EXPOSURE control with new limits before the new values is
presented, and will thus be seen as valid.

To support this, a new struct DelayedControls::ControlParams is used in
the constructor to provide the control delay value as well as the
priority write flag.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Tested-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
[Kieran: Fix up trivial comments, merge conflicts]
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-03-12 14:12:32 +00:00
..
camera meson: Fix coding style when declaring arrays 2021-02-11 18:20:22 +02:00
controls meson: Fix coding style when declaring arrays 2021-02-11 18:20:22 +02:00
ipa libcamera: IPAInterface: Replace C API with the new C++-only API 2021-02-16 19:22:28 +09:00
ipc tests: Add test for IPCPipeUnixSocket 2021-03-02 19:27:31 +09:00
libtest libcamera: v4l2_device: Return a unique pointer from fromEntityName() 2020-12-09 11:26:25 +02:00
log libcamera: Move EventDispatcher to internal API 2020-11-15 22:21:28 +02:00
media_device libcamera: Drop unneeded empty default constructors and destructors 2020-10-23 22:48:17 +03:00
pipeline libcamera: camera: Rename name() to id() 2020-08-05 20:07:13 +02:00
process meson: Fix coding style when declaring arrays 2021-02-11 18:20:22 +02:00
serialization tests: Test IPA serializer generation 2021-03-02 19:27:35 +09:00
stream meson: Fix coding style when declaring arrays 2021-02-11 18:20:22 +02:00
v4l2_compat tests: v4l2_compat: Fix v4l2-compliance and v4l2-ctl version parsing 2020-07-17 18:50:10 +09:00
v4l2_subdevice meson: Fix coding style when declaring arrays 2021-02-11 18:20:22 +02:00
v4l2_videodevice meson: Fix coding style when declaring arrays 2021-02-11 18:20:22 +02:00
bayer-format.cpp test: Add unit tests for the BayerFormat class 2021-02-04 21:00:38 +02:00
byte-stream-buffer.cpp libcamera: Move internal headers to include/libcamera/internal/ 2020-05-16 03:38:11 +03:00
camera-sensor.cpp libcamera: Move internal headers to include/libcamera/internal/ 2020-05-16 03:38:11 +03:00
delayed_contols.cpp libcamera: delayed_controls: Add notion of priority write 2021-03-12 14:12:32 +00:00
event-dispatcher.cpp libcamera: Move EventDispatcher to internal API 2020-11-15 22:21:28 +02:00
event-thread.cpp libcamera: Move EventDispatcher to internal API 2020-11-15 22:21:28 +02:00
event.cpp libcamera: Move EventDispatcher to internal API 2020-11-15 22:21:28 +02:00
file-descriptor.cpp test: file-descriptor: Add "fd move" constructor test 2020-05-19 18:08:11 +03:00
file.cpp test: file: Check that directories are not treated as files 2020-12-30 13:03:54 +00:00
geometry.cpp test: geometry: Add unit tests for new geometry helper functions 2020-10-27 14:06:51 +02:00
hotplug-cameras.cpp libcamera: Move EventDispatcher to internal API 2020-11-15 22:21:28 +02:00
mapped-buffer.cpp test: Omit extra semicolons 2020-10-20 13:15:43 +03:00
meson.build test: Add unit tests for the BayerFormat class 2021-02-04 21:00:38 +02:00
message.cpp libcamera: Move internal headers to include/libcamera/internal/ 2020-05-16 03:38:11 +03:00
object-delete.cpp tests: Add a test case for the Object::deleteLater() API, to verify 2020-07-31 23:33:35 +03:00
object-invoke.cpp libcamera: Move EventDispatcher to internal API 2020-11-15 22:21:28 +02:00
object.cpp libcamera: Move internal headers to include/libcamera/internal/ 2020-05-16 03:38:11 +03:00
pixel-format.cpp libcamera: pixel_format: Replace hex with format names 2020-06-25 06:47:48 +03:00
signal-threads.cpp libcamera: Move internal headers to include/libcamera/internal/ 2020-05-16 03:38:11 +03:00
signal.cpp test: signal: Add additional disconnection tests for Object 2020-01-22 17:26:20 +02:00
span.cpp test: span: Fix typo describing the dynamic span test 2020-10-09 08:37:10 +09:00
threads.cpp libcamera: Move internal headers to include/libcamera/internal/ 2020-05-16 03:38:11 +03:00
timer-thread.cpp libcamera: Move EventDispatcher to internal API 2020-11-15 22:21:28 +02:00
timer.cpp libcamera: Move EventDispatcher to internal API 2020-11-15 22:21:28 +02:00
utils.cpp libcamera: utils: Add alignUp and alignDown functions 2020-08-03 11:16:16 +02:00