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 /bsd-core/drm_agpsupport.c | |
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 'bsd-core/drm_agpsupport.c')
-rw-r--r-- | bsd-core/drm_agpsupport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bsd-core/drm_agpsupport.c b/bsd-core/drm_agpsupport.c index 9aed5572..6f963b9c 100644 --- a/bsd-core/drm_agpsupport.c +++ b/bsd-core/drm_agpsupport.c @@ -184,7 +184,6 @@ int drm_agp_enable(drm_device_t *dev, drm_agp_mode_t mode) dev->agp->mode = mode.mode; agp_enable(dev->agp->agpdev, mode.mode); - dev->agp->base = dev->agp->info.ai_aperture_base; dev->agp->enabled = 1; return 0; } @@ -405,6 +404,7 @@ drm_agp_head_t *drm_agp_init(void) return NULL; head->agpdev = agpdev; agp_get_info(agpdev, &head->info); + head->base = head->info.ai_aperture_base; head->memory = NULL; DRM_INFO("AGP at 0x%08lx %dMB\n", (long)head->info.ai_aperture_base, |