All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/display: guard intel_alpm_get_error() against non-ALPM sinks
@ 2026-06-11 12:54 Stephen J. Fuhry
  2026-06-11 13:17 ` Hogander, Jouni
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Stephen J. Fuhry @ 2026-06-11 12:54 UTC (permalink / raw)
  To: intel-gfx
  Cc: Jani Nikula, Rodrigo Vivi, Jouni Högander, Animesh Manna,
	intel-xe, dri-devel, Stephen J . Fuhry

intel_alpm_get_error() unconditionally reads DP_RECEIVER_ALPM_STATUS via
AUX from any DP connection that receives a short-pulse interrupt.  However,
alpm_dpcd is only populated by intel_edp_init_dpcd(), so it is zero for
all external (non-eDP) DP and DP-MST connections.  On such connections the
AUX read fails, producing a spurious

  [drm] *ERROR* Error reading ALPM status

and setting sink_alpm_error = true, which is then visible in the ALPM
debug output even on hardware that never enabled ALPM.

intel_alpm_disable() already has the same guard (DISPLAY_VER check plus
!intel_dp->alpm_dpcd); extend the same logic to intel_alpm_get_error() so
it returns early without attempting the AUX transaction when ALPM is not
supported by the sink.

Reproducer: ThinkPad T14 Gen1 (Alder Lake-P / i915 DISPLAY_VER 12) docked
via Lenovo ThinkPad USB-C Dock Gen2 with external DP-MST monitors.  On
every DPMS wake the error fires once on the dock's upstream DP port.

Fixes: 2063174c22da ("drm/i915/lobf: Check for sink error and disable LOBF")
Signed-off-by: Stephen J. Fuhry <fuhrysteve@gmail.com>
---
 drivers/gpu/drm/i915/display/intel_alpm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index a7350ce8e716..4bb0c00741c4 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -611,6 +611,9 @@ bool intel_alpm_get_error(struct intel_dp *intel_dp)
 	u8 val;
 	int r;

+	if (!intel_dp->alpm_dpcd)
+		return false;
+
 	r = drm_dp_dpcd_readb(aux, DP_RECEIVER_ALPM_STATUS, &val);
 	if (r != 1) {
 		drm_err(display->drm, "Error reading ALPM status\n");
--
2.39.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-06-12 13:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11 12:54 [PATCH] drm/i915/display: guard intel_alpm_get_error() against non-ALPM sinks Stephen J. Fuhry
2026-06-11 13:17 ` Hogander, Jouni
2026-06-11 14:02 ` sashiko-bot
2026-06-11 14:49 ` [PATCH] drm/i915/display: fix ALPM error handling in psr_alpm_check() Stephen J. Fuhry
2026-06-11 14:59   ` Hogander, Jouni
2026-06-11 15:45   ` Stephen J. Fuhry
2026-06-12 13:09 ` ✗ LGCI.VerificationFailed: failure for drm/i915/display: guard intel_alpm_get_error() against non-ALPM sinks Patchwork
2026-06-12 13:22 ` ✗ LGCI.VerificationFailed: failure for drm/i915/display: guard intel_alpm_get_error() against non-ALPM sinks (rev2) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.