summaryrefslogtreecommitdiff
path: root/linux/drm_drv.h
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2001-04-30 16:18:22 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2001-04-30 16:18:22 +0000
commitb804c09d0699131a8333c19a4d58cb14125d413e (patch)
tree3797238ff3bba8aaf25eee1b0dd1bf04c8e8db82 /linux/drm_drv.h
parentdf76f812924e4db284fd38b3c5db6b87ec0d82fc (diff)
fix build of i810 kernel driver for 2.4.3 or greater kernelsX_4_0_99_3-20010501-preimport
Diffstat (limited to 'linux/drm_drv.h')
-rw-r--r--linux/drm_drv.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index 7447ca6d4..87da59512 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -81,6 +81,9 @@
#ifndef __HAVE_COUNTERS
#define __HAVE_COUNTERS 0
#endif
+#ifndef __HAVE_SG
+#define __HAVE_SG 0
+#endif
#ifndef DRIVER_PREINIT
#define DRIVER_PREINIT()
@@ -135,8 +138,10 @@ static drm_ioctl_desc_t DRM(ioctls)[] = {
[DRM_IOCTL_NR(DRM_IOCTL_ADD_MAP)] = { DRM(addmap), 1, 1 },
[DRM_IOCTL_NR(DRM_IOCTL_RM_MAP)] = { DRM(rmmap), 1, 0 },
+#if __HAVE_CTX_BITMAP
[DRM_IOCTL_NR(DRM_IOCTL_SET_SAREA_CTX)] = { DRM(setsareactx), 1, 1 },
[DRM_IOCTL_NR(DRM_IOCTL_GET_SAREA_CTX)] = { DRM(getsareactx), 1, 0 },
+#endif
[DRM_IOCTL_NR(DRM_IOCTL_ADD_CTX)] = { DRM(addctx), 1, 1 },
[DRM_IOCTL_NR(DRM_IOCTL_RM_CTX)] = { DRM(rmctx), 1, 1 },
@@ -178,6 +183,11 @@ static drm_ioctl_desc_t DRM(ioctls)[] = {
[DRM_IOCTL_NR(DRM_IOCTL_AGP_UNBIND)] = { DRM(agp_unbind), 1, 1 },
#endif
+#if __HAVE_SG
+ [DRM_IOCTL_NR(DRM_IOCTL_SG_ALLOC)] = { DRM(sg_alloc), 1, 1 },
+ [DRM_IOCTL_NR(DRM_IOCTL_SG_FREE)] = { DRM(sg_free), 1, 1 },
+#endif
+
DRIVER_IOCTLS
};
@@ -415,6 +425,17 @@ static int DRM(takedown)( drm_device_t *dev )
* handled in the AGP/GART driver.
*/
break;
+ case _DRM_SCATTER_GATHER:
+ /* Handle it, but do nothing, if HAVE_SG
+ * isn't defined.
+ */
+#if __HAVE_SG
+ if(dev->sg) {
+ DRM(sg_cleanup)(dev->sg);
+ dev->sg = NULL;
+ }
+#endif
+ break;
}
DRM(free)(map, sizeof(*map), DRM_MEM_MAPS);
}