aboutsummaryrefslogtreecommitdiff
path: root/tests/modefb/demo.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-02-20 19:54:36 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2008-02-20 19:55:14 +0000
commit88cb873045b76bf947f45fb127baa96f055ad32c (patch)
treee84ed9d7913447f8f3e516cf999d0dcf39f1afb4 /tests/modefb/demo.c
parent66cd6bd66667433f56feecdcc94a2bb228d5a7ca (diff)
minor test fixes
Diffstat (limited to 'tests/modefb/demo.c')
-rw-r--r--tests/modefb/demo.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/modefb/demo.c b/tests/modefb/demo.c
index 7fa3b93f..b6d1f65b 100644
--- a/tests/modefb/demo.c
+++ b/tests/modefb/demo.c
@@ -26,7 +26,12 @@ int main(int argc, char **argv)
char name[100];
int i,d;
int fd;
- int drmfd = drmOpenControl(0);
+ int drmfd = drmOpen("i915", NULL);
+
+ if (drmfd < 0) {
+ printf("drmOpenControl failed\n");
+ return 1;
+ }
/* try four devices */
for (d = 0; d < 4; d++) {
@@ -38,11 +43,6 @@ int main(int argc, char **argv)
return 1;
}
- if (drmfd < 0) {
- printf("drmOpenControl failed\n");
- return 1;
- }
-
memset(&var, 0, sizeof(struct fb_var_screeninfo));
memset(&fix, 0, sizeof(struct fb_fix_screeninfo));
@@ -79,6 +79,8 @@ int main(int argc, char **argv)
printf("cursor (may show up on wrong CRTC - fixme)\n");
cursor(fd, drmfd);
+
+ close(fd);
}
return 0;
}