summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/drm_agpsupport.c1
-rw-r--r--sys/dev/pci/drm/radeon/radeon_agp.c8
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/drm_agpsupport.c b/sys/dev/pci/drm/drm_agpsupport.c
index 757c8f65247..ee1e56c6848 100644
--- a/sys/dev/pci/drm/drm_agpsupport.c
+++ b/sys/dev/pci/drm/drm_agpsupport.c
@@ -370,6 +370,7 @@ drm_agp_init(void)
head->agpdev = agpdev;
agp_get_info(agpdev, &head->info);
head->base = head->info.ai_aperture_base;
+ head->cant_use_aperture = (head->base == 0);
TAILQ_INIT(&head->memory);
}
return (head);
diff --git a/sys/dev/pci/drm/radeon/radeon_agp.c b/sys/dev/pci/drm/radeon/radeon_agp.c
index 885a060e8b1..fdc140b1c66 100644
--- a/sys/dev/pci/drm/radeon/radeon_agp.c
+++ b/sys/dev/pci/drm/radeon/radeon_agp.c
@@ -251,9 +251,11 @@ int radeon_agp_init(struct radeon_device *rdev)
dev_info(rdev->dev, "GTT: %lluM 0x%08llX - 0x%08llX\n",
rdev->mc.gtt_size >> 20, rdev->mc.gtt_start, rdev->mc.gtt_end);
- start = atop(bus_space_mmap(rdev->memt, rdev->mc.gtt_start, 0, 0, 0));
- end = start + atop(rdev->mc.gtt_size);
- uvm_page_physload(start, end, start, end, PHYSLOAD_DEVICE);
+ if (!rdev->ddev->agp->cant_use_aperture) {
+ start = atop(bus_space_mmap(rdev->memt, rdev->mc.gtt_start, 0, 0, 0));
+ end = start + atop(rdev->mc.gtt_size);
+ uvm_page_physload(start, end, start, end, PHYSLOAD_DEVICE);
+ }
/* workaround some hw issues */
if (rdev->family < CHIP_R200) {