diff options
author | Matthieu Herrb <matthieu@herrb.eu> | 2022-06-27 15:52:59 +0200 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2022-06-28 15:31:39 +0200 |
commit | 3cb30de33f78f3c5cddcf848dec7fc94baa94a3b (patch) | |
tree | 4869d37833702905aec2e54d7aefcf693087fb6b /sysutils/libdrm | |
parent | 7b4acbdc3a898c0ab80cc5ea5823d771af288215 (diff) |
sysutils/libdrm: update to version 2.4.111
Diffstat (limited to 'sysutils/libdrm')
-rw-r--r-- | sysutils/libdrm/Makefile | 8 | ||||
-rw-r--r-- | sysutils/libdrm/distinfo | 4 | ||||
-rw-r--r-- | sysutils/libdrm/patches/patch-libsync_h | 1 | ||||
-rw-r--r-- | sysutils/libdrm/patches/patch-xf86drm_c | 74 | ||||
-rw-r--r-- | sysutils/libdrm/pkg/PLIST | 3 |
5 files changed, 72 insertions, 18 deletions
diff --git a/sysutils/libdrm/Makefile b/sysutils/libdrm/Makefile index a203f8e..f9f6b28 100644 --- a/sysutils/libdrm/Makefile +++ b/sysutils/libdrm/Makefile @@ -1,14 +1,12 @@ -# $OpenBSD: Makefile.template,v 1.83 2019/07/02 12:03:14 sthen Exp $ -# ONLY_FOR_ARCHS = amd64 i386 sparc64 COMMENT = Direct Rendering Manager library and headers -DISTNAME = libdrm-2.4.105 +DISTNAME = libdrm-2.4.111 EXTRACT_SUFX = .tar.xz -SHARED_LIBS = drm 7.9 drm_radeon 4.0 drm_intel 5.4 \ - drm_amdgpu 1.10 drm_nouveau 3.0 +SHARED_LIBS = drm 7.11 drm_radeon 4.0 drm_intel 5.4 \ + drm_amdgpu 1.12 drm_nouveau 3.0 CATEGORIES = sysutils diff --git a/sysutils/libdrm/distinfo b/sysutils/libdrm/distinfo index 57fbd30..b115dbb 100644 --- a/sysutils/libdrm/distinfo +++ b/sysutils/libdrm/distinfo @@ -1,2 +1,2 @@ -SHA256 (libdrm-2.4.105.tar.xz) = HR0CS3ytxj4rWc3aypT3iGSUCrRAhDhBET+6xq+vKkY= -SIZE (libdrm-2.4.105.tar.xz) = 420376 +SHA256 (libdrm-2.4.111.tar.xz) = GtcWT3dCTeb07Lp8JiveGWohTG4Zpvv0l/CBX016sqk= +SIZE (libdrm-2.4.111.tar.xz) = 447388 diff --git a/sysutils/libdrm/patches/patch-libsync_h b/sysutils/libdrm/patches/patch-libsync_h index d1fad0f..ebf339d 100644 --- a/sysutils/libdrm/patches/patch-libsync_h +++ b/sysutils/libdrm/patches/patch-libsync_h @@ -1,4 +1,3 @@ -$OpenBSD$ Index: libsync.h --- libsync.h.orig diff --git a/sysutils/libdrm/patches/patch-xf86drm_c b/sysutils/libdrm/patches/patch-xf86drm_c index a4db35d..248786e 100644 --- a/sysutils/libdrm/patches/patch-xf86drm_c +++ b/sysutils/libdrm/patches/patch-xf86drm_c @@ -1,9 +1,7 @@ -$OpenBSD$ - Index: xf86drm.c --- xf86drm.c.orig +++ xf86drm.c -@@ -99,6 +99,10 @@ +@@ -101,6 +101,10 @@ #define DRM_MAJOR 226 /* Linux */ #endif @@ -14,7 +12,7 @@ Index: xf86drm.c #if defined(__OpenBSD__) || defined(__DragonFly__) struct drm_pciinfo { uint16_t domain; -@@ -340,6 +344,18 @@ static const char *drmGetDeviceName(int type) +@@ -763,6 +767,18 @@ static const char *drmGetDeviceName(int type) return NULL; } @@ -33,7 +31,7 @@ Index: xf86drm.c /** * Open the DRM device, creating it if necessary. * -@@ -379,6 +395,7 @@ static int drmOpenDevice(dev_t dev, int minor, int typ +@@ -802,6 +818,7 @@ static int drmOpenDevice(dev_t dev, int minor, int typ devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH); } @@ -41,7 +39,7 @@ Index: xf86drm.c #if !UDEV if (stat(DRM_DIR_NAME, &st)) { if (!isroot) -@@ -425,14 +442,19 @@ wait_for_udev: +@@ -848,14 +865,19 @@ wait_for_udev: } } #endif @@ -62,7 +60,7 @@ Index: xf86drm.c /* Check if the device node is not what we expect it to be, and recreate it * and try again if so. */ -@@ -484,8 +506,13 @@ static int drmOpenMinor(int minor, int create, int typ +@@ -907,8 +929,13 @@ static int drmOpenMinor(int minor, int create, int typ return -EINVAL; sprintf(buf, dev_name, DRM_DIR_NAME, minor); @@ -78,3 +76,65 @@ Index: xf86drm.c return -errno; } +@@ -4514,53 +4541,6 @@ drm_device_has_rdev(drmDevicePtr device, dev_t find_rd + */ + drm_public int drmGetDeviceFromDevId(dev_t find_rdev, uint32_t flags, drmDevicePtr *device) + { +-#ifdef __OpenBSD__ +- /* +- * DRI device nodes on OpenBSD are not in their own directory, they reside +- * in /dev along with a large number of statically generated /dev nodes. +- * Avoid stat'ing all of /dev needlessly by implementing this custom path. +- */ +- drmDevicePtr d; +- char node[PATH_MAX + 1]; +- const char *dev_name; +- int node_type, subsystem_type; +- int maj, min, n, ret; +- +- if (device == NULL) +- return -EINVAL; +- +- maj = major(find_rdev); +- min = minor(find_rdev); +- +- if (!drmNodeIsDRM(maj, min)) +- return -EINVAL; +- +- node_type = drmGetMinorType(maj, min); +- if (node_type == -1) +- return -ENODEV; +- +- dev_name = drmGetDeviceName(node_type); +- if (!dev_name) +- return -EINVAL; +- +- n = snprintf(node, PATH_MAX, dev_name, DRM_DIR_NAME, min); +- if (n == -1 || n >= PATH_MAX) +- return -errno; +- if (stat(node, &sbuf)) +- return -EINVAL; +- +- subsystem_type = drmParseSubsystemType(maj, min); +- if (subsystem_type != DRM_BUS_PCI) +- return -ENODEV; +- +- ret = drmProcessPciDevice(&d, node, node_type, maj, min, true, flags); +- if (ret) +- return ret; +- +- *device = d; +- +- return 0; +-#else + drmDevicePtr local_devices[MAX_DRM_NODES]; + drmDevicePtr d; + DIR *sysdir; +@@ -4624,7 +4604,6 @@ drm_public int drmGetDeviceFromDevId(dev_t find_rdev, + if (*device == NULL) + return -ENODEV; + return 0; +-#endif + } + + /** diff --git a/sysutils/libdrm/pkg/PLIST b/sysutils/libdrm/pkg/PLIST index b396a11..edf4bb9 100644 --- a/sysutils/libdrm/pkg/PLIST +++ b/sysutils/libdrm/pkg/PLIST @@ -1,5 +1,3 @@ -@comment $OpenBSD: PLIST,v$ -include/libdrm/ include/libdrm/amdgpu.h include/libdrm/amdgpu_drm.h include/libdrm/drm.h @@ -43,5 +41,4 @@ lib/pkgconfig/libdrm.pc lib/pkgconfig/libdrm_amdgpu.pc lib/pkgconfig/libdrm_intel.pc lib/pkgconfig/libdrm_radeon.pc -share/libdrm/ share/libdrm/amdgpu.ids |