aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2006-01-11 04:48:09 -0500
committerDave Airlie <airlied@linux.ie>2006-01-11 04:48:09 -0500
commit8d2ea6258123d7a92a1f6ec638a8cad4a0604c43 (patch)
tree8dae80ca8b6bdf4608460c372023a9500ff02b9f
parentf8e0f2905bf0a7cb5ef2baaf009f0c26f80c3056 (diff)
drm: fixup drm bufs being just under the EOM
If the mapping was just under the end of memory it would fail. Lets DRM start on my PCI card. Signed-off-by: Dave Airlie <airlied@linux.ie>
-rw-r--r--drivers/char/drm/drm_bufs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c
index 1845dd062816..1db12dcb6802 100644
--- a/drivers/char/drm/drm_bufs.c
+++ b/drivers/char/drm/drm_bufs.c
@@ -154,7 +154,7 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset,
154 case _DRM_REGISTERS: 154 case _DRM_REGISTERS:
155 case _DRM_FRAME_BUFFER: 155 case _DRM_FRAME_BUFFER:
156#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) && !defined(__powerpc64__) && !defined(__x86_64__) 156#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) && !defined(__powerpc64__) && !defined(__x86_64__)
157 if (map->offset + map->size < map->offset || 157 if (map->offset + (map->size-1) < map->offset ||
158 map->offset < virt_to_phys(high_memory)) { 158 map->offset < virt_to_phys(high_memory)) {
159 drm_free(map, sizeof(*map), DRM_MEM_MAPS); 159 drm_free(map, sizeof(*map), DRM_MEM_MAPS);
160 return -EINVAL; 160 return -EINVAL;