drm/i915/psr: Add continuous full frame bit together with single
Subsystems (3)
PATCH 1/1 drm/i915/psr: Add continuous full frame bit together with single
Currently we are observing occasionally display flickering or complete freeze. This is narrowed down to be caused by single full frame update (SFF).
SFF bit after it's written gets cleared by HW in subsequent vblank i.e. when the update is sent to the panel. SFF bit is required to be written together with partial frame update (PFU) bit. After the SFF bit gets cleared by the HW psr2 man trk ctl register still contains PFU bit. If there is subsequent update for any reason we will end up having selective update/fetch configuration where start line is 0 and end line is 0. Also selective fetch configuration for the planes is not properly performed. This seems to be causing problems with some panels.
Using CFF without SFF doesn't work either because it may happen that psr2 man track ctl register is overwritten by next update before vblank triggers sending the update. This is causing problems to psr_invalidate/flush. Using CFF and SFF together solves the problems as SFF is cleared only by HW in subsequent vblank.
Fix the flickering/freeze issue by adding continuous full frame with single full frame update and switch to partial frame update only when selective update area is properly calculated and configured.
This is also workaround for HSD 14014971508
--- drivers/gpu/drm/i915/display/intel_psr.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_psr.c +10 -9
@@ -1510,7 +1510,8 @@ static void psr_force_hw_tracking_exit(struct intel_dp *intel_dp)PSR2_MAN_TRK_CTL (intel_dp->psr.transcoder),man_trk_ctl_enable_bit_get (dev_priv) |man_trk_ctl_partial_frame_bit_get (dev_priv) | - man_trk_ctl_single_full_frame_bit_get(dev_priv)); +man_trk_ctl_single_full_frame_bit_get (dev_priv) | + man_trk_ctl_continuos_full_frame(dev_priv));/* * Display WA #0884: skl+
@@ -1624,11 +1625,8 @@ static void psr2_man_trk_ctl_calc(struct intel_crtc_state *crtc_state, val |=man_trk_ctl_partial_frame_bit_get (dev_priv);if (full_update) { -/* -* Not applying Wa_14014971508:adlp as we do not support the -* feature that requires this workaround. -*/ val |=man_trk_ctl_single_full_frame_bit_get (dev_priv); + val |=man_trk_ctl_continuos_full_frame (dev_priv); goto exit; }
@@ -2307,12 +2305,15 @@ static void _psr_flush_handle(struct intel_dp *intel_dp)/* can we turn CFF off? */ if (intel_dp->psr.busy_frontbuffer_bits ==0 ) {u32 val =man_trk_ctl_enable_bit_get (dev_priv) | -man_trk_ctl_partial_frame_bit_get (dev_priv) | -man_trk_ctl_single_full_frame_bit_get (dev_priv); +man_trk_ctl_partial_frame_bit_get (dev_priv) | +man_trk_ctl_single_full_frame_bit_get (dev_priv) | +man_trk_ctl_continuos_full_frame (dev_priv);/* -* turn continuous full frame off and do a single -* full frame +* turn continuous full frame off and do a single full frame. Still +* keep cff bit enabled as we don't have proper SU configuration in +* case update is sent for any reason after sff bit gets cleared by +* the HW on next vblank. */ intel_de_write (dev_priv,PSR2_MAN_TRK_CTL (intel_dp->psr.transcoder), val);
Signature · 1 line
2.34.1
Quoted 69 lines · Jouni
Currently we are observing occasionally display flickering or complete freeze. This is narrowed down to be caused by single full frame update (SFF).
SFF bit after it's written gets cleared by HW in subsequent vblank i.e. when the update is sent to the panel. SFF bit is required to be written together with partial frame update (PFU) bit. After the SFF bit gets cleared by the HW psr2 man trk ctl register still contains PFU bit. If there is subsequent update for any reason we will end up having selective update/fetch configuration where start line is 0 and end line is 0. Also selective fetch configuration for the planes is not properly performed. This seems to be causing problems with some panels.
Using CFF without SFF doesn't work either because it may happen that
psr2 man track ctl register is overwritten by next update before vblank triggers sending the update. This is causing problems to psr_invalidate/flush. Using CFF and SFF together solves the problems as SFF is cleared only by HW in subsequent vblank.Fix the flickering/freeze issue by adding continuous full frame with single full frame update and switch to partial frame update only when selective update area is properly calculated and configured.
This is also workaround for HSD 14014971508
Cc Ville Syrjälä <[email protected]>Cc José Roberto de Souza <[email protected]>Cc Mika Kahola <[email protected]>Reported-by Lee Shawn C <[email protected]>Signed-off-by Jouni Högander <[email protected]>---
drivers/gpu/drm/i915/display/intel_psr.c| 19 ++++++++++---------1 file changed, 10 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +10
-10@@ -1510,7 +1510,8 @@ static void psr_force_hw_tracking_exit(struct intel_dp *intel_dp)PSR2_MAN_TRK_CTL (intel_dp->psr.transcoder),man_trk_ctl_enable_bit_get (dev_priv) |man_trk_ctl_partial_frame_bit_get (dev_priv) | - man_trk_ctl_single_full_frame_bit_get(dev_priv)); +man_trk_ctl_single_full_frame_bit_get (dev_priv) | + man_trk_ctl_continuos_full_frame(dev_priv));/* * Display WA #0884: skl+ @@ -1624,11 +1625,8 @@ static void psr2_man_trk_ctl_calc(struct intel_crtc_state *crtc_state, val |=man_trk_ctl_partial_frame_bit_get (dev_priv);if (full_update) { -/* -* Not applying Wa_14014971508:adlp as we do not support the -* feature that requires this workaround. -*/ val |=man_trk_ctl_single_full_frame_bit_get (dev_priv); + val |=man_trk_ctl_continuos_full_frame (dev_priv); goto exit; }@@ -2307,12 +2305,15 @@ static void _psr_flush_handle(struct intel_dp *intel_dp)/* can we turn CFF off? */ if (intel_dp->psr.busy_frontbuffer_bits ==0 ) {u32 val =man_trk_ctl_enable_bit_get (dev_priv) | -man_trk_ctl_partial_frame_bit_get (dev_priv) | -man_trk_ctl_single_full_frame_bit_get (dev_priv); +man_trk_ctl_partial_frame_bit_get (dev_priv) | +man_trk_ctl_single_full_frame_bit_get (dev_priv) | +man_trk_ctl_continuos_full_frame (dev_priv);/* -* turn continuous full frame off and do a single -* full frame +* turn continuous full frame off and do a single full frame. Still +* keep cff bit enabled as we don't have proper SU configuration in +* case update is sent for any reason after sff bit gets cleared by +* the HW on next vblank. */ intel_de_write (dev_priv,PSR2_MAN_TRK_CTL (intel_dp->psr.transcoder), val); --
Quoted 1 line
2.34.1
My DUT works well after applied this patch. Thanks!
Best regards,
Shawn
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/psr: Add continuous full frame bit together with single
In reply to Jouni Högander== Series Details ==
== Series Details ==
Series: drm/i915/psr: Add continuous full frame bit together with single
URL : https://patchwork.freedesktop.org/series/111420/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12442 -> Patchwork_111420v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_111420v1 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_111420v1, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/index.html
Participating hosts (30 -> 33)
------------------------------
Additional (4): bat-kbl-2 bat-jsl-3 bat-adlp-4 bat-dg1-5
Missing (1): bat-dg1-6
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_111420v1:
### IGT changes ###
#### Possible regressions ####
* igt@runner@aborted:
- fi-apl-guc: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/fi-apl-guc/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_111420v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@debugfs_test@basic-hwmon:
- bat-adlp-4: NOTRUN -> [SKIP][2] ([i915#7456])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-adlp-4/igt@[email protected]
* igt@gem_lmem_swapping@verify-random:
- bat-adlp-4: NOTRUN -> [SKIP][3] ([i915#4613]) +3 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-adlp-4/igt@[email protected]
* igt@gem_mmap@basic:
- bat-dg1-5: NOTRUN -> [SKIP][4] ([i915#4083])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
* igt@gem_tiled_fence_blits@basic:
- bat-dg1-5: NOTRUN -> [SKIP][5] ([i915#4077]) +2 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
* igt@gem_tiled_pread_basic:
- bat-dg1-5: NOTRUN -> [SKIP][6] ([i915#4079]) +1 similar issue
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@gem_tiled_pread_basic.html
- bat-adlp-4: NOTRUN -> [SKIP][7] ([i915#3282])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-adlp-4/igt@gem_tiled_pread_basic.html
* igt@i915_pm_backlight@basic-brightness:
- bat-dg1-5: NOTRUN -> [SKIP][8] ([i915#7561])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
* igt@i915_pm_rps@basic-api:
- bat-dg1-5: NOTRUN -> [SKIP][9] ([i915#6621])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
- bat-adlp-4: NOTRUN -> [SKIP][10] ([i915#6621])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-adlp-4/igt@[email protected]
* igt@kms_addfb_basic@basic-x-tiled-legacy:
- bat-dg1-5: NOTRUN -> [SKIP][11] ([i915#4212]) +7 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg1-5: NOTRUN -> [SKIP][12] ([i915#4215])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
* igt@kms_chamelium@dp-crc-fast:
- bat-adlp-4: NOTRUN -> [SKIP][13] ([fdo#111827]) +8 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-adlp-4/igt@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- bat-dg1-5: NOTRUN -> [SKIP][14] ([fdo#111827]) +8 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- bat-adlp-4: NOTRUN -> [SKIP][15] ([i915#4103])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-adlp-4/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][16] ([i915#4103] / [i915#4213])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- bat-dg1-5: NOTRUN -> [SKIP][17] ([fdo#109285])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
* igt@kms_force_connector_basic@prune-stale-modes:
- bat-adlp-4: NOTRUN -> [SKIP][18] ([i915#4093]) +3 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-adlp-4/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-adlp-4: NOTRUN -> [SKIP][19] ([i915#3546])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-adlp-4/igt@[email protected]
* igt@kms_psr@sprite_plane_onoff:
- bat-dg1-5: NOTRUN -> [SKIP][20] ([i915#1072] / [i915#4078]) +3 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@kms_psr@sprite_plane_onoff.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-dg1-5: NOTRUN -> [SKIP][21] ([i915#3555])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
- bat-adlp-4: NOTRUN -> [SKIP][22] ([i915#3555] / [i915#4579])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-adlp-4/igt@[email protected]
* igt@prime_vgem@basic-fence-read:
- bat-dg1-5: NOTRUN -> [SKIP][23] ([i915#3708]) +3 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
* igt@prime_vgem@basic-gtt:
- bat-dg1-5: NOTRUN -> [SKIP][24] ([i915#3708] / [i915#4077]) +1 similar issue
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
* igt@prime_vgem@basic-userptr:
- bat-adlp-4: NOTRUN -> [SKIP][25] ([fdo#109295] / [i915#3301] / [i915#3708])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-adlp-4/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][26] ([i915#3708] / [i915#4873])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-dg1-5/igt@[email protected]
* igt@prime_vgem@basic-write:
- bat-adlp-4: NOTRUN -> [SKIP][27] ([fdo#109295] / [i915#3291] / [i915#3708]) +2 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-adlp-4/igt@[email protected]
#### Possible fixes ####
* igt@fbdev@read:
- {bat-rpls-2}: [SKIP][28] ([i915#2582]) -> [PASS][29] +4 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12442/bat-rpls-2/igt@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-rpls-2/igt@[email protected]
* igt@i915_selftest@live@hugepages:
- {bat-rpls-1}: [DMESG-WARN][30] ([i915#5278]) -> [PASS][31]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12442/bat-rpls-1/igt@i915_selftest@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/bat-rpls-1/igt@i915_selftest@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3003]: https://gitlab.freedesktop.org/drm/intel/issues/3003
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4093]: https://gitlab.freedesktop.org/drm/intel/issues/4093
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5278]: https://gitlab.freedesktop.org/drm/intel/issues/5278
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#7346]: https://gitlab.freedesktop.org/drm/intel/issues/7346
[i915#7348]: https://gitlab.freedesktop.org/drm/intel/issues/7348
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7467]: https://gitlab.freedesktop.org/drm/intel/issues/7467
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
Build changes
-------------
* Linux: CI_DRM_12442 -> Patchwork_111420v1
CI-20190529: 20190529
CI_DRM_12442: 9e8dc55b099e744c1f5fa5d7eac9f81966591028 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7074: a7403583f1baee0548d86d1f2c9bb078384f997a @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_111420v1: 9e8dc55b099e744c1f5fa5d7eac9f81966591028 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
fe6e761c5589 drm/i915/psr: Add continuous full frame bit together with single
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111420v1/index.html
Quoted 4 lines · Jouni Högander
Currently we are observing occasionally display flickering or complete freeze. This is narrowed down to be caused by single full frame update (SFF).
Quoted 8 lines
SFF bit after it's written gets cleared by HW in subsequent vblank i.e. when the update is sent to the panel. SFF bit is required to be written together with partial frame update (PFU) bit. After the SFF bit gets cleared by the HW psr2 man trk ctl register still contains PFU bit. If there is subsequent update for any reason we will end up having selective update/fetch configuration where start line is 0 and end line is 0.
How did you get this information(start and end line 0)?
Quoted 9 lines
Also selective fetch configuration for the planes is
not properly performed. This seems to be causing problems with some panels.Using CFF without SFF doesn't work either because it may happen that psr2 man track ctl register is overwritten by next update before vblank triggers sending the update. This is causing problems to psr_invalidate/flush. Using CFF and SFF together solves the problems as SFF is cleared only by HW in subsequent vblank.
This looks dangerous, have you checked with HW engineers if setting both could cause any issue?
At the SFF write you could get what is the current vblank counter and properly handle future PSR2_MAN_TRK_CTL writes.
Quoted 6 lines
Fix the flickering/freeze issue by adding continuous full frame with single full frame update and switch to partial frame update only when selective update area is properly calculated and configured.
This is also workaround for HSD 14014971508
Please use versions in your patches, you had 2 patches in the previous approach with the same subject but no versioning and no information about what changed between versions.
Quoted 39 lines
Cc Ville Syrjälä <[email protected]>Cc José Roberto de Souza <[email protected]>Cc Mika Kahola <[email protected]>Reported-by Lee Shawn C <[email protected]>Signed-off-by Jouni Högander <[email protected]>--- drivers/gpu/drm/i915/display/intel_psr.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +3
-5@@ -1510,7 +1510,8 @@ static void psr_force_hw_tracking_exit(struct intel_dp *intel_dp)PSR2_MAN_TRK_CTL (intel_dp->psr.transcoder),man_trk_ctl_enable_bit_get (dev_priv) |man_trk_ctl_partial_frame_bit_get (dev_priv) | - man_trk_ctl_single_full_frame_bit_get(dev_priv)); +man_trk_ctl_single_full_frame_bit_get (dev_priv) | + man_trk_ctl_continuos_full_frame(dev_priv));/* * Display WA #0884: skl+ @@ -1624,11 +1625,8 @@ static void psr2_man_trk_ctl_calc(struct intel_crtc_state *crtc_state, val |=man_trk_ctl_partial_frame_bit_get (dev_priv);if (full_update) { -/* -* Not applying Wa_14014971508:adlp as we do not support the -* feature that requires this workaround. -*/ val |=man_trk_ctl_single_full_frame_bit_get (dev_priv); + val |=man_trk_ctl_continuos_full_frame (dev_priv); goto exit; }
drivers/gpu/drm/i915/display/intel_psr.c static void _psr_flush_handle(struct intel_dp *intel_dp) · line 2310
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_psr.c +3
-2@@ -2307,12 +2305,15 @@ static void _psr_flush_handle(struct intel_dp *intel_dp)/* can we turn CFF off? */ if (intel_dp->psr.busy_frontbuffer_bits ==0 ) {u32 val =man_trk_ctl_enable_bit_get (dev_priv) | -man_trk_ctl_partial_frame_bit_get (dev_priv) | -man_trk_ctl_single_full_frame_bit_get (dev_priv); +man_trk_ctl_partial_frame_bit_get (dev_priv) | +man_trk_ctl_single_full_frame_bit_get (dev_priv) | +man_trk_ctl_continuos_full_frame (dev_priv);
style.
drivers/gpu/drm/i915/display/intel_psr.c static void _psr_flush_handle(struct intel_dp *intel_dp) · line 2316
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_psr.c +4
-2/* -* turn continuous full frame off and do a single -* full frame +* turn continuous full frame off and do a single full frame. Still +* keep cff bit enabled as we don't have proper SU configuration in +* case update is sent for any reason after sff bit gets cleared by +* the HW on next vblank.
turn off and keep bit enabled?! makes no sense this comment.
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_psr.c +0
-0*/ intel_de_write (dev_priv,PSR2_MAN_TRK_CTL (intel_dp->psr.transcoder), val);
Quoted 19 lines · Jose
Quoted 6 lines · Jouni Högander
Currently we are observing occasionally display flickering or complete
freeze. This is narrowed down to be caused by single full frame update
(SFF).Quoted 11 lines
SFF bit after it's written gets cleared by HW in subsequent vblank i.e. when the update is sent to the panel. SFF bit is required to be
written together with partial frame update (PFU) bit. After the SFF bit gets cleared by the HW psr2 man trk ctl register still contains PFU bit. If there is subsequent update for any reason we will end up
having selective update/fetch configuration where start line is 0 and
end line is 0.
Quoted 1 line
How did you get this information(start and end line 0)?
If you consider what is written into psr2 man trk ctl register in case of full frame update in intel_psr2_program_trans_man_trk_ctl and in _psr_flush_handle:
SFF = 1
PFU = 1
Start line = 0
End line = 0
On next vblank SFF is cleared by the hw. After that we have:
PFU = 1
Start line = 0
End line = 0
which is basically selective update with start and endline as 0. If there is an update with this configration we are observing freeze/flicker. I can use CFF instead of SFF as a workaround. I also checked that configuring start and end lines as a full frame is also fixing the issue. I choose to come out with the first one.
Quoted 13 lines
Quoted 5 lines
Also selective fetch configuration for the planes is not properly performed. This seems to be causing problems with some panels.
Quoted 7 lines
Using CFF without SFF doesn't work either because it may happen that
psr2 man track ctl register is overwritten by next update before vblank triggers sending the update. This is causing problems to psr_invalidate/flush. Using CFF and SFF together solves the problems
as SFF is cleared only by HW in subsequent vblank.
Quoted 2 lines
This looks dangerous, have you checked with HW engineers if setting both could cause any issue?
Yes, this make sense, I will check this.
Quoted 2 lines
At the SFF write you could get what is the current vblank counter and properly handle future
PSR2_MAN_TRK_CTLwrites.
Is vblank counter updated with that granularity? E.g. if you have psr_invalidate/psr_flush sequence there is an update, but vblank interrupts are not enabled? In legacy cursor update there is also an update without vblank interrupts getting enabled. How vblank counter works when vblank interrupt is disabled?
Quoted 8 lines
Quoted 8 lines
Fix the flickering/freeze issue by adding continuous full frame with
single full frame update and switch to partial frame update only when
selective update area is properly calculated and configured.
Quoted 6 lines
Quoted 1 line
This is also workaround for HSD 14014971508
Please use versions in your patches, you had 2 patches in the previous approach with the same subject but no versioning and no information about what
changed between versions.
First one was sent to trybot and then to intel-gfx. In this one I changed the subject. So I was thinking it's ok to leave out versioning. I will add versioning when sending again.
Quoted 91 lines
Quoted 59 lines
Cc Ville Syrjälä <[email protected]>Cc José Roberto de Souza <[email protected]>Cc Mika Kahola <[email protected]>Reported-by Lee Shawn C <[email protected]>Signed-off-by Jouni Högander <[email protected]>---
drivers/gpu/drm/i915/display/intel_psr.c | 19 ++++++++++---------1 file changed, 10 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +0
-0@@ -1510,7 +1510,8 @@ static void psr_force_hw_tracking_exit(struct intel_dp *intel_dp)PSR2_MAN_TRK_CTL(intel_dp-
Quoted 1 line
psr.transcoder),
man_trk_ctl_enable_bit_get(dev_priv)|man_trk_ctl_partial_frame_bit_get(dev_priv)|
-man_trk_ctl_single_full_frame_bit_get(dev_priv));
+man_trk_ctl_single_full_frame_bit_get(dev_priv)|
+man_trk_ctl_continuos_full_frame(dev_priv));
/*
* Display WA #0884: skl+drivers/gpu/drm/i915/display/intel_psr.c +0
-0@@ -1624,11 +1625,8 @@ static void psr2_man_trk_ctl_calc(structintel_crtc_state *crtc_state, val |= man_trk_ctl_partial_frame_bit_get(dev_priv);
if (full_update) {
- /*
- * Not applying Wa_14014971508:adlp as we do not support the
- * feature that requires this workaround. - */
val |=man_trk_ctl_single_full_frame_bit_get(dev_priv);
+ val |=man_trk_ctl_continuos_full_frame(dev_priv); goto exit;
}drivers/gpu/drm/i915/display/intel_psr.c +0
-0@@ -2307,12 +2305,15 @@ static void _psr_flush_handle(struct intel_dp *intel_dp) /* can we turn CFF off? */if (
intel_dp->psr.busy_frontbuffer_bits==
0) {
u32 val =man_trk_ctl_enable_bit_get(dev_priv)|
-man_trk_ctl_partial_frame_bit_get(dev_priv)|Quoted 8 lines
-
man_trk_ctl_single_full_frame_bit_get(dev_priv);
+ man_trk_ctl_partial_frame_bit_get(dev_priv)|
+ man_trk_ctl_single_full_frame_bit_get(dev_priv)|
+ man_trk_ctl_continuos_full_frame(dev_priv);style.
Quoted 4 lines
/*
- * turn continuous full frame off and do a singleQuoted 8 lines
- * full frame
+ * turn continuous full frame off and do a single full frame. Still
+ * keep cff bit enabled as we don't have proper SU configuration in
+ * case update is sent for any reason after sff bit gets cleared by
+ * the HW on next vblank.turn off and keep bit enabled?! makes no sense this comment.
Quoted 4 lines
*/
intel_de_write(dev_priv, PSR2_MAN_TRK_CTL(intel_dp->psr.transcoder), val);
Hello Jose,
Thank you for your comments. Please see my responses below and check the new version I have sent.
Quoted 61 lines · Jouni Högander
Quoted 22 lines · Jose
Quoted 6 lines · Jouni Högander
Currently we are observing occasionally display flickering or complete
freeze. This is narrowed down to be caused by single full frame update
(SFF).Quoted 14 lines
SFF bit after it's written gets cleared by HW in subsequent vblank
i.e. when the update is sent to the panel. SFF bit is required to be
written together with partial frame update (PFU) bit. After the SFF
bit gets cleared by the HW psr2 man trk ctl register still contains
PFU bit. If there is subsequent update for any reason we will end up
having selective update/fetch configuration where start line is 0 and
end line is 0.Quoted 1 line
How did you get this information(start and end line 0)?
If you consider what is written into psr2 man trk ctl register in case
of full frame update inintel_psr2_program_trans_man_trk_ctland in_psr_flush_handle:SFF = 1
PFU = 1
Start line = 0
End line = 0On next vblank SFF is cleared by the hw. After that we have:
PFU = 1
Start line = 0
End line = 0which is basically selective update with start and endline as 0. If there is an update with this configration we are observing freeze/flicker. I can use CFF instead of SFF as a workaround. I also checked that configuring start and end lines as a full frame is also fixing the issue. I choose to come out with the first one.
Quoted 14 lines
Quoted 13 lines
Also selective fetch configuration for the planes is not properly performed. This seems to be causing problems with some
panels.Using CFF without SFF doesn't work either because it may happen that
psr2 man track ctl register is overwritten by next update before vblank triggers sending the update. This is causing problems to psr_invalidate/flush. Using CFF and SFF together solves the problems
as SFF is cleared only by HW in subsequent vblank.
Quoted 4 lines
Quoted 2 lines
This looks dangerous, have you checked with HW engineers if setting both could cause any issue?
Yes, this make sense, I will check this.
I got confirmation from HW folks:
"There are no restrictions on setting both bits simultaneously (HW simply OR's the two bits together)."
Quoted 11 lines
Quoted 4 lines
At the SFF write you could get what is the current vblank counter and
properly handle futurePSR2_MAN_TRK_CTLwrites.Is vblank counter updated with that granularity? E.g. if you have psr_invalidate/psr_flush sequence there is an update, but vblank interrupts are not enabled? In legacy cursor update there is also an update without vblank interrupts getting enabled. How vblank counter works when vblank interrupt is disabled?
I did experiments with vblank counter. It could be actually possible to to use it, but to my opinion new strategy keeping CFF bit enabled unless there is a selective update is much simpler. It solves this problem, takes care of current flickering/freeze issue and also takes care of HSD 14014971508.
Quoted 15 lines
Quoted 8 lines
Quoted 8 lines
Fix the flickering/freeze issue by adding continuous full frame with
single full frame update and switch to partial frame update only when
selective update area is properly calculated and configured.Quoted 6 lines
Quoted 1 line
This is also workaround for HSD 14014971508
Please use versions in your patches, you had 2 patches in the previous approach with the same subject but no versioning and no information about what
changed between versions.
Quoted 99 lines
First one was sent to trybot and then to intel-gfx. In this one I changed the subject. So I was thinking it's ok to leave out versioning.
I will add versioning when sending again.Quoted 94 lines
Quoted 67 lines
Cc Ville Syrjälä <[email protected]>Cc José Roberto de Souza <[email protected]>Cc Mika Kahola <[email protected]>Reported-by Lee Shawn C <[email protected]>Signed-off-by Jouni Högander <[email protected]>---
drivers/gpu/drm/i915/display/intel_psr.c | 19 ++++++++++-------- -1 file changed, 10 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +0
-0@@ -1510,7 +1510,8 @@ static voidpsr_force_hw_tracking_exit(struct
intel_dp*intel_dp)
PSR2_MAN_TRK_CTL(intel_dp-Quoted 1 line
psr.transcoder),
man_trk_ctl_enable_bit_get(dev_priv)Quoted 1 line
man_trk_ctl_partial_frame_bit_get(dev_priv)|
-man_trk_ctl_single_full_frame_bit_get(dev_priv));
+man_trk_ctl_single_full_frame_bit_get(dev_priv)|
+man_trk_ctl_continuos_full_frame(dev_priv));
/*
* Display WA #0884: skl+drivers/gpu/drm/i915/display/intel_psr.c +0
-0@@ -1624,11 +1625,8 @@ static void psr2_man_trk_ctl_calc(structintel_crtc_state *crtc_state, val |= man_trk_ctl_partial_frame_bit_get(dev_priv);
if (full_update) {
- /*
- * Not applying Wa_14014971508:adlp as we do not support the
- * feature that requires this workaround. - */
val |=man_trk_ctl_single_full_frame_bit_get(dev_priv);
+ val |=man_trk_ctl_continuos_full_frame(dev_priv);
goto exit;
}drivers/gpu/drm/i915/display/intel_psr.c +0
-0@@ -2307,12 +2305,15 @@ static void _psr_flush_handle(struct intel_dp *intel_dp) /* can we turn CFF off? */if (
intel_dp->psr.busy_frontbuffer_bits==
0) {
u32 val =man_trk_ctl_enable_bit_get(dev_priv)|
-man_trk_ctl_partial_frame_bit_get(dev_priv)|
-man_trk_ctl_single_full_frame_bit_get(dev_priv);
+ man_trk_ctl_partial_frameQuoted 8 lines
_b
it_get(dev_priv)|
+ man_trk_ctl_single_full_f rame_bit_get(dev_priv)|
+ man_trk_ctl_continuos_ful l_frame(dev_priv);style.
Quoted 5 lines
/*
- * turn continuous full frame off and do a single
- * full frameQuoted 8 lines
+ * turn continuous full frame off and do a single full frame. Still
+ * keep cff bit enabled as we don't
have proper SU configuration in
+ * case update is sent for any reason after sff bit gets cleared by
+ * the HW on next vblank.turn off and keep bit enabled?! makes no sense this comment.
I tried to make it more clear. Please check new version.
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
*/
intel_de_write(dev_priv, PSR2_MAN_TRK_CTL(intel_dp->psr.transcoder), val);
Quoted 24 lines · Jouni Högander
Currently we are observing occasionally display flickering or complete freeze. This is narrowed down to be caused by single full frame update (SFF).
SFF bit after it's written gets cleared by HW in subsequent vblank i.e. when the update is sent to the panel. SFF bit is required to be written together with partial frame update (PFU) bit. After the SFF bit gets cleared by the HW psr2 man trk ctl register still contains PFU bit. If there is subsequent update for any reason we will end up having selective update/fetch configuration where start line is 0 and end line is 0. Also selective fetch configuration for the planes is not properly performed. This seems to be causing problems with some panels.
Using CFF without SFF doesn't work either because it may happen that psr2 man track ctl register is overwritten by next update before vblank triggers sending the update. This is causing problems to psr_invalidate/flush. Using CFF and SFF together solves the problems as SFF is cleared only by HW in subsequent vblank.
Fix the flickering/freeze issue by adding continuous full frame with single full frame update and switch to partial frame update only when selective update area is properly calculated and configured.
Quoted 8 lines
This is also workaround for HSD 14014971508
Cc Ville Syrjälä <[email protected]>Cc José Roberto de Souza <[email protected]>Cc Mika Kahola <[email protected]>Reported-by Lee Shawn C <[email protected]>Signed-off-by Jouni Högander <[email protected]>
Looks ok to me. Wonder still if that is the way PSR2 was supposed to work or are we simply trying to fix/tackle some hw issues?
Anyways, if it helps and doesn't break anything else,
Quoted 54 lines
--- drivers/gpu/drm/i915/display/intel_psr.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +10
-9@@ -1510,7 +1510,8 @@ static void psr_force_hw_tracking_exit(struct intel_dp *intel_dp)PSR2_MAN_TRK_CTL (intel_dp->psr.transcoder),man_trk_ctl_enable_bit_get (dev_priv) |man_trk_ctl_partial_frame_bit_get (dev_priv) | - man_trk_ctl_single_full_frame_bit_get(dev_priv)); +man_trk_ctl_single_full_frame_bit_get (dev_priv) | + man_trk_ctl_continuos_full_frame(dev_priv));/* * Display WA #0884: skl+ @@ -1624,11 +1625,8 @@ static void psr2_man_trk_ctl_calc(struct intel_crtc_state *crtc_state, val |=man_trk_ctl_partial_frame_bit_get (dev_priv);if (full_update) { -/* -* Not applying Wa_14014971508:adlp as we do not support the -* feature that requires this workaround. -*/ val |=man_trk_ctl_single_full_frame_bit_get (dev_priv); + val |=man_trk_ctl_continuos_full_frame (dev_priv); goto exit; }@@ -2307,12 +2305,15 @@ static void _psr_flush_handle(struct intel_dp *intel_dp)/* can we turn CFF off? */ if (intel_dp->psr.busy_frontbuffer_bits ==0 ) {u32 val =man_trk_ctl_enable_bit_get (dev_priv) | -man_trk_ctl_partial_frame_bit_get (dev_priv) | -man_trk_ctl_single_full_frame_bit_get (dev_priv); +man_trk_ctl_partial_frame_bit_get (dev_priv) | +man_trk_ctl_single_full_frame_bit_get (dev_priv) | +man_trk_ctl_continuos_full_frame (dev_priv);/* -* turn continuous full frame off and do a single -* full frame +* turn continuous full frame off and do a single full frame. Still +* keep cff bit enabled as we don't have proper SU configuration in +* case update is sent for any reason after sff bit gets cleared by +* the HW on next vblank. */ intel_de_write (dev_priv,PSR2_MAN_TRK_CTL (intel_dp->psr.transcoder), val);Signature · 1 line
2.34.1