drm: add fix for PAT on radeon with 2.6.26
parent
76c8e19a29
commit
abdd523c75
|
@ -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(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);
|
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,
|
static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev,
|
||||||
|
|
|
@ -362,4 +362,8 @@ extern struct page *drm_vm_sg_nopage(struct vm_area_struct *vma,
|
||||||
unsigned long address, int *type);
|
unsigned long address, int *type);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
|
||||||
|
#define drm_core_ioremap_wc drm_core_ioremap
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -348,6 +348,14 @@ void drm_core_ioremap(struct drm_map *map, struct drm_device *dev)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(drm_core_ioremap);
|
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)
|
void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev)
|
||||||
{
|
{
|
||||||
if (!map->handle || !map->size)
|
if (!map->handle || !map->size)
|
||||||
|
|
|
@ -1158,7 +1158,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.mapping.size =
|
||||||
dev_priv->gart_info.table_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.addr =
|
||||||
dev_priv->gart_info.mapping.handle;
|
dev_priv->gart_info.mapping.handle;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue