]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blob - libdrm/patches/libdrm-2.4.0-no-bc.patch
Change file layout of the makefiles.
[people/arne_f/ipfire-3.x.git] / libdrm / patches / libdrm-2.4.0-no-bc.patch
1 diff -up libdrm-20080814/xf86drm.c.no-bc libdrm-20080814/xf86drm.c
2 --- libdrm-20080814/xf86drm.c.no-bc 2008-08-14 15:43:09.000000000 +1000
3 +++ libdrm-20080814/xf86drm.c 2008-08-14 15:45:09.000000000 +1000
4 @@ -396,11 +396,6 @@ int drmAvailable(void)
5 int fd;
6
7 if ((fd = drmOpenMinor(0, 1, DRM_NODE_RENDER)) < 0) {
8 -#ifdef __linux__
9 - /* Try proc for backward Linux compatibility */
10 - if (!access("/proc/dri/0", R_OK))
11 - return 1;
12 -#endif
13 return 0;
14 }
15
16 @@ -519,38 +514,6 @@ static int drmOpenByName(const char *nam
17 }
18 }
19
20 -#ifdef __linux__
21 - /* Backward-compatibility /proc support */
22 - for (i = 0; i < 8; i++) {
23 - char proc_name[64], buf[512];
24 - char *driver, *pt, *devstring;
25 - int retcode;
26 -
27 - sprintf(proc_name, "/proc/dri/%d/name", i);
28 - if ((fd = open(proc_name, 0, 0)) >= 0) {
29 - retcode = read(fd, buf, sizeof(buf)-1);
30 - close(fd);
31 - if (retcode) {
32 - buf[retcode-1] = '\0';
33 - for (driver = pt = buf; *pt && *pt != ' '; ++pt)
34 - ;
35 - if (*pt) { /* Device is next */
36 - *pt = '\0';
37 - if (!strcmp(driver, name)) { /* Match */
38 - for (devstring = ++pt; *pt && *pt != ' '; ++pt)
39 - ;
40 - if (*pt) { /* Found busid */
41 - return drmOpenByBusid(++pt);
42 - } else { /* No busid */
43 - return drmOpenDevice(strtol(devstring, NULL, 0),i, DRM_NODE_RENDER);
44 - }
45 - }
46 - }
47 - }
48 - }
49 - }
50 -#endif
51 -
52 return -1;
53 }
54