summaryrefslogtreecommitdiff
path: root/lib/igt_psr.h
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2018-10-23 16:19:30 -0700
committerJosé Roberto de Souza <jose.souza@intel.com>2019-02-13 16:43:33 -0800
commiteea5cf40199c0d08ac654481b830d8a3d4408502 (patch)
tree5384bd8d338a4889a45b8690b36ae844e98c958c /lib/igt_psr.h
parent0628e044a05b46cce102bb8aaa79669e22ec431b (diff)
test: Add PSR2 selective update tests
This tests checks if hardware is able to do selective update when screen changes. PSR2 don't trigger interruptions and the 'PSR2 SU status' register is not kept loaded all the times, so it is necessary keep polling PSR status debugfs until those values are loaded. Also from DEEP_SLEEP state HW will not do a seletive update, as most of the memory/context is lost in deep sleep state hardware will need to exit PSR mode then wait a configured number of frames to activate PSR again to then start doing seletive updates, that is why just one screen change is not enough to pass this tests. When a selective update happens and the values are loaded and read from debugfs it is compared with the expected value of seletive update blocks, if matches the polling is stopped and the test passed otherwise it will wait until it reachs a maximum number o screen changes to fail the test. v2: Using new SU blocks debugfs output v3: - removed the timerfd to fail the test, now failing based in a maximum number of screen changes - removing thread to read debugfs, read from main thread is enough - improved commit message v4: - getting cairo context for frontbuffer test in prepare() - droppoing poll(), using blocking timerfd instead v5: - Doing a modeset before trying to enable PSR2 v6: - doing atomic commits to fix(legacy commit is taking more time in recent kernels causing us to miss the SU when reading debugfs) and speedup test - fixed code to skip test when PSR2 is not possile Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Tested-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'lib/igt_psr.h')
-rw-r--r--lib/igt_psr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index 7e7017bf..49599cf8 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -40,5 +40,6 @@ bool psr_wait_update(int debugfs_fd, enum psr_mode mode);
bool psr_enable(int debugfs_fd, enum psr_mode);
bool psr_disable(int debugfs_fd);
bool psr_sink_support(int debugfs_fd, enum psr_mode);
+bool psr2_wait_su(int debugfs_fd, uint16_t *num_su_blocks);
#endif