diff --git a/.abf.yml b/.abf.yml index 0c5f040..c1e83f4 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - libdrm-2.4.102.tar.xz: c71ca06789ffca6daf5bf6ea8e3b76f373015449 + libdrm-2.4.103.tar.xz: 7583f6c48fca590cbf813e6d92bc4d26f7f4e0ee diff --git a/0101-RH-libdrm-2.4.70-no-bc-v1.4.patch b/0101-RH-libdrm-2.4.70-no-bc-v1.4.patch deleted file mode 100644 index e799b51..0000000 --- a/0101-RH-libdrm-2.4.70-no-bc-v1.4.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -rupN libdrm-2.4.70.old/xf86drm.c libdrm-2.4.70/xf86drm.c ---- libdrm-2.4.70.old/xf86drm.c 2016-07-21 01:42:21.000000000 +0200 -+++ libdrm-2.4.70/xf86drm.c 2016-07-25 14:46:13.224165554 +0200 -@@ -484,11 +484,6 @@ 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; - } - -@@ -661,38 +656,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, 0, 0)) >= 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; - } - diff --git a/libdrm.spec b/libdrm.spec index 3d009d1..47493d9 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -34,8 +34,8 @@ Summary: Userspace interface to kernel DRM services Name: libdrm -Version: 2.4.102 -Release: 3 +Version: 2.4.103 +Release: 1 Group: System/Libraries License: MIT/X11 Url: http://dri.freedesktop.org @@ -43,9 +43,6 @@ Source0: http://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.xz Source1: 91-drm-modeset.rules # hardcode the 666 instead of 660 for device nodes Patch0: 0100-RH-libdrm-make-dri-perms-okay-v1.2.patch -Patch1: 0101-RH-libdrm-2.4.70-no-bc-v1.4.patch -# (tpg) https://raw.githubusercontent.com/clearlinux-pkgs/libdrm/master/log2int.patch -Patch7: https://raw.githubusercontent.com/clearlinux-pkgs/libdrm/master/log2int.patch # For building man pages BuildRequires: docbook-style-xsl diff --git a/log2int.patch b/log2int.patch deleted file mode 100644 index ae9461e..0000000 --- a/log2int.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- libdrm-2.4.96/xf86drm.c~ 2018-10-16 14:49:03.000000000 +0000 -+++ libdrm-2.4.96/xf86drm.c 2019-01-18 04:33:23.641141632 +0000 -@@ -3769,6 +3769,21 @@ - } - } - -+static unsigned log2_int(unsigned x) -+{ -+ unsigned l; -+ -+ if (x < 2) { -+ return 0; -+ } -+ for (l = 2; ; l++) { -+ if ((unsigned)(1 << l) > x) { -+ return l - 1; -+ } -+ } -+ return 0; -+} -+ - /* Consider devices located on the same bus as duplicate and fold the respective - * entries into a single one. - * -@@ -3782,7 +3797,7 @@ - for (j = i + 1; j < count; j++) { - if (drmDevicesEqual(local_devices[i], local_devices[j])) { - local_devices[i]->available_nodes |= local_devices[j]->available_nodes; -- node_type = log2(local_devices[j]->available_nodes); -+ node_type = log2_int(local_devices[j]->available_nodes); - memcpy(local_devices[i]->nodes[node_type], - local_devices[j]->nodes[node_type], drmGetMaxNodeName()); - drmFreeDevice(&local_devices[j]);