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

Nikita Zhandarovich posted 3 patches an hour ago
.../drm/bridge/analogix/analogix_dp_core.c    | 36 +++++++++++++++----
.../gpu/drm/rockchip/analogix_dp-rockchip.c   | 11 ++++--
2 files changed, 37 insertions(+), 10 deletions(-)
[PATCH v2 0/3] drm: analogix_dp: Handle runtime resume failures
Posted by Nikita Zhandarovich an hour ago
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@a-marquet.fr/
[2] https://lore.kernel.org/all/20261119223843.3694307-1-m.szyprowski@samsung.com/
[3] https://lore.kernel.org/all/20261120083302.3719465-1-m.szyprowski@samsung.com/
[4] https://lore.kernel.org/all/20261111094845.1673-1-laixiangwu@cmss.chinamobile.com/
[5] https://lore.kernel.org/all/20261113082305.541652-1-damon.ding@rock-chips.com/
[6] https://lore.kernel.org/all/20261111164243.77775-2-blum@kernel.org/
[7] https://lore.kernel.org/all/20261119103742.1161858-1-m.szyprowski@samsung.com/
[8] https://lore.kernel.org/all/20260828091334.5793-1-pengpeng@iscas.ac.cn/
[9] https://lore.kernel.org/all/20260828092624.9054B1F000E9@smtp.kernel.org/

v1 -> v2: Use a better Fixes: tag in patch 3. Also, use goto-based error
pathing instead in patch 2 to avoid repeating calls.

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   | 11 ++++--
 2 files changed, 37 insertions(+), 10 deletions(-)

-- 
2.43.0