tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: redundant xf86-video-intel patches



On Sun, Jan 25, 2015 at 05:32:17PM +0100, Manuel Bouyer wrote:
> I can test on i386 on a 965GM if you provide patches against netbsd-7.
> Note that accelleration doens't work well on this platform anyway,
> I see display corruption (especially in fonts)

Thanks - patch attached!

From the other comments in this thread, it sounds like it is safe to remove
these extras...

Cheers,

Patrick
Index: external/mit/xf86-video-intel/dist/src/sna/kgem.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c,v
retrieving revision 1.2.2.2
diff -u -r1.2.2.2 kgem.c
--- external/mit/xf86-video-intel/dist/src/sna/kgem.c	21 Jan 2015 11:23:13 -0000	1.2.2.2
+++ external/mit/xf86-video-intel/dist/src/sna/kgem.c	26 Jan 2015 11:26:27 -0000
@@ -440,12 +440,7 @@
 	VG_CLEAR(gtt);
 retry_gtt:
 	gtt.handle = bo->handle;
-#ifdef __NetBSD__
-	if (drmIoctl(kgem->fd, DRM_IOCTL_I915_GEM_MMAP_GTT, &gtt)) {
-		err = errno;
-#else
 	if ((err = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_MMAP_GTT, &gtt))) {
-#endif
 		assert(err != EINVAL);
 
 		(void)__kgem_throttle_retire(kgem, 0);
@@ -461,15 +456,10 @@
 	}
 
 retry_mmap:
-#ifdef __NetBSD__
-	err = -drmMap(kgem->fd, gtt.offset, bytes(bo), &ptr);
-	if (err) {
-#else
 	ptr = mmap(0, bytes(bo), PROT_READ | PROT_WRITE, MAP_SHARED,
 		   kgem->fd, gtt.offset);
 	if (ptr == MAP_FAILED) {
 		err = errno;
-#endif
 		assert(err != EINVAL);
 
 		if (__kgem_throttle_retire(kgem, 0))
Index: external/mit/xf86-video-intel/dist/src/sna/sna_display.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_display.c,v
retrieving revision 1.1.1.1.2.1
diff -u -r1.1.1.1.2.1 sna_display.c
--- external/mit/xf86-video-intel/dist/src/sna/sna_display.c	21 Jan 2015 11:23:13 -0000	1.1.1.1.2.1
+++ external/mit/xf86-video-intel/dist/src/sna/sna_display.c	26 Jan 2015 11:26:27 -0000
@@ -439,22 +439,14 @@
 {
 	struct drm_i915_gem_mmap_gtt mmap_arg;
 	void *ptr;
-#ifdef __NetBSD__
-	int err;
-#endif
 
 	VG_CLEAR(mmap_arg);
 	mmap_arg.handle = handle;
 	if (drmIoctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT, &mmap_arg))
 		return NULL;
 
-#ifdef __NetBSD__
-	err = -drmMap(fd, mmap_arg.offset, size, &ptr);
-	if (err)
-#else
 	ptr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, mmap_arg.offset);
 	if (ptr == MAP_FAILED)
-#endif
 		return NULL;
 
 	return ptr;


Home | Main Index | Thread Index | Old Index