summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@herrb.eu>2024-11-02 12:13:17 +0100
committerMatthieu Herrb <matthieu@herrb.eu>2024-11-02 12:13:17 +0100
commitd8e9ad49921881efe10a175c079f7ec52f9be036 (patch)
tree3fdabaafbfba03e9598c374917b20ace0797a073
parent174e3780257e67501a224f45254f7c0c83eecdbb (diff)
sysutils/libdrm: update to 2.4.123
-rw-r--r--sysutils/libdrm/Makefile9
-rw-r--r--sysutils/libdrm/distinfo4
-rw-r--r--sysutils/libdrm/patches/patch-libsync_h1
-rw-r--r--sysutils/libdrm/patches/patch-xf86drm_c33
4 files changed, 27 insertions, 20 deletions
diff --git a/sysutils/libdrm/Makefile b/sysutils/libdrm/Makefile
index 9c861e3..0569e1e 100644
--- a/sysutils/libdrm/Makefile
+++ b/sysutils/libdrm/Makefile
@@ -2,11 +2,11 @@ ONLY_FOR_ARCHS = amd64 i386 sparc64
COMMENT = Direct Rendering Manager library and headers
-DISTNAME = libdrm-2.4.117
+DISTNAME = libdrm-2.4.123
EXTRACT_SUFX = .tar.xz
-SHARED_LIBS = drm 7.12 drm_radeon 4.0 drm_intel 5.4 \
- drm_amdgpu 1.12
+SHARED_LIBS = drm 7.13 drm_radeon 4.0 drm_intel 5.4 \
+ drm_amdgpu 1.14
CATEGORIES = sysutils
@@ -31,7 +31,8 @@ CONFIGURE_ARGS = -Detnaviv=disabled \
-Dfreedreno=disabled \
-Dnouveau=disabled \
-Dvalgrind=disabled \
- -Dcairo-tests=disabled
+ -Dcairo-tests=disabled \
+ -Dtests=false
SEPARATE_BUILD = Yes
diff --git a/sysutils/libdrm/distinfo b/sysutils/libdrm/distinfo
index 834640e..949ab05 100644
--- a/sysutils/libdrm/distinfo
+++ b/sysutils/libdrm/distinfo
@@ -1,2 +1,2 @@
-SHA256 (libdrm-2.4.117.tar.xz) = ooiNaePrHIp3rcCKdaYPuuAfDSCNJvA00aEuNiNhJCs=
-SIZE (libdrm-2.4.117.tar.xz) = 475504
+SHA256 (libdrm-2.4.123.tar.xz) = ormFZ6FJp0sPUOkegl+cAxXYbnvpt0OU2uiymMqtt54=
+SIZE (libdrm-2.4.123.tar.xz) = 481112
diff --git a/sysutils/libdrm/patches/patch-libsync_h b/sysutils/libdrm/patches/patch-libsync_h
index ebf339d..f8ceeb0 100644
--- a/sysutils/libdrm/patches/patch-libsync_h
+++ b/sysutils/libdrm/patches/patch-libsync_h
@@ -1,4 +1,3 @@
-
Index: libsync.h
--- libsync.h.orig
+++ libsync.h
diff --git a/sysutils/libdrm/patches/patch-xf86drm_c b/sysutils/libdrm/patches/patch-xf86drm_c
index ea8d83e..55c362f 100644
--- a/sysutils/libdrm/patches/patch-xf86drm_c
+++ b/sysutils/libdrm/patches/patch-xf86drm_c
@@ -1,7 +1,7 @@
Index: xf86drm.c
--- xf86drm.c.orig
+++ xf86drm.c
-@@ -101,6 +101,10 @@
+@@ -100,6 +100,10 @@
#define DRM_MAJOR 226 /* Linux */
#endif
@@ -12,7 +12,7 @@ Index: xf86drm.c
#if defined(__OpenBSD__) || defined(__DragonFly__)
struct drm_pciinfo {
uint16_t domain;
-@@ -806,7 +810,7 @@ static int drmMatchBusID(const char *id1, const char *
+@@ -805,7 +809,7 @@ static int drmMatchBusID(const char *id1, const char *
* If any other failure happened then it will output error message using
* drmMsg() call.
*/
@@ -21,7 +21,7 @@ Index: xf86drm.c
static int chown_check_return(const char *path, uid_t owner, gid_t group)
{
int rv;
-@@ -835,6 +839,18 @@ static const char *drmGetDeviceName(int type)
+@@ -834,6 +838,18 @@ static const char *drmGetDeviceName(int type)
return NULL;
}
@@ -30,7 +30,7 @@ Index: xf86drm.c
+_priv_open_device(const char *path)
+{
+ drmMsg("_priv_open_device\n");
-+ return open(path, O_RDWR, 0);
++ return open(path, O_RDWR);
+}
+
+drm_public int priv_open_device(const char *)
@@ -40,7 +40,7 @@ Index: xf86drm.c
/**
* Open the DRM device, creating it if necessary.
*
-@@ -856,7 +872,7 @@ static int drmOpenDevice(dev_t dev, int minor, int typ
+@@ -855,7 +871,7 @@ static int drmOpenDevice(dev_t dev, int minor, int typ
int fd;
mode_t devmode = DRM_DEV_MODE, serv_mode;
gid_t serv_group;
@@ -49,7 +49,7 @@ Index: xf86drm.c
int isroot = !geteuid();
uid_t user = DRM_DEV_UID;
gid_t group = DRM_DEV_GID;
-@@ -874,6 +890,7 @@ static int drmOpenDevice(dev_t dev, int minor, int typ
+@@ -873,6 +889,7 @@ static int drmOpenDevice(dev_t dev, int minor, int typ
devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH);
}
@@ -57,7 +57,7 @@ Index: xf86drm.c
#if !UDEV
if (stat(DRM_DIR_NAME, &st)) {
if (!isroot)
-@@ -920,14 +937,19 @@ wait_for_udev:
+@@ -919,14 +936,19 @@ wait_for_udev:
}
}
#endif
@@ -78,7 +78,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.
*/
-@@ -979,8 +1001,13 @@ static int drmOpenMinor(int minor, int create, int typ
+@@ -978,8 +1000,13 @@ static int drmOpenMinor(int minor, int create, int typ
return -EINVAL;
sprintf(buf, dev_name, DRM_DIR_NAME, minor);
@@ -94,7 +94,7 @@ Index: xf86drm.c
return -errno;
}
-@@ -3505,7 +3532,11 @@ static char *drmGetMinorNameForFD(int fd, int type)
+@@ -3504,7 +3531,11 @@ static char *drmGetMinorNameForFD(int fd, int type)
const char *dev_name = drmGetDeviceName(type);
unsigned int maj, min;
int n;
@@ -106,7 +106,7 @@ Index: xf86drm.c
if (fstat(fd, &sbuf))
return NULL;
-@@ -3518,7 +3549,7 @@ static char *drmGetMinorNameForFD(int fd, int type)
+@@ -3517,7 +3548,7 @@ static char *drmGetMinorNameForFD(int fd, int type)
if (!dev_name)
return NULL;
@@ -115,7 +115,7 @@ Index: xf86drm.c
if (n == -1 || n >= sizeof(buf))
return NULL;
-@@ -4574,53 +4605,6 @@ drm_device_has_rdev(drmDevicePtr device, dev_t find_rd
+@@ -4583,60 +4614,6 @@ drm_device_has_rdev(drmDevicePtr device, dev_t find_rd
*/
drm_public int drmGetDeviceFromDevId(dev_t find_rdev, uint32_t flags, drmDevicePtr *device)
{
@@ -130,6 +130,8 @@ Index: xf86drm.c
- const char *dev_name;
- int node_type, subsystem_type;
- int maj, min, n, ret;
+- const int max_node_length = ALIGN(drmGetMaxNodeName(), sizeof(void *));
+- struct stat sbuf;
-
- if (device == NULL)
- return -EINVAL;
@@ -148,9 +150,14 @@ Index: xf86drm.c
- if (!dev_name)
- return -EINVAL;
-
+- /* anything longer than this will be truncated in drmDeviceAlloc.
+- * Account for NULL byte
+- */
- n = snprintf(node, PATH_MAX, dev_name, DRM_DIR_NAME, min);
- if (n == -1 || n >= PATH_MAX)
- return -errno;
+- if (n + 1 > max_node_length)
+- return -EINVAL;
- if (stat(node, &sbuf))
- return -EINVAL;
-
@@ -169,11 +176,11 @@ Index: xf86drm.c
drmDevicePtr local_devices[MAX_DRM_NODES];
drmDevicePtr d;
DIR *sysdir;
-@@ -4684,7 +4668,6 @@ drm_public int drmGetDeviceFromDevId(dev_t find_rdev,
+@@ -4700,7 +4677,6 @@ drm_public int drmGetDeviceFromDevId(dev_t find_rdev,
if (*device == NULL)
return -ENODEV;
return 0;
-#endif
}
- /**
+ drm_public int drmGetNodeTypeFromDevId(dev_t devid)