From 9fb6986e83a84f6b958e8aba2c20b5988676bd55 Mon Sep 17 00:00:00 2001
From: Eric Anholt <anholt@freebsd.org>
Date: Tue, 16 Dec 2003 08:57:08 +0000
Subject: Don't ioremap the framebuffer area. The ioremapped area wasn't used
 by     anything, and took up valuable KVA. While I'm in the area, clean up
 BSD     MTRR stuff some more. Suggested by: jonsmirl

---
 linux/drm_bufs.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'linux')

diff --git a/linux/drm_bufs.h b/linux/drm_bufs.h
index e30e6de8..577a1c99 100644
--- a/linux/drm_bufs.h
+++ b/linux/drm_bufs.h
@@ -148,7 +148,9 @@ int DRM(addmap)( struct inode *inode, struct file *filp,
 					      MTRR_TYPE_WRCOMB, 1 );
 		}
 #endif
-		map->handle = DRM(ioremap)( map->offset, map->size, dev );
+		if (map->type == _DRM_REGISTERS)
+			map->handle = DRM(ioremap)( map->offset, map->size,
+						    dev );
 		break;
 
 	case _DRM_SHM:
-- 
cgit v1.2.3