All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips
@ 2021-11-02 19:32 José Roberto de Souza
  2021-11-02 21:58 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Exit PSR when doing async flips (rev4) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: José Roberto de Souza @ 2021-11-02 19:32 UTC (permalink / raw)
  To: intel-gfx

Changing the buffer in the middle of the scanout then entering an
period of flip idleness will cause part of the previous buffer being
diplayed to user when PSR is enabled.

So here disabling PSR and scheduling activation during the next
sync flip.

The async flip check that we had in PSR compute is not executed at
every flip so it was not doing anything useful and is also being
dropped here.

v2:
- scheduling the PSR work in _intel_psr_post_plane_update()

v3:
- only re enabling PSR when doing a sync flip

Cc: Karthik B S <karthik.b.s@intel.com>
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 37 ++++++++++++++----------
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 9d589d471e335..b8fac53d57df1 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -731,12 +731,6 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
 		return false;
 	}
 
-	if (crtc_state->uapi.async_flip) {
-		drm_dbg_kms(&dev_priv->drm,
-			    "PSR2 sel fetch not enabled, async flip enabled\n");
-		return false;
-	}
-
 	/* Wa_14010254185 Wa_14010103792 */
 	if (IS_TGL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_C0)) {
 		drm_dbg_kms(&dev_priv->drm,
@@ -1780,36 +1774,47 @@ void intel_psr_pre_plane_update(struct intel_atomic_state *state,
 		if (psr->enabled && needs_to_disable)
 			intel_psr_disable_locked(intel_dp);
 
+		if (psr->enabled && crtc_state->uapi.async_flip)
+			intel_psr_exit(intel_dp);
+
 		mutex_unlock(&psr->lock);
 	}
 }
 
 static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
-					 const struct intel_crtc_state *crtc_state)
+					 const struct intel_crtc_state *old_crtc_state,
+					 const struct intel_crtc_state *new_crtc_state)
 {
 	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
 	struct intel_encoder *encoder;
 
-	if (!crtc_state->has_psr)
+	if (!new_crtc_state->has_psr)
 		return;
 
 	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
-					     crtc_state->uapi.encoder_mask) {
+					     new_crtc_state->uapi.encoder_mask) {
 		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
 		struct intel_psr *psr = &intel_dp->psr;
 
 		mutex_lock(&psr->lock);
 
-		drm_WARN_ON(&dev_priv->drm, psr->enabled && !crtc_state->active_planes);
+		drm_WARN_ON(&dev_priv->drm, psr->enabled &&
+			    !new_crtc_state->active_planes);
 
 		/* Only enable if there is active planes */
-		if (!psr->enabled && crtc_state->active_planes)
-			intel_psr_enable_locked(intel_dp, crtc_state);
+		if (!psr->enabled && new_crtc_state->active_planes)
+			intel_psr_enable_locked(intel_dp, new_crtc_state);
 
 		/* Force a PSR exit when enabling CRC to avoid CRC timeouts */
-		if (crtc_state->crc_enabled && psr->enabled)
+		if (new_crtc_state->crc_enabled && psr->enabled)
 			psr_force_hw_tracking_exit(intel_dp);
 
+		/* Only re enabling PSR when doing a sync flip */
+		if (psr->enabled && !psr->active &&
+		    old_crtc_state->uapi.async_flip &&
+		    !new_crtc_state->uapi.async_flip)
+			schedule_work(&intel_dp->psr.work);
+
 		mutex_unlock(&psr->lock);
 	}
 }
@@ -1817,15 +1822,15 @@ static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
 void intel_psr_post_plane_update(const struct intel_atomic_state *state)
 {
 	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
-	struct intel_crtc_state *crtc_state;
+	struct intel_crtc_state *old_crtc_state, *new_crtc_state;
 	struct intel_crtc *crtc;
 	int i;
 
 	if (!HAS_PSR(dev_priv))
 		return;
 
-	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i)
-		_intel_psr_post_plane_update(state, crtc_state);
+	for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i)
+		_intel_psr_post_plane_update(state, old_crtc_state, new_crtc_state);
 }
 
 static int _psr2_ready_for_pipe_update_locked(struct intel_dp *intel_dp)
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Exit PSR when doing async flips (rev4)
  2021-11-02 19:32 [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips José Roberto de Souza
@ 2021-11-02 21:58 ` Patchwork
  2021-11-03  0:34 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  2021-11-04 14:10 ` [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips Ville Syrjälä
  2 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2021-11-02 21:58 UTC (permalink / raw)
  To: Souza, Jose; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 6402 bytes --]

== Series Details ==

Series: drm/i915/display: Exit PSR when doing async flips (rev4)
URL   : https://patchwork.freedesktop.org/series/96440/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10830 -> Patchwork_21508
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/index.html

Participating hosts (36 -> 34)
------------------------------

  Additional (2): fi-kbl-soraka fi-tgl-1115g4 
  Missing    (4): fi-bsw-cyan fi-icl-u2 bat-dg1-6 bat-adlp-4 

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@query-info:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][1] ([fdo#109315])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-tgl-1115g4/igt@amdgpu/amd_basic@query-info.html

  * igt@amdgpu/amd_cs_nop@nop-gfx0:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][2] ([fdo#109315] / [i915#2575]) +16 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-tgl-1115g4/igt@amdgpu/amd_cs_nop@nop-gfx0.html

  * igt@gem_exec_fence@basic-busy@bcs0:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][3] ([fdo#109271]) +8 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-kbl-soraka/igt@gem_exec_fence@basic-busy@bcs0.html

  * igt@gem_huc_copy@huc-copy:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#2190])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][5] ([i915#2190])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-tgl-1115g4/igt@gem_huc_copy@huc-copy.html

  * igt@i915_pm_backlight@basic-brightness:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][6] ([i915#1155])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-tgl-1115g4/igt@i915_pm_backlight@basic-brightness.html

  * igt@i915_selftest@live@gt_pm:
    - fi-kbl-soraka:      NOTRUN -> [DMESG-FAIL][7] ([i915#1886] / [i915#2291])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][8] ([fdo#111827]) +8 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-tgl-1115g4/igt@kms_chamelium@common-hpd-after-suspend.html
    - fi-kbl-soraka:      NOTRUN -> [SKIP][9] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-kbl-soraka/igt@kms_chamelium@common-hpd-after-suspend.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][10] ([i915#4103]) +1 similar issue
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-tgl-1115g4/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][11] ([fdo#109285])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-tgl-1115g4/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-cml-u2:          [PASS][12] -> [DMESG-WARN][13] ([i915#4269])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
    - fi-cfl-8109u:       [PASS][14] -> [DMESG-WARN][15] ([i915#295]) +11 similar issues
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][16] ([fdo#109271] / [i915#533])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-kbl-soraka/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_psr@primary_mmap_gtt:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][17] ([i915#1072]) +3 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-tgl-1115g4/igt@kms_psr@primary_mmap_gtt.html

  * igt@prime_vgem@basic-userptr:
    - fi-tgl-1115g4:      NOTRUN -> [SKIP][18] ([i915#3301])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/fi-tgl-1115g4/igt@prime_vgem@basic-userptr.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
  [i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2291]: https://gitlab.freedesktop.org/drm/intel/issues/2291
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#295]: https://gitlab.freedesktop.org/drm/intel/issues/295
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533


Build changes
-------------

  * Linux: CI_DRM_10830 -> Patchwork_21508

  CI-20190529: 20190529
  CI_DRM_10830: 551447131277b251d76fa8db11e5a045bf9d853d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6268: c712ecac599add7e877883a7c8e2857d3c19836f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_21508: 3962a1996f54af61a6a53f92b9ab6972db1aa020 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

3962a1996f54 drm/i915/display: Exit PSR when doing async flips

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/index.html

[-- Attachment #2: Type: text/html, Size: 7787 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/display: Exit PSR when doing async flips (rev4)
  2021-11-02 19:32 [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips José Roberto de Souza
  2021-11-02 21:58 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Exit PSR when doing async flips (rev4) Patchwork
@ 2021-11-03  0:34 ` Patchwork
  2021-11-04 14:10 ` [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips Ville Syrjälä
  2 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2021-11-03  0:34 UTC (permalink / raw)
  To: Souza, Jose; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 30279 bytes --]

== Series Details ==

Series: drm/i915/display: Exit PSR when doing async flips (rev4)
URL   : https://patchwork.freedesktop.org/series/96440/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10830_full -> Patchwork_21508_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_create@create-massive:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][1] ([i915#3002])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl3/igt@gem_create@create-massive.html

  * igt@gem_exec_fair@basic-deadline:
    - shard-kbl:          NOTRUN -> [FAIL][2] ([i915#2846])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl3/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-apl:          [PASS][3] -> [SKIP][4] ([fdo#109271])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl7/igt@gem_exec_fair@basic-none-share@rcs0.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl2/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-tglb:         [PASS][5] -> [FAIL][6] ([i915#2842]) +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-tglb7/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
    - shard-glk:          [PASS][7] -> [FAIL][8] ([i915#2842]) +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-glk2/igt@gem_exec_fair@basic-pace@vcs0.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-glk2/igt@gem_exec_fair@basic-pace@vcs0.html

  * igt@gem_exec_fair@basic-pace@vcs1:
    - shard-iclb:         NOTRUN -> [FAIL][9] ([i915#2842])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb2/igt@gem_exec_fair@basic-pace@vcs1.html

  * igt@gem_exec_params@secure-non-root:
    - shard-tglb:         NOTRUN -> [SKIP][10] ([fdo#112283])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@gem_exec_params@secure-non-root.html

  * igt@gem_huc_copy@huc-copy:
    - shard-kbl:          NOTRUN -> [SKIP][11] ([fdo#109271] / [i915#2190])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl3/igt@gem_huc_copy@huc-copy.html

  * igt@gem_pxp@create-regular-context-1:
    - shard-tglb:         NOTRUN -> [SKIP][12] ([i915#4270]) +1 similar issue
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@gem_pxp@create-regular-context-1.html

  * igt@gem_render_copy@x-tiled-to-vebox-yf-tiled:
    - shard-kbl:          NOTRUN -> [SKIP][13] ([fdo#109271]) +216 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl6/igt@gem_render_copy@x-tiled-to-vebox-yf-tiled.html

  * igt@gem_softpin@allocator-evict-all-engines:
    - shard-glk:          [PASS][14] -> [DMESG-WARN][15] ([i915#118]) +1 similar issue
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-glk8/igt@gem_softpin@allocator-evict-all-engines.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-glk4/igt@gem_softpin@allocator-evict-all-engines.html

  * igt@gem_softpin@evict-snoop:
    - shard-tglb:         NOTRUN -> [SKIP][16] ([fdo#109312])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@gem_softpin@evict-snoop.html

  * igt@gem_userptr_blits@unsync-unmap-after-close:
    - shard-tglb:         NOTRUN -> [SKIP][17] ([i915#3297]) +1 similar issue
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@gem_userptr_blits@unsync-unmap-after-close.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-skl:          [PASS][18] -> [DMESG-WARN][19] ([i915#1436] / [i915#716])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-skl1/igt@gen9_exec_parse@allowed-single.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl4/igt@gen9_exec_parse@allowed-single.html

  * igt@gen9_exec_parse@bb-large:
    - shard-tglb:         NOTRUN -> [SKIP][20] ([i915#2856])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@gen9_exec_parse@bb-large.html

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-tglb:         NOTRUN -> [SKIP][21] ([i915#1904])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@i915_pm_rpm@modeset-lpsp-stress:
    - shard-apl:          NOTRUN -> [SKIP][22] ([fdo#109271]) +88 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl4/igt@i915_pm_rpm@modeset-lpsp-stress.html

  * igt@i915_query@query-topology-known-pci-ids:
    - shard-tglb:         NOTRUN -> [SKIP][23] ([fdo#109303])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb2/igt@i915_query@query-topology-known-pci-ids.html

  * igt@i915_query@query-topology-unsupported:
    - shard-tglb:         NOTRUN -> [SKIP][24] ([fdo#109302])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb2/igt@i915_query@query-topology-unsupported.html

  * igt@i915_suspend@debugfs-reader:
    - shard-tglb:         [PASS][25] -> [INCOMPLETE][26] ([i915#456]) +1 similar issue
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-tglb8/igt@i915_suspend@debugfs-reader.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb7/igt@i915_suspend@debugfs-reader.html

  * igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip:
    - shard-skl:          NOTRUN -> [FAIL][27] ([i915#3743])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl4/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip:
    - shard-kbl:          NOTRUN -> [SKIP][28] ([fdo#109271] / [i915#3777]) +1 similar issue
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl2/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-async-flip:
    - shard-skl:          NOTRUN -> [FAIL][29] ([i915#3763])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl4/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-async-flip.html

  * igt@kms_big_fb@yf-tiled-8bpp-rotate-0:
    - shard-tglb:         NOTRUN -> [SKIP][30] ([fdo#111615])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@kms_big_fb@yf-tiled-8bpp-rotate-0.html

  * igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc:
    - shard-kbl:          NOTRUN -> [SKIP][31] ([fdo#109271] / [i915#3886]) +11 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl7/igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][32] ([i915#3689]) +5 similar issues
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb2/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_ccs.html

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:
    - shard-apl:          NOTRUN -> [SKIP][33] ([fdo#109271] / [i915#3886]) +1 similar issue
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl4/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_gen12_mc_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][34] ([i915#3689] / [i915#3886]) +1 similar issue
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_gen12_mc_ccs:
    - shard-skl:          NOTRUN -> [SKIP][35] ([fdo#109271] / [i915#3886]) +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl4/igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-d-crc-primary-basic-y_tiled_gen12_mc_ccs:
    - shard-iclb:         NOTRUN -> [SKIP][36] ([fdo#109278])
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb8/igt@kms_ccs@pipe-d-crc-primary-basic-y_tiled_gen12_mc_ccs.html

  * igt@kms_chamelium@vga-hpd-for-each-pipe:
    - shard-kbl:          NOTRUN -> [SKIP][37] ([fdo#109271] / [fdo#111827]) +18 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl3/igt@kms_chamelium@vga-hpd-for-each-pipe.html

  * igt@kms_color@pipe-b-legacy-gamma:
    - shard-snb:          [PASS][38] -> [SKIP][39] ([fdo#109271])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-snb2/igt@kms_color@pipe-b-legacy-gamma.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-snb4/igt@kms_color@pipe-b-legacy-gamma.html

  * igt@kms_color_chamelium@pipe-b-ctm-0-5:
    - shard-skl:          NOTRUN -> [SKIP][40] ([fdo#109271] / [fdo#111827]) +3 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl4/igt@kms_color_chamelium@pipe-b-ctm-0-5.html

  * igt@kms_color_chamelium@pipe-c-ctm-0-25:
    - shard-apl:          NOTRUN -> [SKIP][41] ([fdo#109271] / [fdo#111827]) +4 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl8/igt@kms_color_chamelium@pipe-c-ctm-0-25.html

  * igt@kms_color_chamelium@pipe-d-ctm-max:
    - shard-tglb:         NOTRUN -> [SKIP][42] ([fdo#109284] / [fdo#111827]) +6 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@kms_color_chamelium@pipe-d-ctm-max.html

  * igt@kms_content_protection@atomic-dpms:
    - shard-apl:          NOTRUN -> [TIMEOUT][43] ([i915#1319]) +1 similar issue
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl4/igt@kms_content_protection@atomic-dpms.html

  * igt@kms_content_protection@legacy:
    - shard-kbl:          NOTRUN -> [TIMEOUT][44] ([i915#1319])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl2/igt@kms_content_protection@legacy.html

  * igt@kms_cursor_crc@pipe-b-cursor-512x512-onscreen:
    - shard-tglb:         NOTRUN -> [SKIP][45] ([fdo#109279] / [i915#3359]) +1 similar issue
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@kms_cursor_crc@pipe-b-cursor-512x512-onscreen.html

  * igt@kms_cursor_crc@pipe-c-cursor-32x32-offscreen:
    - shard-tglb:         NOTRUN -> [SKIP][46] ([i915#3319])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@kms_cursor_crc@pipe-c-cursor-32x32-offscreen.html

  * igt@kms_cursor_crc@pipe-d-cursor-32x10-offscreen:
    - shard-tglb:         NOTRUN -> [SKIP][47] ([i915#3359]) +1 similar issue
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb2/igt@kms_cursor_crc@pipe-d-cursor-32x10-offscreen.html

  * igt@kms_cursor_legacy@2x-cursor-vs-flip-atomic:
    - shard-iclb:         NOTRUN -> [SKIP][48] ([fdo#109274] / [fdo#109278]) +1 similar issue
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb8/igt@kms_cursor_legacy@2x-cursor-vs-flip-atomic.html

  * igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions-varying-size:
    - shard-tglb:         NOTRUN -> [SKIP][49] ([i915#4103])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions-varying-size.html

  * igt@kms_flip@2x-wf_vblank-ts-check-interruptible:
    - shard-iclb:         NOTRUN -> [SKIP][50] ([fdo#109274])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb8/igt@kms_flip@2x-wf_vblank-ts-check-interruptible.html

  * igt@kms_flip@flip-vs-expired-vblank@b-edp1:
    - shard-skl:          [PASS][51] -> [FAIL][52] ([i915#79])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-skl1/igt@kms_flip@flip-vs-expired-vblank@b-edp1.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl4/igt@kms_flip@flip-vs-expired-vblank@b-edp1.html

  * igt@kms_flip@flip-vs-suspend-interruptible@c-dp1:
    - shard-apl:          [PASS][53] -> [DMESG-WARN][54] ([i915#180]) +2 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl4/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl6/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html

  * igt@kms_flip@flip-vs-suspend@a-edp1:
    - shard-skl:          [PASS][55] -> [INCOMPLETE][56] ([i915#198]) +1 similar issue
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-skl6/igt@kms_flip@flip-vs-suspend@a-edp1.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl1/igt@kms_flip@flip-vs-suspend@a-edp1.html

  * igt@kms_flip@flip-vs-suspend@c-dp1:
    - shard-kbl:          [PASS][57] -> [DMESG-WARN][58] ([i915#180]) +6 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl3/igt@kms_flip@flip-vs-suspend@c-dp1.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl1/igt@kms_flip@flip-vs-suspend@c-dp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs:
    - shard-kbl:          NOTRUN -> [SKIP][59] ([fdo#109271] / [i915#2672])
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl3/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile:
    - shard-iclb:         [PASS][60] -> [SKIP][61] ([i915#3701])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-iclb7/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile.html

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-cur-indfb-draw-mmap-gtt:
    - shard-tglb:         NOTRUN -> [SKIP][62] ([fdo#111825]) +11 similar issues
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-cur-indfb-draw-mmap-gtt.html

  * igt@kms_frontbuffer_tracking@psr-shrfb-scaledprimary:
    - shard-glk:          NOTRUN -> [SKIP][63] ([fdo#109271])
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-glk2/igt@kms_frontbuffer_tracking@psr-shrfb-scaledprimary.html

  * igt@kms_hdr@static-toggle-suspend:
    - shard-tglb:         NOTRUN -> [SKIP][64] ([i915#1187])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@kms_hdr@static-toggle-suspend.html

  * igt@kms_pipe_b_c_ivb@enable-pipe-c-while-b-has-3-lanes:
    - shard-tglb:         NOTRUN -> [SKIP][65] ([fdo#109289])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb2/igt@kms_pipe_b_c_ivb@enable-pipe-c-while-b-has-3-lanes.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
    - shard-skl:          [PASS][66] -> [FAIL][67] ([fdo#108145] / [i915#265])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-skl7/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl7/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html

  * igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:
    - shard-kbl:          NOTRUN -> [FAIL][68] ([i915#265]) +1 similar issue
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl3/igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
    - shard-kbl:          NOTRUN -> [FAIL][69] ([fdo#108145] / [i915#265]) +3 similar issues
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl2/igt@kms_plane_alpha_blend@pipe-c-alpha-7efc.html
    - shard-apl:          NOTRUN -> [FAIL][70] ([fdo#108145] / [i915#265])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl8/igt@kms_plane_alpha_blend@pipe-c-alpha-7efc.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-iclb:         NOTRUN -> [SKIP][71] ([i915#3536])
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb8/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4:
    - shard-apl:          NOTRUN -> [SKIP][72] ([fdo#109271] / [i915#658]) +4 similar issues
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl4/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4.html

  * igt@kms_psr2_sf@plane-move-sf-dmg-area-3:
    - shard-kbl:          NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#658]) +5 similar issues
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl2/igt@kms_psr2_sf@plane-move-sf-dmg-area-3.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2:
    - shard-skl:          NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#658])
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl4/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-3:
    - shard-tglb:         NOTRUN -> [SKIP][75] ([i915#2920])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-3.html

  * igt@kms_psr@psr2_suspend:
    - shard-iclb:         [PASS][76] -> [SKIP][77] ([fdo#109441]) +3 similar issues
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-iclb2/igt@kms_psr@psr2_suspend.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb4/igt@kms_psr@psr2_suspend.html

  * igt@kms_writeback@writeback-pixel-formats:
    - shard-kbl:          NOTRUN -> [SKIP][78] ([fdo#109271] / [i915#2437])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl3/igt@kms_writeback@writeback-pixel-formats.html

  * igt@nouveau_crc@pipe-c-ctx-flip-skip-current-frame:
    - shard-tglb:         NOTRUN -> [SKIP][79] ([i915#2530]) +1 similar issue
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb2/igt@nouveau_crc@pipe-c-ctx-flip-skip-current-frame.html

  * igt@perf@gen12-mi-rpc:
    - shard-skl:          NOTRUN -> [SKIP][80] ([fdo#109271]) +36 similar issues
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl4/igt@perf@gen12-mi-rpc.html

  * igt@prime_nv_pcopy@test1_micro:
    - shard-tglb:         NOTRUN -> [SKIP][81] ([fdo#109291])
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@prime_nv_pcopy@test1_micro.html

  * igt@sysfs_clients@create:
    - shard-skl:          NOTRUN -> [SKIP][82] ([fdo#109271] / [i915#2994])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl4/igt@sysfs_clients@create.html

  * igt@sysfs_clients@fair-0:
    - shard-apl:          NOTRUN -> [SKIP][83] ([fdo#109271] / [i915#2994])
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl4/igt@sysfs_clients@fair-0.html

  * igt@sysfs_clients@pidname:
    - shard-tglb:         NOTRUN -> [SKIP][84] ([i915#2994])
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@sysfs_clients@pidname.html

  * igt@sysfs_clients@split-25:
    - shard-kbl:          NOTRUN -> [SKIP][85] ([fdo#109271] / [i915#2994]) +2 similar issues
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl3/igt@sysfs_clients@split-25.html

  
#### Possible fixes ####

  * igt@gem_eio@in-flight-10ms:
    - shard-iclb:         [TIMEOUT][86] -> [PASS][87]
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-iclb7/igt@gem_eio@in-flight-10ms.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb2/igt@gem_eio@in-flight-10ms.html

  * igt@gem_exec_fair@basic-none@vcs0:
    - shard-kbl:          [FAIL][88] ([i915#2842]) -> [PASS][89] +1 similar issue
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl3/igt@gem_exec_fair@basic-none@vcs0.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl2/igt@gem_exec_fair@basic-none@vcs0.html

  * igt@i915_suspend@fence-restore-untiled:
    - shard-tglb:         [INCOMPLETE][90] ([i915#456]) -> [PASS][91]
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-tglb7/igt@i915_suspend@fence-restore-untiled.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb2/igt@i915_suspend@fence-restore-untiled.html

  * igt@i915_suspend@forcewake:
    - shard-tglb:         [INCOMPLETE][92] ([i915#2411] / [i915#456]) -> [PASS][93]
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-tglb7/igt@i915_suspend@forcewake.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-tglb6/igt@i915_suspend@forcewake.html

  * igt@kms_color@pipe-b-ctm-0-5:
    - shard-skl:          [DMESG-WARN][94] ([i915#1982]) -> [PASS][95]
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-skl6/igt@kms_color@pipe-b-ctm-0-5.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl1/igt@kms_color@pipe-b-ctm-0-5.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1:
    - shard-skl:          [FAIL][96] ([i915#79]) -> [PASS][97]
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-skl1/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl6/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1.html

  * igt@kms_flip@flip-vs-expired-vblank@a-dp1:
    - shard-apl:          [FAIL][98] ([i915#79]) -> [PASS][99]
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl3/igt@kms_flip@flip-vs-expired-vblank@a-dp1.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl7/igt@kms_flip@flip-vs-expired-vblank@a-dp1.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
    - shard-apl:          [DMESG-WARN][100] ([i915#180]) -> [PASS][101] +5 similar issues
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl4/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl6/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-kbl:          [DMESG-WARN][102] ([i915#180]) -> [PASS][103] +8 similar issues
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl7/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_psr@psr2_primary_page_flip:
    - shard-iclb:         [SKIP][104] ([fdo#109441]) -> [PASS][105]
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-iclb7/igt@kms_psr@psr2_primary_page_flip.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html

  * igt@sysfs_timeslice_duration@timeout@vecs0:
    - shard-apl:          [FAIL][106] ([i915#1755]) -> [PASS][107]
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl1/igt@sysfs_timeslice_duration@timeout@vecs0.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl4/igt@sysfs_timeslice_duration@timeout@vecs0.html

  
#### Warnings ####

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-iclb:         [SKIP][108] ([i915#658]) -> [SKIP][109] ([i915#588])
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-iclb7/igt@i915_pm_dc@dc3co-vpb-simulation.html
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb2/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@i915_pm_dc@dc9-dpms:
    - shard-iclb:         [FAIL][110] ([i915#4275]) -> [SKIP][111] ([i915#4281])
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-iclb1/igt@i915_pm_dc@dc9-dpms.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb3/igt@i915_pm_dc@dc9-dpms.html

  * igt@i915_pm_rc6_residency@rc6-idle:
    - shard-iclb:         [WARN][112] ([i915#2684]) -> [WARN][113] ([i915#1804] / [i915#2684])
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-iclb8/igt@i915_pm_rc6_residency@rc6-idle.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb6/igt@i915_pm_rc6_residency@rc6-idle.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3:
    - shard-iclb:         [SKIP][114] ([i915#658]) -> [SKIP][115] ([i915#2920]) +1 similar issue
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-iclb7/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-iclb2/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3.html

  * igt@runner@aborted:
    - shard-kbl:          ([FAIL][116], [FAIL][117], [FAIL][118], [FAIL][119], [FAIL][120], [FAIL][121], [FAIL][122], [FAIL][123], [FAIL][124], [FAIL][125]) ([fdo#109271] / [i915#1436] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312]) -> ([FAIL][126], [FAIL][127], [FAIL][128], [FAIL][129], [FAIL][130], [FAIL][131], [FAIL][132], [FAIL][133]) ([i915#1436] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312])
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl1/igt@runner@aborted.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl1/igt@runner@aborted.html
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl1/igt@runner@aborted.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl3/igt@runner@aborted.html
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl4/igt@runner@aborted.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl4/igt@runner@aborted.html
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl4/igt@runner@aborted.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl6/igt@runner@aborted.html
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl7/igt@runner@aborted.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-kbl4/igt@runner@aborted.html
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl6/igt@runner@aborted.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl7/igt@runner@aborted.html
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl6/igt@runner@aborted.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl6/igt@runner@aborted.html
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl2/igt@runner@aborted.html
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl1/igt@runner@aborted.html
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl3/igt@runner@aborted.html
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-kbl1/igt@runner@aborted.html
    - shard-apl:          ([FAIL][134], [FAIL][135], [FAIL][136], [FAIL][137], [FAIL][138], [FAIL][139], [FAIL][140], [FAIL][141]) ([fdo#109271] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312]) -> ([FAIL][142], [FAIL][143], [FAIL][144], [FAIL][145], [FAIL][146]) ([i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#4312])
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl7/igt@runner@aborted.html
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl8/igt@runner@aborted.html
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl2/igt@runner@aborted.html
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl2/igt@runner@aborted.html
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl1/igt@runner@aborted.html
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl6/igt@runner@aborted.html
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl8/igt@runner@aborted.html
   [141]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-apl4/igt@runner@aborted.html
   [142]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl6/igt@runner@aborted.html
   [143]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl1/igt@runner@aborted.html
   [144]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl2/igt@runner@aborted.html
   [145]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl3/igt@runner@aborted.html
   [146]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-apl4/igt@runner@aborted.html
    - shard-skl:          ([FAIL][147], [FAIL][148]) ([i915#3002] / [i915#3363] / [i915#4312]) -> ([FAIL][149], [FAIL][150]) ([i915#1436] / [i915#3002] / [i915#3363] / [i915#4312])
   [147]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-skl2/igt@runner@aborted.html
   [148]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10830/shard-skl8/igt@runner@aborted.html
   [149]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl4/igt@runner@aborted.html
   [150]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/shard-skl9/igt@runner@aborted.html

  
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bu

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21508/index.html

[-- Attachment #2: Type: text/html, Size: 35042 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips
  2021-11-02 19:32 [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips José Roberto de Souza
  2021-11-02 21:58 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Exit PSR when doing async flips (rev4) Patchwork
  2021-11-03  0:34 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
@ 2021-11-04 14:10 ` Ville Syrjälä
  2021-11-04 17:56   ` Souza, Jose
  2 siblings, 1 reply; 10+ messages in thread
From: Ville Syrjälä @ 2021-11-04 14:10 UTC (permalink / raw)
  To: José Roberto de Souza; +Cc: intel-gfx

On Tue, Nov 02, 2021 at 12:32:14PM -0700, José Roberto de Souza wrote:
> Changing the buffer in the middle of the scanout then entering an
> period of flip idleness will cause part of the previous buffer being
> diplayed to user when PSR is enabled.
> 
> So here disabling PSR and scheduling activation during the next
> sync flip.
> 
> The async flip check that we had in PSR compute is not executed at
> every flip so it was not doing anything useful and is also being
> dropped here.
> 
> v2:
> - scheduling the PSR work in _intel_psr_post_plane_update()
> 
> v3:
> - only re enabling PSR when doing a sync flip
> 
> Cc: Karthik B S <karthik.b.s@intel.com>
> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 37 ++++++++++++++----------
>  1 file changed, 21 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 9d589d471e335..b8fac53d57df1 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -731,12 +731,6 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
>  		return false;
>  	}
>  
> -	if (crtc_state->uapi.async_flip) {
> -		drm_dbg_kms(&dev_priv->drm,
> -			    "PSR2 sel fetch not enabled, async flip enabled\n");
> -		return false;
> -	}
> -
>  	/* Wa_14010254185 Wa_14010103792 */
>  	if (IS_TGL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_C0)) {
>  		drm_dbg_kms(&dev_priv->drm,
> @@ -1780,36 +1774,47 @@ void intel_psr_pre_plane_update(struct intel_atomic_state *state,
>  		if (psr->enabled && needs_to_disable)
>  			intel_psr_disable_locked(intel_dp);
>  
> +		if (psr->enabled && crtc_state->uapi.async_flip)
> +			intel_psr_exit(intel_dp);
> +
>  		mutex_unlock(&psr->lock);
>  	}
>  }
>  
>  static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
> -					 const struct intel_crtc_state *crtc_state)
> +					 const struct intel_crtc_state *old_crtc_state,
> +					 const struct intel_crtc_state *new_crtc_state)

Might make sense to change this to match how psr_pre_plane_update()
works these days.

>  {
>  	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
>  	struct intel_encoder *encoder;
>  
> -	if (!crtc_state->has_psr)
> +	if (!new_crtc_state->has_psr)
>  		return;
>  
>  	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
> -					     crtc_state->uapi.encoder_mask) {
> +					     new_crtc_state->uapi.encoder_mask) {
>  		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
>  		struct intel_psr *psr = &intel_dp->psr;
>  
>  		mutex_lock(&psr->lock);
>  
> -		drm_WARN_ON(&dev_priv->drm, psr->enabled && !crtc_state->active_planes);
> +		drm_WARN_ON(&dev_priv->drm, psr->enabled &&
> +			    !new_crtc_state->active_planes);
>  
>  		/* Only enable if there is active planes */
> -		if (!psr->enabled && crtc_state->active_planes)
> -			intel_psr_enable_locked(intel_dp, crtc_state);
> +		if (!psr->enabled && new_crtc_state->active_planes)
> +			intel_psr_enable_locked(intel_dp, new_crtc_state);

What prevents this guy from activating PSR while we're doing
an async flip?

>  
>  		/* Force a PSR exit when enabling CRC to avoid CRC timeouts */
> -		if (crtc_state->crc_enabled && psr->enabled)
> +		if (new_crtc_state->crc_enabled && psr->enabled)
>  			psr_force_hw_tracking_exit(intel_dp);
>  
> +		/* Only re enabling PSR when doing a sync flip */
> +		if (psr->enabled && !psr->active &&
> +		    old_crtc_state->uapi.async_flip &&
> +		    !new_crtc_state->uapi.async_flip)
> +			schedule_work(&intel_dp->psr.work);
> +
>  		mutex_unlock(&psr->lock);
>  	}
>  }
> @@ -1817,15 +1822,15 @@ static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
>  void intel_psr_post_plane_update(const struct intel_atomic_state *state)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> -	struct intel_crtc_state *crtc_state;
> +	struct intel_crtc_state *old_crtc_state, *new_crtc_state;
>  	struct intel_crtc *crtc;
>  	int i;
>  
>  	if (!HAS_PSR(dev_priv))
>  		return;
>  
> -	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i)
> -		_intel_psr_post_plane_update(state, crtc_state);
> +	for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i)
> +		_intel_psr_post_plane_update(state, old_crtc_state, new_crtc_state);
>  }
>  
>  static int _psr2_ready_for_pipe_update_locked(struct intel_dp *intel_dp)
> -- 
> 2.33.1

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips
  2021-11-04 14:10 ` [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips Ville Syrjälä
@ 2021-11-04 17:56   ` Souza, Jose
  2021-11-05 13:46     ` Ville Syrjälä
  0 siblings, 1 reply; 10+ messages in thread
From: Souza, Jose @ 2021-11-04 17:56 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx

On Thu, 2021-11-04 at 16:10 +0200, Ville Syrjälä wrote:
> On Tue, Nov 02, 2021 at 12:32:14PM -0700, José Roberto de Souza wrote:
> > Changing the buffer in the middle of the scanout then entering an
> > period of flip idleness will cause part of the previous buffer being
> > diplayed to user when PSR is enabled.
> > 
> > So here disabling PSR and scheduling activation during the next
> > sync flip.
> > 
> > The async flip check that we had in PSR compute is not executed at
> > every flip so it was not doing anything useful and is also being
> > dropped here.
> > 
> > v2:
> > - scheduling the PSR work in _intel_psr_post_plane_update()
> > 
> > v3:
> > - only re enabling PSR when doing a sync flip
> > 
> > Cc: Karthik B S <karthik.b.s@intel.com>
> > Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_psr.c | 37 ++++++++++++++----------
> >  1 file changed, 21 insertions(+), 16 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> > index 9d589d471e335..b8fac53d57df1 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -731,12 +731,6 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
> >  		return false;
> >  	}
> >  
> > -	if (crtc_state->uapi.async_flip) {
> > -		drm_dbg_kms(&dev_priv->drm,
> > -			    "PSR2 sel fetch not enabled, async flip enabled\n");
> > -		return false;
> > -	}
> > -
> >  	/* Wa_14010254185 Wa_14010103792 */
> >  	if (IS_TGL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_C0)) {
> >  		drm_dbg_kms(&dev_priv->drm,
> > @@ -1780,36 +1774,47 @@ void intel_psr_pre_plane_update(struct intel_atomic_state *state,
> >  		if (psr->enabled && needs_to_disable)
> >  			intel_psr_disable_locked(intel_dp);
> >  
> > +		if (psr->enabled && crtc_state->uapi.async_flip)
> > +			intel_psr_exit(intel_dp);
> > +
> >  		mutex_unlock(&psr->lock);
> >  	}
> >  }
> >  
> >  static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
> > -					 const struct intel_crtc_state *crtc_state)
> > +					 const struct intel_crtc_state *old_crtc_state,
> > +					 const struct intel_crtc_state *new_crtc_state)
> 
> Might make sense to change this to match how psr_pre_plane_update()
> works these days.

Will do as follow up.

> 
> >  {
> >  	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> >  	struct intel_encoder *encoder;
> >  
> > -	if (!crtc_state->has_psr)
> > +	if (!new_crtc_state->has_psr)
> >  		return;
> >  
> >  	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
> > -					     crtc_state->uapi.encoder_mask) {
> > +					     new_crtc_state->uapi.encoder_mask) {
> >  		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> >  		struct intel_psr *psr = &intel_dp->psr;
> >  
> >  		mutex_lock(&psr->lock);
> >  
> > -		drm_WARN_ON(&dev_priv->drm, psr->enabled && !crtc_state->active_planes);
> > +		drm_WARN_ON(&dev_priv->drm, psr->enabled &&
> > +			    !new_crtc_state->active_planes);
> >  
> >  		/* Only enable if there is active planes */
> > -		if (!psr->enabled && crtc_state->active_planes)
> > -			intel_psr_enable_locked(intel_dp, crtc_state);
> > +		if (!psr->enabled && new_crtc_state->active_planes)
> > +			intel_psr_enable_locked(intel_dp, new_crtc_state);
> 
> What prevents this guy from activating PSR while we're doing
> an async flip?

enabled != active, when doing a async flip it will set active = false but enabled will be kept on.

And to change the number of active_planes it will need to do a sync flip, so we are safe.

> 
> >  
> >  		/* Force a PSR exit when enabling CRC to avoid CRC timeouts */
> > -		if (crtc_state->crc_enabled && psr->enabled)
> > +		if (new_crtc_state->crc_enabled && psr->enabled)
> >  			psr_force_hw_tracking_exit(intel_dp);
> >  
> > +		/* Only re enabling PSR when doing a sync flip */
> > +		if (psr->enabled && !psr->active &&
> > +		    old_crtc_state->uapi.async_flip &&
> > +		    !new_crtc_state->uapi.async_flip)
> > +			schedule_work(&intel_dp->psr.work);
> > +
> >  		mutex_unlock(&psr->lock);
> >  	}
> >  }
> > @@ -1817,15 +1822,15 @@ static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
> >  void intel_psr_post_plane_update(const struct intel_atomic_state *state)
> >  {
> >  	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > -	struct intel_crtc_state *crtc_state;
> > +	struct intel_crtc_state *old_crtc_state, *new_crtc_state;
> >  	struct intel_crtc *crtc;
> >  	int i;
> >  
> >  	if (!HAS_PSR(dev_priv))
> >  		return;
> >  
> > -	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i)
> > -		_intel_psr_post_plane_update(state, crtc_state);
> > +	for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i)
> > +		_intel_psr_post_plane_update(state, old_crtc_state, new_crtc_state);
> >  }
> >  
> >  static int _psr2_ready_for_pipe_update_locked(struct intel_dp *intel_dp)
> > -- 
> > 2.33.1
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips
  2021-11-04 17:56   ` Souza, Jose
@ 2021-11-05 13:46     ` Ville Syrjälä
  2021-11-05 17:44       ` Souza, Jose
  0 siblings, 1 reply; 10+ messages in thread
From: Ville Syrjälä @ 2021-11-05 13:46 UTC (permalink / raw)
  To: Souza, Jose; +Cc: intel-gfx

On Thu, Nov 04, 2021 at 05:56:52PM +0000, Souza, Jose wrote:
> On Thu, 2021-11-04 at 16:10 +0200, Ville Syrjälä wrote:
> > On Tue, Nov 02, 2021 at 12:32:14PM -0700, José Roberto de Souza wrote:
> > > Changing the buffer in the middle of the scanout then entering an
> > > period of flip idleness will cause part of the previous buffer being
> > > diplayed to user when PSR is enabled.
> > > 
> > > So here disabling PSR and scheduling activation during the next
> > > sync flip.
> > > 
> > > The async flip check that we had in PSR compute is not executed at
> > > every flip so it was not doing anything useful and is also being
> > > dropped here.
> > > 
> > > v2:
> > > - scheduling the PSR work in _intel_psr_post_plane_update()
> > > 
> > > v3:
> > > - only re enabling PSR when doing a sync flip
> > > 
> > > Cc: Karthik B S <karthik.b.s@intel.com>
> > > Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_psr.c | 37 ++++++++++++++----------
> > >  1 file changed, 21 insertions(+), 16 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> > > index 9d589d471e335..b8fac53d57df1 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > > @@ -731,12 +731,6 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
> > >  		return false;
> > >  	}
> > >  
> > > -	if (crtc_state->uapi.async_flip) {
> > > -		drm_dbg_kms(&dev_priv->drm,
> > > -			    "PSR2 sel fetch not enabled, async flip enabled\n");
> > > -		return false;
> > > -	}
> > > -
> > >  	/* Wa_14010254185 Wa_14010103792 */
> > >  	if (IS_TGL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_C0)) {
> > >  		drm_dbg_kms(&dev_priv->drm,
> > > @@ -1780,36 +1774,47 @@ void intel_psr_pre_plane_update(struct intel_atomic_state *state,
> > >  		if (psr->enabled && needs_to_disable)
> > >  			intel_psr_disable_locked(intel_dp);
> > >  
> > > +		if (psr->enabled && crtc_state->uapi.async_flip)
> > > +			intel_psr_exit(intel_dp);
> > > +
> > >  		mutex_unlock(&psr->lock);
> > >  	}
> > >  }
> > >  
> > >  static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
> > > -					 const struct intel_crtc_state *crtc_state)
> > > +					 const struct intel_crtc_state *old_crtc_state,
> > > +					 const struct intel_crtc_state *new_crtc_state)
> > 
> > Might make sense to change this to match how psr_pre_plane_update()
> > works these days.
> 
> Will do as follow up.
> 
> > 
> > >  {
> > >  	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > >  	struct intel_encoder *encoder;
> > >  
> > > -	if (!crtc_state->has_psr)
> > > +	if (!new_crtc_state->has_psr)
> > >  		return;
> > >  
> > >  	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
> > > -					     crtc_state->uapi.encoder_mask) {
> > > +					     new_crtc_state->uapi.encoder_mask) {
> > >  		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> > >  		struct intel_psr *psr = &intel_dp->psr;
> > >  
> > >  		mutex_lock(&psr->lock);
> > >  
> > > -		drm_WARN_ON(&dev_priv->drm, psr->enabled && !crtc_state->active_planes);
> > > +		drm_WARN_ON(&dev_priv->drm, psr->enabled &&
> > > +			    !new_crtc_state->active_planes);
> > >  
> > >  		/* Only enable if there is active planes */
> > > -		if (!psr->enabled && crtc_state->active_planes)
> > > -			intel_psr_enable_locked(intel_dp, crtc_state);
> > > +		if (!psr->enabled && new_crtc_state->active_planes)
> > > +			intel_psr_enable_locked(intel_dp, new_crtc_state);
> > 
> > What prevents this guy from activating PSR while we're doing
> > an async flip?
> 
> enabled != active, when doing a async flip it will set active = false but enabled will be kept on.

intel_psr_enable_locked() calls intel_psr_activate() uncoditionally.
There is no active=false thing anywhere that I can see.

> 
> And to change the number of active_planes it will need to do a sync flip, so we are safe.

Why would the number of active planes need to change for this
to get called?

I guess maybe there's some reason why this can't happen but it is
entirely non-obvious when reading this code. Also seems pretty
fragile if some other code now changes and suddenly causes this
to get called. In fact from the looks of things the only thing
needed would be for someone to call intel_psr_disable_locked()
so that psr->enabled gets cleared.

I might suggest adding crtc_state->psr_active or soemthing along
those lines to make it obvious when we want to have psr logically
enabled, but actually inactive.

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips
  2021-11-05 13:46     ` Ville Syrjälä
@ 2021-11-05 17:44       ` Souza, Jose
  2021-11-05 17:55         ` Ville Syrjälä
  0 siblings, 1 reply; 10+ messages in thread
From: Souza, Jose @ 2021-11-05 17:44 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx

On Fri, 2021-11-05 at 15:46 +0200, Ville Syrjälä wrote:
> On Thu, Nov 04, 2021 at 05:56:52PM +0000, Souza, Jose wrote:
> > On Thu, 2021-11-04 at 16:10 +0200, Ville Syrjälä wrote:
> > > On Tue, Nov 02, 2021 at 12:32:14PM -0700, José Roberto de Souza wrote:
> > > > Changing the buffer in the middle of the scanout then entering an
> > > > period of flip idleness will cause part of the previous buffer being
> > > > diplayed to user when PSR is enabled.
> > > > 
> > > > So here disabling PSR and scheduling activation during the next
> > > > sync flip.
> > > > 
> > > > The async flip check that we had in PSR compute is not executed at
> > > > every flip so it was not doing anything useful and is also being
> > > > dropped here.
> > > > 
> > > > v2:
> > > > - scheduling the PSR work in _intel_psr_post_plane_update()
> > > > 
> > > > v3:
> > > > - only re enabling PSR when doing a sync flip
> > > > 
> > > > Cc: Karthik B S <karthik.b.s@intel.com>
> > > > Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/display/intel_psr.c | 37 ++++++++++++++----------
> > > >  1 file changed, 21 insertions(+), 16 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> > > > index 9d589d471e335..b8fac53d57df1 100644
> > > > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > > > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > > > @@ -731,12 +731,6 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
> > > >  		return false;
> > > >  	}
> > > >  
> > > > -	if (crtc_state->uapi.async_flip) {
> > > > -		drm_dbg_kms(&dev_priv->drm,
> > > > -			    "PSR2 sel fetch not enabled, async flip enabled\n");
> > > > -		return false;
> > > > -	}
> > > > -
> > > >  	/* Wa_14010254185 Wa_14010103792 */
> > > >  	if (IS_TGL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_C0)) {
> > > >  		drm_dbg_kms(&dev_priv->drm,
> > > > @@ -1780,36 +1774,47 @@ void intel_psr_pre_plane_update(struct intel_atomic_state *state,
> > > >  		if (psr->enabled && needs_to_disable)
> > > >  			intel_psr_disable_locked(intel_dp);
> > > >  
> > > > +		if (psr->enabled && crtc_state->uapi.async_flip)
> > > > +			intel_psr_exit(intel_dp);
> > > > +
> > > >  		mutex_unlock(&psr->lock);
> > > >  	}
> > > >  }
> > > >  
> > > >  static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
> > > > -					 const struct intel_crtc_state *crtc_state)
> > > > +					 const struct intel_crtc_state *old_crtc_state,
> > > > +					 const struct intel_crtc_state *new_crtc_state)
> > > 
> > > Might make sense to change this to match how psr_pre_plane_update()
> > > works these days.
> > 
> > Will do as follow up.
> > 
> > > 
> > > >  {
> > > >  	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > > >  	struct intel_encoder *encoder;
> > > >  
> > > > -	if (!crtc_state->has_psr)
> > > > +	if (!new_crtc_state->has_psr)
> > > >  		return;
> > > >  
> > > >  	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
> > > > -					     crtc_state->uapi.encoder_mask) {
> > > > +					     new_crtc_state->uapi.encoder_mask) {
> > > >  		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> > > >  		struct intel_psr *psr = &intel_dp->psr;
> > > >  
> > > >  		mutex_lock(&psr->lock);
> > > >  
> > > > -		drm_WARN_ON(&dev_priv->drm, psr->enabled && !crtc_state->active_planes);
> > > > +		drm_WARN_ON(&dev_priv->drm, psr->enabled &&
> > > > +			    !new_crtc_state->active_planes);
> > > >  
> > > >  		/* Only enable if there is active planes */
> > > > -		if (!psr->enabled && crtc_state->active_planes)
> > > > -			intel_psr_enable_locked(intel_dp, crtc_state);
> > > > +		if (!psr->enabled && new_crtc_state->active_planes)
> > > > +			intel_psr_enable_locked(intel_dp, new_crtc_state);
> > > 
> > > What prevents this guy from activating PSR while we're doing
> > > an async flip?
> > 
> > enabled != active, when doing a async flip it will set active = false but enabled will be kept on.
> 
> intel_psr_enable_locked() calls intel_psr_activate() uncoditionally.
> There is no active=false thing anywhere that I can see.
> 
> > 
> > And to change the number of active_planes it will need to do a sync flip, so we are safe.
> 
> Why would the number of active planes need to change for this
> to get called?

If CRTC is left on but the number of planes goes to 0, PSR is disabled.
Then it is enabled again if the number of planes goes to 1 or more.

> 
> I guess maybe there's some reason why this can't happen but it is
> entirely non-obvious when reading this code. Also seems pretty
> fragile if some other code now changes and suddenly causes this
> to get called. In fact from the looks of things the only thing
> needed would be for someone to call intel_psr_disable_locked()
> so that psr->enabled gets cleared.

If someone calls intel_psr_disable_locked() then in the next flip the code above will indeed enable it again but as PSR takes at least 2 frames to
actually activate after registers are programmed, we are safe. (see PSR2 EDP_PSR2_FRAME_BEFORE_SU and PSR1 psr_compute_idle_frames())

Then on the next async flip, it will exited again and active set to false.

> 
> I might suggest adding crtc_state->psr_active or soemthing along
> those lines to make it obvious when we want to have psr logically
> enabled, but actually inactive.

Because of the invalidate frontbuffer rendering cases, we can't keep PSR status in atomic state.

> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips
  2021-11-05 17:44       ` Souza, Jose
@ 2021-11-05 17:55         ` Ville Syrjälä
  2021-11-09 19:13           ` Souza, Jose
  0 siblings, 1 reply; 10+ messages in thread
From: Ville Syrjälä @ 2021-11-05 17:55 UTC (permalink / raw)
  To: Souza, Jose; +Cc: intel-gfx

On Fri, Nov 05, 2021 at 05:44:21PM +0000, Souza, Jose wrote:
> On Fri, 2021-11-05 at 15:46 +0200, Ville Syrjälä wrote:
> > On Thu, Nov 04, 2021 at 05:56:52PM +0000, Souza, Jose wrote:
> > > On Thu, 2021-11-04 at 16:10 +0200, Ville Syrjälä wrote:
> > > > On Tue, Nov 02, 2021 at 12:32:14PM -0700, José Roberto de Souza wrote:
> > > > > Changing the buffer in the middle of the scanout then entering an
> > > > > period of flip idleness will cause part of the previous buffer being
> > > > > diplayed to user when PSR is enabled.
> > > > > 
> > > > > So here disabling PSR and scheduling activation during the next
> > > > > sync flip.
> > > > > 
> > > > > The async flip check that we had in PSR compute is not executed at
> > > > > every flip so it was not doing anything useful and is also being
> > > > > dropped here.
> > > > > 
> > > > > v2:
> > > > > - scheduling the PSR work in _intel_psr_post_plane_update()
> > > > > 
> > > > > v3:
> > > > > - only re enabling PSR when doing a sync flip
> > > > > 
> > > > > Cc: Karthik B S <karthik.b.s@intel.com>
> > > > > Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> > > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > > > > ---
> > > > >  drivers/gpu/drm/i915/display/intel_psr.c | 37 ++++++++++++++----------
> > > > >  1 file changed, 21 insertions(+), 16 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> > > > > index 9d589d471e335..b8fac53d57df1 100644
> > > > > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > > > > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > > > > @@ -731,12 +731,6 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
> > > > >  		return false;
> > > > >  	}
> > > > >  
> > > > > -	if (crtc_state->uapi.async_flip) {
> > > > > -		drm_dbg_kms(&dev_priv->drm,
> > > > > -			    "PSR2 sel fetch not enabled, async flip enabled\n");
> > > > > -		return false;
> > > > > -	}
> > > > > -
> > > > >  	/* Wa_14010254185 Wa_14010103792 */
> > > > >  	if (IS_TGL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_C0)) {
> > > > >  		drm_dbg_kms(&dev_priv->drm,
> > > > > @@ -1780,36 +1774,47 @@ void intel_psr_pre_plane_update(struct intel_atomic_state *state,
> > > > >  		if (psr->enabled && needs_to_disable)
> > > > >  			intel_psr_disable_locked(intel_dp);
> > > > >  
> > > > > +		if (psr->enabled && crtc_state->uapi.async_flip)
> > > > > +			intel_psr_exit(intel_dp);
> > > > > +
> > > > >  		mutex_unlock(&psr->lock);
> > > > >  	}
> > > > >  }
> > > > >  
> > > > >  static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
> > > > > -					 const struct intel_crtc_state *crtc_state)
> > > > > +					 const struct intel_crtc_state *old_crtc_state,
> > > > > +					 const struct intel_crtc_state *new_crtc_state)
> > > > 
> > > > Might make sense to change this to match how psr_pre_plane_update()
> > > > works these days.
> > > 
> > > Will do as follow up.
> > > 
> > > > 
> > > > >  {
> > > > >  	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > > > >  	struct intel_encoder *encoder;
> > > > >  
> > > > > -	if (!crtc_state->has_psr)
> > > > > +	if (!new_crtc_state->has_psr)
> > > > >  		return;
> > > > >  
> > > > >  	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
> > > > > -					     crtc_state->uapi.encoder_mask) {
> > > > > +					     new_crtc_state->uapi.encoder_mask) {
> > > > >  		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> > > > >  		struct intel_psr *psr = &intel_dp->psr;
> > > > >  
> > > > >  		mutex_lock(&psr->lock);
> > > > >  
> > > > > -		drm_WARN_ON(&dev_priv->drm, psr->enabled && !crtc_state->active_planes);
> > > > > +		drm_WARN_ON(&dev_priv->drm, psr->enabled &&
> > > > > +			    !new_crtc_state->active_planes);
> > > > >  
> > > > >  		/* Only enable if there is active planes */
> > > > > -		if (!psr->enabled && crtc_state->active_planes)
> > > > > -			intel_psr_enable_locked(intel_dp, crtc_state);
> > > > > +		if (!psr->enabled && new_crtc_state->active_planes)
> > > > > +			intel_psr_enable_locked(intel_dp, new_crtc_state);
> > > > 
> > > > What prevents this guy from activating PSR while we're doing
> > > > an async flip?
> > > 
> > > enabled != active, when doing a async flip it will set active = false but enabled will be kept on.
> > 
> > intel_psr_enable_locked() calls intel_psr_activate() uncoditionally.
> > There is no active=false thing anywhere that I can see.
> > 
> > > 
> > > And to change the number of active_planes it will need to do a sync flip, so we are safe.
> > 
> > Why would the number of active planes need to change for this
> > to get called?
> 
> If CRTC is left on but the number of planes goes to 0, PSR is disabled.
> Then it is enabled again if the number of planes goes to 1 or more.
> 
> > 
> > I guess maybe there's some reason why this can't happen but it is
> > entirely non-obvious when reading this code. Also seems pretty
> > fragile if some other code now changes and suddenly causes this
> > to get called. In fact from the looks of things the only thing
> > needed would be for someone to call intel_psr_disable_locked()
> > so that psr->enabled gets cleared.
> 
> If someone calls intel_psr_disable_locked() then in the next flip the code above will indeed enable it again but as PSR takes at least 2 frames to
> actually activate after registers are programmed, we are safe. (see PSR2 EDP_PSR2_FRAME_BEFORE_SU and PSR1 psr_compute_idle_frames())
> 
> Then on the next async flip, it will exited again and active set to false.
> 
> > 
> > I might suggest adding crtc_state->psr_active or soemthing along
> > those lines to make it obvious when we want to have psr logically
> > enabled, but actually inactive.
> 
> Because of the invalidate frontbuffer rendering cases, we can't keep PSR status in atomic state.

Not fully. But it shouldn't prevent us from having something there as
well. So if crtc_state says to not activate PSR then don't, otherwise
let it activate/deactive as needed based on frontbuffer activity.

ATM it seems to be kind of ad-hoc when we fully disable vs. just
deactivate PSR. Dunno how feasible it would be to make that either:
a) logically enable/disable PSR only during full modesets, and
   otherwise just activate/deactivate as needed whether it be due to
   stuff we can calculate based on crtc_state (eg. active_planes or
   async_flip) or frontbuffer activity
or
b) always logically enable/disable PSR based on stuff we can calculate
   from the crtc state, and leave the activate/deactivate stuff to only
   frontbuffer rendering activity

Although there is also the AUX vs. PSR case to consider, but looks like
that is still not fixed.

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips
  2021-11-05 17:55         ` Ville Syrjälä
@ 2021-11-09 19:13           ` Souza, Jose
  2021-11-15 17:18             ` Ville Syrjälä
  0 siblings, 1 reply; 10+ messages in thread
From: Souza, Jose @ 2021-11-09 19:13 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx

On Fri, 2021-11-05 at 19:55 +0200, Ville Syrjälä wrote:
> On Fri, Nov 05, 2021 at 05:44:21PM +0000, Souza, Jose wrote:
> > On Fri, 2021-11-05 at 15:46 +0200, Ville Syrjälä wrote:
> > > On Thu, Nov 04, 2021 at 05:56:52PM +0000, Souza, Jose wrote:
> > > > On Thu, 2021-11-04 at 16:10 +0200, Ville Syrjälä wrote:
> > > > > On Tue, Nov 02, 2021 at 12:32:14PM -0700, José Roberto de Souza wrote:
> > > > > > Changing the buffer in the middle of the scanout then entering an
> > > > > > period of flip idleness will cause part of the previous buffer being
> > > > > > diplayed to user when PSR is enabled.
> > > > > > 
> > > > > > So here disabling PSR and scheduling activation during the next
> > > > > > sync flip.
> > > > > > 
> > > > > > The async flip check that we had in PSR compute is not executed at
> > > > > > every flip so it was not doing anything useful and is also being
> > > > > > dropped here.
> > > > > > 
> > > > > > v2:
> > > > > > - scheduling the PSR work in _intel_psr_post_plane_update()
> > > > > > 
> > > > > > v3:
> > > > > > - only re enabling PSR when doing a sync flip
> > > > > > 
> > > > > > Cc: Karthik B S <karthik.b.s@intel.com>
> > > > > > Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> > > > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > > > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > > > > > ---
> > > > > >  drivers/gpu/drm/i915/display/intel_psr.c | 37 ++++++++++++++----------
> > > > > >  1 file changed, 21 insertions(+), 16 deletions(-)
> > > > > > 
> > > > > > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> > > > > > index 9d589d471e335..b8fac53d57df1 100644
> > > > > > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > > > > > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > > > > > @@ -731,12 +731,6 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
> > > > > >  		return false;
> > > > > >  	}
> > > > > >  
> > > > > > -	if (crtc_state->uapi.async_flip) {
> > > > > > -		drm_dbg_kms(&dev_priv->drm,
> > > > > > -			    "PSR2 sel fetch not enabled, async flip enabled\n");
> > > > > > -		return false;
> > > > > > -	}
> > > > > > -
> > > > > >  	/* Wa_14010254185 Wa_14010103792 */
> > > > > >  	if (IS_TGL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_C0)) {
> > > > > >  		drm_dbg_kms(&dev_priv->drm,
> > > > > > @@ -1780,36 +1774,47 @@ void intel_psr_pre_plane_update(struct intel_atomic_state *state,
> > > > > >  		if (psr->enabled && needs_to_disable)
> > > > > >  			intel_psr_disable_locked(intel_dp);
> > > > > >  
> > > > > > +		if (psr->enabled && crtc_state->uapi.async_flip)
> > > > > > +			intel_psr_exit(intel_dp);
> > > > > > +
> > > > > >  		mutex_unlock(&psr->lock);
> > > > > >  	}
> > > > > >  }
> > > > > >  
> > > > > >  static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
> > > > > > -					 const struct intel_crtc_state *crtc_state)
> > > > > > +					 const struct intel_crtc_state *old_crtc_state,
> > > > > > +					 const struct intel_crtc_state *new_crtc_state)
> > > > > 
> > > > > Might make sense to change this to match how psr_pre_plane_update()
> > > > > works these days.
> > > > 
> > > > Will do as follow up.
> > > > 
> > > > > 
> > > > > >  {
> > > > > >  	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > > > > >  	struct intel_encoder *encoder;
> > > > > >  
> > > > > > -	if (!crtc_state->has_psr)
> > > > > > +	if (!new_crtc_state->has_psr)
> > > > > >  		return;
> > > > > >  
> > > > > >  	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
> > > > > > -					     crtc_state->uapi.encoder_mask) {
> > > > > > +					     new_crtc_state->uapi.encoder_mask) {
> > > > > >  		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> > > > > >  		struct intel_psr *psr = &intel_dp->psr;
> > > > > >  
> > > > > >  		mutex_lock(&psr->lock);
> > > > > >  
> > > > > > -		drm_WARN_ON(&dev_priv->drm, psr->enabled && !crtc_state->active_planes);
> > > > > > +		drm_WARN_ON(&dev_priv->drm, psr->enabled &&
> > > > > > +			    !new_crtc_state->active_planes);
> > > > > >  
> > > > > >  		/* Only enable if there is active planes */
> > > > > > -		if (!psr->enabled && crtc_state->active_planes)
> > > > > > -			intel_psr_enable_locked(intel_dp, crtc_state);
> > > > > > +		if (!psr->enabled && new_crtc_state->active_planes)
> > > > > > +			intel_psr_enable_locked(intel_dp, new_crtc_state);
> > > > > 
> > > > > What prevents this guy from activating PSR while we're doing
> > > > > an async flip?
> > > > 
> > > > enabled != active, when doing a async flip it will set active = false but enabled will be kept on.
> > > 
> > > intel_psr_enable_locked() calls intel_psr_activate() uncoditionally.
> > > There is no active=false thing anywhere that I can see.
> > > 
> > > > 
> > > > And to change the number of active_planes it will need to do a sync flip, so we are safe.
> > > 
> > > Why would the number of active planes need to change for this
> > > to get called?
> > 
> > If CRTC is left on but the number of planes goes to 0, PSR is disabled.
> > Then it is enabled again if the number of planes goes to 1 or more.
> > 
> > > 
> > > I guess maybe there's some reason why this can't happen but it is
> > > entirely non-obvious when reading this code. Also seems pretty
> > > fragile if some other code now changes and suddenly causes this
> > > to get called. In fact from the looks of things the only thing
> > > needed would be for someone to call intel_psr_disable_locked()
> > > so that psr->enabled gets cleared.
> > 
> > If someone calls intel_psr_disable_locked() then in the next flip the code above will indeed enable it again but as PSR takes at least 2 frames to
> > actually activate after registers are programmed, we are safe. (see PSR2 EDP_PSR2_FRAME_BEFORE_SU and PSR1 psr_compute_idle_frames())
> > 
> > Then on the next async flip, it will exited again and active set to false.
> > 
> > > 
> > > I might suggest adding crtc_state->psr_active or soemthing along
> > > those lines to make it obvious when we want to have psr logically
> > > enabled, but actually inactive.
> > 
> > Because of the invalidate frontbuffer rendering cases, we can't keep PSR status in atomic state.
> 
> Not fully. But it shouldn't prevent us from having something there as
> well. So if crtc_state says to not activate PSR then don't, otherwise
> let it activate/deactive as needed based on frontbuffer activity.
> 
> ATM it seems to be kind of ad-hoc when we fully disable vs. just
> deactivate PSR. Dunno how feasible it would be to make that either:
> a) logically enable/disable PSR only during full modesets, and
>    otherwise just activate/deactivate as needed whether it be due to
>    stuff we can calculate based on crtc_state (eg. active_planes or
>    async_flip) or frontbuffer activity
> or
> b) always logically enable/disable PSR based on stuff we can calculate
>    from the crtc state, and leave the activate/deactivate stuff to only
>    frontbuffer rendering activity
> 

Something like this for a)?


void intel_psr_pre_plane_update(struct intel_atomic_state *state,
				struct intel_crtc *crtc)
{
	struct drm_i915_private *i915 = to_i915(state->base.dev);
	const struct intel_crtc_state *crtc_state =
		intel_atomic_get_new_crtc_state(state, crtc);
	struct intel_encoder *encoder;

	if (!HAS_PSR(i915))
		return;

	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
					     crtc_state->uapi.encoder_mask) {
		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
		struct intel_psr *psr = &intel_dp->psr;
		bool needs_to_disable = false;
		bool needs_to_exit = false;

		mutex_lock(&psr->lock);

		/*
		 * Reasons to disable:
		 * - PSR disabled in new state
		 * - Changing between PSR versions
		 */
		needs_to_disable |= intel_crtc_needs_modeset(crtc_state);
		needs_to_disable |= !crtc_state->has_psr;
		needs_to_disable |= crtc_state->has_psr2 != psr->psr2_enabled;
		if (psr->enabled && needs_to_disable)
			intel_psr_disable_locked(intel_dp);

		needs_to_exit |= crtc_state->uapi.async_flip;
		needs_to_exit |= crtc_state->active_planes == 0;
		if (psr->enabled && needs_to_exit)
			intel_psr_exit(intel_dp);

		mutex_unlock(&psr->lock);
	}
}

static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
					 const struct intel_crtc_state *old_crtc_state,
					 const struct intel_crtc_state *new_crtc_state)
{
	struct intel_encoder *encoder;

	if (!new_crtc_state->has_psr)
		return;

	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
					     new_crtc_state->uapi.encoder_mask) {
		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
		struct intel_psr *psr = &intel_dp->psr;
		bool can_activate = true;

		mutex_lock(&psr->lock);

		/* Only enable if there is active planes */
		if (new_crtc_state->uapi.async_flip ||
		    new_crtc_state->active_planes == 0 ||
		    psr->sink_not_reliable)
			can_activate = false;

		if (!psr->enabled && can_activate)
			intel_psr_enable_locked(intel_dp, new_crtc_state);

		if (psr->enabled && !psr->active && can_activate)
			intel_psr_activate(intel_dp);

		/* Force a PSR exit when enabling CRC to avoid CRC timeouts */
		if (new_crtc_state->crc_enabled && psr->enabled)
			psr_force_hw_tracking_exit(intel_dp);

		mutex_unlock(&psr->lock);
	}
}

> Although there is also the AUX vs. PSR case to consider, but looks like
> that is still not fixed.
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips
  2021-11-09 19:13           ` Souza, Jose
@ 2021-11-15 17:18             ` Ville Syrjälä
  0 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2021-11-15 17:18 UTC (permalink / raw)
  To: Souza, Jose; +Cc: intel-gfx

On Tue, Nov 09, 2021 at 07:13:34PM +0000, Souza, Jose wrote:
> On Fri, 2021-11-05 at 19:55 +0200, Ville Syrjälä wrote:
> > On Fri, Nov 05, 2021 at 05:44:21PM +0000, Souza, Jose wrote:
> > > On Fri, 2021-11-05 at 15:46 +0200, Ville Syrjälä wrote:
> > > > On Thu, Nov 04, 2021 at 05:56:52PM +0000, Souza, Jose wrote:
> > > > > On Thu, 2021-11-04 at 16:10 +0200, Ville Syrjälä wrote:
> > > > > > On Tue, Nov 02, 2021 at 12:32:14PM -0700, José Roberto de Souza wrote:
> > > > > > > Changing the buffer in the middle of the scanout then entering an
> > > > > > > period of flip idleness will cause part of the previous buffer being
> > > > > > > diplayed to user when PSR is enabled.
> > > > > > > 
> > > > > > > So here disabling PSR and scheduling activation during the next
> > > > > > > sync flip.
> > > > > > > 
> > > > > > > The async flip check that we had in PSR compute is not executed at
> > > > > > > every flip so it was not doing anything useful and is also being
> > > > > > > dropped here.
> > > > > > > 
> > > > > > > v2:
> > > > > > > - scheduling the PSR work in _intel_psr_post_plane_update()
> > > > > > > 
> > > > > > > v3:
> > > > > > > - only re enabling PSR when doing a sync flip
> > > > > > > 
> > > > > > > Cc: Karthik B S <karthik.b.s@intel.com>
> > > > > > > Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> > > > > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > > > > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > > > > > > ---
> > > > > > >  drivers/gpu/drm/i915/display/intel_psr.c | 37 ++++++++++++++----------
> > > > > > >  1 file changed, 21 insertions(+), 16 deletions(-)
> > > > > > > 
> > > > > > > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> > > > > > > index 9d589d471e335..b8fac53d57df1 100644
> > > > > > > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > > > > > > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > > > > > > @@ -731,12 +731,6 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
> > > > > > >  		return false;
> > > > > > >  	}
> > > > > > >  
> > > > > > > -	if (crtc_state->uapi.async_flip) {
> > > > > > > -		drm_dbg_kms(&dev_priv->drm,
> > > > > > > -			    "PSR2 sel fetch not enabled, async flip enabled\n");
> > > > > > > -		return false;
> > > > > > > -	}
> > > > > > > -
> > > > > > >  	/* Wa_14010254185 Wa_14010103792 */
> > > > > > >  	if (IS_TGL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_C0)) {
> > > > > > >  		drm_dbg_kms(&dev_priv->drm,
> > > > > > > @@ -1780,36 +1774,47 @@ void intel_psr_pre_plane_update(struct intel_atomic_state *state,
> > > > > > >  		if (psr->enabled && needs_to_disable)
> > > > > > >  			intel_psr_disable_locked(intel_dp);
> > > > > > >  
> > > > > > > +		if (psr->enabled && crtc_state->uapi.async_flip)
> > > > > > > +			intel_psr_exit(intel_dp);
> > > > > > > +
> > > > > > >  		mutex_unlock(&psr->lock);
> > > > > > >  	}
> > > > > > >  }
> > > > > > >  
> > > > > > >  static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
> > > > > > > -					 const struct intel_crtc_state *crtc_state)
> > > > > > > +					 const struct intel_crtc_state *old_crtc_state,
> > > > > > > +					 const struct intel_crtc_state *new_crtc_state)
> > > > > > 
> > > > > > Might make sense to change this to match how psr_pre_plane_update()
> > > > > > works these days.
> > > > > 
> > > > > Will do as follow up.
> > > > > 
> > > > > > 
> > > > > > >  {
> > > > > > >  	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> > > > > > >  	struct intel_encoder *encoder;
> > > > > > >  
> > > > > > > -	if (!crtc_state->has_psr)
> > > > > > > +	if (!new_crtc_state->has_psr)
> > > > > > >  		return;
> > > > > > >  
> > > > > > >  	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
> > > > > > > -					     crtc_state->uapi.encoder_mask) {
> > > > > > > +					     new_crtc_state->uapi.encoder_mask) {
> > > > > > >  		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> > > > > > >  		struct intel_psr *psr = &intel_dp->psr;
> > > > > > >  
> > > > > > >  		mutex_lock(&psr->lock);
> > > > > > >  
> > > > > > > -		drm_WARN_ON(&dev_priv->drm, psr->enabled && !crtc_state->active_planes);
> > > > > > > +		drm_WARN_ON(&dev_priv->drm, psr->enabled &&
> > > > > > > +			    !new_crtc_state->active_planes);
> > > > > > >  
> > > > > > >  		/* Only enable if there is active planes */
> > > > > > > -		if (!psr->enabled && crtc_state->active_planes)
> > > > > > > -			intel_psr_enable_locked(intel_dp, crtc_state);
> > > > > > > +		if (!psr->enabled && new_crtc_state->active_planes)
> > > > > > > +			intel_psr_enable_locked(intel_dp, new_crtc_state);
> > > > > > 
> > > > > > What prevents this guy from activating PSR while we're doing
> > > > > > an async flip?
> > > > > 
> > > > > enabled != active, when doing a async flip it will set active = false but enabled will be kept on.
> > > > 
> > > > intel_psr_enable_locked() calls intel_psr_activate() uncoditionally.
> > > > There is no active=false thing anywhere that I can see.
> > > > 
> > > > > 
> > > > > And to change the number of active_planes it will need to do a sync flip, so we are safe.
> > > > 
> > > > Why would the number of active planes need to change for this
> > > > to get called?
> > > 
> > > If CRTC is left on but the number of planes goes to 0, PSR is disabled.
> > > Then it is enabled again if the number of planes goes to 1 or more.
> > > 
> > > > 
> > > > I guess maybe there's some reason why this can't happen but it is
> > > > entirely non-obvious when reading this code. Also seems pretty
> > > > fragile if some other code now changes and suddenly causes this
> > > > to get called. In fact from the looks of things the only thing
> > > > needed would be for someone to call intel_psr_disable_locked()
> > > > so that psr->enabled gets cleared.
> > > 
> > > If someone calls intel_psr_disable_locked() then in the next flip the code above will indeed enable it again but as PSR takes at least 2 frames to
> > > actually activate after registers are programmed, we are safe. (see PSR2 EDP_PSR2_FRAME_BEFORE_SU and PSR1 psr_compute_idle_frames())
> > > 
> > > Then on the next async flip, it will exited again and active set to false.
> > > 
> > > > 
> > > > I might suggest adding crtc_state->psr_active or soemthing along
> > > > those lines to make it obvious when we want to have psr logically
> > > > enabled, but actually inactive.
> > > 
> > > Because of the invalidate frontbuffer rendering cases, we can't keep PSR status in atomic state.
> > 
> > Not fully. But it shouldn't prevent us from having something there as
> > well. So if crtc_state says to not activate PSR then don't, otherwise
> > let it activate/deactive as needed based on frontbuffer activity.
> > 
> > ATM it seems to be kind of ad-hoc when we fully disable vs. just
> > deactivate PSR. Dunno how feasible it would be to make that either:
> > a) logically enable/disable PSR only during full modesets, and
> >    otherwise just activate/deactivate as needed whether it be due to
> >    stuff we can calculate based on crtc_state (eg. active_planes or
> >    async_flip) or frontbuffer activity
> > or
> > b) always logically enable/disable PSR based on stuff we can calculate
> >    from the crtc state, and leave the activate/deactivate stuff to only
> >    frontbuffer rendering activity
> > 
> 
> Something like this for a)?
> 
> 
> void intel_psr_pre_plane_update(struct intel_atomic_state *state,
> 				struct intel_crtc *crtc)
> {
> 	struct drm_i915_private *i915 = to_i915(state->base.dev);
> 	const struct intel_crtc_state *crtc_state =
> 		intel_atomic_get_new_crtc_state(state, crtc);
> 	struct intel_encoder *encoder;
> 
> 	if (!HAS_PSR(i915))
> 		return;
> 
> 	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
> 					     crtc_state->uapi.encoder_mask) {
> 		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> 		struct intel_psr *psr = &intel_dp->psr;
> 		bool needs_to_disable = false;
> 		bool needs_to_exit = false;
> 
> 		mutex_lock(&psr->lock);
> 
> 		/*
> 		 * Reasons to disable:
> 		 * - PSR disabled in new state
> 		 * - Changing between PSR versions
> 		 */
> 		needs_to_disable |= intel_crtc_needs_modeset(crtc_state);
> 		needs_to_disable |= !crtc_state->has_psr;
> 		needs_to_disable |= crtc_state->has_psr2 != psr->psr2_enabled;
> 		if (psr->enabled && needs_to_disable)
> 			intel_psr_disable_locked(intel_dp);
> 
> 		needs_to_exit |= crtc_state->uapi.async_flip;
> 		needs_to_exit |= crtc_state->active_planes == 0;
> 		if (psr->enabled && needs_to_exit)
> 			intel_psr_exit(intel_dp);
> 
> 		mutex_unlock(&psr->lock);
> 	}
> }
> 
> static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
> 					 const struct intel_crtc_state *old_crtc_state,
> 					 const struct intel_crtc_state *new_crtc_state)
> {
> 	struct intel_encoder *encoder;
> 
> 	if (!new_crtc_state->has_psr)
> 		return;
> 
> 	for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
> 					     new_crtc_state->uapi.encoder_mask) {
> 		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> 		struct intel_psr *psr = &intel_dp->psr;
> 		bool can_activate = true;
> 
> 		mutex_lock(&psr->lock);
> 
> 		/* Only enable if there is active planes */
> 		if (new_crtc_state->uapi.async_flip ||
> 		    new_crtc_state->active_planes == 0 ||
> 		    psr->sink_not_reliable)
> 			can_activate = false;
> 
> 		if (!psr->enabled && can_activate)
> 			intel_psr_enable_locked(intel_dp, new_crtc_state);

This still conflates activate vs. enable, so not quite what I was
suggesting.

> 
> 		if (psr->enabled && !psr->active && can_activate)
> 			intel_psr_activate(intel_dp);
> 
> 		/* Force a PSR exit when enabling CRC to avoid CRC timeouts */
> 		if (new_crtc_state->crc_enabled && psr->enabled)
> 			psr_force_hw_tracking_exit(intel_dp);
> 
> 		mutex_unlock(&psr->lock);
> 	}
> }
> 
> > Although there is also the AUX vs. PSR case to consider, but looks like
> > that is still not fixed.
> > 
> 

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-11-15 17:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 19:32 [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips José Roberto de Souza
2021-11-02 21:58 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Exit PSR when doing async flips (rev4) Patchwork
2021-11-03  0:34 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-11-04 14:10 ` [Intel-gfx] [PATCH v3] drm/i915/display: Exit PSR when doing async flips Ville Syrjälä
2021-11-04 17:56   ` Souza, Jose
2021-11-05 13:46     ` Ville Syrjälä
2021-11-05 17:44       ` Souza, Jose
2021-11-05 17:55         ` Ville Syrjälä
2021-11-09 19:13           ` Souza, Jose
2021-11-15 17:18             ` Ville Syrjälä

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.