intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/dp: On DPCD init/caps wake the DPRx
@ 2026-02-19  9:43 Arun R Murthy
  2026-02-19 10:48 ` ✓ i915.CI.BAT: success for " Patchwork
                   ` (14 more replies)
  0 siblings, 15 replies; 44+ messages in thread
From: Arun R Murthy @ 2026-02-19  9:43 UTC (permalink / raw)
  To: intel-gfx, intel-xe; +Cc: imre.deak, suraj.kandpal, Arun R Murthy

Before reading the DPCD caps for eDP wake the sink device and for DP
after reading the lttpr caps and before reading the dpcd caps wake up
the sink device.

Closes: https://issues.redhat.com/browse/RHEL-120913
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c       | 41 +++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_dp.h       |  1 +
 .../drm/i915/display/intel_dp_link_training.c |  3 ++
 3 files changed, 45 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 454e6144ee4e..2fbb947e6cc8 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4705,6 +4705,45 @@ intel_edp_set_sink_rates(struct intel_dp *intel_dp)
 	intel_edp_set_data_override_rates(intel_dp);
 }
 
+void intel_dp_wake_sink(struct intel_dp *intel_dp)
+{
+	u8 value = 0;
+	int ret = 0, try = 0;
+
+	intel_dp_dpcd_set_probe(intel_dp, false);
+
+	/*
+	 * Wake the sink device
+	 * Spec DP2.1 section 2.3.1.2 if AUX CH is powered down by writing 0x02
+	 * to DP_SET_POWER dpcd reg, 1ms time would be required to wake it up
+	 */
+	while (try < 10 && ret < 0) {
+		ret = drm_dp_dpcd_readb(&intel_dp->aux, DP_SET_POWER, &value);
+		/*
+		 * If sink is in D3 then it may not respond to the AUX tx so
+		 * wake it up to D3_AUX_ON state
+		 */
+		if (value == DP_SET_POWER_D3) {
+			/* After setting to D0 need a min of 1ms to wake(Spec DP2.1 sec 2.3.1.2) */
+			drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER,
+					   DP_SET_POWER_D0);
+			fsleep(1000);
+			drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER,
+					   DP_SET_POWER_D3_AUX_ON);
+			break;
+		} else if ((value == DP_SET_POWER_D0) ||
+			   (value == DP_SET_POWER_D3_AUX_ON)) {
+			/* if in D0 or D3_AUX_ON exit */
+			break;
+		}
+		/* Sink in D0 or even if read fails a minimum of 1ms is required to wake and respond */
+		fsleep(1000);
+		try++;
+	}
+
+	intel_dp_dpcd_set_probe(intel_dp, true);
+}
+
 static bool
 intel_edp_init_dpcd(struct intel_dp *intel_dp, struct intel_connector *connector)
 {
@@ -4713,6 +4752,8 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp, struct intel_connector *connector
 	/* this function is meant to be called only once */
 	drm_WARN_ON(display->drm, intel_dp->dpcd[DP_DPCD_REV] != 0);
 
+	intel_dp_wake_sink(intel_dp);
+
 	if (drm_dp_read_dpcd_caps(&intel_dp->aux, intel_dp->dpcd) != 0)
 		return false;
 
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
index b0bbd5981f57..3f16077c0cc7 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -232,6 +232,7 @@ bool intel_dp_dotclk_valid(struct intel_display *display,
 bool intel_dp_joiner_candidate_valid(struct intel_connector *connector,
 				     int hdisplay,
 				     int num_joined_pipes);
+void intel_dp_wake_sink(struct intel_dp *intel_dp);
 
 #define for_each_joiner_candidate(__connector, __mode, __num_joined_pipes) \
 	for ((__num_joined_pipes) = 1; (__num_joined_pipes) <= (I915_MAX_PIPES); (__num_joined_pipes)++) \
diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
index 54c585c59b90..cbb712ea9f60 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
@@ -270,6 +270,9 @@ int intel_dp_init_lttpr_and_dprx_caps(struct intel_dp *intel_dp)
 		lttpr_count = intel_dp_init_lttpr(intel_dp, dpcd);
 	}
 
+	/* After reading LTTPR wake up the sink before reading DPRX caps */
+	intel_dp_wake_sink(intel_dp);
+
 	/*
 	 * The DPTX shall read the DPRX caps after LTTPR detection, so re-read
 	 * it here.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 44+ messages in thread
* Re: [PATCHv4] drm/i915/dp: On DPCD init wake the DPRx for eDP
@ 2026-09-07 20:53 Metrical revel
  2026-09-08  3:20 ` Murthy, Arun R
  0 siblings, 1 reply; 44+ messages in thread
From: Metrical revel @ 2026-09-07 20:53 UTC (permalink / raw)
  To: arun.r.murthy; +Cc: intel-gfx

Hi Arun,

(Replying by email since patchwork doesn't support direct comments —
apologies if this duplicates my GitLab note.)

Noticed v5's i915.CI.BAT is passing now — good sign the build issue
is resolved.

Before I compile and test v5 on my hardware for a Tested-by, I
wanted to flag something from i915.CI.Full that looks a bit more
specific than the usual noise we saw on v1/v3:

igt@kms_cursor_crc@cursor-rapid-movement-128x128@pipe-a-edp-1:
    shard-mtlp: PASS -> ABORT +1 other test abort

igt@kms_cursor_crc@cursor-rapid-movement-128x128@pipe-d-edp-1:
    shard-mtlp: PASS -> DMESG-WARN

Unlike the earlier CI flags (which were all in unrelated subsystems
like gem_ccs/kms_plane_lowres), these two are both on eDP-1
specifically, same shard, same test family, both regressing from
PASS. Is this known/expected noise on shard-mtlp, or worth digging
into given it touches the exact connector this patch modifies?

Happy to go ahead and test v5 on my hardware for a Tested-by either way —
just didn't want to give a Tested-by without flagging this first.

Thanks,
Mathias

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

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

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-19  9:43 [PATCH] drm/i915/dp: On DPCD init/caps wake the DPRx Arun R Murthy
2026-02-19 10:48 ` ✓ i915.CI.BAT: success for " Patchwork
2026-02-19 14:36 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-19 14:53 ` [PATCH] " Ville Syrjälä
2026-02-19 15:12   ` Murthy, Arun R
2026-02-20  3:11     ` Ville Syrjälä
2026-02-20  5:01       ` Murthy, Arun R
2026-02-24  8:24         ` Ville Syrjälä
2026-02-24  8:48           ` Murthy, Arun R
2026-02-24  7:48 ` [PATCHv2] " Arun R Murthy
2026-02-24 14:50   ` Imre Deak
2026-02-25  3:33     ` Murthy, Arun R
2026-02-25  5:58       ` Murthy, Arun R
2026-03-02  7:57       ` Imre Deak
2026-03-02  9:04         ` Murthy, Arun R
2026-03-02  9:20           ` Imre Deak
2026-03-10  8:52             ` Murthy, Arun R
2026-02-24  9:02 ` ✓ i915.CI.BAT: success for drm/i915/dp: On DPCD init/caps wake the DPRx (rev2) Patchwork
2026-02-24 10:50 ` ✓ i915.CI.Full: " Patchwork
2026-02-25  6:11 ` [PATCHv3] drm/i915/dp: On DPCD init wake the DPRx for eDP Arun R Murthy
2026-08-05  9:58   ` Murthy, Arun R
2026-08-11 12:17     ` Kandpal, Suraj
2026-09-07  9:00       ` Murthy, Arun R
2026-09-07  9:04         ` Kandpal, Suraj
2026-09-07  9:06           ` Murthy, Arun R
2026-02-25  7:17 ` ✗ i915.CI.BAT: failure for drm/i915/dp: On DPCD init/caps wake the DPRx (rev3) Patchwork
2026-08-05 10:06 ` ✗ Fi.CI.BUILD: failure for drm/i915/dp: On DPCD init/caps wake the DPRx (rev4) Patchwork
2026-09-07  9:27 ` [PATCHv4] drm/i915/dp: On DPCD init wake the DPRx for eDP Arun R Murthy
2026-09-07  9:37   ` Kandpal, Suraj
2026-09-08  3:54     ` Murthy, Arun R
2026-09-08  4:13       ` Kandpal, Suraj
2026-09-07  9:40   ` sashiko-bot
2026-09-07 10:33   ` Jani Nikula
2026-09-08  4:36     ` Murthy, Arun R
2026-09-07 12:17 ` ✓ i915.CI.BAT: success for drm/i915/dp: On DPCD init/caps wake the DPRx (rev5) Patchwork
2026-09-07 19:37 ` ✗ i915.CI.Full: failure " Patchwork
2026-09-08 16:12 ` [PATCHv5] drm/i915/dp: On DPCD init wake the DPRx for eDP Arun R Murthy
2026-09-08 16:25   ` sashiko-bot
2026-09-08 17:33 ` ✓ i915.CI.BAT: success for drm/i915/dp: On DPCD init/caps wake the DPRx (rev6) Patchwork
2026-09-09  9:27 ` ✗ i915.CI.Full: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2026-09-07 20:53 [PATCHv4] drm/i915/dp: On DPCD init wake the DPRx for eDP Metrical revel
2026-09-08  3:20 ` Murthy, Arun R
2026-09-10  4:43   ` Metrical revel
2026-09-10  7:14     ` Murthy, Arun R

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).