summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-03-28 11:56:04 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-04-11 09:45:37 +0200
commitaed2030ea1eeda27299db8994b329d3063559805 (patch)
treea9e1f073143645788abca5fe55aa89d5c43b3c3f /lib
parent2c3e1ca6496de3b0377a43f4e8060cebd2c9920b (diff)
lib/igt_kms: Reset FIFO underruns on first commit after init()/reset().
When we set the test to its first state, we will clear FIFO underrun status through the debugfs, so that any underruns caused by the tests will not affect other tests. In particular this also resets the FBC FIFO underrun status, so previous failures won't affect other tests that depend on FBC. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105681 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_kms.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 4b25f836..35c77da7 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -3115,6 +3115,13 @@ display_commit_changed(igt_display_t *display, enum igt_commit_style s)
}
if (display->first_commit) {
+ int fd = igt_debugfs_open(display->drm_fd, "i915_fifo_underrun_reset", O_WRONLY);
+ if (fd >= 0) {
+ igt_assert_eq(write(fd, "y", 1), 1);
+
+ close(fd);
+ }
+
igt_display_drop_events(display);
display->first_commit = false;
}