From patchwork Fri May 3 15:11:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 13653017 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 00BCBC4345F for ; Fri, 3 May 2024 15:12:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 16A2A11309E; Fri, 3 May 2024 15:12:10 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) by gabe.freedesktop.org (Postfix) with ESMTPS id E4309113097 for ; Fri, 3 May 2024 15:12:07 +0000 (UTC) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s2uZR-0004Br-K7; Fri, 03 May 2024 17:11:33 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1s2uZN-00FjHY-C5; Fri, 03 May 2024 17:11:29 +0200 From: Lucas Stach To: =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Sandy Huang , Jingoo Han , Inki Dae , Seung-Woo Kim , Kyungmin Park , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, kernel@pengutronix.de, patchwork-lst@pengutronix.de Subject: [PATCH 00/14] improve Analogix DP AUX channel handling Date: Fri, 3 May 2024 17:11:15 +0200 Message-Id: <20240503151129.3901815-1-l.stach@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Currently the AUX channel support in the Analogix DP driver is severely limited as the AUX block of the bridge is only initialized when the video link is to be enabled. This is okay for the purposes of link training, but does not allow to detect displays by probing for EDID. This series reworks the driver to allow AUX transactions before the video link is active. As this requires to rework some of the controller initialization and also handling of both internal and external clocks, the series includes quite a few changes to add better runtime PM handling. Lucas Stach (14): drm/bridge: analogix_dp: remove unused platform power_on_end callback drm/rockchip: analogix_dp: add runtime PM handling drm/bridge: analogix_dp: register AUX bus after enabling runtime PM drm/bridge: analogix_dp: handle clock via runtime PM drm/bridge: analogix_dp: remove unused analogix_dp_remove drm/bridge: analogix_dp: remove clk handling from analogix_dp_set_bridge drm/bridge: analogix_dp: move platform and PHY power handling into runtime PM drm/bridge: analogix_dp: move basic controller init into runtime PM drm/bridge: analogix_dp: remove PLL lock check from analogix_dp_config_video drm/bridge: analogix_dp: move macro reset after link bandwidth setting drm/bridge: analogix_dp: don't wait for PLL lock too early drm/bridge: analogix_dp: simplify and correct PLL lock checks drm/bridge: analogix_dp: only read AUX status when an error occured drm/bridge: analogix_dp: handle AUX transfer timeouts .../drm/bridge/analogix/analogix_dp_core.c | 196 ++++++++---------- .../drm/bridge/analogix/analogix_dp_core.h | 7 +- .../gpu/drm/bridge/analogix/analogix_dp_reg.c | 38 ++-- .../gpu/drm/bridge/analogix/analogix_dp_reg.h | 9 + drivers/gpu/drm/exynos/exynos_dp.c | 5 +- .../gpu/drm/rockchip/analogix_dp-rockchip.c | 26 +-- include/drm/bridge/analogix_dp.h | 4 +- 7 files changed, 120 insertions(+), 165 deletions(-) Tested-by: Heiko Stuebner