*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
#include "xf86drm.h"
int sigio_fd;
printf( "No driver available\n" );
}
}
-
-void handler(int fd, void *oldctx, void *newctx)
-{
- printf("Got fd %d\n", fd);
-}
-void process_sigio(char *device)
+static void process_sigio(char *device)
{
int fd;
if ((fd = open(device, 0)) < 0) {
- drmError(-errno, __FUNCTION__);
+ drmError(-errno, __func__);
exit(1);
}
sigio_fd = fd;
- drmInstallSIGIOHandler(fd, handler);
for (;;) sleep(60);
}
int c;
int r = 0;
int fd = -1;
- drmHandle handle;
+ drm_handle_t handle;
void *address;
char *pt;
unsigned long count;
unsigned long offset;
unsigned long size;
- drmContext context;
+ drm_context_t context;
int loops;
char buf[1024];
int i;
printf("===== /proc/%d/maps =====\n", getpid());
sprintf(buf, "cat /proc/%d/maps", getpid());
system(buf);
- printf("===== /proc/grphics/0/mem =====\n");
+ printf("===== /proc/dri/0/mem =====\n");
sprintf(buf, "cat /proc/dri/0/mem");
system(buf);
printf("===== /proc/dri/0/vma =====\n");
return r;
}
+
+int xf86ConfigDRI[10];