Skip to contentSkip to conversation

tests/kms_cursor_legacy: Disable Intel's PSR2 selective fetch in this test

PATCH In review José Roberto de Souza 3 participants 4 messages Nov 24, 2021 – Nov 25, 2021 Library code

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tests/kms_cursor_legacy: Disable Intel's PSR2 selective fetch in this test

When doing a primary or sprite plane flip, PSR2 selective fetch code also adds all the planes including cursor that overlaps with the area being updated, so this causes legacy cursor API calls to wait for a pending atomic commit to finish causing tests that do checks with vblank counters.

So here when running in an Intel platform that has PSR2 selective fetch enabled, it will switch to PSR1 before executing the subtests. Because what this whole test mostly wants to do, is check if userspace can do asynchronous cursors updates.

v2:
- rename functions and add documentation

---
 lib/igt_psr.c             | 44 +++++++++++++++++++++++++++++++++++++++
 lib/igt_psr.h             |  3 +++
 tests/kms_cursor_legacy.c | 10 +++++++++
 3 files changed, 57 insertions(+)
lib/igt_psr.c +44 -0
index 8fa8b192f..98eb28b40 100644
@@ -280,3 +280,47 @@ bool i915_psr2_selective_fetch_check(int drm_fd)
 
 	return ret;
 }
+
+/**
+ * i915_psr2_sel_fetch_to_psr1
+ *
+ * Check if PSR2 selective fetch is enabled, if yes switch to PSR1 and returns
+ * true otherwise returns false.
+ * This function should be called from tests that are not compatible with PSR2
+ * selective fetch.
+ *
+ * Returns:
+ * True if PSR mode changed to PSR1, false otherwise.
+ */
+bool i915_psr2_sel_fetch_to_psr1(int drm_fd)
+{
+	int debugfs_fd;
+	bool ret = false;
+
+	if (!is_i915_device(drm_fd))
+		return ret;
+
+	debugfs_fd = igt_debugfs_dir(drm_fd);
+	if (psr2_selective_fetch_check(debugfs_fd)) {
+		psr_set(drm_fd, debugfs_fd, PSR_MODE_1);
+		ret = true;
+	}
+
+	close(debugfs_fd);
+	return ret;
+}
+
+/**
+ * i915_psr2_sel_fetch_restore
+ *
+ * Restore PSR2 selective fetch after tests were executed, this function should
+ * only be called if i915_psr2_sel_fetch_to_psr1() returned true.
+ */
+void i915_psr2_sel_fetch_restore(int drm_fd)
+{
+	int debugfs_fd;
+
+	debugfs_fd = igt_debugfs_dir(drm_fd);
+	psr_set(drm_fd, debugfs_fd, PSR_MODE_2_SEL_FETCH);
+	close(debugfs_fd);
+}
lib/igt_psr.h +3 -0
index a075f336d..76cd26c65 100644
@@ -49,4 +49,7 @@ void psr_print_debugfs(int debugfs_fd);
 
 bool i915_psr2_selective_fetch_check(int drm_fd);
 
+bool i915_psr2_sel_fetch_to_psr1(int drm_fd);
+void i915_psr2_sel_fetch_restore(int drm_fd);
+
 #endif
tests/kms_cursor_legacy.c +10 -0
index cd2f84984..d50155e89 100644
@@ -27,6 +27,7 @@
 
 #include "i915/gem.h"
 #include "igt.h"
+#include "igt_psr.h"
 #include "igt_rand.h"
 #include "igt_stats.h"
 
@@ -1421,6 +1422,7 @@ igt_main
 {
 	const int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
 	igt_display_t display = { .drm_fd = -1 };
+	bool intel_psr2_restore = false;
 	int i;
 
 	igt_fixture {
@@ -1428,6 +1430,12 @@ igt_main
 		kmstest_set_vt_graphics_mode();
 
 		igt_display_require(&display, display.drm_fd);
+		/*
+		 * Not possible to evade vblank after a primary or sprite plane
+		 * page flip with cursor legacy APIS when Intel's PSR2 selective
+		 * fetch is enabled, so switching PSR1 for this whole test.
+		 */
+		intel_psr2_restore = i915_psr2_sel_fetch_to_psr1(display.drm_fd);
 	}
 
 	/*Test description for pipe-* and all-pipe-* tests*/
@@ -1609,6 +1617,8 @@ igt_main
 		}
 
 	igt_fixture {
+		if (intel_psr2_restore)
+			i915_psr2_sel_fetch_restore(display.drm_fd);
 		igt_display_fini(&display);
 	}
 }
Signature · 1 line
2.34.0
#1 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_legacy: Disable Intel's PSR2 selective fetch in this test (rev3)

== Series Details ==

== Series Details ==

Series: tests/kms_cursor_legacy: Disable Intel's PSR2 selective fetch in this test (rev3)
URL : https://patchwork.freedesktop.org/series/97212/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10924 -> IGTPW_6433
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

Participating hosts (48 -> 34)
------------------------------

Missing (14): fi-kbl-soraka fi-ilk-m540 bat-dg1-6 bat-dg1-5 fi-hsw-4200u fi-skl-guc fi-icl-u2 fi-bsw-cyan bat-adlp-6 bat-adlp-4 fi-ctg-p8600 fi-bdw-samus bat-jsl-2 bat-jsl-1

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s0:
- fi-tgl-u2: [PASS][1] -> [FAIL][2] ([i915#1888])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/fi-tgl-u2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/fi-tgl-u2/igt@[email protected]
- fi-tgl-1115g4: [PASS][3] -> [FAIL][4] ([i915#1888])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/fi-tgl-1115g4/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/fi-tgl-1115g4/igt@[email protected]

* igt@gem_exec_suspend@basic-s3:
- fi-bdw-5557u: [PASS][5] -> [INCOMPLETE][6] ([i915#146])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/fi-bdw-5557u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/fi-bdw-5557u/igt@[email protected]

* igt@gem_flink_basic@bad-flink:
- fi-skl-6600u: NOTRUN -> [FAIL][7] ([i915#4547])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/fi-skl-6600u/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- fi-cml-u2: [PASS][8] -> [DMESG-WARN][9] ([i915#4269])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/fi-cml-u2/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/fi-cml-u2/igt@[email protected]

* igt@runner@aborted:
- fi-skl-6600u: NOTRUN -> [FAIL][10] ([i915#3363] / [i915#4312])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/fi-skl-6600u/igt@[email protected]
- fi-bsw-nick: NOTRUN -> [FAIL][11] ([i915#3690])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/fi-bsw-nick/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s3:
- fi-skl-6600u: [INCOMPLETE][12] ([i915#198]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/fi-skl-6600u/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/fi-skl-6600u/igt@[email protected]

[i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
[i915#3690]: https://gitlab.freedesktop.org/drm/intel/issues/3690
[i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547

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

* CI: CI-20190529 -> None
* IGT: IGT_6288 -> IGTPW_6433

CI-20190529: 20190529
CI_DRM_10924: ba551d92d19db25d085cde572852bf6c08c7e750 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_6433: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/index.html
IGT_6288: a5ac2c3e67bc9a9c8d3f440a0324ee2c5d49eb49 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

#2 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_cursor_legacy: Disable Intel's PSR2 selective fetch in this test (rev3)

In reply to José Roberto de Souza
== Series Details ==

== Series Details ==

Series: tests/kms_cursor_legacy: Disable Intel's PSR2 selective fetch in this test (rev3)
URL : https://patchwork.freedesktop.org/series/97212/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10924_full -> IGTPW_6433_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_6433_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_6433_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

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

Participating hosts (11 -> 7)
------------------------------

Missing (4): pig-skl-6260u pig-kbl-iris shard-rkl pig-glk-j5005

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_6433_full:

### IGT changes ###

#### Possible regressions ####

* igt@gen9_exec_parse@bb-large:
- shard-apl: [PASS][1] -> [TIMEOUT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-apl1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl1/igt@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-async-flip:
- shard-glk: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-glk4/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk8/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_isolation@preservation-s3@bcs0:
- shard-tglb: [PASS][5] -> [INCOMPLETE][6] ([i915#456])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-tglb1/igt@gem_ctx_isolation@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb7/igt@gem_ctx_isolation@[email protected]

* igt@gem_ctx_persistence@engines-cleanup:
- shard-snb: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#1099])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-snb5/igt@[email protected]

* igt@gem_ctx_sseu@engines:
- shard-tglb: NOTRUN -> [SKIP][8] ([i915#280])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb5/igt@[email protected]

* igt@gem_exec_balancer@parallel-out-fence:
- shard-iclb: NOTRUN -> [SKIP][9] ([i915#4525])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb2/igt@[email protected]

* igt@gem_exec_capture@pi@vecs0:
- shard-iclb: NOTRUN -> [INCOMPLETE][10] ([i915#3371])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb8/igt@gem_exec_capture@[email protected]

* igt@gem_exec_fair@basic-flow@rcs0:
- shard-tglb: [PASS][11] -> [FAIL][12] ([i915#2842]) +2 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-tglb7/igt@gem_exec_fair@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none-share@rcs0:
- shard-apl: [PASS][13] -> [SKIP][14] ([fdo#109271])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-apl7/igt@gem_exec_fair@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl3/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none@rcs0:
- shard-glk: [PASS][15] -> [FAIL][16] ([i915#2842])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-glk7/igt@gem_exec_fair@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none@vcs0:
- shard-apl: [PASS][17] -> [FAIL][18] ([i915#2842])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-apl6/igt@gem_exec_fair@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl6/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-iclb: [PASS][19] -> [FAIL][20] ([i915#2842]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-iclb3/igt@gem_exec_fair@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb4/igt@gem_exec_fair@[email protected]
- shard-kbl: [PASS][21] -> [FAIL][22] ([i915#2842])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-kbl6/igt@gem_exec_fair@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl2/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace@vcs1:
- shard-iclb: NOTRUN -> [FAIL][23] ([i915#2842])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb4/igt@gem_exec_fair@[email protected]

* igt@gem_exec_params@no-blt:
- shard-tglb: NOTRUN -> [SKIP][24] ([fdo#109283]) +1 similar issue
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb1/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][25] ([fdo#109283])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb4/igt@[email protected]

* igt@gem_exec_params@secure-non-master:
- shard-iclb: NOTRUN -> [SKIP][26] ([fdo#112283])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb3/igt@[email protected]

* igt@gem_exec_reloc@basic-write-read:
- shard-apl: [PASS][27] -> [DMESG-WARN][28] ([i915#203]) +2 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-apl1/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl1/igt@[email protected]

* igt@gem_lmem_swapping@parallel-multi:
- shard-glk: NOTRUN -> [SKIP][29] ([fdo#109271] / [i915#4613])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk8/igt@[email protected]

* igt@gem_lmem_swapping@random-engines:
- shard-tglb: NOTRUN -> [SKIP][30] ([i915#4613]) +1 similar issue
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb5/igt@[email protected]

* igt@gem_pxp@display-protected-crc:
- shard-iclb: NOTRUN -> [SKIP][31] ([i915#4270]) +2 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb2/igt@[email protected]

* igt@gem_pxp@protected-encrypted-src-copy-not-readible:
- shard-tglb: NOTRUN -> [SKIP][32] ([i915#4270]) +4 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb7/igt@[email protected]

* igt@gem_render_copy@x-tiled-to-vebox-yf-tiled:
- shard-kbl: NOTRUN -> [SKIP][33] ([fdo#109271]) +122 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl2/igt@[email protected]

* igt@gem_render_copy@y-tiled-mc-ccs-to-vebox-yf-tiled:
- shard-iclb: NOTRUN -> [SKIP][34] ([i915#768])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb3/igt@[email protected]

* igt@gem_userptr_blits@input-checking:
- shard-apl: NOTRUN -> [DMESG-WARN][35] ([i915#3002])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl7/igt@[email protected]

* igt@gem_userptr_blits@invalid-mmap-offset-unsync:
- shard-iclb: NOTRUN -> [SKIP][36] ([i915#3297]) +1 similar issue
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb3/igt@[email protected]

* igt@gem_userptr_blits@readonly-unsync:
- shard-tglb: NOTRUN -> [SKIP][37] ([i915#3297])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb6/igt@[email protected]

* igt@gem_userptr_blits@vma-merge:
- shard-glk: NOTRUN -> [FAIL][38] ([i915#3318])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk9/igt@[email protected]

* igt@gem_workarounds@suspend-resume-fd:
- shard-snb: [PASS][39] -> [TIMEOUT][40] ([i915#4420])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-snb7/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-snb4/igt@[email protected]

* igt@gen7_exec_parse@cmd-crossing-page:
- shard-tglb: NOTRUN -> [SKIP][41] ([fdo#109289]) +5 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb1/igt@[email protected]

* igt@gen9_exec_parse@bb-start-cmd:
- shard-tglb: NOTRUN -> [SKIP][42] ([i915#2856])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb6/igt@[email protected]

* igt@gen9_exec_parse@bb-start-out:
- shard-iclb: NOTRUN -> [SKIP][43] ([i915#2856])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb1/igt@[email protected]

* igt@i915_pm_dc@dc6-dpms:
- shard-iclb: [PASS][44] -> [FAIL][45] ([i915#454]) +1 similar issue
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-iclb8/igt@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb3/igt@[email protected]

* igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait:
- shard-tglb: NOTRUN -> [SKIP][46] ([fdo#111644] / [i915#1397] / [i915#2411])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb3/igt@[email protected]

* igt@i915_query@query-topology-known-pci-ids:
- shard-tglb: NOTRUN -> [SKIP][47] ([fdo#109303])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb1/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][48] ([fdo#109303])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb4/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- shard-snb: [PASS][49] -> [INCOMPLETE][50] ([i915#3921])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-snb2/igt@i915_selftest@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-snb2/igt@i915_selftest@[email protected]

* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-apl: [PASS][51] -> [DMESG-WARN][52] ([i915#180]) +5 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-apl6/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl1/igt@[email protected]

* igt@kms_big_fb@linear-16bpp-rotate-270:
- shard-tglb: NOTRUN -> [SKIP][53] ([fdo#111614]) +1 similar issue
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb7/igt@[email protected]

* igt@kms_big_fb@linear-32bpp-rotate-180:
- shard-glk: [PASS][54] -> [DMESG-WARN][55] ([i915#118]) +1 similar issue
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-glk7/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk8/igt@[email protected]

* igt@kms_big_fb@x-tiled-64bpp-rotate-90:
- shard-iclb: NOTRUN -> [SKIP][56] ([fdo#110725] / [fdo#111614]) +1 similar issue
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb6/igt@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip:
- shard-glk: NOTRUN -> [SKIP][57] ([fdo#109271] / [i915#3777])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk4/igt@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip:
- shard-apl: NOTRUN -> [SKIP][58] ([fdo#109271] / [i915#3777])
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl4/igt@[email protected]
- shard-kbl: NOTRUN -> [SKIP][59] ([fdo#109271] / [i915#3777])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl7/igt@[email protected]

* igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-hflip:
- shard-tglb: NOTRUN -> [SKIP][60] ([fdo#111615]) +3 similar issues
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb8/igt@[email protected]

* igt@kms_big_joiner@2x-modeset:
- shard-tglb: NOTRUN -> [SKIP][61] ([i915#2705])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb3/igt@[email protected]

* igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_gen12_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][62] ([i915#3689] / [i915#3886]) +7 similar issues
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb5/igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_gen12_mc_ccs.html

* igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:
- shard-kbl: NOTRUN -> [SKIP][63] ([fdo#109271] / [i915#3886]) +6 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl3/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:
- shard-glk: NOTRUN -> [SKIP][64] ([fdo#109271] / [i915#3886]) +6 similar issues
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk2/igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html
- shard-apl: NOTRUN -> [SKIP][65] ([fdo#109271] / [i915#3886]) +6 similar issues
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl8/igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html
- shard-iclb: NOTRUN -> [SKIP][66] ([fdo#109278] / [i915#3886]) +6 similar issues
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb4/igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_rc_ccs_cc:
- shard-snb: NOTRUN -> [SKIP][67] ([fdo#109271]) +97 similar issues
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-snb6/igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-c-random-ccs-data-yf_tiled_ccs:
- shard-tglb: NOTRUN -> [SKIP][68] ([fdo#111615] / [i915#3689]) +2 similar issues
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb8/igt@kms_ccs@pipe-c-random-ccs-data-yf_tiled_ccs.html

* igt@kms_ccs@pipe-d-crc-primary-basic-y_tiled_gen12_mc_ccs:
- shard-iclb: NOTRUN -> [SKIP][69] ([fdo#109278]) +25 similar issues
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb8/igt@kms_ccs@pipe-d-crc-primary-basic-y_tiled_gen12_mc_ccs.html
- shard-tglb: NOTRUN -> [SKIP][70] ([i915#3689]) +2 similar issues
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb8/igt@kms_ccs@pipe-d-crc-primary-basic-y_tiled_gen12_mc_ccs.html

* igt@kms_chamelium@hdmi-edid-change-during-suspend:
- shard-apl: NOTRUN -> [SKIP][71] ([fdo#109271] / [fdo#111827]) +10 similar issues
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl6/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-for-each-pipe:
- shard-kbl: NOTRUN -> [SKIP][72] ([fdo#109271] / [fdo#111827]) +9 similar issues
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl3/igt@[email protected]

* igt@kms_chamelium@vga-edid-read:
- shard-iclb: NOTRUN -> [SKIP][73] ([fdo#109284] / [fdo#111827]) +4 similar issues
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb3/igt@[email protected]

* igt@kms_chamelium@vga-hpd-enable-disable-mode:
- shard-glk: NOTRUN -> [SKIP][74] ([fdo#109271] / [fdo#111827]) +11 similar issues
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk8/igt@[email protected]

* igt@kms_color@pipe-c-ctm-green-to-red:
- shard-apl: NOTRUN -> [DMESG-WARN][75] ([i915#180] / [i915#203] / [i915#62])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl1/igt@[email protected]

* igt@kms_color_chamelium@pipe-b-ctm-0-75:
- shard-tglb: NOTRUN -> [SKIP][76] ([fdo#109284] / [fdo#111827]) +11 similar issues
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb1/igt@[email protected]

* igt@kms_color_chamelium@pipe-d-ctm-0-5:
- shard-snb: NOTRUN -> [SKIP][77] ([fdo#109271] / [fdo#111827]) +5 similar issues
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-snb2/igt@[email protected]

* igt@kms_color_chamelium@pipe-d-ctm-max:
- shard-iclb: NOTRUN -> [SKIP][78] ([fdo#109278] / [fdo#109284] / [fdo#111827]) +1 similar issue
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb2/igt@[email protected]

* igt@kms_content_protection@type1:
- shard-iclb: NOTRUN -> [SKIP][79] ([fdo#109300] / [fdo#111066]) +1 similar issue
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb6/igt@[email protected]
- shard-tglb: NOTRUN -> [SKIP][80] ([fdo#111828]) +1 similar issue
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb1/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-512x512-onscreen:
- shard-tglb: NOTRUN -> [SKIP][81] ([fdo#109279] / [i915#3359]) +4 similar issues
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb6/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: NOTRUN -> [DMESG-WARN][82] ([i915#180])
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl4/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-32x32-onscreen:
- shard-tglb: NOTRUN -> [SKIP][83] ([i915#3319]) +3 similar issues
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb2/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-512x512-onscreen:
- shard-iclb: NOTRUN -> [SKIP][84] ([fdo#109278] / [fdo#109279]) +2 similar issues
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb8/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-max-size-onscreen:
- shard-tglb: NOTRUN -> [SKIP][85] ([i915#3359]) +5 similar issues
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb5/igt@[email protected]

* igt@kms_cursor_crc@pipe-d-cursor-256x85-rapid-movement:
- shard-glk: NOTRUN -> [SKIP][86] ([fdo#109271]) +97 similar issues
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk2/igt@[email protected]

* igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size:
- shard-iclb: NOTRUN -> [SKIP][87] ([fdo#109274] / [fdo#109278]) +3 similar issues
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb8/igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size.html

* igt@kms_cursor_legacy@flip-vs-cursor-varying-size:
- shard-iclb: [PASS][88] -> [FAIL][89] ([i915#2346])
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-iclb6/igt@[email protected]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb7/igt@[email protected]

* igt@kms_cursor_legacy@pipe-a-single-move:
- shard-apl: [PASS][90] -> [DMESG-WARN][91] ([i915#203] / [i915#533])
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-apl8/igt@[email protected]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl1/igt@[email protected]

* igt@kms_cursor_legacy@pipe-d-torture-bo:
- shard-kbl: NOTRUN -> [SKIP][92] ([fdo#109271] / [i915#533])
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl2/igt@[email protected]
- shard-apl: NOTRUN -> [SKIP][93] ([fdo#109271] / [i915#533])
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl2/igt@[email protected]
- shard-glk: NOTRUN -> [SKIP][94] ([fdo#109271] / [i915#533]) +1 similar issue
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk1/igt@[email protected]

* igt@kms_dp_tiled_display@basic-test-pattern-with-chamelium:
- shard-iclb: NOTRUN -> [SKIP][95] ([i915#3528])
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb5/igt@[email protected]

* igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
- shard-iclb: NOTRUN -> [SKIP][96] ([fdo#109274]) +3 similar issues
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb8/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible@c-dp1:
- shard-kbl: [PASS][97] -> [INCOMPLETE][98] ([i915#636])
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-kbl7/igt@kms_flip@[email protected]
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl3/igt@kms_flip@[email protected]

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

* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile:
- shard-iclb: [PASS][100] -> [SKIP][101] ([i915#3701])
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-iclb3/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt:
- shard-apl: NOTRUN -> [SKIP][102] ([fdo#109271]) +119 similar issues
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt.html

* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-tglb: NOTRUN -> [SKIP][103] ([fdo#111825]) +33 similar issues
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb3/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-mmap-gtt.html

* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-cur-indfb-move:
- shard-iclb: NOTRUN -> [SKIP][104] ([fdo#109280]) +20 similar issues
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb5/igt@[email protected]

* igt@kms_multipipe_modeset@basic-max-pipe-crc-check:
- shard-tglb: NOTRUN -> [SKIP][105] ([i915#1839])
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb2/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][106] ([i915#1839])
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb5/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes:
- shard-kbl: [PASS][107] -> [DMESG-WARN][108] ([i915#180]) +7 similar issues
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-kbl1/igt@kms_plane@[email protected]
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl4/igt@kms_plane@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
- shard-apl: NOTRUN -> [FAIL][109] ([i915#265])
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl8/igt@[email protected]
- shard-glk: NOTRUN -> [FAIL][110] ([i915#265])
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk4/igt@[email protected]
- shard-kbl: NOTRUN -> [FAIL][111] ([i915#265])
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl4/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-none:
- shard-tglb: NOTRUN -> [SKIP][112] ([i915#3536]) +2 similar issues
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb8/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][113] ([i915#3536]) +1 similar issue
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb8/igt@[email protected]

* igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping:
- shard-kbl: NOTRUN -> [SKIP][114] ([fdo#109271] / [i915#2733])
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl2/igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping.html

* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-1:
- shard-glk: NOTRUN -> [SKIP][115] ([fdo#109271] / [i915#658]) +3 similar issues
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk9/igt@[email protected]

* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-4:
- shard-apl: NOTRUN -> [SKIP][116] ([fdo#109271] / [i915#658]) +3 similar issues
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl1/igt@[email protected]
- shard-tglb: NOTRUN -> [SKIP][117] ([i915#2920]) +3 similar issues
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb8/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][118] ([i915#658]) +1 similar issue
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb8/igt@[email protected]

* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-3:
- shard-iclb: NOTRUN -> [SKIP][119] ([i915#2920])
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb2/igt@[email protected]
- shard-kbl: NOTRUN -> [SKIP][120] ([fdo#109271] / [i915#658]) +1 similar issue
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-kbl3/igt@[email protected]

* igt@kms_psr2_su@frontbuffer:
- shard-tglb: NOTRUN -> [SKIP][121] ([i915#1911])
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb5/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][122] ([fdo#109642] / [fdo#111068] / [i915#658])
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb7/igt@[email protected]

* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [PASS][123] -> [SKIP][124] ([fdo#109441]) +1 similar issue
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb7/igt@kms_psr@psr2_cursor_render.html

* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: NOTRUN -> [SKIP][125] ([fdo#109441]) +1 similar issue
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-iclb4/igt@kms_psr@psr2_sprite_mmap_gtt.html

* igt@kms_rotation_crc@sprite-rotation-90-pos-100-0:
- shard-apl: [PASS][126] -> [DMESG-WARN][127] ([i915#180] / [i915#203] / [i915#62]) +12 similar issues
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10924/shard-apl6/igt@[email protected]
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-apl1/igt@[email protected]

* igt@kms_setmode@basic:
- shard-snb: NOTRUN -> [FAIL][128] ([i915#31])
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-snb4/igt@[email protected]

* igt@kms_vblank@pipe-c-accuracy-idle:
- shard-glk: NOTRUN -> [FAIL][129] ([i915#43])
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-glk7/igt@[email protected]

* igt@kms_vrr@flipline:
- shard-tglb: NOTRUN -> [SKIP][130] ([fdo#109502])
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6433/shard-tglb8/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][131] ([fdo#109502])
[131]: https://intel-gfx-ci.0

== Logs ==

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

Reviewed-by on v2 1/1
#3 lore raw
In reply to José Roberto de Souza
Quoted 6 lines · José Roberto de Souza

When doing a primary or sprite plane flip, PSR2 selective fetch code also adds all the planes including cursor that overlaps with the area being updated, so this causes legacy cursor API calls to wait for a pending atomic commit to finish causing tests that do checks with vblank counters.

Quoted 8 lines

So here when running in an Intel platform that has PSR2 selective fetch enabled, it will switch to PSR1 before executing the subtests. Because what this whole test mostly wants to do, is check if userspace
can do asynchronous cursors updates.

v2:
- rename functions and add documentation

Quoted 126 lines
---
 lib/igt_psr.c             | 44
+++++++++++++++++++++++++++++++++++++++
 lib/igt_psr.h             |  3 +++
 tests/kms_cursor_legacy.c | 10 +++++++++
 3 files changed, 57 insertions(+)
lib/igt_psr.c +5 -0
index 8fa8b192f..98eb28b40 100644
@@ -280,3 +280,47 @@ bool i915_psr2_selective_fetch_check(int drm_fd)
 
 	return ret;
 }
+
+/**
+ * i915_psr2_sel_fetch_to_psr1
+ *
+ * Check if PSR2 selective fetch is enabled, if yes switch to PSR1

and returns
+ * true otherwise returns false.
+ * This function should be called from tests that are not compatible with PSR2
+ * selective fetch.
+ *
+ * Returns:
+ * True if PSR mode changed to PSR1, false otherwise.
+ */

lib/igt_psr.c +22 -0
+bool i915_psr2_sel_fetch_to_psr1(int drm_fd)
+{
+	int debugfs_fd;
+	bool ret = false;
+
+	if (!is_i915_device(drm_fd))
+		return ret;
+
+	debugfs_fd = igt_debugfs_dir(drm_fd);
+	if (psr2_selective_fetch_check(debugfs_fd)) {
+		psr_set(drm_fd, debugfs_fd, PSR_MODE_1);
+		ret = true;
+	}
+
+	close(debugfs_fd);
+	return ret;
+}
+
+/**
+ * i915_psr2_sel_fetch_restore
+ *
+ * Restore PSR2 selective fetch after tests were executed, this

function should
+ * only be called if i915_psr2_sel_fetch_to_psr1() returned true.
+ */

lib/igt_psr.c +8 -0
+void i915_psr2_sel_fetch_restore(int drm_fd)
+{
+	int debugfs_fd;
+
+	debugfs_fd = igt_debugfs_dir(drm_fd);
+	psr_set(drm_fd, debugfs_fd, PSR_MODE_2_SEL_FETCH);
+	close(debugfs_fd);
+}
lib/igt_psr.h +3 -0
index a075f336d..76cd26c65 100644
@@ -49,4 +49,7 @@ void psr_print_debugfs(int debugfs_fd);
 
 bool i915_psr2_selective_fetch_check(int drm_fd);
 
+bool i915_psr2_sel_fetch_to_psr1(int drm_fd);
+void i915_psr2_sel_fetch_restore(int drm_fd);
+
 #endif
tests/kms_cursor_legacy.c +4 -0
index cd2f84984..d50155e89 100644
@@ -27,6 +27,7 @@
 
 #include "i915/gem.h"
 #include "igt.h"
+#include "igt_psr.h"
 #include "igt_rand.h"
 #include "igt_stats.h"
 
@@ -1421,6 +1422,7 @@ igt_main
 {
 	const int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
 	igt_display_t display = { .drm_fd = -1 };
+	bool intel_psr2_restore = false;
 	int i;
 
 	igt_fixture {
@@ -1428,6 +1430,12 @@ igt_main
 		kmstest_set_vt_graphics_mode();
 
 		igt_display_require(&display, display.drm_fd);
+		/*
+		 * Not possible to evade vblank after a primary or

sprite plane

tests/kms_cursor_legacy.c +1 -0
+		 * page flip with cursor legacy APIS when Intel's PSR2

selective

tests/kms_cursor_legacy.c +1 -0
+		 * fetch is enabled, so switching PSR1 for this whole

test.

tests/kms_cursor_legacy.c +2 -0
+		 */
+		intel_psr2_restore =

i915_psr2_sel_fetch_to_psr1(display.drm_fd);

tests/kms_cursor_legacy.c +2 -0
 	}
 
 	/*Test description for pipe-* and all-pipe-* tests*/
@@ -1609,6 +1617,8 @@ igt_main
 		}
 
 	igt_fixture {
+		if (intel_psr2_restore)
+			i915_psr2_sel_fetch_restore(display.drm_fd);
 		igt_display_fini(&display);
 	}
 }