From: Fernando Rimoli <fernandorimoli11@gmail.com>
To: Benjamin Mugnier <benjamin.mugnier@foss.st.com>,
Sylvain Petinot <sylvain.petinot@foss.st.com>
Cc: Fernando Rimoli <fernandorimoli11@gmail.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] media: i2c: vd55g1: Mark the AE lock and bias controls inactive in manual mode
Date: Sun, 25 Oct 2026 15:40:25 +0000 [thread overview]
Message-ID: <20261025154031.27083-2-fernandorimoli11@gmail.com> (raw)
In-Reply-To: <20261025154031.27083-1-fernandorimoli11@gmail.com>
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@gmail.com>
---
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
next prev parent reply other threads:[~2026-10-25 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 15:40 [PATCH 0/2] media: i2c: vd55g1: Two v4l2-compliance fixes for controls Fernando Rimoli
2026-10-25 15:40 ` Fernando Rimoli [this message]
2026-10-25 15:40 ` [PATCH 2/2] media: i2c: vd55g1: Support control events Fernando Rimoli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261025154031.27083-2-fernandorimoli11@gmail.com \
--to=fernandorimoli11@gmail.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=sylvain.petinot@foss.st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®