drm/i915/psr: Remove intel_crtc_state parameter from disable()
Subsystems (2)
PATCH v6 1/5 drm/i915/psr: Remove intel_crtc_state parameter from disable()
It was only used in VLV/CHV so after the removal of the PSR support for those platforms it is not necessary any more.
--- drivers/gpu/drm/i915/i915_drv.h | 3 +-- drivers/gpu/drm/i915/intel_psr.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -2
@@ -634,8 +634,7 @@ struct i915_psr {void (*enable_source)(struct intel_dp *,const struct intel_crtc_state *); -void (*disable_source)(struct intel_dp *, -const struct intel_crtc_state *); +void (*disable_source)(struct intel_dp *intel_dp);void (*enable_sink)(struct intel_dp *);void (*activate)(struct intel_dp *);void (*setup_vsc)(struct intel_dp *,const struct intel_crtc_state *);
drivers/gpu/drm/i915/intel_psr.c +2 -3
@@ -677,8 +677,7 @@ void intel_psr_enable(struct intel_dp *intel_dp,mutex_unlock (&dev_priv->psr.lock); } -static void hsw_psr_disable (struct intel_dp *intel_dp, -const struct intel_crtc_state *old_crtc_state) +static void hsw_psr_disable (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;
@@ -747,7 +746,7 @@ void intel_psr_disable(struct intel_dp *intel_dp,return ; } - dev_priv->psr.disable_source (intel_dp, old_crtc_state); + dev_priv->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.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 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
@@ -1920,6 +1920,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.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 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
@@ -1010,6 +1010,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 ;
@@ -1029,7 +1031,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.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 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
@@ -632,7 +632,8 @@ static void hsw_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.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 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
@@ -360,6 +360,8 @@ static void hsw_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 );
@@ -415,6 +417,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); }
@@ -1012,7 +1017,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 ;
@@ -1041,6 +1047,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.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for series starting with [v6,1/5] drm/i915/psr: Remove intel_crtc_state parameter from disable()
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [v6,1/5] drm/i915/psr: Remove intel_crtc_state parameter from disable()
URL : https://patchwork.freedesktop.org/series/45200/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Commit: drm/i915/psr: Remove intel_crtc_state parameter from disable() -drivers/gpu/drm/i915/selftests/../i915_drv.h:3680:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3679:16: warning: expression using sizeof(void)
Commit: drm/i915/psr: Begin to handle PSR/PSR2 errors set by sink Okay!
Commit: drm/i915/psr: Handle PSR errors
Okay!
Commit: drm/i915/psr: Avoid PSR exit max time timeout Okay!
Commit: drm/i915/psr: Enable CRC check in the static frame on the sink side Okay!
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [v6,1/5] drm/i915/psr: Remove intel_crtc_state parameter from disable()
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [v6,1/5] drm/i915/psr: Remove intel_crtc_state parameter from disable()
URL : https://patchwork.freedesktop.org/series/45200/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4365 -> Patchwork_9389 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/45200/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_9389 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_ctx_create@basic-files:
fi-cfl-guc: PASS -> DMESG-WARN (fdo#106954)
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
fi-glk-j4005: NOTRUN -> FAIL (fdo#103481)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-bxt-dsi: PASS -> INCOMPLETE (fdo#103927)
==== Possible fixes ====
igt@debugfs_test@read_all_entries:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#106954 https://bugs.freedesktop.org/show_bug.cgi?id=106954
== Participating hosts (42 -> 37) ==
Additional (1): fi-glk-j4005
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-glk-dsi fi-bsw-cyan fi-ctg-p8600 fi-kbl-x1275
== Build changes ==
* Linux: CI_DRM_4365 -> Patchwork_9389
CI_DRM_4365: 1502cd264cf44201245175984fb4c03c89299bfc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4528: 6be300d405de5974b262e8b93a445be4ac618e6a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9389: b4b015f9cc4723f318567798d9156af58f05c479 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
b4b015f9cc47 drm/i915/psr: Enable CRC check in the static frame on the sink side 65bca4ff6837 drm/i915/psr: Avoid PSR exit max time timeout 1e62f85f16b1 drm/i915/psr: Handle PSR errorsd4d8483bbead drm/i915/psr: Begin to handle PSR/PSR2 errors set by sink 89a674d64c8a drm/i915/psr: Remove intel_crtc_state parameter from disable()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9389/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 [v6,1/5] drm/i915/psr: Remove intel_crtc_state parameter from disable()
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [v6,1/5] drm/i915/psr: Remove intel_crtc_state parameter from disable()
URL : https://patchwork.freedesktop.org/series/45200/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4365_full -> Patchwork_9389_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9389_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9389_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_9389_full:
=== IGT changes ===
==== Warnings ====
igt@pm_rc6_residency@rc6-accuracy:
shard-kbl: PASS -> SKIP +1== Known issues ==
Here are the changes found in Patchwork_9389_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_hangcheck:
shard-apl: PASS -> DMESG-FAIL (fdo#106560, fdo#106947)
igt@kms_flip@dpms-vs-vblank-race:
shard-glk: PASS -> FAIL (fdo#103060)
igt@kms_flip@plain-flip-fb-recreate-interruptible:
shard-glk: PASS -> FAIL (fdo#100368)
igt@kms_flip_tiling@flip-x-tiled:
shard-glk: PASS -> FAIL (fdo#104724, fdo#103822)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
shard-apl: PASS -> FAIL (fdo#103375)
igt@kms_sysfs_edid_timing:
shard-hsw: NOTRUN -> WARN (fdo#100047)
==== Possible fixes ====
igt@drv_selftest@live_gtt:
shard-glk: FAIL (fdo#105347) -> PASS
igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
shard-glk: FAIL (fdo#106509, fdo#105454) -> PASS
igt@kms_flip@blocking-wf_vblank:
shard-glk: FAIL (fdo#100368) -> PASS
igt@kms_flip_tiling@flip-y-tiled:
shard-glk: FAIL (fdo#104724, fdo#103822) -> PASS
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS
shard-hsw: FAIL (fdo#99912) -> PASS fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
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#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
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_4365 -> Patchwork_9389
CI_DRM_4365: 1502cd264cf44201245175984fb4c03c89299bfc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4528: 6be300d405de5974b262e8b93a445be4ac618e6a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9389: b4b015f9cc4723f318567798d9156af58f05c479 @ 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_9389/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx