drm/i915/psr: Print PSR_STATUS when PSR idle wait times out.
Subsystems (2)
PATCH 1/3 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
@@ -1947,7 +1947,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
@@ -766,7 +766,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);
@@ -799,8 +800,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
@@ -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.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915/psr: Add missing check for I915_PSR_DEBUG_IRQ bit
We print the last attempted entry and last exit timestamps only when IRQ debug is requested. This check was missed when new debug flags were added in 'commit c44301fce614 ("drm/i915: Allow control of PSR at runtime through debugfs, v6")
debugfs, v6")
--- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -2735,7 +2735,7 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)psr_source_status (dev_priv, m);mutex_unlock (&dev_priv->psr.lock); -if (READ_ONCE (dev_priv->psr.debug)) { +if (READ_ONCE (dev_priv->psr.debug) &I915_PSR_DEBUG_IRQ ) {seq_printf (m,"Last attempted entry at: %lld\n" , dev_priv->psr.last_entry_attempt); seq_printf(m, "Last exit at: %lld\n",
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915/psr: Mask PSR irq bits when re-enabling interrupts.
In reply to Dhinakaran Pandiyangen8_de_irq_postinstall() wasn't masking the IRQ bit before passing the debug flag to psr_irq_control(). This check was missed when new debug bits were defined in 'commit c44301fce614 ("drm/i915: Allow control of PSR at runtime through debugfs, v6")'. Instead of ANDing the irq bit in all the callers, move it to the callee.
v2: Rebased.
debugfs, v6")
--- drivers/gpu/drm/i915/i915_irq.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_psr.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +1 -1
@@ -4048,7 +4048,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)if (IS_HASWELL (dev_priv)) {gen3_assert_iir_is_zero (dev_priv,EDP_PSR_IIR ); -intel_psr_irq_control (dev_priv, dev_priv->psr.debug &I915_PSR_DEBUG_IRQ ); +intel_psr_irq_control (dev_priv, dev_priv->psr.debug); display_mask |=DE_EDP_PSR_INT_HSW ; }
drivers/gpu/drm/i915/intel_drv.h +1 -1
@@ -1944,7 +1944,7 @@ void intel_psr_flush(struct drm_i915_private *dev_priv,void intel_psr_init (struct drm_i915_private *dev_priv);void intel_psr_compute_config (struct intel_dp *intel_dp,struct intel_crtc_state *crtc_state); -void intel_psr_irq_control (struct drm_i915_private *dev_priv,bool debug); +void intel_psr_irq_control (struct drm_i915_private *dev_priv,u32 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,
drivers/gpu/drm/i915/intel_psr.c +3 -3
@@ -79,7 +79,7 @@ static bool intel_psr2_enabled(struct drm_i915_private *dev_priv, } } -void intel_psr_irq_control (struct drm_i915_private *dev_priv,bool debug) +void intel_psr_irq_control (struct drm_i915_private *dev_priv,u32 debug) {u32 debug_mask, mask;
@@ -100,7 +100,7 @@ void intel_psr_irq_control(struct drm_i915_private *dev_priv, bool debug)EDP_PSR_PRE_ENTRY (TRANSCODER_C ); } -if (debug) +if (debug &I915_PSR_DEBUG_IRQ ) mask |= debug_mask;I915_WRITE (EDP_PSR_IMR , ~mask);
@@ -904,7 +904,7 @@ int intel_psr_set_debugfs_mode(struct drm_i915_private *dev_priv,if (crtc) dev_priv->psr.psr2_enabled =intel_psr2_enabled (dev_priv, crtc_state); -intel_psr_irq_control (dev_priv, dev_priv->psr.debug &I915_PSR_DEBUG_IRQ ); +intel_psr_irq_control (dev_priv, dev_priv->psr.debug);if (dev_priv->psr.prepared && enable)intel_psr_enable_locked (dev_priv, crtc_state);
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [CI,1/3] drm/i915/psr: Print PSR_STATUS when PSR idle wait times out.
In reply to Dhinakaran Pandiyan== Series Details ==
== Series Details ==
Series: series starting with [CI,1/3] drm/i915/psr: Print PSR_STATUS when PSR idle wait times out.
URL : https://patchwork.freedesktop.org/series/48520/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4694 -> Patchwork_9985 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48520/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9985:
=== IGT changes ===
==== Warnings ====
{igt@pm_rpm@module-reload}:
fi-hsw-4770r: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_9985 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_frontbuffer_tracking@basic:
{fi-byt-clapper}: PASS -> FAIL (fdo#103167)
{igt@pm_rpm@module-reload}:
fi-cnl-psr: PASS -> WARN (fdo#107602)
==== Possible fixes ====
igt@drv_module_reload@basic-reload-inject:
fi-hsw-4770r: DMESG-WARN (fdo#107425) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-a:
{fi-byt-clapper}: FAIL (fdo#107362) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-skl-guc: FAIL (fdo#103191) -> PASS {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107425 https://bugs.freedesktop.org/show_bug.cgi?id=107425
fdo#107602 https://bugs.freedesktop.org/show_bug.cgi?id=107602
== Participating hosts (54 -> 48) ==
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-u
== Build changes ==
* Linux: CI_DRM_4694 -> Patchwork_9985
CI_DRM_4694: 5813e453be09d4f8a8832f62933a558c16c48a83 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4608: 94ebd21177feedf03e8f6dd1e73dca1a6ec7a0ac @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9985: 74fb69e1b27a2a17f246ef2bdab6c1566cea0962 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
74fb69e1b27a drm/i915/psr: Mask PSR irq bits when re-enabling interrupts. 2d9f28d28f64 drm/i915/psr: Add missing check for I915_PSR_DEBUG_IRQ bit 4a1c5289183e 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_9985/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [CI,1/3] drm/i915/psr: Print PSR_STATUS when PSR idle wait times out.
In reply to Dhinakaran Pandiyan== Series Details ==
== Series Details ==
Series: series starting with [CI,1/3] drm/i915/psr: Print PSR_STATUS when PSR idle wait times out.
URL : https://patchwork.freedesktop.org/series/48520/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4694_full -> Patchwork_9985_full =
== Summary - SUCCESS ==
No regressions found.
== Known issues ==
Here are the changes found in Patchwork_9985_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_ctx_isolation@vcs1-s3:
shard-kbl: PASS -> INCOMPLETE (fdo#103665)
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: PASS -> INCOMPLETE (fdo#106023, fdo#103665)
==== Possible fixes ====
igt@gem_exec_await@wide-contexts:
shard-kbl: FAIL (fdo#105900) -> PASS
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-glk: FAIL (fdo#105363) -> PASS
igt@pm_rpm@system-suspend:
shard-kbl: INCOMPLETE (fdo#107556, fdo#103665) -> PASS fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4694 -> Patchwork_9985
CI_DRM_4694: 5813e453be09d4f8a8832f62933a558c16c48a83 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4608: 94ebd21177feedf03e8f6dd1e73dca1a6ec7a0ac @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9985: 74fb69e1b27a2a17f246ef2bdab6c1566cea0962 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9985/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 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.
Cc José Roberto de Souza <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>Reviewed-by Rodrigo Vivi <[email protected]>
Series pushed to -dinq. Thanks for the reviews.
-DK
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx