Module Name:    xsrc
Committed By:   chs
Date:           Sun Dec 14 23:52:45 UTC 2014

Modified Files:
        xsrc/external/mit/libdrm/dist: xf86drm.c
        xsrc/external/mit/libdrm/dist/include/drm: drm.h

Log Message:
remove the interim code to create mappings via ioctl(),
mmap() works fine now.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 xsrc/external/mit/libdrm/dist/xf86drm.c
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/libdrm/dist/include/drm/drm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libdrm/dist/xf86drm.c
diff -u xsrc/external/mit/libdrm/dist/xf86drm.c:1.9 xsrc/external/mit/libdrm/dist/xf86drm.c:1.10
--- xsrc/external/mit/libdrm/dist/xf86drm.c:1.9	Sat Dec 13 21:39:07 2014
+++ xsrc/external/mit/libdrm/dist/xf86drm.c	Sun Dec 14 23:52:45 2014
@@ -1129,9 +1129,6 @@ 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;
@@ -1141,17 +1138,6 @@ int drmMap(int fd, drm_handle_t handle, 
 
     size = (size + pagesize_mask) & ~pagesize_mask;
 
-#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;
@@ -2585,4 +2571,3 @@ int drmPrimeFDToHandle(int fd, int prime
 	*handle = args.handle;
 	return 0;
 }
-

Index: xsrc/external/mit/libdrm/dist/include/drm/drm.h
diff -u xsrc/external/mit/libdrm/dist/include/drm/drm.h:1.3 xsrc/external/mit/libdrm/dist/include/drm/drm.h:1.4
--- xsrc/external/mit/libdrm/dist/include/drm/drm.h:1.3	Sat Dec 13 21:39:07 2014
+++ xsrc/external/mit/libdrm/dist/include/drm/drm.h	Sun Dec 14 23:52:45 2014
@@ -759,20 +759,6 @@ 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.

Reply via email to