drm/radeon: fixup issue with radeon and PAT support.
authorDave Airlie <airlied@linux.ie>
Tue, 15 Jul 2008 05:48:05 +0000 (15:48 +1000)
committerDave Airlie <airlied@linux.ie>
Tue, 15 Jul 2008 05:48:05 +0000 (15:48 +1000)
With new userspace libpciaccess we can get a conflicting mapping
on the PCIE GART table in the video RAM. Always try and map it _wc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_memory.c
drivers/gpu/drm/radeon/radeon_cp.c
include/drm/drmP.h

index 845081b44f637fbd2ba538a83155fa58b68423d8..0177012845c60cc951380d4419f3dbb9a736b8be 100644 (file)
@@ -167,6 +167,11 @@ void drm_core_ioremap(struct drm_map *map, struct drm_device *dev)
 }
 EXPORT_SYMBOL(drm_core_ioremap);
 
+void drm_core_ioremap_wc(struct drm_map *map, struct drm_device *dev)
+{
+       map->handle = ioremap_wc(map->offset, map->size);
+}
+EXPORT_SYMBOL(drm_core_ioremap_wc);
 void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev)
 {
        if (!map->handle || !map->size)
index e53158f0ecb5c9ebf074bbe241df3f60986e0987..f0de81a5689d3c88f386b7e378afda0e59f1001e 100644 (file)
@@ -1154,7 +1154,7 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
                        dev_priv->gart_info.mapping.size =
                            dev_priv->gart_info.table_size;
 
-                       drm_core_ioremap(&dev_priv->gart_info.mapping, dev);
+                       drm_core_ioremap_wc(&dev_priv->gart_info.mapping, dev);
                        dev_priv->gart_info.addr =
                            dev_priv->gart_info.mapping.handle;
 
index 0764b662b33936a396dea2c50f537ffea5ce31c5..1c1b13e29223a6e170372f4911e91af3a2021527 100644 (file)
@@ -1089,6 +1089,7 @@ extern int drm_mm_remove_space_from_tail(struct drm_mm *mm, unsigned long size);
 extern int drm_mm_add_space_to_tail(struct drm_mm *mm, unsigned long size);
 
 extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev);
+extern void drm_core_ioremap_wc(struct drm_map *map, struct drm_device *dev);
 extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev);
 
 static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev,