summaryrefslogtreecommitdiff
path: root/src/glx/x11
diff options
context:
space:
mode:
authorDave Airlie <airliedfreedesktop.org>2006-11-08 22:25:52 +0000
committerDave Airlie <airliedfreedesktop.org>2006-11-08 22:25:52 +0000
commit4bb39f5899e7f004f6e06cb2f734d7847ab38dda (patch)
treee8c10a7ff8b5329fe10b3be7075ce09d1efa0320 /src/glx/x11
parent0ddd50c8aec1ae6dfe2d649972abf8f36a4e103e (diff)
remove drm stuff from libGL, this is now in libdrm 2.3.0
Diffstat (limited to 'src/glx/x11')
-rw-r--r--src/glx/x11/glxext.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index bad09ce4cc..8bec2c34c6 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -722,68 +722,6 @@ static const __DRIinterfaceMethods interface_methods = {
__glXGetMscRateOML,
};
-#define DRM_MAX_FDS 16
-static struct {
- char *BusID;
- int fd;
- int refcount;
-} connection[DRM_MAX_FDS];
-
-static int nr_fds = 0;
-
-int drmOpenOnce(void *unused,
- const char *BusID,
- int *newlyopened)
-{
- int i;
- int fd;
-
- for (i = 0; i < nr_fds; i++)
- if (strcmp(BusID, connection[i].BusID) == 0) {
- connection[i].refcount++;
- *newlyopened = 0;
- return connection[i].fd;
- }
-
- fd = drmOpen(unused, BusID);
- if (fd <= 0 || nr_fds == DRM_MAX_FDS)
- return fd;
-
- connection[nr_fds].BusID = strdup(BusID);
- connection[nr_fds].fd = fd;
- connection[nr_fds].refcount = 1;
- *newlyopened = 1;
-
- if (0)
- fprintf(stderr, "saved connection %d for %s %d\n",
- nr_fds, connection[nr_fds].BusID,
- strcmp(BusID, connection[nr_fds].BusID));
-
- nr_fds++;
-
- return fd;
-}
-
-void drmCloseOnce(int fd)
-{
- int i;
-
-
-
- for (i = 0; i < nr_fds; i++) {
- if (fd == connection[i].fd) {
- if (--connection[i].refcount == 0) {
- drmClose(connection[i].fd);
- free(connection[i].BusID);
-
- if (i < --nr_fds)
- connection[i] = connection[nr_fds];
-
- return;
- }
- }
- }
-}
/**