From b668d6d9050106bebfb704e4ed32d2924bb26371 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 15 Aug 2007 14:29:31 -0700 Subject: 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. --- bsd-core/drm_agpsupport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bsd-core/drm_agpsupport.c') 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, -- cgit v1.2.3