Re: [PATCH 05/11] media: adv748x-csi2: Initialize subdev format

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

 



Hi Jacopo,

Thank you for the patch.

On Fri, May 03, 2024 at 05:51:20PM +0200, Jacopo Mondi wrote:
> Initialize the subdevice format to the default 1280x720 YUV 4:2:2.
> 
> The subdevice format is propagated from the frontend (HDMI or AFE) to
> the CSI-2 tx, but it was not initialized during the CSI-2 tx
> registration.
> 
> Use YUYV8 1280x720 as default format as it's supported by both TXes in
> all supported configurations (1, 2 or 4 CSI-2 lanes).
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@xxxxxxxxxxxxxxxx>
> ---
>  drivers/media/i2c/adv748x/adv748x-csi2.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/media/i2c/adv748x/adv748x-csi2.c b/drivers/media/i2c/adv748x/adv748x-csi2.c
> index 5b265b722394..9da7f6742a2b 100644
> --- a/drivers/media/i2c/adv748x/adv748x-csi2.c
> +++ b/drivers/media/i2c/adv748x/adv748x-csi2.c
> @@ -14,6 +14,13 @@
>  
>  #include "adv748x.h"
>  
> +static const struct v4l2_mbus_framefmt adv748x_csi2_default_fmt = {
> +	.width = 1280,
> +	.height = 720,
> +	.code = MEDIA_BUS_FMT_YUYV8_1X16,
> +	.field = V4L2_FIELD_NONE,
> +};
> +
>  int adv748x_csi2_set_virtual_channel(struct adv748x_csi2 *tx, unsigned int vc)
>  {
>  	return tx_write(tx, ADV748X_CSI_VC_REF, vc << ADV748X_CSI_VC_REF_SHIFT);
> @@ -311,6 +318,8 @@ int adv748x_csi2_init(struct adv748x_state *state, struct adv748x_csi2 *tx)
>  	if (ret)
>  		return ret;
>  
> +	tx->format = adv748x_csi2_default_fmt;
> +

This looks OK, so

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

But patch 08/11 removes the tx->format field, so I think you could as
well drop this patch.

>  	ret = v4l2_async_subdev_endpoint_add(&tx->sd,
>  					     of_fwnode_handle(state->endpoints[tx->port]));
>  	if (ret)

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