Re: [PATCH 5/5] media: rcar-vin: Support multiplexed CSI-2 receiver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jacopo,

Thank you for the patch.

On Sat, Sep 18, 2021 at 05:05:07PM +0200, Jacopo Mondi wrote:
> The R-Car CSI-2 receiver supports multiplexed streams.
> 
> The VIN driver inspects the CSI-2 subdevice format with the intent of
> validating formats at stream start time.
> 
> Each VIN instance is connected to a CSI-2 receiver which exposes a
> single stream and since it has acquired support for multiplexed streams
> maintains the format information in its v4l2_subdev_state per-stream.
> 
> Instrument the VIN driver to fetch the CSI-2 receiver format from the
> streams configuration by setting the stream identifier to 0 and pass to
> the subdevice its own state where to retrieve format information from.
> 
> Signed-off-by: Jacopo Mondi <jacopo+renesas@xxxxxxxxxx>
> ---
>  drivers/media/platform/rcar-vin/rcar-dma.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c
> index 83b2f923cf98..a6f3701f3f3f 100644
> --- a/drivers/media/platform/rcar-vin/rcar-dma.c
> +++ b/drivers/media/platform/rcar-vin/rcar-dma.c
> @@ -1119,7 +1119,8 @@ static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd,
>  	};
>  
>  	fmt.pad = pad->index;
> -	if (v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt))
> +	fmt.stream = 0;
> +	if (v4l2_subdev_call(sd, pad, get_fmt, sd->state, &fmt))

Should we have a helper function for this ?

int v4l2_subdev_get_pad_fmt(struct v4l2_subdev *sd,
			    struct v4l2_subdev_format *format);

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

>  		return -EPIPE;
>  
>  	switch (fmt.format.code) {

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux