[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+V-a8u2rd60ueUZar5keyo2wBG565XPUmOknaXg_4U5cq4QtA@mail.gmail.com>
Date: Sat, 7 Sep 2024 22:03:38 +0100
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Sakari Ailus <sakari.ailus@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>, Hans Verkuil <hverkuil-cisco@...all.nl>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, Biju Das <biju.das.jz@...renesas.com>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH 1/3] media: platform: rzg2l-cru: rzg2l-csi2: Implement .get_frame_desc()
Hi Laurent,
Thank you for the review.
On Fri, Sep 6, 2024 at 11:38 PM Laurent Pinchart
<laurent.pinchart@...asonboard.com> wrote:
>
> Hi Prabhakar,
>
> Thank you for the patch.
>
> On Fri, Sep 06, 2024 at 06:39:45PM +0100, Prabhakar wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> >
> > The RZ/G2L CRU requires information about which VCx to process data from,
> > among the four available VCs. To obtain this information, the
> > .get_frame_desc() routine is implemented. This routine, in turn, calls
> > .get_frame_desc() on the remote sensor connected to the CSI2 bridge.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> > ---
> > .../media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> > index c7fdee347ac8..a7e4a0c109da 100644
> > --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> > +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> > @@ -582,6 +582,17 @@ static int rzg2l_csi2_enum_frame_size(struct v4l2_subdev *sd,
> > return 0;
> > }
> >
> > +static int rzg2l_csi2_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
> > + struct v4l2_mbus_frame_desc *fd)
> > +{
> > + struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
> > +
> > + if (!csi2->remote_source)
> > + return -EINVAL;
>
> Maybe -ENODEV ?
>
Agreed.
> > +
> > + return v4l2_subdev_call(csi2->remote_source, pad, get_frame_desc, pad, fd);
> > +}
> > +
>
> I wonder if we should implement a wrapper around .get_frame_desc() that
> would automatically forward the call to the source if .get_frame_desc()
> isn't implemented by a subdev. That's not a requirement for this series,
>
That would be helpful.
> Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
>
> > static const struct v4l2_subdev_video_ops rzg2l_csi2_video_ops = {
> > .s_stream = rzg2l_csi2_s_stream,
> > .pre_streamon = rzg2l_csi2_pre_streamon,
> > @@ -593,6 +604,7 @@ static const struct v4l2_subdev_pad_ops rzg2l_csi2_pad_ops = {
> > .enum_frame_size = rzg2l_csi2_enum_frame_size,
> > .set_fmt = rzg2l_csi2_set_format,
> > .get_fmt = v4l2_subdev_get_fmt,
> > + .get_frame_desc = rzg2l_csi2_get_frame_desc,
> > };
> >
> > static const struct v4l2_subdev_ops rzg2l_csi2_subdev_ops = {
>
Cheers,
Prabhakar
Powered by blists - more mailing lists