mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Jai Luthra <jai.luthra@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jai Luthra <jai.luthra@ideasonboard.com>
Subject: Re: [PATCH 4/6] media: imx335: Update HBLANK range on mode change
Date: Wed, 13 Aug 2025 11:22:24 +0100	[thread overview]
Message-ID: <175508054445.560048.732077947659016819@ping.linuxembedded.co.uk> (raw)
In-Reply-To: <20250813-imx335_binning-v1-4-a42b687d8541@ideasonboard.com>

Quoting Jai Luthra (2025-08-13 08:20:35)
> While switching modes, updating to a different value of HBLANK isn't
> sufficient, as this is a read-only control with a single allowed value,
> and thus hblank_min == hblank_max == hblank of the default mode.
> 
> So to correctly update the user-facing value of the HBLANK parameter,
> which is necessary for correct framerate calculation, update the whole
> range when switching modes.
> 

Seems reasonable to me.


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
> ---
>  drivers/media/i2c/imx335.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c
> index dbf2db4bf9cbfd792ff5865264c6f465eb79a43b..c61a6952f828fd8b945746ae2f53f5517e98c410 100644
> --- a/drivers/media/i2c/imx335.c
> +++ b/drivers/media/i2c/imx335.c
> @@ -485,7 +485,8 @@ static int imx335_update_controls(struct imx335 *imx335,
>         if (ret)
>                 return ret;
>  
> -       ret = __v4l2_ctrl_s_ctrl(imx335->hblank_ctrl, mode->hblank);
> +       ret = __v4l2_ctrl_modify_range(imx335->hblank_ctrl, mode->hblank,
> +                                      mode->hblank, 1, mode->hblank);
>         if (ret)
>                 return ret;
>  
> 
> -- 
> 2.50.1
>

  reply	other threads:[~2025-08-13 10:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13  7:20 [PATCH 0/6] media: imx335: Vflip, active state and binning support Jai Luthra
2025-08-13  7:20 ` [PATCH 1/6] media: imx335: Rectify name of mode struct Jai Luthra
2025-08-13  7:20 ` [PATCH 2/6] media: imx335: Support vertical flip Jai Luthra
2025-08-13  7:20 ` [PATCH 3/6] media: imx335: Update the native pixel array width Jai Luthra
2025-08-13 10:15   ` Kieran Bingham
2025-08-19  7:13     ` Jai Luthra
2025-08-13  7:20 ` [PATCH 4/6] media: imx335: Update HBLANK range on mode change Jai Luthra
2025-08-13 10:22   ` Kieran Bingham [this message]
2025-08-13  7:20 ` [PATCH 5/6] media: imx355: Use subdev active state Jai Luthra
2025-08-13 10:24   ` Kieran Bingham
2025-08-19  7:17     ` Jai Luthra
2025-08-18 13:14   ` Sakari Ailus
2025-08-19  7:20     ` Jai Luthra
2025-08-13  7:20 ` [PATCH 6/6] media: imx335: Support 2x2 binning Jai Luthra
2025-08-13  9:56   ` Kieran Bingham
2025-08-19  7:04     ` Jai Luthra

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=175508054445.560048.732077947659016819@ping.linuxembedded.co.uk \
    --to=kieran.bingham@ideasonboard.com \
    --cc=jai.luthra@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.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®