diff options
author | CoprDistGit <infra@openeuler.org> | 2024-12-12 02:36:25 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-12-12 02:36:25 +0000 |
commit | f051076cd2fb1be7c424f7e00479e436f0487022 (patch) | |
tree | 8d3e4f653fc70dbf1bcf9d8e8df9bda988e0d63f /libdrm-2.4.0-no-bc.patch | |
parent | 3ecc28626c625d8f7bf36bbdeaf56f4cc7c07a62 (diff) |
automatic import of libdrmopeneuler24.09openeuler24.03_LTS
Diffstat (limited to 'libdrm-2.4.0-no-bc.patch')
-rw-r--r-- | libdrm-2.4.0-no-bc.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/libdrm-2.4.0-no-bc.patch b/libdrm-2.4.0-no-bc.patch new file mode 100644 index 0000000..db9ff41 --- /dev/null +++ b/libdrm-2.4.0-no-bc.patch @@ -0,0 +1,53 @@ +diff -up libdrm-2.4.114/xf86drm.c.dma libdrm-2.4.114/xf86drm.c +--- libdrm-2.4.114/xf86drm.c.dma 2022-11-03 18:33:36.000000000 +1000 ++++ libdrm-2.4.114/xf86drm.c 2022-11-10 05:39:58.652477119 +1000 +@@ -930,11 +930,6 @@ drm_public int drmAvailable(void) + int fd; + + if ((fd = drmOpenMinor(0, 1, DRM_NODE_PRIMARY)) < 0) { +-#ifdef __linux__ +- /* Try proc for backward Linux compatibility */ +- if (!access("/proc/dri/0", R_OK)) +- return 1; +-#endif + return 0; + } + +@@ -1127,38 +1122,6 @@ static int drmOpenByName(const char *nam + } + } + +-#ifdef __linux__ +- /* Backward-compatibility /proc support */ +- for (i = 0; i < 8; i++) { +- char proc_name[64], buf[512]; +- char *driver, *pt, *devstring; +- int retcode; +- +- sprintf(proc_name, "/proc/dri/%d/name", i); +- if ((fd = open(proc_name, O_RDONLY)) >= 0) { +- retcode = read(fd, buf, sizeof(buf)-1); +- close(fd); +- if (retcode) { +- buf[retcode-1] = '\0'; +- for (driver = pt = buf; *pt && *pt != ' '; ++pt) +- ; +- if (*pt) { /* Device is next */ +- *pt = '\0'; +- if (!strcmp(driver, name)) { /* Match */ +- for (devstring = ++pt; *pt && *pt != ' '; ++pt) +- ; +- if (*pt) { /* Found busid */ +- return drmOpenByBusid(++pt, type); +- } else { /* No busid */ +- return drmOpenDevice(strtol(devstring, NULL, 0),i, type); +- } +- } +- } +- } +- } +- } +-#endif +- + return -1; + } |