Linux Media Controller development
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Kate Hsuan <hpa@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans de Goede <hansg@kernel.org>,
	Hans Verkuil <hverkuil+cisco@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Jai Luthra <jai.luthra@ideasonboard.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] media: i2c: imx471: Add line length PCK setting
Date: Fri, 4 Sep 2026 11:18:16 +0300	[thread overview]
Message-ID: <app-yOyzA32vQE7e@valkosipuli.retiisi.eu> (raw)
In-Reply-To: <20260904075113.125751-2-hpa@redhat.com>

Hi Kate,

On Fri, Sep 04, 2026 at 03:51:11PM +0800, Kate Hsuan wrote:
> Add the line length PCK setting to the IMX471 driver. This parameter
> determines the horizontal line scan duration and is used to calculate
> and control the sensor frame rate.
> Set the line length PCK value to 0x0a00 (matching the original value
> in ipu6-drivers), which maintains a frame rate close to the datasheet
> spec (~150 FPS in 2328x1304 binning mode).

This fits on fewer lines, please rewrap.

> 
> Signed-off-by: Kate Hsuan <hpa@redhat.com>
> ---
>  drivers/media/i2c/imx471.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/i2c/imx471.c b/drivers/media/i2c/imx471.c
> index 4053aed84340..3c939f2a9056 100644
> --- a/drivers/media/i2c/imx471.c
> +++ b/drivers/media/i2c/imx471.c
> @@ -91,6 +91,7 @@
>  #define IMX471_CSI_2_LANE_MODE			1
>  #define IMX471_CSI_4_LANE_MODE			3
>  
> +#define IMX471_REG_LINE_LENGTH_PCK		CCI_REG16(0x0342)
>  #define IMX471_REG_X_ADD_STA			CCI_REG16(0x0344)
>  #define IMX471_REG_Y_ADD_STA			CCI_REG16(0x0346)
>  #define IMX471_REG_X_ADD_END			CCI_REG16(0x0348)
> @@ -240,6 +241,7 @@ static const struct cci_reg_sequence mode_1928x1088_regs[] = {
>  	{ CCI_REG8(0x030d), 0x02 },
>  	{ CCI_REG8(0x030e), 0x00 },
>  	{ CCI_REG8(0x030f), 0x53 },
> +	{ IMX471_REG_LINE_LENGTH_PCK, 2560 },

The register definition is nice but there's already a control for this.
Could you do this via s_ctrl()?

There's also another set addressing related issues here
<URL:https://lore.kernel.org/linux-media/20260904075113.125751-1-hpa@redhat.com/T/#t>.

>  	{ IMX471_REG_PLL_MULT_DRIV, IMX471_PLL_DUAL },
>  	{ CCI_REG8(0x3f4c), 0x81 },
>  	{ CCI_REG8(0x3f4d), 0x81 },

-- 
Regards,

Sakari Ailus

  reply	other threads:[~2026-09-04  8:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  7:51 [PATCH v2 0/3] media: i2c: imx471: Add line length PCK setting and calculate pixel rate based on external clock rate Kate Hsuan
2026-09-04  7:51 ` [PATCH v2 1/3] media: i2c: imx471: Add line length PCK setting Kate Hsuan
2026-09-04  8:18   ` Sakari Ailus [this message]
2026-09-04  8:32     ` Sakari Ailus
2026-09-04  8:44       ` Kate Hsuan
2026-09-04  7:51 ` [PATCH v2 2/3] media: i2c: imx471: Name the PLL registers in the OP domain Kate Hsuan
2026-09-04  7:51 ` [PATCH v2 3/3] media: i2c: imx471: Calculate pixel rate based on external clock rate Kate Hsuan

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=app-yOyzA32vQE7e@valkosipuli.retiisi.eu \
    --to=sakari.ailus@iki.fi \
    --cc=hansg@kernel.org \
    --cc=hpa@redhat.com \
    --cc=hverkuil+cisco@kernel.org \
    --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