libcamera: rkisp1: Mark VBLANK as priority

The DelayedControls class works around a limitation of the V4L2 controls
API by assigning to controls that modify the limits of other controls a
'priority' flag.

'Priority' controls are written to the device before others to make sure
the limits of dependent controls are correctly updated.

A typical example of a priority control is VBLANK, whose value changes the
limits of the EXPOSURE control. This doesn't apply to a specific hardware
platform but to all V4L2 sensors.

The RkISP1 pipeline handler doesn't mark VBLANK as a priority control, an
issue which might result in the exposure being clamped to an outdated frame
length.

Fix the rkisp1 pipeline by marking VBLANK as a priority control.

Fixes: f72c76eb6e ("rkisp1: Honor the FrameDurationLimits control")
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2025-11-02 19:37:37 +01:00
parent 563e8df666
commit 6af90deaf2

View File

@@ -1348,7 +1348,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)
std::unordered_map<uint32_t, DelayedControls::ControlParams> params = {
{ V4L2_CID_ANALOGUE_GAIN, { delays.gainDelay, false } },
{ V4L2_CID_EXPOSURE, { delays.exposureDelay, false } },
{ V4L2_CID_VBLANK, { delays.vblankDelay, false } },
{ V4L2_CID_VBLANK, { delays.vblankDelay, true } },
};
data->delayedCtrls_ =