aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_os_linux.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-09-04 23:21:40 +0000
committerDave Airlie <airlied@linux.ie>2004-09-04 23:21:40 +0000
commit4499ea42eae887c45403cd9ea364fccf311fee8e (patch)
treefc12944d1a50a92a3141996a193081ea98d621ad /linux-core/drm_os_linux.h
parent3d9e16aa6e074fdaa7a74f2fb6b0c46f1dd04172 (diff)
Fixup OS_HAS_AGP/OS_HAS_MTRR along lines of patches going to kernel, as
suggested by Arjan.. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'linux-core/drm_os_linux.h')
-rw-r--r--linux-core/drm_os_linux.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h
index bf58a1c2..ab16d7b3 100644
--- a/linux-core/drm_os_linux.h
+++ b/linux-core/drm_os_linux.h
@@ -47,6 +47,7 @@ typedef void irqreturn_t;
#endif
/** AGP types */
+#if __OS_HAS_AGP
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,70)
#define DRM_AGP_MEM agp_memory
#define DRM_AGP_KERN agp_kern_info
@@ -54,6 +55,30 @@ typedef void irqreturn_t;
#define DRM_AGP_MEM struct agp_memory
#define DRM_AGP_KERN struct agp_kern_info
#endif
+#else
+/* define some dummy types for non AGP supporting kernels */
+struct no_agp_kern {
+ unsigned long aper_base;
+ unsigned long aper_size;
+};
+#define DRM_AGP_MEM int
+#define DRM_AGP_KERN struct no_agp_kern
+#endif
+
+#if !(__OS_HAS_MTRR)
+static __inline__ int mtrr_add (unsigned long base, unsigned long size,
+ unsigned int type, char increment)
+{
+ return -ENODEV;
+}
+
+static __inline__ int mtrr_del (int reg, unsigned long base,
+ unsigned long size)
+{
+ return -ENODEV;
+}
+#define MTRR_TYPE_WRCOMB 1
+#endif
/** Task queue handler arguments */
#define DRM_TASKQUEUE_ARGS void *arg