summaryrefslogtreecommitdiff
path: root/linux-core/drm_memory.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-12-19 20:29:03 +1100
committerDave Airlie <airlied@linux.ie>2006-12-19 20:29:03 +1100
commit86ff2aeb9bfea357d5748b3587ab224e813b37b6 (patch)
tree7cc4afd1293c491e3074f6c1af339773136f6156 /linux-core/drm_memory.h
parent656c3a3737180d507bec352d56fbd9ef8b8a4feb (diff)
drm: remove all 2.4 support for drm development tree.
Bye bye 2.4 you served us well..
Diffstat (limited to 'linux-core/drm_memory.h')
-rw-r--r--linux-core/drm_memory.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/linux-core/drm_memory.h b/linux-core/drm_memory.h
index 4a2c3583..c299e25a 100644
--- a/linux-core/drm_memory.h
+++ b/linux-core/drm_memory.h
@@ -43,7 +43,7 @@
*/
/* Need the 4-argument version of vmap(). */
-#if __OS_HAS_AGP && defined(VMAP_4_ARGS)
+#if __OS_HAS_AGP
#include <linux/vmalloc.h>
@@ -57,18 +57,6 @@
# endif
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#ifndef pte_offset_kernel
-# define pte_offset_kernel(dir, address) pte_offset(dir, address)
-#endif
-#ifndef pte_pfn
-# define pte_pfn(pte) (pte_page(pte) - mem_map)
-#endif
-#ifndef pfn_to_page
-# define pfn_to_page(pfn) (mem_map + (pfn))
-#endif
-#endif
-
/*
* Find the drm_map that covers the range [offset, offset+size).
*/
@@ -171,14 +159,12 @@ static inline unsigned long drm_follow_page(void *vaddr)
static inline void *drm_ioremap(unsigned long offset, unsigned long size,
drm_device_t * dev)
{
-#if defined(VMAP_4_ARGS)
if (drm_core_has_AGP(dev) && dev->agp && dev->agp->cant_use_aperture) {
drm_map_t *map = drm_lookup_map(offset, size, dev);
if (map && map->type == _DRM_AGP)
return agp_remap(offset, size, dev);
}
-#endif
return ioremap(offset, size);
}
@@ -186,14 +172,12 @@ static inline void *drm_ioremap(unsigned long offset, unsigned long size,
static inline void *drm_ioremap_nocache(unsigned long offset,
unsigned long size, drm_device_t * dev)
{
-#if defined(VMAP_4_ARGS)
if (drm_core_has_AGP(dev) && dev->agp && dev->agp->cant_use_aperture) {
drm_map_t *map = drm_lookup_map(offset, size, dev);
if (map && map->type == _DRM_AGP)
return agp_remap(offset, size, dev);
}
-#endif
return ioremap_nocache(offset, size);
}
@@ -201,7 +185,6 @@ static inline void *drm_ioremap_nocache(unsigned long offset,
static inline void drm_ioremapfree(void *pt, unsigned long size,
drm_device_t * dev)
{
-#if defined(VMAP_4_ARGS)
/*
* This is a bit ugly. It would be much cleaner if the DRM API would use separate
* routines for handling mappings in the AGP space. Hopefully this can be done in
@@ -220,7 +203,6 @@ static inline void drm_ioremapfree(void *pt, unsigned long size,
return;
}
}
-#endif
iounmap(pt);
}
#else