From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3182333509E; Fri, 17 Oct 2025 15:35:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760715347; cv=none; b=sQpQBbfAjtUp1WJpGj7I1JY+ped4NDp4vXvR2lakYQHnq/0LooZXIVsyHNkQ8DnQETsHTlG0t7ycBjgeZXJeEHM/jlq2ePFSRg8NCP+g/wJmHQ5Nje40muCCVpJlweFnZ6eraOWt5+LwMt0b8Et/8STed4RpXxV/zESA+xickYw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760715347; c=relaxed/simple; bh=Mj2Vj5YwDG6G402LwTownvMoXurLN+6hVDqDstCj030=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g3mKXWeu4+BFJe5c+g/YFSm9bil2p5TtjgVt/oxVLE8QcxVqMo45RBCfJBwv9f+Bb6opUVJ+oJGg0Kjnirn49UZq2XCkSh7gmxeFBn856IrryfvARbre2TY/HF13yBPPFcqcGHeuoy90IIwvOsWQyKBhMtIzq68Qt8CX7sm5kT0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NoA32IsU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="NoA32IsU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0293C4CEFE; Fri, 17 Oct 2025 15:35:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1760715347; bh=Mj2Vj5YwDG6G402LwTownvMoXurLN+6hVDqDstCj030=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NoA32IsUEDRy07ddok2+Q+9B2KKKBI4OU7T9bIkxbDYQjANfqB7n+cQqk6XsAo+3y lYotqfM56VRCDwgZkJTi5wMvjGo+y+ZFmO3XfaO8gN3tvoq4Rn//2iTr/7g77g6iYy iyhAP5dfEZ0DYJAr1QZ4M2Q/9CJ0bztF53qmX6vI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Devarsh Thakkar , Jai Luthra , Sakari Ailus , Hans Verkuil , Yemike Abhilash Chandra Subject: [PATCH 6.17 184/371] media: ti: j721e-csi2rx: Fix source subdev link creation Date: Fri, 17 Oct 2025 16:52:39 +0200 Message-ID: <20251017145208.582621566@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251017145201.780251198@linuxfoundation.org> References: <20251017145201.780251198@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jai Luthra commit 3e743cd0a73246219da117ee99061aad51c4748c upstream. 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@vger.kernel.org Reviewed-by: Devarsh Thakkar Tested-by: Yemike Abhilash Chandra (on SK-AM68) Signed-off-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c @@ -52,6 +52,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. */ @@ -426,8 +428,9 @@ static int csi_async_notifier_complete(s 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);