aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_drv.c
diff options
context:
space:
mode:
authorKevin E Martin <kem@kem.org>2001-04-05 22:16:12 +0000
committerKevin E Martin <kem@kem.org>2001-04-05 22:16:12 +0000
commit5d6ddbca26d695561fb1d08d798a0cc254b805e7 (patch)
treeaf1e718f29c3dfca0e577bb0f4d211c6432600e6 /linux-core/drm_drv.c
parenta15b9dec3cfed3ce36826faf8c7d76284b0527a8 (diff)
Merged ati-pcigart-1-0-0
Diffstat (limited to 'linux-core/drm_drv.c')
-rw-r--r--linux-core/drm_drv.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 7447ca6d..3791d7a8 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -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()
@@ -178,6 +181,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 +423,12 @@ static int DRM(takedown)( drm_device_t *dev )
* handled in the AGP/GART driver.
*/
break;
+ case _DRM_SCATTER_GATHER:
+ if(dev->sg) {
+ DRM(sg_cleanup)(dev->sg);
+ dev->sg = NULL;
+ }
+ break;
}
DRM(free)(map, sizeof(*map), DRM_MEM_MAPS);
}