summaryrefslogtreecommitdiff
path: root/tests/modedemo
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-02-13 12:20:02 +1000
committerDave Airlie <airlied@redhat.com>2008-02-13 12:20:02 +1000
commitdb85ed25afc616acfaadb21facf6066354f9d490 (patch)
tree2d4c7eafac377543f8c5a01aced75079056c4e87 /tests/modedemo
parentf276c845bde4c712aa383540a2dd2055ecc00031 (diff)
Revert "After the previous revert fix libdrm to start at minor 1"
This reverts commit f51dc37d75b0b1b8e5636f8f2c201e29986517ea. Conflicts: tests/modedemo/demo.c
Diffstat (limited to 'tests/modedemo')
-rw-r--r--tests/modedemo/demo.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/tests/modedemo/demo.c b/tests/modedemo/demo.c
index 9eef9022..474f04a5 100644
--- a/tests/modedemo/demo.c
+++ b/tests/modedemo/demo.c
@@ -10,19 +10,13 @@
/* Pitch needs to be power of two */
#define PITCH 2048
-
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <string.h>
-#ifdef CLEAN_FBDEV
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <linux/fb.h>
-#endif
+
#include "xf86drm.h"
#include "xf86drmMode.h"
@@ -32,11 +26,6 @@ void testCursor(int fd, uint32_t crtc);
void prettyColors(int fd, unsigned int handle);
void prettyCursor(int fd, unsigned int handle, unsigned int color);
-#ifdef CLEAN_FBDEV
-struct fb_var_screeninfo var;
-struct fb_fix_screeninfo fix;
-#endif
-
/* structs for the demo_driver */
struct demo_driver;
@@ -111,19 +100,6 @@ int main(int argc, char **argv)
struct demo_driver *driver;
int num;
int i;
-#ifdef CLEAN_FBDEV
- int fbdev_fd;
-
- fbdev_fd = open("/dev/fb0", O_RDWR);
-
- memset(&var, 0, sizeof(struct fb_var_screeninfo));
- memset(&fix, 0, sizeof(struct fb_fix_screeninfo));
-
- if (ioctl(fbdev_fd, FBIOGET_VSCREENINFO, &var))
- printf("var %s\n", strerror(errno));
- if (ioctl(fbdev_fd, FBIOGET_FSCREENINFO, &fix))
- printf("fix %s\n", strerror(errno));
-#endif
printf("starting demo\n");
@@ -378,7 +354,7 @@ struct demo_driver* demoCreateDriver(void)
memset(driver, 0, sizeof(struct demo_driver));
- driver->fd = drmOpen("i915", NULL);
+ driver->fd = drmOpenControl(0);
if (driver->fd < 0) {
printf("Failed to open the card fb\n");