[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <19cd3fd4-2d17-49f7-aa3a-9d443b24cf28@foss.st.com>
Date: Mon, 21 Jul 2025 13:03:50 +0200
From: Benjamin Mugnier <benjamin.mugnier@...s.st.com>
To: Julien Massot <julien.massot@...labora.com>, <kernel@...labora.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Sylvain Petinot
<sylvain.petinot@...s.st.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
CC: <linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: i2c: vgxy61: Report stream using frame descriptors
Hi Julien,
Thank you for your patch.
On 7/4/25 11:28, Julien Massot wrote:
> Add support for .get_frame_desc() to report CSI-2 virtual channel
> and data type information. This allows CSI-2 receivers to properly
> interpret the stream without inferring the data type from the pixel
> format.
>
> Signed-off-by: Julien Massot <julien.massot@...labora.com>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@...s.st.com>
> ---
> drivers/media/i2c/vgxy61.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
> index 5b0479f3a3c0592be430cefe5a1ab9a76812ba84..44d6c8d8fbf8d6182e42d44e129bc45945ee0da5 100644
> --- a/drivers/media/i2c/vgxy61.c
> +++ b/drivers/media/i2c/vgxy61.c
> @@ -1181,6 +1181,21 @@ static int vgxy61_s_stream(struct v4l2_subdev *sd, int enable)
> return ret;
> }
>
> +static int vgxy61_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
> + struct v4l2_mbus_frame_desc *fd)
> +{
> + struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
> +
> + fd->type = V4L2_MBUS_FRAME_DESC_TYPE_CSI2;
> + fd->num_entries = 1;
> + fd->entry[0].pixelcode = sensor->fmt.code;
> + fd->entry[0].stream = 0;
> + fd->entry[0].bus.csi2.vc = 0;
> + fd->entry[0].bus.csi2.dt = get_data_type_by_code(sensor->fmt.code);
> +
> + return 0;
> +}
> +
> static int vgxy61_set_fmt(struct v4l2_subdev *sd,
> struct v4l2_subdev_state *sd_state,
> struct v4l2_subdev_format *format)
> @@ -1402,6 +1417,7 @@ static const struct v4l2_subdev_pad_ops vgxy61_pad_ops = {
> .set_fmt = vgxy61_set_fmt,
> .get_selection = vgxy61_get_selection,
> .enum_frame_size = vgxy61_enum_frame_size,
> + .get_frame_desc = vgxy61_get_frame_desc,
> };
>
> static const struct v4l2_subdev_ops vgxy61_subdev_ops = {
>
> ---
> base-commit: 1343433ed38923a21425c602e92120a1f1db5f7a
> change-id: 20250704-vgxy61-frame-desc-2a6d3c6cab43
>
> Best regards,
--
Regards,
Benjamin
Powered by blists - more mailing lists