summaryrefslogtreecommitdiff
path: root/tests/fbdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fbdev.c')
-rw-r--r--tests/fbdev.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/fbdev.c b/tests/fbdev.c
index fe320b14..e5efeb93 100644
--- a/tests/fbdev.c
+++ b/tests/fbdev.c
@@ -43,8 +43,16 @@ igt_main
struct fb_fix_screeninfo fix_info;
int fd = -1;
+ /*
+ * Should this test focus on the fbdev independent of any drm driver,
+ * or should it look for fbdev of a particular device?
+ */
igt_fixture {
fd = open("/dev/fb0", O_RDWR);
+ if (fd < 0) {
+ drm_load_module(DRIVER_ANY);
+ fd = open("/dev/fb0", O_RDWR);
+ }
igt_require_f(fd != -1, "/dev/fb0\n");
igt_require(ioctl(fd, FBIOGET_VSCREENINFO, &var_info) == 0);