[PATCH 0/3] drm: analogix_dp: Handle runtime resume failures

From: Nikita Zhandarovich

Date: Wed Nov 25 2026 - 06:43:51 EST


This series addresses the unchecked return from phy_power_on() in
analogix_dp_resume(). The driver currently continues controller
initialization and reports a successful resume even if PHY power-on
fails. Patch 3 checks platform power-on and PHY setup errors and returns
them after unwinding the resources acquired by the resume attempt.

Propagating these errors safely requires two preparatory fixes. The
bridge setup and AUX paths currently ignore runtime-resume failures and
may still access hardware after a failed resume. Patch 1 checks resume
in those paths and avoids retaining a PM usage reference when it fails.

On Rockchip, the platform power_on() callback leaves pclk enabled if
setting eDP mode fails. Patch 2 fixes this partial rollback, allowing
patch 3 to return a platform power-on error without invoking power_off()
after an unsuccessful power_on().

Patch 3 depends on patches 1 and 2 and on the Exynos pipe-clock conversion
posted by Alexandre Marquet [1] (used in the development of this series),
or Marek Szyprowski's alternative [2]. Both move the pipe clock to
encoder enable/disable and remove the platform power callbacks.
Neither Exynos patch is included in this three-patch series; only one
of the two alternatives is required.

Important note on pending work: patch 1 overlaps with the pending
analog-init cleanups [3][4] and may require include-block adjustments when
combined with [5][6]. The bridge-detect PM fix [7] is complementary to
this series. Also, patch 3 is built on Pengpeng Hou's earlier
proposal [8] and addresses the platform power-on and
unbalanced-clock-cleanup concern raised in its review [9].

AI assistance: Codex was used to analyse the error paths, help draft the
changes and commit messages, and prepare this cover letter.

[1] https://lore.kernel.org/all/20261027-drm-misc-next-manta-auxbus-v1-2-3a45c3cf531d@xxxxxxxxxxxx/
[2] https://lore.kernel.org/all/20261119223843.3694307-1-m.szyprowski@xxxxxxxxxxx/
[3] https://lore.kernel.org/all/20261120083302.3719465-1-m.szyprowski@xxxxxxxxxxx/
[4] https://lore.kernel.org/all/20261111094845.1673-1-laixiangwu@xxxxxxxxxxxxxxxxxxxx/
[5] https://lore.kernel.org/all/20261113082305.541652-1-damon.ding@xxxxxxxxxxxxxx/
[6] https://lore.kernel.org/all/20261111164243.77775-2-blum@xxxxxxxxxx/
[7] https://lore.kernel.org/all/20261119103742.1161858-1-m.szyprowski@xxxxxxxxxxx/
[8] https://lore.kernel.org/all/20260828091334.5793-1-pengpeng@xxxxxxxxxxx/
[9] https://lore.kernel.org/all/20260828092624.9054B1F000E9@xxxxxxxxxxxxxxx/

Nikita Zhandarovich (3):
drm/bridge: analogix_dp: Check runtime resume before accessing
hardware
drm/rockchip: analogix_dp: Disable pclk if setting eDP mode fails
drm/bridge: analogix_dp: Propagate errors from runtime resume

.../drm/bridge/analogix/analogix_dp_core.c | 36 +++++++++++++++----
.../gpu/drm/rockchip/analogix_dp-rockchip.c | 4 ++-
2 files changed, 32 insertions(+), 8 deletions(-)

--
2.43.0