--david
===== drivers/char/drm/drm_memory.h 1.16 vs edited =====
--- 1.16/drivers/char/drm/drm_memory.h Sat May 10 01:32:08 2003
+++ edited/drivers/char/drm/drm_memory.h Mon May 12 13:37:57 2003
@@ -42,7 +42,12 @@
*/
#define DEBUG_MEMORY 0
-#if __REALLY_HAVE_AGP
+/* Need at least kernel v2.5.68 to get the 4-argument version of vmap(). */
+#if __REALLY_HAVE_AGP && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,68))
+
+#ifndef PAGE_AGP
+# define PAGE_AGP PAGE_KERNEL_NOCACHE
+#endif
/*
* Find the drm_map that covers the range [offset, offset+size).
@@ -127,7 +132,7 @@
{
int remap_aperture = 0;
-#if __REALLY_HAVE_AGP
+#if __REALLY_HAVE_AGP && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,68))
if (dev->agp->cant_use_aperture) {
drm_map_t *map = drm_lookup_map(offset, size, dev);
@@ -146,7 +151,7 @@
{
int remap_aperture = 0;
-#if __REALLY_HAVE_AGP
+#if __REALLY_HAVE_AGP && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,68))
if (dev->agp->cant_use_aperture) {
drm_map_t *map = drm_lookup_map(offset, size, dev);
@@ -163,7 +168,7 @@
static inline void drm_ioremapfree(void *pt, unsigned long size, drm_device_t *dev)
{
int unmap_aperture = 0;
-#if __REALLY_HAVE_AGP
+#if __REALLY_HAVE_AGP && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,68))
/*
* 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/