[PATCH 1/2] media: i2c: vd55g1: Mark the AE lock and bias controls inactive in manual mode
From: Fernando Rimoli
Date: Sun Oct 25 2026 - 11:41:47 EST
In manual exposure mode the auto exposure lock and bias controls have
no effect, and the driver marks them grabbed. The grabbed flag means a
control is temporarily locked, for instance while streaming, so
v4l2-compliance fails on it while the sensor is idle:
fail: v4l2-test-controls.cpp(134): GRABBED flag set
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
test VIDIOC_QUERYCTRL: FAIL
A control that does not apply to the current configuration is what the
inactive flag is for. Use v4l2_ctrl_activate() instead.
Setting the controls in manual mode now stores the value rather than
returning -EBUSY. That has no effect on the sensor:
vd55g1_lock_exposure() writes only in auto mode, and the bias sets the
auto exposure target, which the sensor uses only once auto exposure
resumes.
Fixes: e56616d7b23c ("media: i2c: Add driver for ST VD55G1 camera sensor")
Signed-off-by: Fernando Rimoli <fernandorimoli11@xxxxxxxxx>
---
drivers/media/i2c/vd55g1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/vd55g1.c b/drivers/media/i2c/vd55g1.c
index e3939bb..69ffb3a 100644
--- a/drivers/media/i2c/vd55g1.c
+++ b/drivers/media/i2c/vd55g1.c
@@ -1503,8 +1503,8 @@ static int vd55g1_s_ctrl(struct v4l2_ctrl *ctrl)
break;
case V4L2_CID_EXPOSURE_AUTO:
is_auto = (ctrl->val == V4L2_EXPOSURE_AUTO);
- __v4l2_ctrl_grab(sensor->ae_lock_ctrl, !is_auto);
- __v4l2_ctrl_grab(sensor->ae_bias_ctrl, !is_auto);
+ v4l2_ctrl_activate(sensor->ae_lock_ctrl, is_auto);
+ v4l2_ctrl_activate(sensor->ae_bias_ctrl, is_auto);
break;
case V4L2_CID_HDR_SENSOR_MODE:
/* Discriminate if the userspace changed the control value */
--
2.43.0