From: Julien Massot <julien.massot@collabora.com>
To: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH 2/5] media/i2c: max96717: implement the .get_frame_desc() operation
Date: Tue, 18 Feb 2025 14:29:30 +0100 [thread overview]
Message-ID: <f5940c764af6587b97d39fdb9b64ec9bfe09b4e8.camel@collabora.com> (raw)
In-Reply-To: <20250207112958.2571600-3-laurentiu.palcu@oss.nxp.com>
Hi,
On Fri, 2025-02-07 at 13:29 +0200, Laurentiu Palcu wrote:
> Since the max96717 serializer can work with various sensors, we need to
> implement the .get_frame_desc() callback to get the VCs and DTs for the
> incoming stream(s).
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
> ---
> drivers/media/i2c/max96717.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/drivers/media/i2c/max96717.c b/drivers/media/i2c/max96717.c
> index b1116aade0687..6a668a004c717 100644
> --- a/drivers/media/i2c/max96717.c
> +++ b/drivers/media/i2c/max96717.c
> @@ -575,12 +575,33 @@ static int max96717_disable_streams(struct v4l2_subdev *sd,
> return 0;
> }
>
> +static int max96717_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
> + struct v4l2_mbus_frame_desc *fd)
> +{
> + struct max96717_priv *priv = sd_to_max96717(sd);
> + int ret;
> + struct v4l2_mbus_frame_desc source_fd;
> +
> + if (pad != MAX96717_PAD_SOURCE)
> + return -EINVAL;
> +
Please check priv->source_sd first, we support the case where we only have a test pattern from
the serializer. Then we can simply return the result of v4l2_subdev_call.
return v4l2_subdev_call(priv->source_sd, pad, get_frame_desc,
priv->source_sd_pad, fd);
> + ret = v4l2_subdev_call(priv->source_sd, pad, get_frame_desc,
> + priv->source_sd_pad, &source_fd);
> + if (ret)
> + return ret;
> +
> + *fd = source_fd;
> +
> + return 0;
> +}
> +
> static const struct v4l2_subdev_pad_ops max96717_pad_ops = {
> .enable_streams = max96717_enable_streams,
> .disable_streams = max96717_disable_streams,
> .set_routing = max96717_set_routing,
> .get_fmt = v4l2_subdev_get_fmt,
> .set_fmt = max96717_set_fmt,
> + .get_frame_desc = max96717_get_frame_desc,
> };
>
> static const struct v4l2_subdev_core_ops max96717_subdev_core_ops = {
Regards,
--
Julien
next prev parent reply other threads:[~2025-02-18 13:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 11:29 [PATCH 0/5] media/i2c: max96717: a few changes Laurentiu Palcu
2025-02-07 11:29 ` [PATCH 1/5] media/i2c: max96717: change internal regulator voltage Laurentiu Palcu
2025-02-18 13:14 ` Julien Massot
2025-03-06 8:11 ` Laurentiu Palcu
2025-02-07 11:29 ` [PATCH 2/5] media/i2c: max96717: implement the .get_frame_desc() operation Laurentiu Palcu
2025-02-18 13:29 ` Julien Massot [this message]
2025-03-06 8:14 ` Laurentiu Palcu
2025-02-07 11:29 ` [PATCH 3/5] dt-bindings: i2c: maxim,max96717: add new properties Laurentiu Palcu
2025-02-11 18:46 ` Conor Dooley
2025-02-12 17:42 ` Rob Herring
2025-02-12 20:11 ` Conor Dooley
2025-02-12 17:42 ` Rob Herring (Arm)
2025-02-18 13:54 ` Julien Massot
2025-03-06 8:24 ` Laurentiu Palcu
2025-03-13 7:41 ` Julien Massot
2025-02-07 11:29 ` [PATCH 4/5] media/i2c: max96717: add FSYNC support Laurentiu Palcu
2025-02-18 14:46 ` Julien Massot
2025-03-06 8:30 ` Laurentiu Palcu
2025-02-07 11:29 ` [PATCH 5/5] media/i2c: max96717: allow user to override operation mode from DT Laurentiu Palcu
2025-02-18 15:21 ` Julien Massot
2025-03-06 8:42 ` Laurentiu Palcu
2025-03-13 7:46 ` Julien Massot
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=f5940c764af6587b97d39fdb9b64ec9bfe09b4e8.camel@collabora.com \
--to=julien.massot@collabora.com \
--cc=laurentiu.palcu@oss.nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/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®