Re: [PATCH v5 02/12] media: rcar-vin: Store platform info with group structure

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

 



Hi Niklas,

Thank you for the patch.

On Fri, Jun 06, 2025 at 08:25:56PM +0200, Niklas Söderlund wrote:
> When the transition of Gen2 to use groups are complete the platform
> specific information can be retrieved from the group instead of being
> duplicated in each VIN's private data structure.
> 
> Prepare for this by already adding the information to the group
> structure so it can be used without first having to find the group from
> a VIN instances private data.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>

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

> ---
> * Changes since v4
> - New in v5.
> ---
>  drivers/media/platform/renesas/rcar-vin/rcar-core.c | 1 +
>  drivers/media/platform/renesas/rcar-vin/rcar-vin.h  | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-core.c b/drivers/media/platform/renesas/rcar-vin/rcar-core.c
> index cf5830d7d7b1..66efe075adae 100644
> --- a/drivers/media/platform/renesas/rcar-vin/rcar-core.c
> +++ b/drivers/media/platform/renesas/rcar-vin/rcar-core.c
> @@ -156,6 +156,7 @@ static int rvin_group_get(struct rvin_dev *vin,
>  		}
>  
>  		kref_init(&group->refcount);
> +		group->info = vin->info;
>  
>  		rvin_group_data = group;
>  	}
> diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-vin.h b/drivers/media/platform/renesas/rcar-vin/rcar-vin.h
> index 83d1b2734c41..313703cd1103 100644
> --- a/drivers/media/platform/renesas/rcar-vin/rcar-vin.h
> +++ b/drivers/media/platform/renesas/rcar-vin/rcar-vin.h
> @@ -242,6 +242,7 @@ struct rvin_dev {
>   * @lock:		protects the count, notifier, vin and csi members
>   * @count:		number of enabled VIN instances found in DT
>   * @notifier:		group notifier for CSI-2 async connections
> + * @info:		Platform dependent information about the VIN instances
>   * @vin:		VIN instances which are part of the group
>   * @link_setup:		Callback to create all links for the media graph
>   * @remotes:		array of pairs of async connection and subdev pointers
> @@ -255,6 +256,7 @@ struct rvin_group {
>  	struct mutex lock;
>  	unsigned int count;
>  	struct v4l2_async_notifier notifier;
> +	const struct rvin_info *info;
>  	struct rvin_dev *vin[RCAR_VIN_NUM];
>  
>  	int (*link_setup)(struct rvin_dev *vin);

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