diff options
author | Eric Anholt <eric@anholt.net> | 2007-08-15 14:29:31 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-08-15 14:29:31 -0700 |
commit | b668d6d9050106bebfb704e4ed32d2924bb26371 (patch) | |
tree | efdc06fab9804aebb52312ef72de029e2821aaf8 /linux-core | |
parent | 6e93c35ba7c5001e756d0c9d1a4f534384652a5a (diff) |
Fix dev->agp->base initialization on BSD, and fix addmap range check on Linux.
With the previous linux commit, an AGP aperture at the end of the address space
would have wrapped to 0 and the test would have failed.
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drm_bufs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c index f0b28fa1..60eca60c 100644 --- a/linux-core/drm_bufs.c +++ b/linux-core/drm_bufs.c @@ -231,7 +231,7 @@ static int drm_addmap_core(struct drm_device *dev, unsigned int offset, */ if (map->offset < dev->agp->base || map->offset > dev->agp->base + - dev->agp->agp_info.aper_size * 1024 * 1024) { + dev->agp->agp_info.aper_size * 1024 * 1024 - 1) { map->offset += dev->agp->base; } map->mtrr = dev->agp->agp_mtrr; /* for getmap */ |