You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

libdrm-2.4.0-no-bc.patch 1.4KB

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