summaryrefslogtreecommitdiff
path: root/linux/drmP.h
diff options
context:
space:
mode:
authorDavid Dawes <dawes@xfree86.org>2003-04-17 15:27:34 +0000
committerDavid Dawes <dawes@xfree86.org>2003-04-17 15:27:34 +0000
commitd1b7f551e6d582cd9c44d23883de1f6121907627 (patch)
tree97b6ea1752a89520e4609f1c336d28a4d49b2c96 /linux/drmP.h
parent48e389f3a5109383ca71c6c7f743b5107965f1d9 (diff)
Fix DRM module build on 2.5.41 and later kernels (tqueue -> workqueue).
Diffstat (limited to 'linux/drmP.h')
-rw-r--r--linux/drmP.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/linux/drmP.h b/linux/drmP.h
index 59a445ea..efbc30c0 100644
--- a/linux/drmP.h
+++ b/linux/drmP.h
@@ -67,7 +67,16 @@
#include <linux/types.h>
#include <linux/agp_backend.h>
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41)
+#define HAS_WORKQUEUE 0
+#else
+#define HAS_WORKQUEUE 1
+#endif
+#if !HAS_WORKQUEUE
#include <linux/tqueue.h>
+#else
+#include <linux/workqueue.h>
+#endif
#include <linux/poll.h>
#include <asm/pgalloc.h>
#include "drm.h"
@@ -206,7 +215,7 @@ static inline struct page * vmalloc_to_page(void * vmalloc_addr)
}
#endif
-#ifndef REMAP_PAGE_RANGE_5_ARGS /* #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
+#ifndef REMAP_PAGE_RANGE_5_ARGS
#define DRM_RPR_ARG(vma)
#else
#define DRM_RPR_ARG(vma) vma,
@@ -615,7 +624,11 @@ typedef struct drm_device {
int last_checked; /* Last context checked for DMA */
int last_context; /* Last current context */
unsigned long last_switch; /* jiffies at last context switch */
+#if !HAS_WORKQUEUE
struct tq_struct tq;
+#else
+ struct work_struct work;
+#endif
#if __HAVE_VBL_IRQ
wait_queue_head_t vbl_queue;
atomic_t vbl_received;