From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Kate Hsuan <hpa@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans de Goede <johannes.goede@oss.qualcomm.com>,
Hans Verkuil <hverkuil+cisco@kernel.org>,
Serin Yeh <serin.yeh@intel.com>,
Tarang Raval <tarang.raval@siliconsignals.io>,
Damjan Georgievski <gdamjan@gmail.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/3] media: i2c: imx471: Add Sony IMX471 image sensor driver
Date: Wed, 24 Jun 2026 11:55:52 +0300 [thread overview]
Message-ID: <ajubmHMhiuRyyLoM@kekkonen.localdomain> (raw)
In-Reply-To: <20260624033508.27391-4-hpa@redhat.com>
Hi Kate,
Thanks for the update.
On Wed, Jun 24, 2026 at 11:35:08AM +0800, Kate Hsuan wrote:
...
> +static int imx471_set_pad_format(struct v4l2_subdev *sd,
> + struct v4l2_subdev_state *sd_state,
> + struct v4l2_subdev_format *fmt)
> +{
> + struct imx471 *sensor = to_imx471(sd);
> + const struct imx471_mode *mode;
> + int h_blank, ret;
> +
> + mode = v4l2_find_nearest_size(imx471_modes, ARRAY_SIZE(imx471_modes),
> + width, height, fmt->format.width,
> + fmt->format.height);
> +
> + imx471_update_pad_format(sensor, mode, fmt);
> +
> + *v4l2_subdev_state_get_format(sd_state, fmt->pad) = fmt->format;
> +
> + if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
> + return 0;
> +
> + if (media_entity_is_streaming(&sensor->sd.entity))
> + return -EBUSY;
> +
> + ret = __v4l2_ctrl_modify_range(sensor->vblank,
> + mode->fll_min - mode->height,
> + IMX471_FLL_MAX - mode->height,
> + 1,
> + mode->fll_def - mode->height);
> + if (ret)
> + return ret;
> +
> + h_blank = mode->llp - mode->width;
> + /*
> + * Currently hblank is not changeable.
> + * So FPS control is done only by vblank.
> + */
> + return __v4l2_ctrl_modify_range(sensor->hblank, h_blank,
> + h_blank, 1, h_blank);
> +}
...
> +
> +static int imx471_init_state(struct v4l2_subdev *sd,
> + struct v4l2_subdev_state *sd_state)
> +{
> + struct v4l2_subdev_format fmt = {
> + .which = V4L2_SUBDEV_FORMAT_ACTIVE,
The purpose of the init_state op is to initialise the provided state only,
it's not allowed to change the sensor configuration.
> + .format = {
> + .code = MEDIA_BUS_FMT_SRGGB10_1X10,
> + .width = imx471_modes[0].width,
> + .height = imx471_modes[0].height,
> + },
> + };
> +
> + return imx471_set_pad_format(sd, sd_state, &fmt);
> +}
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2026-06-24 8:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 3:35 [PATCH v5 0/3] Add Sony IMX471 camera " Kate Hsuan
2026-06-24 3:35 ` [PATCH v5 1/3] media: ipu-bridge: Add DMI information of Lenovo X9 to the image upside-down list Kate Hsuan
2026-06-24 3:35 ` [PATCH v5 2/3] media: ipu-bridge: Add Sony IMX471 for Lenovo X1 Carbon G14 Kate Hsuan
2026-06-24 3:35 ` [PATCH v5 3/3] media: i2c: imx471: Add Sony IMX471 image sensor driver Kate Hsuan
2026-06-24 8:43 ` Tarang Raval
2026-06-24 9:08 ` Kate Hsuan
2026-06-24 9:58 ` Tarang Raval
2026-06-24 10:01 ` Sakari Ailus
2026-06-25 3:55 ` Kate Hsuan
2026-06-24 8:55 ` Sakari Ailus [this message]
2026-06-24 9:30 ` Kate Hsuan
2026-06-24 10:02 ` Sakari Ailus
2026-06-24 10:12 ` Vladimir Zapolskiy
2026-06-25 5:36 ` Kate Hsuan
2026-06-24 13:08 ` Kieran Bingham
2026-06-24 14:06 ` Tarang Raval
2026-06-25 5:46 ` Kate Hsuan
2026-06-26 18:10 Anis TALBI
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=ajubmHMhiuRyyLoM@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=gdamjan@gmail.com \
--cc=hpa@redhat.com \
--cc=hverkuil+cisco@kernel.org \
--cc=johannes.goede@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=serin.yeh@intel.com \
--cc=tarang.raval@siliconsignals.io \
/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®