mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH 1/3] media: platform: rzg2l-cru: rzg2l-csi2: Implement .get_frame_desc()
Date: Sat, 7 Sep 2024 01:38:31 +0300	[thread overview]
Message-ID: <20240906223831.GB12915@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20240906173947.282402-2-prabhakar.mahadev-lad.rj@bp.renesas.com>

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@bp.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@bp.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 ?

> +
> +	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,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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 = {

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2024-09-06 22:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 17:39 [PATCH 0/3] media: platform: rzg2l-cru: CSI-2 and CRU enhancements Prabhakar
2024-09-06 17:39 ` [PATCH 1/3] media: platform: rzg2l-cru: rzg2l-csi2: Implement .get_frame_desc() Prabhakar
2024-09-06 22:38   ` Laurent Pinchart [this message]
2024-09-07 21:03     ` Lad, Prabhakar
2024-09-06 17:39 ` [PATCH 2/3] media: platform: rzg2l-cru: rzg2l-video: Retrieve virtual channel information Prabhakar
2024-09-06 23:10   ` Laurent Pinchart
2024-09-07 21:09     ` Lad, Prabhakar
2024-09-08 20:23       ` Lad, Prabhakar
2024-09-09 10:07         ` Laurent Pinchart
2024-09-08 22:39       ` Laurent Pinchart
2024-09-09  9:57         ` Lad, Prabhakar
2024-09-09 12:54           ` Laurent Pinchart
2024-09-06 17:39 ` [PATCH 3/3] media: platform: rzg2l-cru: Add support to capture 8bit raw sRGB Prabhakar
2024-09-06 23:32   ` Laurent Pinchart

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=20240906223831.GB12915@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --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

all inboxes | Powered by JetHome®