lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7a6966e8-dbbe-49de-84e4-127c22c7ca33@ti.com>
Date: Thu, 27 Mar 2025 15:44:09 +0530
From: Devarsh Thakkar <devarsht@...com>
To: Jai Luthra <jai.luthra@...asonboard.com>,
        Jai Luthra
	<jai.luthra@...ux.dev>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans
 Verkuil <hverkuil@...all.nl>,
        Tomi Valkeinen
	<tomi.valkeinen@...asonboard.com>,
        Sakari Ailus
	<sakari.ailus@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>
CC: Rishikesh Donadkar <r-donadkar@...com>,
        Vaishnav Achath
	<vaishnav.a@...com>,
        Changhuang Liang <changhuang.liang@...rfivetech.com>,
        <linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <stable@...r.kernel.org>
Subject: Re: [PATCH 3/6] media: ti: j721e-csi2rx: Fix source subdev link
 creation

On 24/03/25 17:31, Jai Luthra wrote:
> We don't use OF ports and remote-endpoints to connect the CSI2RX bridge
> and this device in the device tree, thus it is wrong to use
> v4l2_create_fwnode_links_to_pad() to create the media graph link between
> the two.
> 
> It works out on accident, as neither the source nor the sink implement
> the .get_fwnode_pad() callback, and the framework helper falls back on
> using the first source and sink pads to create the link between them.
> 
> Instead, manually create the media link from the first source pad of the
> bridge to the first sink pad of the J721E CSI2RX.
> 
> Fixes: b4a3d877dc92 ("media: ti: Add CSI2RX support for J721E")
> Cc: stable@...r.kernel.org
> Signed-off-by: Jai Luthra <jai.luthra@...asonboard.com>

Reviewed-by: Devarsh Thakkar <devarsht@...com>

Regards
Devarsh
> ---
>   drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
> index 6d406925e092660cb67c04cc2a7e1e10c14e295e..ad51d033b6725426550578bdac1bae8443458f13 100644
> --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
> +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
> @@ -53,6 +53,8 @@
>   #define DRAIN_TIMEOUT_MS		50
>   #define DRAIN_BUFFER_SIZE		SZ_32K
>   
> +#define CSI2RX_BRIDGE_SOURCE_PAD	1
> +
>   struct ti_csi2rx_fmt {
>   	u32				fourcc;	/* Four character code. */
>   	u32				code;	/* Mbus code. */
> @@ -427,8 +429,9 @@ static int csi_async_notifier_complete(struct v4l2_async_notifier *notifier)
>   	if (ret)
>   		return ret;
>   
> -	ret = v4l2_create_fwnode_links_to_pad(csi->source, &csi->pad,
> -					      MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
> +	ret = media_create_pad_link(&csi->source->entity, CSI2RX_BRIDGE_SOURCE_PAD,
> +				    &vdev->entity, csi->pad.index,
> +				    MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
>   
>   	if (ret) {
>   		video_unregister_device(vdev);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ