diff options
author | José Roberto de Souza <jose.souza@intel.com> | 2021-11-23 08:34:10 -0800 |
---|---|---|
committer | José Roberto de Souza <jose.souza@intel.com> | 2021-11-25 06:06:25 -0800 |
commit | 2edbba08875fc6348ec1cad59dfc0d91012cdeba (patch) | |
tree | 4dd36b36d690dd20f01cecf5da4772c2f0f9531a /tests/kms_cursor_legacy.c | |
parent | 04f17901d1a64e5ddc15f2f3873c04b756b1727d (diff) |
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
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2346
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Jouni Hogander <jouni.hogander@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'tests/kms_cursor_legacy.c')
-rw-r--r-- | tests/kms_cursor_legacy.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c index cd2f84984..d50155e89 100644 --- a/tests/kms_cursor_legacy.c +++ b/tests/kms_cursor_legacy.c @@ -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); } } |