summaryrefslogtreecommitdiff
path: root/x11/libdrm
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2015-01-03 10:01:40 +0000
committerwiz <wiz@pkgsrc.org>2015-01-03 10:01:40 +0000
commitcfa1fede0d6a96250864383d6292ac8d4ab06aff (patch)
tree88725dc6dc6fbba44688aee1b19239ad5471292e /x11/libdrm
parentc1e2fa89e1a24ddfe1181c106e00458f2726150e (diff)
downloadpkgsrc-cfa1fede0d6a96250864383d6292ac8d4ab06aff.tar.gz
Remove code for DRM_IOCTL_MMAP hack.
Never needed on NetBSD-5 and -6; and chuq improved mmap in NetBSD-7 and -current, so it's not needed there any longer either. Confirmed by mrg. Bump PKGREVISION.
Diffstat (limited to 'x11/libdrm')
-rw-r--r--x11/libdrm/Makefile4
-rw-r--r--x11/libdrm/distinfo6
-rw-r--r--x11/libdrm/patches/patch-ab32
-rw-r--r--x11/libdrm/patches/patch-include_drm_drm.h23
4 files changed, 7 insertions, 58 deletions
diff --git a/x11/libdrm/Makefile b/x11/libdrm/Makefile
index e441e598249..79a7679b547 100644
--- a/x11/libdrm/Makefile
+++ b/x11/libdrm/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.49 2014/10/26 10:20:10 wiz Exp $
+# $NetBSD: Makefile,v 1.50 2015/01/03 10:01:40 wiz Exp $
DISTNAME= libdrm-2.4.58
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= x11 graphics
MASTER_SITES= http://dri.freedesktop.org/libdrm/
EXTRACT_SUFX= .tar.bz2
diff --git a/x11/libdrm/distinfo b/x11/libdrm/distinfo
index 987beeeb31a..d3f6b53aa7a 100644
--- a/x11/libdrm/distinfo
+++ b/x11/libdrm/distinfo
@@ -1,12 +1,12 @@
-$NetBSD: distinfo,v 1.47 2014/10/26 10:20:10 wiz Exp $
+$NetBSD: distinfo,v 1.48 2015/01/03 10:01:40 wiz Exp $
SHA1 (libdrm-2.4.58.tar.bz2) = ef9a647796fa326e99ca9026a6d847172f39c66c
RMD160 (libdrm-2.4.58.tar.bz2) = d765d1d5860014e7295c12edc28a4d696ce8b0f1
Size (libdrm-2.4.58.tar.bz2) = 573202 bytes
-SHA1 (patch-ab) = f58a2edde2dde7cac69c1b196982431e79f04af6
+SHA1 (patch-ab) = e28070e56924a68ecc3c4e27d479a5e8edc70913
SHA1 (patch-ac) = 67c998df7dfc0dabc86320ea6d015cede3e464ea
SHA1 (patch-ad) = b9c8d708830c8b182c8e491fe5a9e5d0f2d44a5f
-SHA1 (patch-include_drm_drm.h) = 5d6910c1548af6f9abc6cf0353238e7477119b0c
+SHA1 (patch-include_drm_drm.h) = 1cb10685b54a1c0ad71aef92edecbb0318fe4c99
SHA1 (patch-intel_intel__bufmgr__gem.c) = bab22f43ba85c48fd063b6ac667369d1223f908f
SHA1 (patch-libkms_linux.c) = 737d0a8e7b742ee9d24fec94c72de6b4915dd675
SHA1 (patch-libkms_vmwgfx.c) = d49c046a70e5c0edbdb0a424473324cc2a3b6243
diff --git a/x11/libdrm/patches/patch-ab b/x11/libdrm/patches/patch-ab
index e6ebbfd695b..f90aef8d816 100644
--- a/x11/libdrm/patches/patch-ab
+++ b/x11/libdrm/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.6 2014/10/26 10:20:10 wiz Exp $
+$NetBSD: patch-ab,v 1.7 2015/01/03 10:01:40 wiz Exp $
--- xf86drm.c.orig 2014-09-28 16:19:54.000000000 +0000
+++ xf86drm.c
@@ -11,33 +11,3 @@ $NetBSD: patch-ab,v 1.6 2014/10/26 10:20:10 wiz Exp $
#endif
# ifdef __OpenBSD__
-@@ -1128,6 +1128,9 @@ int drmClose(int fd)
- int drmMap(int fd, drm_handle_t handle, drmSize size, drmAddressPtr address)
- {
- static unsigned long pagesize_mask = 0;
-+#ifdef DRM_IOCTL_MMAP
-+ struct drm_mmap mmap_req = {0};
-+#endif
-
- if (fd < 0)
- return -EINVAL;
-@@ -1137,7 +1140,18 @@ int drmMap(int fd, drm_handle_t handle,
-
- size = (size + pagesize_mask) & ~pagesize_mask;
-
-- *address = drm_mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, handle);
-+#ifdef DRM_IOCTL_MMAP
-+ mmap_req.dnm_addr = NULL;
-+ mmap_req.dnm_size = size;
-+ mmap_req.dnm_prot = (PROT_READ | PROT_WRITE);
-+ mmap_req.dnm_flags = MAP_SHARED;
-+ mmap_req.dnm_offset = handle;
-+ if (drmIoctl(fd, DRM_IOCTL_MMAP, &mmap_req) == 0) {
-+ *address = mmap_req.dnm_addr;
-+ return 0;
-+ }
-+#endif
-+ *address = drm_mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, handle);
- if (*address == MAP_FAILED)
- return -errno;
- return 0;
diff --git a/x11/libdrm/patches/patch-include_drm_drm.h b/x11/libdrm/patches/patch-include_drm_drm.h
index e310fd1a64d..03f4a03a60d 100644
--- a/x11/libdrm/patches/patch-include_drm_drm.h
+++ b/x11/libdrm/patches/patch-include_drm_drm.h
@@ -1,4 +1,4 @@
-$NetBSD: patch-include_drm_drm.h,v 1.2 2014/10/26 10:20:10 wiz Exp $
+$NetBSD: patch-include_drm_drm.h,v 1.3 2015/01/03 10:01:40 wiz Exp $
Fix compilation on systems that don't provide O_CLOEXEC.
@@ -16,24 +16,3 @@ Fix compilation on systems that don't provide O_CLOEXEC.
struct drm_prime_handle {
__u32 handle;
-@@ -759,6 +763,20 @@ struct drm_prime_handle {
- #define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
- #define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2)
-
-+#ifdef __NetBSD__
-+/*
-+ * Instrumenting mmap is trickier than just making an ioctl to do it.
-+ */
-+struct drm_mmap {
-+ void *dnm_addr; /* in/out */
-+ size_t dnm_size; /* in */
-+ int dnm_prot; /* in */
-+ int dnm_flags; /* in */
-+ off_t dnm_offset; /* in */
-+};
-+#define DRM_IOCTL_MMAP DRM_IOWR(0xff, struct drm_mmap)
-+#endif
-+
- /**
- * Device specific ioctls should only be in their respective headers
- * The device specific ioctl range is from 0x40 to 0x99.