From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Kieran Bingham <kieran.bingham@ideasonboard.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
Steve Longerbeam <slongerbeam@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/11] media: i2c: ov5640: Set default WB gains
Date: Thu, 14 May 2026 09:44:23 +0200 [thread overview]
Message-ID: <agV8Pk_SHuS96NjC@zed> (raw)
In-Reply-To: <20260501-ov5640_cleanup-v1-1-0869a7802a33@ideasonboard.com>
Hi Kieran
On Fri, May 01, 2026 at 04:39:03PM +0100, Kieran Bingham wrote:
> The default values for the Blue and Red balance should be
> the same as the Green balance (0x400/1024).
>
> Update the values to ensure no change is applied by default.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
> drivers/media/i2c/ov5640.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> index 85ecc23b3587..01ea6b2bfeeb 100644
> --- a/drivers/media/i2c/ov5640.c
> +++ b/drivers/media/i2c/ov5640.c
> @@ -3470,9 +3470,9 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
> V4L2_CID_AUTO_WHITE_BALANCE,
> 0, 1, 1, 1);
> ctrls->blue_balance = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_BLUE_BALANCE,
> - 0, 4095, 1, 0);
> + 0, 4095, 1, 1024);
> ctrls->red_balance = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_RED_BALANCE,
> - 0, 4095, 1, 0);
> + 0, 4095, 1, 1024);
The register format is not documented, but 0x400 is indeed the
default. Looking at the control max value and the register default which
is reasonable to assume represents x1.0, I presume it is safe to
assume unsigned Q2.10 for the WB gains.
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> /* Auto/manual exposure */
> ctrls->auto_exp = v4l2_ctrl_new_std_menu(hdl, ops,
> V4L2_CID_EXPOSURE_AUTO,
>
> --
> 2.52.0
>
>
next parent reply other threads:[~2026-05-14 7:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260501-ov5640_cleanup-v1-0-0869a7802a33@ideasonboard.com>
[not found] ` <20260501-ov5640_cleanup-v1-1-0869a7802a33@ideasonboard.com>
2026-05-14 7:44 ` Jacopo Mondi [this message]
[not found] ` <20260501-ov5640_cleanup-v1-2-0869a7802a33@ideasonboard.com>
2026-05-14 7:58 ` [PATCH 02/11] media: i2c: ov5640: Set exposure minimum and defaults Jacopo Mondi
2026-05-14 8:01 ` Jacopo Mondi
[not found] ` <20260501-ov5640_cleanup-v1-3-0869a7802a33@ideasonboard.com>
2026-05-14 8:05 ` [PATCH 03/11] media: i2c: ov5640: Fix minimum gain to 1.0x Jacopo Mondi
[not found] ` <20260501-ov5640_cleanup-v1-4-0869a7802a33@ideasonboard.com>
2026-05-14 8:08 ` [PATCH 04/11] media: i2c: ov5640: fix error path in ov5640_set_mode Jacopo Mondi
[not found] ` <20260501-ov5640_cleanup-v1-5-0869a7802a33@ideasonboard.com>
2026-05-14 8:10 ` [PATCH 05/11] media: i2c: ov5640: Remove unsupported bayer orders Jacopo Mondi
2026-05-14 8:43 ` Kieran Bingham
2026-05-14 9:22 ` Jacopo Mondi
[not found] ` <20260501-ov5640_cleanup-v1-6-0869a7802a33@ideasonboard.com>
2026-05-14 8:23 ` [PATCH 06/11] media: i2c: ov5640: split out the LSC registers Jacopo Mondi
2026-05-14 8:44 ` Kieran Bingham
[not found] ` <20260501-ov5640_cleanup-v1-8-0869a7802a33@ideasonboard.com>
2026-05-14 8:33 ` [PATCH 08/11] media: i2c: ov5640: Document AWB control registers Jacopo Mondi
2026-05-14 8:34 ` Jacopo Mondi
2026-05-14 8:48 ` Kieran Bingham
[not found] ` <20260501-ov5640_cleanup-v1-9-0869a7802a33@ideasonboard.com>
2026-05-14 8:36 ` [PATCH 09/11] media: i2c: ov5640: Add ISP Control registers Jacopo Mondi
[not found] ` <20260501-ov5640_cleanup-v1-10-0869a7802a33@ideasonboard.com>
2026-05-14 8:39 ` [PATCH 10/11] media: i2c: ov5640: Disable ISP for raw output Jacopo Mondi
2026-05-14 8:50 ` Kieran Bingham
[not found] ` <20260501-ov5640_cleanup-v1-11-0869a7802a33@ideasonboard.com>
2026-05-14 8:41 ` [PATCH 11/11] media: i2c: ov5640: Split out format mux registers Jacopo Mondi
2026-05-14 8:51 ` Kieran Bingham
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=agV8Pk_SHuS96NjC@zed \
--to=jacopo.mondi@ideasonboard.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=slongerbeam@gmail.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