[libcamera-devel,0/3] Resolve invalid attempt to set sensor HBLANK control
mbox series

Message ID 20221122120343.4825-1-david.plowman@raspberrypi.com
Headers show
  • Resolve invalid attempt to set sensor HBLANK control
Related show


David Plowman Nov. 22, 2022, 12:03 p.m. UTC

Slightly in the same vein as recent sensor flip patches...

We have the same problem with the HBLANK control, in that we're
setting it at a moment (in CameraSensor::init) when we might not be
allowed to. So there are three patches here:

1. The first moves that code into a helper function.
2 and 3. Pipeline handlers call the helper function.

The background here is that when we (Raspberry Pi) added control of
HBLANK in order to get longer exposure times, that control was updated
to expose a min and max value. Other pipeline handlers however, might
then assume that the minimum value was the current one, and so a
workaround was suggested where we ensure HBLANK is forced to the
minimum. These changes merely move where that happens.


David Plowman (3):
  libcamera: camera_sensor: Add a function to reset the HBLANK interval
  libcamera: pipeline: rkisp1: Reset sensor HBLANK control
  libcamera: pipeline: ipu3: Reset sensor HBLANK control

 include/libcamera/internal/camera_sensor.h |  2 ++
 src/libcamera/camera_sensor.cpp            | 10 +++++++---
 src/libcamera/pipeline/ipu3/ipu3.cpp       |  3 +++
 src/libcamera/pipeline/rkisp1/rkisp1.cpp   |  3 +++
 4 files changed, 15 insertions(+), 3 deletions(-)