diff options
author | Matthieu Herrb <matthieu@herrb.eu> | 2020-08-16 11:48:22 +0200 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2020-08-16 12:36:33 +0200 |
commit | 6d6a3b19718d4ca26c9debddd67cc23cbfe63d13 (patch) | |
tree | 49b8a8bebc5c66e9e863103a18a48c0db32f9eae /sysutils/libdrm | |
parent | 7b37172033f776bf36f1eea532751d3f59cd01a6 (diff) |
Update to libdrm 2.4.100
Diffstat (limited to 'sysutils/libdrm')
-rw-r--r-- | sysutils/libdrm/Makefile | 2 | ||||
-rw-r--r-- | sysutils/libdrm/distinfo | 4 | ||||
-rw-r--r-- | sysutils/libdrm/patches/patch-xf86drm_c | 102 |
3 files changed, 10 insertions, 98 deletions
diff --git a/sysutils/libdrm/Makefile b/sysutils/libdrm/Makefile index 9026811..35c71dc 100644 --- a/sysutils/libdrm/Makefile +++ b/sysutils/libdrm/Makefile @@ -4,7 +4,7 @@ ONLY_FOR_ARCHS = amd64 i386 sparc64 COMMENT = Direct Rendering Manager library and headers -DISTNAME = libdrm-2.4.98 +DISTNAME = libdrm-2.4.100 SHARED_LIBS = drm 7.7 drm_radeon 4.0 drm_intel 5.4 \ drm_amdgpu 1.8 drm_nouveau 3.0 diff --git a/sysutils/libdrm/distinfo b/sysutils/libdrm/distinfo index 33fe2a3..ec6dd8b 100644 --- a/sysutils/libdrm/distinfo +++ b/sysutils/libdrm/distinfo @@ -1,2 +1,2 @@ -SHA256 (libdrm-2.4.98.tar.gz) = OXieLDfnMAMkd3pcCk6hhGU3gisV6j5jCwoADYJD7pc= -SIZE (libdrm-2.4.98.tar.gz) = 1141680 +SHA256 (libdrm-2.4.100.tar.gz) = alM3wFTAxHvBZgeiHvorYi4IAwvkEB70okHF6wW2YZs= +SIZE (libdrm-2.4.100.tar.gz) = 1149132 diff --git a/sysutils/libdrm/patches/patch-xf86drm_c b/sysutils/libdrm/patches/patch-xf86drm_c index 835484b..2a1decb 100644 --- a/sysutils/libdrm/patches/patch-xf86drm_c +++ b/sysutils/libdrm/patches/patch-xf86drm_c @@ -3,7 +3,7 @@ $OpenBSD$ Index: xf86drm.c --- xf86drm.c.orig +++ xf86drm.c -@@ -101,6 +101,10 @@ +@@ -91,6 +91,10 @@ #define DRM_MAJOR 226 /* Linux */ #endif @@ -14,9 +14,9 @@ Index: xf86drm.c #if defined(__OpenBSD__) || defined(__DragonFly__) struct drm_pciinfo { uint16_t domain; -@@ -310,6 +314,18 @@ static int chown_check_return(const char *path, uid_t +@@ -313,6 +317,18 @@ static const char *drmGetDeviceName(int type) + return NULL; } - #endif +#ifdef X_PRIVSEP +static int @@ -33,7 +33,7 @@ Index: xf86drm.c /** * Open the DRM device, creating it if necessary. * -@@ -360,6 +376,7 @@ static int drmOpenDevice(dev_t dev, int minor, int typ +@@ -352,6 +368,7 @@ static int drmOpenDevice(dev_t dev, int minor, int typ devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH); } @@ -41,7 +41,7 @@ Index: xf86drm.c #if !UDEV if (stat(DRM_DIR_NAME, &st)) { if (!isroot) -@@ -406,14 +423,19 @@ wait_for_udev: +@@ -398,14 +415,19 @@ wait_for_udev: } } #endif @@ -62,8 +62,8 @@ Index: xf86drm.c /* Check if the device node is not what we expect it to be, and recreate it * and try again if so. */ -@@ -476,8 +498,13 @@ static int drmOpenMinor(int minor, int create, int typ - }; +@@ -457,8 +479,13 @@ static int drmOpenMinor(int minor, int create, int typ + return -EINVAL; sprintf(buf, dev_name, DRM_DIR_NAME, minor); - if ((fd = open(buf, O_RDWR | O_CLOEXEC, 0)) >= 0) @@ -78,91 +78,3 @@ Index: xf86drm.c return -errno; } -@@ -2904,7 +2931,7 @@ static char *drmGetMinorNameForFD(int fd, int type) - char buf[PATH_MAX + 1]; - const char *dev_name; - unsigned int maj, min; -- int n, base; -+ int n; - - if (fstat(fd, &sbuf)) - return NULL; -@@ -2929,11 +2956,7 @@ static char *drmGetMinorNameForFD(int fd, int type) - return NULL; - }; - -- base = drmGetMinorBase(type); -- if (base < 0) -- return NULL; -- -- n = snprintf(buf, sizeof(buf), dev_name, DRM_DIR_NAME, min - base); -+ n = snprintf(buf, sizeof(buf), dev_name, DRM_DIR_NAME, min); - if (n == -1 || n >= sizeof(buf)) - return NULL; - -@@ -3141,10 +3164,6 @@ drm_public int drmDevicesEqual(drmDevicePtr a, drmDevi - - static int drmGetNodeType(const char *name) - { -- if (strncmp(name, DRM_PRIMARY_MINOR_NAME, -- sizeof(DRM_PRIMARY_MINOR_NAME) - 1) == 0) -- return DRM_NODE_PRIMARY; -- - if (strncmp(name, DRM_CONTROL_MINOR_NAME, - sizeof(DRM_CONTROL_MINOR_NAME ) - 1) == 0) - return DRM_NODE_CONTROL; -@@ -3153,6 +3172,10 @@ static int drmGetNodeType(const char *name) - sizeof(DRM_RENDER_MINOR_NAME) - 1) == 0) - return DRM_NODE_RENDER; - -+ if (strncmp(name, DRM_PRIMARY_MINOR_NAME, -+ sizeof(DRM_PRIMARY_MINOR_NAME) - 1) == 0) -+ return DRM_NODE_PRIMARY; -+ - return -EINVAL; - } - -@@ -3827,7 +3850,7 @@ drm_public int drmGetDevice2(int fd, uint32_t flags, d - char node[PATH_MAX + 1]; - const char *dev_name; - int node_type, subsystem_type; -- int maj, min, n, ret, base; -+ int maj, min, n, ret; - - if (fd == -1 || device == NULL) - return -EINVAL; -@@ -3859,11 +3882,7 @@ drm_public int drmGetDevice2(int fd, uint32_t flags, d - return -EINVAL; - }; - -- base = drmGetMinorBase(node_type); -- if (base < 0) -- return -EINVAL; -- -- n = snprintf(node, PATH_MAX, dev_name, DRM_DIR_NAME, min - base); -+ n = snprintf(node, PATH_MAX, dev_name, DRM_DIR_NAME, min); - if (n == -1 || n >= PATH_MAX) - return -errno; - if (stat(node, &sbuf)) -@@ -4083,7 +4102,7 @@ drm_public char *drmGetDeviceNameFromFd2(int fd) - char node[PATH_MAX + 1]; - const char *dev_name; - int node_type; -- int maj, min, n, base; -+ int maj, min, n; - - if (fstat(fd, &sbuf)) - return NULL; -@@ -4112,11 +4131,7 @@ drm_public char *drmGetDeviceNameFromFd2(int fd) - return NULL; - }; - -- base = drmGetMinorBase(node_type); -- if (base < 0) -- return NULL; -- -- n = snprintf(node, PATH_MAX, dev_name, DRM_DIR_NAME, min - base); -+ n = snprintf(node, PATH_MAX, dev_name, DRM_DIR_NAME, min); - if (n == -1 || n >= PATH_MAX) - return NULL; - |