summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2013-05-08 19:06:43 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-05-08 21:00:45 +0200
commit0009a4af3d76ada8df86ec012736792d0543fb08 (patch)
treeb63abf58b3f85cacde5751a9405353f10fbf9348 /tests
parentcf26435be80232a30de918f6b231ffb7e3b30ee4 (diff)
kms_flip: set VT graphics mode
This is one reason for some of the sporadic kms_flip failures. One such is https://bugs.freedesktop.org/show_bug.cgi?id=59834. v2: - use unsigned long for KDSETMODE/KDGETMODE - fix passing the parameter to KDGETMODE as it should be by value - actually testing that it works.. v3: - don't do an explicit DPMS_ON, only switch to graphics mode. v4: - use the newly added drmtest_set_vt_graphics_mode(), which will also take care of restoring the original mode. (Daniel) Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_flip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index dc29e9d6..85e5c114 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -36,6 +36,7 @@
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
+#include <linux/kd.h>
#include "i915_drm.h"
#include "drmtest.h"
@@ -1205,8 +1206,10 @@ int main(int argc, char **argv)
drm_fd = drm_open_any();
- if (!drmtest_only_list_subtests())
+ if (!drmtest_only_list_subtests()) {
+ do_or_die(drmtest_set_vt_graphics_mode());
get_timestamp_format();
+ }
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
devid = intel_get_drm_devid(drm_fd);