Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/display: use port not transcoder for PORT_ALPM_CTL
@ 2026-01-09  5:00 Kaushlendra Kumar
  2026-01-09  5:10 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Kaushlendra Kumar @ 2026-01-09  5:00 UTC (permalink / raw)
  To: jani.nikula, rodrigo.vivi, joonas.lahtinen, tursulin, airlied,
	simona
  Cc: intel-gfx, intel-xe, dri-devel, Kaushlendra Kumar

intel_alpm_disable() incorrectly passes cpu_transcoder as the
index to PORT_ALPM_CTL(), which expects an enum port. This
writes to the wrong register, potentially corrupting state on
unrelated ports.

Use dp_to_dig_port(intel_dp)->base.port to access the correct
port-indexed register.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
---
 drivers/gpu/drm/i915/display/intel_alpm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index 6372f533f65b..09ba1c2be16c 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -557,6 +557,7 @@ void intel_alpm_disable(struct intel_dp *intel_dp)
 {
 	struct intel_display *display = to_intel_display(intel_dp);
 	enum transcoder cpu_transcoder = intel_dp->alpm.transcoder;
+	enum port port = dp_to_dig_port(intel_dp)->base.port;
 
 	if (DISPLAY_VER(display) < 20 || !intel_dp->alpm_dpcd)
 		return;
@@ -568,7 +569,7 @@ void intel_alpm_disable(struct intel_dp *intel_dp)
 		     ALPM_CTL_ALPM_AUX_LESS_ENABLE, 0);
 
 	intel_de_rmw(display,
-		     PORT_ALPM_CTL(cpu_transcoder),
+		     PORT_ALPM_CTL(port),
 		     PORT_ALPM_CTL_ALPM_AUX_LESS_ENABLE, 0);
 
 	drm_dbg_kms(display->drm, "Disabling ALPM\n");
-- 
2.34.1


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

end of thread, other threads:[~2026-01-09 10:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09  5:00 [PATCH] drm/i915/display: use port not transcoder for PORT_ALPM_CTL Kaushlendra Kumar
2026-01-09  5:10 ` ✓ CI.KUnit: success for " Patchwork
2026-01-09  5:43 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-09  7:26 ` ✓ Xe.CI.Full: " Patchwork
2026-01-09  8:49 ` [PATCH] " Jani Nikula
2026-01-09 10:07   ` Kumar, Kaushlendra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox