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: 13653037 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 0EAF3C4345F for ; Fri, 3 May 2024 15:13:13 +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: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:In-Reply-To:References: List-Owner; bh=c+FjofnoHzzEA9J76hov9pPPp7zIQZh8BWx0Uk6KCnY=; b=w7FWQko6PSlqD5 zBwx9ZxX49n1oZhH763wQL/vxodTxkyZWbBeqRQNBf3JNFJlQ1zk/q3PkJEwmq3O9HzskKy8IVc4X p06lFq6ZCesxxK47Ct66bIySLuwMdOb6Nfi0e9JO76NtiZpfagOqIsKaG/sVFs4h/oij8kxb07t1J tgrjpHfQAJU2uDs3gBdzC2/VJ6vMxE305C/kYF1kIdcDzPfiJ/HT0u3FwR+XB0XFgb3qeDlmmRAUk JhvfxqPtDxANDgs4wUWElpMFJbx6pQABaO9OuzPHqASQVQWUAjQwl8IZL7JRHmLzpr/+0TOftFElD OCEDoXRgVauxok7KA39w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2uao-0000000Gzkh-2su9; Fri, 03 May 2024 15:12:58 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2uZx-0000000GyyM-0Us4 for linux-arm-kernel@lists.infradead.org; Fri, 03 May 2024 15:12:14 +0000 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: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240503_081205_595725_A8859C6F X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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