From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Cc: Sylvain Petinot <sylvain.petinot@foss.st.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Hans Verkuil <hverkuil+cisco@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 3/5] media: i2c: vd55g1: Fix manual digital gain on color variant
Date: Mon, 22 Jun 2026 12:09:57 +0200 [thread overview]
Message-ID: <ajkJ3u4VdXHWEePt@zed> (raw)
In-Reply-To: <20260428-vd55g4_and_fixes-v1-3-4f745a83b87e@foss.st.com>
Hi Benjamin
On Tue, Apr 28, 2026 at 10:40:57AM +0200, Benjamin Mugnier wrote:
> Apply digital gain to all channels, each channel representing a color.
>
> Fixes: e138e7f00042 ("media: i2c: vd55g1: Add support for vd65g4 RGB variant")
Also cc stable here
>
> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Thanks
j
> ---
> drivers/media/i2c/vd55g1.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/i2c/vd55g1.c b/drivers/media/i2c/vd55g1.c
> index e44174056ace..2c962fcb41d2 100644
> --- a/drivers/media/i2c/vd55g1.c
> +++ b/drivers/media/i2c/vd55g1.c
> @@ -60,7 +60,10 @@
> #define VD55G1_PATGEN_ENABLE BIT(0)
> #define VD55G1_REG_MANUAL_ANALOG_GAIN CCI_REG8(0x0501)
> #define VD55G1_REG_MANUAL_COARSE_EXPOSURE CCI_REG16_LE(0x0502)
> -#define VD55G1_REG_MANUAL_DIGITAL_GAIN CCI_REG16_LE(0x0504)
> +#define VD55G1_REG_MANUAL_DIGITAL_GAIN_CH0 CCI_REG16_LE(0x0504)
> +#define VD55G1_REG_MANUAL_DIGITAL_GAIN_CH1 CCI_REG16_LE(0x0506)
> +#define VD55G1_REG_MANUAL_DIGITAL_GAIN_CH2 CCI_REG16_LE(0x0508)
> +#define VD55G1_REG_MANUAL_DIGITAL_GAIN_CH3 CCI_REG16_LE(0x050a)
> #define VD55G1_REG_APPLIED_COARSE_EXPOSURE CCI_REG16_LE(0x00e8)
> #define VD55G1_REG_APPLIED_ANALOG_GAIN CCI_REG16_LE(0x00ea)
> #define VD55G1_REG_APPLIED_DIGITAL_GAIN CCI_REG16_LE(0x00ec)
> @@ -850,9 +853,16 @@ static int vd55g1_update_expo_cluster(struct vd55g1 *sensor, bool is_auto)
> vd55g1_write(sensor, VD55G1_REG_MANUAL_ANALOG_GAIN,
> sensor->again_ctrl->val, &ret);
>
> - if (!is_auto && sensor->dgain_ctrl->is_new)
> - vd55g1_write(sensor, VD55G1_REG_MANUAL_DIGITAL_GAIN,
> + if (!is_auto && sensor->dgain_ctrl->is_new) {
> + vd55g1_write(sensor, VD55G1_REG_MANUAL_DIGITAL_GAIN_CH0,
> sensor->dgain_ctrl->val, &ret);
> + vd55g1_write(sensor, VD55G1_REG_MANUAL_DIGITAL_GAIN_CH1,
> + sensor->dgain_ctrl->val, &ret);
> + vd55g1_write(sensor, VD55G1_REG_MANUAL_DIGITAL_GAIN_CH2,
> + sensor->dgain_ctrl->val, &ret);
> + vd55g1_write(sensor, VD55G1_REG_MANUAL_DIGITAL_GAIN_CH3,
> + sensor->dgain_ctrl->val, &ret);
> + }
>
> return ret;
> }
>
> --
> 2.43.0
>
>
next prev parent reply other threads:[~2026-06-22 10:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 8:40 [PATCH 0/5] media: i2c: vd55g1: Add vd55g4 support and various fixes Benjamin Mugnier
2026-04-28 8:40 ` [PATCH 1/5] media: i2c: vd55g1: Fix media bus code initialization Benjamin Mugnier
2026-06-22 9:28 ` Jacopo Mondi
2026-04-28 8:40 ` [PATCH 2/5] media: i2c: vd55g1: Remove spurious pad format update on init_state() Benjamin Mugnier
2026-06-22 9:30 ` Jacopo Mondi
2026-04-28 8:40 ` [PATCH 3/5] media: i2c: vd55g1: Fix manual digital gain on color variant Benjamin Mugnier
2026-06-22 10:09 ` Jacopo Mondi [this message]
2026-04-28 8:40 ` [PATCH 4/5] media: i2c: vd55g1: Add support for vd55g4 Benjamin Mugnier
2026-06-22 10:16 ` Jacopo Mondi
2026-04-28 8:40 ` [PATCH 5/5] media: dt-bindings: vd55g1: Add vd55g4 compatible Benjamin Mugnier
2026-04-30 9:37 ` Krzysztof Kozlowski
2026-05-04 15:02 ` Benjamin Mugnier
2026-06-19 14:20 ` [PATCH 0/5] media: i2c: vd55g1: Add vd55g4 support and various fixes Benjamin Mugnier
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=ajkJ3u4VdXHWEePt@zed \
--to=jacopo.mondi@ideasonboard.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil+cisco@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.