summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-07-15 16:18:22 +1000
committerDave Airlie <airlied@linux.ie>2008-07-15 16:18:22 +1000
commitabdd523c759a5e19e733e3b544c2f1bcaa7a0b9a (patch)
tree169afb7ae7c1699c0d2438f27e06773ed9be68eb /linux-core
parent76c8e19a29d635d2c62937a381ab33014cfe6cea (diff)
drm: add fix for PAT on radeon with 2.6.26
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drmP.h1
-rw-r--r--linux-core/drm_compat.h4
-rw-r--r--linux-core/drm_memory.c8
3 files changed, 13 insertions, 0 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 00db3000..331f3ac5 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -1255,6 +1255,7 @@ static inline struct drm_mm *drm_get_mm(struct drm_mm_node *block)
}
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,
diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h
index 30834f33..3339219d 100644
--- a/linux-core/drm_compat.h
+++ b/linux-core/drm_compat.h
@@ -362,4 +362,8 @@ extern struct page *drm_vm_sg_nopage(struct vm_area_struct *vma,
unsigned long address, int *type);
#endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
+#define drm_core_ioremap_wc drm_core_ioremap
+#endif
+
#endif
diff --git a/linux-core/drm_memory.c b/linux-core/drm_memory.c
index 75f5b521..6af73c8d 100644
--- a/linux-core/drm_memory.c
+++ b/linux-core/drm_memory.c
@@ -348,6 +348,14 @@ void drm_core_ioremap(struct drm_map *map, struct drm_device *dev)
}
EXPORT_SYMBOL_GPL(drm_core_ioremap);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+void drm_core_ioremap_wc(struct drm_map *map, struct drm_device *dev)
+{
+ map->handle = ioremap_wc(map->offset, map->size);
+}
+#endif
+
void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev)
{
if (!map->handle || !map->size)