From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DC6EC9832F for ; Mon, 28 Sep 2026 08:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HaX7kEdyNxvin5SFfesedLCwJmZxLmmfeJsjZFt2ncQ=; b=1DkJbMUYhvpgm+ 9nykk0zUGdstlFrqqFkH92wSTjs4IMSG/H+xvmy6mQRm59PYOg1zKLNsXWIHnJ/dv/wYT1U1jmxLe q3UhaJTeJkbqaWS/hk6tomtHojObygUENsV8eVgQ1X7nEIPtDWBUP35A91hw/hSOGrUg9rVCqV5Qc 2FSMrIzjEAQlXWHuSNb6XkzYt9j1w548tzbzzQsLY1f4MFqflv4IJO7Zxe8lPyGcchxgBBYNTzVKX PZY08A2perOggDQvVKA6XRvQMuFh+H4NbPL/35+/NZXKT2umVqV3TSYaLAzLxMn6wNLv3P4IZ6Sx1 nomWSfPqvpcuQJgAnsjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xB6bC-0000000045t-2uUN; Mon, 28 Sep 2026 08:20:34 +0000 Received: from mail-m12772.qiye.163.com ([115.236.127.72]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xB6ay-000000003qR-1gl7; Mon, 28 Sep 2026 08:20:22 +0000 Received: from zyb-HP-ProDesk-680-G2-MT.. (unknown [61.154.14.86]) by smtp.qiye.163.com (Hmail) with ESMTP id 4f5398eae; Mon, 28 Sep 2026 16:15:15 +0800 (GMT+08:00) From: Damon Ding To: Andrzej Hajda , Neil Armstrong , Robert Foss , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jingoo Han , Inki Dae , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Peter Griffin , Alim Akhtar , Heiko Stuebner Cc: Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Dmitry Baryshkov , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, Damon Ding Subject: [PATCH v3 11/14] drm/bridge: analogix_dp: Use bridge->next_bridge instead of plat_data field Date: Mon, 28 Sep 2026 16:14:15 +0800 Message-Id: <20260928081418.3605775-12-damon.ding@rock-chips.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260928081418.3605775-1-damon.ding@rock-chips.com> References: <20260928081418.3605775-1-damon.ding@rock-chips.com> MIME-Version: 1.0 X-HM-Tid: 0aa0e7151b5c03a8kunm323e2b5437cf7b X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkZSE8aVhgaSR1PGUlCSEJCSFYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlNSlVKTk9VSk9VQ01ZV1kWGg8SFR0UWUFZT0tIVUpLSE pOTE5VSktLVUpCS0tZBg++ DKIM-Signature: a=rsa-sha256; b=i9W2wGYKXGV2T4isZVlWgnjW8rWtA678+S3YvACjHBDDYhjS6UrRHGQSlYLQJnX6ahGJWCsKslg21Q9bxQLm779HpsVH5oeaFGi9/ItpNoROmSlXGDBPcNSuL1cwZzs3apoDp1Yzzix5u8tRvMnXcBj+tk5qPdcnwhyfJdBLmQE=; s=default; c=relaxed/relaxed; d=rock-chips.com; v=1; bh=j11Dmmvwc4sMN9cMfiaTCR0rnZ/rVwqt5MGQa88GIlk=; h=date:mime-version:subject:message-id:from; X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260928_012020_695192_98D92411 X-CRM114-Status: GOOD ( 17.09 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The DRM bridge core provides a standard next_bridge field in struct drm_bridge for chaining downstream bridges. Use dp->bridge.next_bridge consistently inside the analogix_dp driver and drop the separate dp->plat_data->next_bridge field. The next bridge is now resolved in analogix_dp_aux_done_probing(): for Exynos platforms with legacy display-timings a display mode bridge is created and used directly, skipping the endpoint lookup; otherwise the remote endpoint bridge (panel or bridge) is looked up via of_drm_get_bridge_by_endpoint(). The reference returned by of_drm_get_bridge_by_endpoint() is transferred to bridge->next_bridge, and an explicit reference is taken for the devm-managed display mode bridge; the bridge core automatically puts bridge->next_bridge at bridge destroy time, pairing with both. Suggested-by: Heiko Stuebner Link: https://lore.kernel.org/all/5609825.iZASKD2KPV@diego/ Signed-off-by: Damon Ding --- .../drm/bridge/analogix/analogix_dp_core.c | 44 +++++++++---------- drivers/gpu/drm/exynos/exynos_dp.c | 15 +------ include/drm/bridge/analogix_dp.h | 1 - 3 files changed, 23 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 38857508d939..853b6a6a7fe4 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -32,6 +33,8 @@ #include #include +#include