Skip to content

Commit

Permalink
drm: fixup drm bufs being just under the EOM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dave Airlie authored and Dave Airlie committed Jan 11, 2006
1 parent f8e0f29 commit 8d2ea62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/drm/drm_bufs.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset,
case _DRM_REGISTERS:
case _DRM_FRAME_BUFFER:
#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) && !defined(__powerpc64__) && !defined(__x86_64__)
if (map->offset + map->size < map->offset ||
if (map->offset + (map->size-1) < map->offset ||
map->offset < virt_to_phys(high_memory)) {
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
return -EINVAL;
Expand Down

0 comments on commit 8d2ea62

Please sign in to comment.