summaryrefslogtreecommitdiff
path: root/linux-core/ati_pcigart.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-09-05 10:56:18 +1000
committerDave Airlie <airlied@redhat.com>2008-09-05 10:57:47 +1000
commit9f9f171f8e0ad817414e6218b44579171d03cec0 (patch)
treed872b22143d83524c57a510b59858c3a02ad9e65 /linux-core/ati_pcigart.c
parentfe59d04a7c30692952652f77529deb22a3e0c8bb (diff)
radeon: rs690 GART tables need to be in uncached memory.
Allocate the rs480/690 tables from uncached memory.
Diffstat (limited to 'linux-core/ati_pcigart.c')
-rw-r--r--linux-core/ati_pcigart.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/linux-core/ati_pcigart.c b/linux-core/ati_pcigart.c
index 9b954291..50e990f1 100644
--- a/linux-core/ati_pcigart.c
+++ b/linux-core/ati_pcigart.c
@@ -90,6 +90,12 @@ int drm_ati_alloc_pcigart_table(struct drm_device *dev,
if (gart_info->table_handle == NULL)
return -ENOMEM;
+#ifdef CONFIG_X86
+ /* IGPs only exist on x86 in any case */
+ if (gart_info->gart_reg_if == DRM_ATI_GART_IGP)
+ set_memory_uc(gart_info->table_handle->vaddr, gart_info->table_size >> PAGE_SHIFT);
+#endif
+
memset(gart_info->table_handle->vaddr, 0, gart_info->table_size);
return 0;
}
@@ -98,6 +104,11 @@ EXPORT_SYMBOL(drm_ati_alloc_pcigart_table);
static void drm_ati_free_pcigart_table(struct drm_device *dev,
struct drm_ati_pcigart_info *gart_info)
{
+#ifdef CONFIG_X86
+ /* IGPs only exist on x86 in any case */
+ if (gart_info->gart_reg_if == DRM_ATI_GART_IGP)
+ set_memory_wb(gart_info->table_handle->vaddr, gart_info->table_size >> PAGE_SHIFT);
+#endif
drm_pci_free(dev, gart_info->table_handle);
gart_info->table_handle = NULL;
}