summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-11-03 09:52:25 +1000
committerDave Airlie <airlied@redhat.com>2008-11-03 09:52:25 +1000
commit0e1df6216e7ce3a69d4311e4685613e57129285f (patch)
tree6b844bf9e560fb755f056fc18979bef928410ba8 /linux-core
parent2b9a7d5381534122858dc6e407794e8cd5c04d3e (diff)
radeon: add mtrr support for VRAM aperture.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/radeon_gem.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux-core/radeon_gem.c b/linux-core/radeon_gem.c
index f39e8b47..2e20de3c 100644
--- a/linux-core/radeon_gem.c
+++ b/linux-core/radeon_gem.c
@@ -947,6 +947,10 @@ void radeon_init_memory_map(struct drm_device *dev)
- dev_priv->fb_location;
}
+ /* add an MTRR for the VRAM */
+ dev_priv->aper_size = aper_size;
+ dev_priv->vram_mtrr = mtrr_add(dev_priv->fb_aper_offset, dev_priv->aper_size, MTRR_TYPE_WRCOMB, 1);
+
}
/* init memory manager - start with all of VRAM and a 32MB GART aperture for now */
@@ -1037,6 +1041,8 @@ void radeon_gem_mm_fini(struct drm_device *dev)
DRM_DEBUG("delaying takedown of VRAM memory\n");
}
+ if (dev_priv->vram_mtrr)
+ mtrr_del(dev_priv->vram_mtrr, dev_priv->fb_aper_offset, dev_priv->aper_size);
mutex_unlock(&dev->struct_mutex);
drm_bo_driver_finish(dev);