summaryrefslogtreecommitdiff
path: root/linux/gamma.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/gamma.h')
-rw-r--r--linux/gamma.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/linux/gamma.h b/linux/gamma.h
index 44d8d5bc..1d4ab25d 100644
--- a/linux/gamma.h
+++ b/linux/gamma.h
@@ -145,4 +145,22 @@
#define DRIVER_AGP_BUFFERS_MAP( dev ) \
((drm_gamma_private_t *)((dev)->dev_private))->buffers
+/* Gamma makes use of a wierd mechanism to get the DDX driver to do
+ * context switches on behalf of the 3d clients via a trip to the
+ * kernel module. This requires read/poll functionality on the drm
+ * file descriptor not normally present:
+ */
+#define DRIVER_FOPS \
+static struct file_operations DRM(fops) = { \
+ .owner = THIS_MODULE, \
+ .open = DRM(open), \
+ .flush = DRM(flush), \
+ .release = DRM(release), \
+ .ioctl = DRM(ioctl), \
+ .mmap = DRM(mmap), \
+ .read = DRM(read), \
+ .fasync = DRM(fasync), \
+ .poll = DRM(poll), \
+}
+
#endif /* __GAMMA_H__ */