From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Fernando Rimoli <fernandorimoli11@gmail.com>
Cc: Benjamin Mugnier <benjamin.mugnier@foss.st.com>,
Sylvain Petinot <sylvain.petinot@foss.st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Hans Verkuil <hans@jjverkuil.nl>
Subject: Re: [PATCH v2 1/2] media: i2c: vd55g1: Mark the AE lock and bias controls inactive in manual mode
Date: Mon, 2 Nov 2026 14:08:40 +0200 [thread overview]
Message-ID: <auh9SHrLKHTjENwY@kekkonen.localdomain> (raw)
In-Reply-To: <20261101195006.220657-2-fernandorimoli11@gmail.com>
Hi Fernando, Hans,
On Sun, Nov 01, 2026 at 07:50:04PM +0000, Fernando Rimoli wrote:
> 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
Hans: v4l-utils commit 0a4d4accea726 adds a check for this but the commit
message doesn't explain why. I don't think grabbing a control is a bug as
such; it's normal that if exposure is set to auto, you can't access the
manual exposure controls.
>
> 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.
>
> 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 */
--
Regards,
Sakari Ailus
next prev parent reply other threads:[~2026-11-02 12:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 19:50 [PATCH v2 0/2] media: i2c: vd55g1: Two v4l2-compliance fixes for controls Fernando Rimoli
2026-11-01 19:50 ` [PATCH v2 1/2] media: i2c: vd55g1: Mark the AE lock and bias controls inactive in manual mode Fernando Rimoli
2026-11-02 12:08 ` Sakari Ailus [this message]
2026-11-03 10:49 ` Fernando Rimoli
2026-11-03 10:55 ` Sakari Ailus
2026-11-01 19:50 ` [PATCH v2 2/2] media: i2c: vd55g1: Support control events Fernando Rimoli
2026-11-02 12:04 ` Sakari Ailus
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=auh9SHrLKHTjENwY@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=fernandorimoli11@gmail.com \
--cc=hans@jjverkuil.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--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®