drm/i915/psr: Remove intel_crtc_state parameter from disable_source()
Subsystems (2)
PATCH v7 1/5 drm/i915/psr: Remove intel_crtc_state parameter from disable_source()
It was only used in VLV/CHV so after the removal of the PSR support for those platforms it is not necessary any more.
v7: Rebased
--- drivers/gpu/drm/i915/intel_psr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_psr.c +2 -3
@@ -625,8 +625,7 @@ void intel_psr_enable(struct intel_dp *intel_dp, }static void -intel_psr_disable_source (struct intel_dp *intel_dp, -const struct intel_crtc_state *old_crtc_state) +intel_psr_disable_source (struct intel_dp *intel_dp) {struct intel_digital_port *intel_dig_port =dp_to_dig_port (intel_dp);struct drm_device *dev = intel_dig_port->base.base.dev;
@@ -693,7 +692,7 @@ void intel_psr_disable(struct intel_dp *intel_dp,return ; } -intel_psr_disable_source (intel_dp, old_crtc_state); +intel_psr_disable_source (intel_dp);/* Disable PSR on Sink */ drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_EN_CFG ,0 );
Signature · 6 lines
2.18.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 2/5 drm/i915/psr: Begin to handle PSR/PSR2 errors set by sink
eDP spec states that sink device will do a short pulse in HPD line when there is a PSR/PSR2 error that needs to be handled by source, this is handling the first and most simples error:DP_PSR_SINK_INTERNAL_ERROR.
Here taking the safest approach and disabling PSR(at least until the next modeset), to avoid multiple rendering issues due to bad pannels.
v5:
added lockdep_assert in psr_disable and renamed psr_disable() to intel_psr_disable_locked()
v4:
Using CAN_PSR instead of HAS_PSR in intel_psr_short_pulse
v3:
disabling PSR instead of exiting on error
--- drivers/gpu/drm/i915/intel_dp.c | 2 ++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_psr.c | 62 ++++++++++++++++++++++++++------ 3 files changed, 54 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +2 -0
@@ -4491,6 +4491,8 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)if (intel_dp_needs_link_retrain (intel_dp))return false; +intel_psr_short_pulse (intel_dp); +if (intel_dp->compliance.test_type ==DP_TEST_LINK_TRAINING ) {DRM_DEBUG_KMS ("Link Training Compliance Test requested\n" );/* Send a Hotplug Uevent to userspace to start modeset */
drivers/gpu/drm/i915/intel_drv.h +1 -0
@@ -1921,6 +1921,7 @@ 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_handler (struct drm_i915_private *dev_priv,u32 psr_iir); +void intel_psr_short_pulse (struct intel_dp *intel_dp);/* intel_runtime_pm.c */ int intel_power_domains_init (struct drm_i915_private *);
drivers/gpu/drm/i915/intel_psr.c +51 -11
77 lines not on this page · raw message
Signature · 6 lines
2.18.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 3/5 drm/i915/psr: Handle PSR errors
In reply to José Roberto de SouzaSink will interrupt source when it have any PSR error. DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR is a PSR2 but already handling it here.
The only missing error to be handled is DP_PSR_LINK_CRC_ERROR that will be taken in care in a futher patch.
v6:
not handling DP_PSR_LINK_CRC_ERROR here
v5:
handling all PSR errors here, so the commit message and comment have changed
v3:
disabling PSR instead of exiting on error
--- drivers/gpu/drm/i915/intel_psr.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_psr.c +21 -1
@@ -949,6 +949,8 @@ void intel_psr_short_pulse(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (dev);struct i915_psr *psr = &dev_priv->psr;u8 val; +const u8 errors =DP_PSR_RFB_STORAGE_ERROR | +DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR ;if (!CAN_PSR (dev_priv) || !intel_dp_is_edp (intel_dp))return ;
@@ -968,7 +970,25 @@ void intel_psr_short_pulse(struct intel_dp *intel_dp)intel_psr_disable_locked (intel_dp); } -/* TODO: handle other PSR/PSR2 errors */ +if (drm_dp_dpcd_readb (&intel_dp->aux,DP_PSR_ERROR_STATUS , &val) !=1 ) { +DRM_ERROR ("PSR_ERROR_STATUS dpcd read failed\n" ); + goto exit; + } + +if (val &DP_PSR_RFB_STORAGE_ERROR ) +DRM_DEBUG_KMS ("PSR RFB storage error, disabling PSR\n" ); +if (val &DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR ) +DRM_DEBUG_KMS ("PSR VSC SDP uncorrectable error, disabling PSR\n" ); + +if (val & ~errors) +DRM_ERROR ("PSR_ERROR_STATUS unhandled errors %x\n" , + val & ~errors); +if (val & errors) +intel_psr_disable_locked (intel_dp); +/* clear status register */ +drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_ERROR_STATUS , val); + +/* TODO: handle PSR2 errors */ exit:mutex_unlock (&psr->lock); }
Signature · 6 lines
2.18.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 4/5 drm/i915/psr: Avoid PSR exit max time timeout
In reply to José Roberto de SouzaSpecification requires that max time should be masked from bdw and forward but it can be also safely enabled to hsw.
This will make PSR exits more deterministic and only when really needed. If this was used to fix a issue in some panel than can only self-refresh for a few seconds, that panel will interrupt and assert one of the PSR errors handled in:
'drm/i915/psr: Handle PSR RFB storage error' and 'drm/i915/psr: Begin to handle PSR/PSR2 errors set by sink'
Spec: 21664
v4:
patch moved to before 'drm/i915/psr/bdw+: Enable CRC check in the static frame on the sink side' to avoid touch in 2 patches EDP_PSR_DEBUG.
--- drivers/gpu/drm/i915/intel_psr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_psr.c +2 -1
@@ -579,7 +579,8 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,EDP_PSR_DEBUG_MASK_MEMUP |EDP_PSR_DEBUG_MASK_HPD |EDP_PSR_DEBUG_MASK_LPSP | - EDP_PSR_DEBUG_MASK_DISP_REG_WRITE); +EDP_PSR_DEBUG_MASK_DISP_REG_WRITE | + EDP_PSR_DEBUG_MASK_MAX_SLEEP); } }
Signature · 6 lines
2.18.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 5/5 drm/i915/psr: Enable CRC check in the static frame on the sink side
In reply to José Roberto de SouzaSink can be configured to calculate the CRC over the static frame and compare with the CRC calculated and transmited in the VSC SDP by source, if there is a mismatch sink will do a short pulse in HPD and set DP_PSR_LINK_CRC_ERROR in DP_PSR_ERROR_STATUS.
Spec: 7723
v6:
andling DP_PSR_LINK_CRC_ERROR here and remove "bdw+" from commit message
v4:
patch moved to after 'drm/i915/psr: Avoid PSR exit max time timeout' to avoid touch in 2 patches EDP_PSR_DEBUG.
v3:
disabling PSR instead of exiting on error
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_psr.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -4044,6 +4044,7 @@ enum {#define EDP_PSR_SKIP_AUX_EXIT (1 << 12)#define EDP_PSR_TP1_TP2_SEL (0 << 11)#define EDP_PSR_TP1_TP3_SEL (1 << 11) +#define EDP_PSR_CRC_ENABLE (1 << 10)/* BDW+ */ #define EDP_PSR_TP2_TP3_TIME_500us (0 << 8)#define EDP_PSR_TP2_TP3_TIME_100us (1 << 8)#define EDP_PSR_TP2_TP3_TIME_2500us (2 << 8)
drivers/gpu/drm/i915/intel_psr.c +9 -1
@@ -323,6 +323,8 @@ static void intel_psr_enable_sink(struct intel_dp *intel_dp)if (dev_priv->psr.link_standby) dpcd_val |=DP_PSR_MAIN_LINK_ACTIVE ; +if (!dev_priv->psr.psr2_enabled &&INTEL_GEN (dev_priv) >=8 ) + dpcd_val |=DP_PSR_CRC_VERIFICATION ;drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_EN_CFG , dpcd_val);drm_dp_dpcd_writeb (&intel_dp->aux,DP_SET_POWER ,DP_SET_POWER_D0 );
@@ -378,6 +380,9 @@ static void hsw_activate_psr1(struct intel_dp *intel_dp)else val |=EDP_PSR_TP1_TP2_SEL ; +if (INTEL_GEN (dev_priv) >=8 ) + val |=EDP_PSR_CRC_ENABLE ; + val |=I915_READ (EDP_PSR_CTL ) &EDP_PSR_RESTORE_PSR_ACTIVE_CTX_MASK ;I915_WRITE (EDP_PSR_CTL , val); }
@@ -951,7 +956,8 @@ void intel_psr_short_pulse(struct intel_dp *intel_dp)struct i915_psr *psr = &dev_priv->psr;u8 val;const u8 errors =DP_PSR_RFB_STORAGE_ERROR | -DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR ; +DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR | +DP_PSR_LINK_CRC_ERROR ;if (!CAN_PSR (dev_priv) || !intel_dp_is_edp (intel_dp))return ;
@@ -980,6 +986,8 @@ void intel_psr_short_pulse(struct intel_dp *intel_dp)DRM_DEBUG_KMS ("PSR RFB storage error, disabling PSR\n" );if (val &DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR )DRM_DEBUG_KMS ("PSR VSC SDP uncorrectable error, disabling PSR\n" ); +if (val &DP_PSR_LINK_CRC_ERROR ) +DRM_ERROR ("PSR Link CRC error, disabling PSR\n" );if (val & ~errors) DRM_ERROR("PSR_ERROR_STATUS unhandled errors %x\n",
Signature · 6 lines
2.18.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [v7,1/5] drm/i915/psr: Remove intel_crtc_state parameter from disable_source()
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [v7,1/5] drm/i915/psr: Remove intel_crtc_state parameter from disable_source()
URL : https://patchwork.freedesktop.org/series/45436/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4382 -> Patchwork_9430 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/45436/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_9430 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_suspend@basic-s4-devices:
fi-kbl-7500u: PASS -> DMESG-WARN (fdo#105128)
==== Possible fixes ====
igt@gem_exec_gttfill@basic:
fi-byt-n2820: FAIL (fdo#106744) -> PASS fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#106744 https://bugs.freedesktop.org/show_bug.cgi?id=106744
== Participating hosts (44 -> 39) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4382 -> Patchwork_9430
CI_DRM_4382: ffc2d866e9b04af3cc2244bb7448d7f7eb438a89 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4530: 0e98bf69f146eb72fe3a7c3b19a049b5786f0ca3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9430: e8a93b1c4cec19c8565909bc0744a96068009163 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
e8a93b1c4cec drm/i915/psr: Enable CRC check in the static frame on the sink side af0ebd24c4c2 drm/i915/psr: Avoid PSR exit max time timeout ceb6f782b6a5 drm/i915/psr: Handle PSR errors0098a2d2d5f5 drm/i915/psr: Begin to handle PSR/PSR2 errors set by sink f7fd8f3ecaaf drm/i915/psr: Remove intel_crtc_state parameter from disable_source()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9430/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 [v7,1/5] drm/i915/psr: Remove intel_crtc_state parameter from disable_source()
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [v7,1/5] drm/i915/psr: Remove intel_crtc_state parameter from disable_source()
URL : https://patchwork.freedesktop.org/series/45436/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4382_full -> Patchwork_9430_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9430_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9430_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9430_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-vebox:
shard-kbl: SKIP -> PASS
igt@gem_linear_blits@interruptible:
shard-apl: PASS -> SKIP
igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
shard-snb: SKIP -> PASS +2== Known issues ==
Here are the changes found in Patchwork_9430_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_gtt:
shard-glk: PASS -> FAIL (fdo#105347)
igt@drv_selftest@live_hangcheck:
shard-apl: PASS -> DMESG-FAIL (fdo#106947, fdo#106560)
igt@drv_suspend@shrink:
shard-kbl: PASS -> FAIL (fdo#106886)
igt@gem_exec_schedule@pi-ringfull-bsd1:
shard-kbl: NOTRUN -> FAIL (fdo#103158) +1
igt@gem_softpin@noreloc-s3:
shard-kbl: PASS -> INCOMPLETE (fdo#103665)
igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
shard-glk: PASS -> FAIL (fdo#105703)
igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
shard-hsw: PASS -> FAIL (fdo#105767)
igt@kms_flip_tiling@flip-to-x-tiled:
shard-glk: PASS -> FAIL (fdo#103822, fdo#104724)
igt@kms_flip_tiling@flip-x-tiled:
shard-glk: PASS -> FAIL (fdo#104724) +2
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size:
shard-hsw: FAIL (fdo#103355) -> PASS
igt@kms_flip@plain-flip-fb-recreate:
shard-glk: FAIL (fdo#100368) -> PASS +2 fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4382 -> Patchwork_9430
CI_DRM_4382: ffc2d866e9b04af3cc2244bb7448d7f7eb438a89 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4530: 0e98bf69f146eb72fe3a7c3b19a049b5786f0ca3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9430: e8a93b1c4cec19c8565909bc0744a96068009163 @ 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_9430/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · José Roberto de Souza
It was only used in VLV/CHV so after the removal of the PSR support for those platforms it is not necessary any more.
v7: Rebased
Pushed this to -dinq, thanks for your patience.
Quoted 30 lines
Reviewed-by Dhinakaran Pandiyan <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>---
drivers/gpu/drm/i915/intel_psr.c | 5 ++---1 file changed, 2 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -625,8 +625,7 @@ void intel_psr_enable(struct intel_dp *intel_dp, }
static voiddrivers/gpu/drm/i915/intel_psr.c +0
-2-intel_psr_disable_source(struct intel_dp *intel_dp, - const struct intel_crtc_state
*old_crtc_state)
+intel_psr_disable_source(structintel_dp*intel_dp) {
structintel_digital_port*intel_dig_port=dp_to_dig_port(intel_dp);
structdrm_device*dev =intel_dig_port->base.base.dev;drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -693,7 +692,7 @@ void intel_psr_disable(struct intel_dp *intel_dp, return; }drivers/gpu/drm/i915/intel_psr.c +1
-1-intel_psr_disable_source (intel_dp, old_crtc_state); +intel_psr_disable_source (intel_dp);
Quoted 3 lines
/* Disable PSR on Sink */drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, 0);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx