Skip to contentSkip to conversation

drm/i915/psr: Print PSR_STATUS when PSR idle wait times out.

PATCH In review Dhinakaran Pandiyan 3 participants 3 messages Jul 26, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/psr: Print PSR_STATUS when PSR idle wait times out.

Knowing the status of the PSR HW state machine is useful for debug, especially since we are seeing errors with PSR2 in CI.

---
 drivers/gpu/drm/i915/intel_drv.h    | 3 ++-
 drivers/gpu/drm/i915/intel_psr.c    | 9 ++++++---
 drivers/gpu/drm/i915/intel_sprite.c | 6 ++++--
 3 files changed, 12 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_drv.h +2 -1
index c275f91244a6..658411680683 100644
@@ -1938,7 +1938,8 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
 void intel_psr_irq_control(struct drm_i915_private *dev_priv, bool debug);
 void intel_psr_irq_handler(struct drm_i915_private *dev_priv, u32 psr_iir);
 void intel_psr_short_pulse(struct intel_dp *intel_dp);
-int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state);
+int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state,
+			    u32 *out_value);
 
 /* intel_runtime_pm.c */
 int intel_power_domains_init(struct drm_i915_private *);
drivers/gpu/drm/i915/intel_psr.c +6 -3
index 4bd5768731ee..5686ddaa6a72 100644
@@ -717,7 +717,8 @@ void intel_psr_disable(struct intel_dp *intel_dp,
 	cancel_work_sync(&dev_priv->psr.work);
 }
 
-int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state)
+int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state,
+			    u32 *out_value)
 {
 	struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->base.crtc);
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
@@ -750,8 +751,10 @@ int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state)
 	 * 6 ms of exit training time + 1.5 ms of aux channel
 	 * handshake. 50 msec is defesive enough to cover everything.
 	 */
-	return intel_wait_for_register(dev_priv, reg, mask,
-				       EDP_PSR_STATUS_STATE_IDLE, 50);
+
+	return __intel_wait_for_register(dev_priv, reg, mask,
+					 EDP_PSR_STATUS_STATE_IDLE, 2, 50,
+					 out_value);
 }
 
 static bool __psr_wait_for_idle_locked(struct drm_i915_private *dev_priv)
drivers/gpu/drm/i915/intel_sprite.c +4 -2
index f7026e887fa9..774bfb03c5d9 100644
@@ -83,6 +83,7 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
 	bool need_vlv_dsi_wa = (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
 		intel_crtc_has_type(new_crtc_state, INTEL_OUTPUT_DSI);
 	DEFINE_WAIT(wait);
+	u32 psr_status;
 
 	vblank_start = adjusted_mode->crtc_vblank_start;
 	if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
@@ -104,8 +105,9 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
 	 * VBL interrupts will start the PSR exit and prevent a PSR
 	 * re-entry as well.
 	 */
-	if (intel_psr_wait_for_idle(new_crtc_state))
-		DRM_ERROR("PSR idle timed out, atomic update may fail\n");
+	if (intel_psr_wait_for_idle(new_crtc_state, &psr_status))
+		DRM_ERROR("PSR idle timed out 0x%x, atomic update may fail\n",
+			  psr_status);
 
 	local_irq_disable();
 
Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: failure for drm/i915/psr: Print PSR_STATUS when PSR idle wait times out.

== Series Details ==

== Series Details ==

Series: drm/i915/psr: Print PSR_STATUS when PSR idle wait times out.
URL : https://patchwork.freedesktop.org/series/47262/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4547 -> Patchwork_9773 =

== Summary - FAILURE ==

Serious unknown changes coming with Patchwork_9773 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_9773, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/47262/revisions/1/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_9773:

=== IGT changes ===

    ==== Possible regressions ====

    {igt@kms_psr@cursor_plane_move}:
      fi-cnl-psr:         NOTRUN -> DMESG-FAIL +2

    {igt@kms_psr@primary_mmap_gtt}:
      fi-cnl-psr:         NOTRUN -> DMESG-WARN

== Known issues ==

Here are the changes found in Patchwork_9773 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-no-display:
      fi-cnl-psr:         NOTRUN -> DMESG-WARN (fdo#105395) +5

    igt@drv_selftest@live_workarounds:
      {fi-cfl-8109u}:     PASS -> DMESG-FAIL (fdo#107292)
      fi-cnl-psr:         NOTRUN -> DMESG-FAIL (fdo#107292)

    igt@gem_exec_suspend@basic-s3:
      {fi-skl-caroline}:  NOTRUN -> INCOMPLETE (fdo#104108)

    igt@gem_mmap@basic-small-bo:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#105719)

    igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
      fi-glk-j4005:       PASS -> FAIL (fdo#103481)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-skl-6700k2:      PASS -> FAIL (fdo#103191)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_hangcheck:
      fi-bxt-dsi:         DMESG-FAIL (fdo#106560) -> PASS

    igt@gem_exec_create@basic:
      fi-glk-j4005:       DMESG-WARN (fdo#106745) -> PASS

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#105395 https://bugs.freedesktop.org/show_bug.cgi?id=105395
fdo#105719 https://bugs.freedesktop.org/show_bug.cgi?id=105719
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106745 https://bugs.freedesktop.org/show_bug.cgi?id=106745
fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292

== Participating hosts (48 -> 44) ==

Additional (3): fi-byt-j1900 fi-skl-caroline fi-cnl-psr
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-kbl-8809g fi-byt-clapper

== Build changes ==

* Linux: CI_DRM_4547 -> Patchwork_9773

CI_DRM_4547: 0a7ab192a697e951b2404f3c1ce42c5fa74f9ed1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4575: fe908a01012c9daafafb3410b9407725ca9d4f21 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9773: 7129cce8ecf866f8d59c850486d9ce3b7e49d274 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

7129cce8ecf8 drm/i915/psr: Print PSR_STATUS when PSR idle wait times out.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9773/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Dhinakaran Pandiyan
Quoted 5 lines · Dhinakaran Pandiyan

Knowing the status of the PSR HW state machine is useful for debug, especially since we are seeing errors with PSR2 in CI.

Quoted 74 lines
---
 drivers/gpu/drm/i915/intel_drv.h    | 3 ++-
 drivers/gpu/drm/i915/intel_psr.c    | 9 ++++++---
 drivers/gpu/drm/i915/intel_sprite.c | 6 ++++--
 3 files changed, 12 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_drv.h +2 -1
index c275f91244a6..658411680683 100644
@@ -1938,7 +1938,8 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
 void intel_psr_irq_control(struct drm_i915_private *dev_priv, bool debug);
 void intel_psr_irq_handler(struct drm_i915_private *dev_priv, u32 psr_iir);
 void intel_psr_short_pulse(struct intel_dp *intel_dp);
-int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state);
+int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state,
+			    u32 *out_value);
 
 /* intel_runtime_pm.c */
 int intel_power_domains_init(struct drm_i915_private *);
drivers/gpu/drm/i915/intel_psr.c +6 -3
index 4bd5768731ee..5686ddaa6a72 100644
@@ -717,7 +717,8 @@ void intel_psr_disable(struct intel_dp *intel_dp,
 	cancel_work_sync(&dev_priv->psr.work);
 }
 
-int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state)
+int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state,
+			    u32 *out_value)
 {
 	struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->base.crtc);
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
@@ -750,8 +751,10 @@ int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state)
 	 * 6 ms of exit training time + 1.5 ms of aux channel
 	 * handshake. 50 msec is defesive enough to cover everything.
 	 */
-	return intel_wait_for_register(dev_priv, reg, mask,
-				       EDP_PSR_STATUS_STATE_IDLE, 50);
+
+	return __intel_wait_for_register(dev_priv, reg, mask,
+					 EDP_PSR_STATUS_STATE_IDLE, 2, 50,
+					 out_value);
 }
 
 static bool __psr_wait_for_idle_locked(struct drm_i915_private *dev_priv)
drivers/gpu/drm/i915/intel_sprite.c +4 -2
index f7026e887fa9..774bfb03c5d9 100644
@@ -83,6 +83,7 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
 	bool need_vlv_dsi_wa = (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
 		intel_crtc_has_type(new_crtc_state, INTEL_OUTPUT_DSI);
 	DEFINE_WAIT(wait);
+	u32 psr_status;
 
 	vblank_start = adjusted_mode->crtc_vblank_start;
 	if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
@@ -104,8 +105,9 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
 	 * VBL interrupts will start the PSR exit and prevent a PSR
 	 * re-entry as well.
 	 */
-	if (intel_psr_wait_for_idle(new_crtc_state))
-		DRM_ERROR("PSR idle timed out, atomic update may fail\n");
+	if (intel_psr_wait_for_idle(new_crtc_state, &psr_status))
+		DRM_ERROR("PSR idle timed out 0x%x, atomic update may fail\n",
+			  psr_status);
 
 	local_irq_disable();
 
Signature · 1 line
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx