summaryrefslogtreecommitdiff
path: root/linux/i810_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/i810_dma.c')
-rw-r--r--linux/i810_dma.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/linux/i810_dma.c b/linux/i810_dma.c
index c58a8851..d558988f 100644
--- a/linux/i810_dma.c
+++ b/linux/i810_dma.c
@@ -371,15 +371,15 @@ static int i810_dma_initialize(drm_device_t *dev,
DRM_ERROR("can not find sarea!\n");
return -EINVAL;
}
- DRM_FIND_MAP( dev_priv->mmio_map, init->mmio_offset );
+ dev_priv->mmio_map = drm_core_findmap(dev, init->mmio_offset);
if (!dev_priv->mmio_map) {
dev->dev_private = (void *)dev_priv;
i810_dma_cleanup(dev);
DRM_ERROR("can not find mmio map!\n");
return -EINVAL;
}
- DRM_FIND_MAP( dev_priv->buffer_map, init->buffers_offset );
- if (!dev_priv->buffer_map) {
+ dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset);
+ if (!dev->agp_buffer_map) {
dev->dev_private = (void *)dev_priv;
i810_dma_cleanup(dev);
DRM_ERROR("can not find dma buffer map!\n");
@@ -1394,3 +1394,28 @@ int i810_flip_bufs(struct inode *inode, struct file *filp,
i810_dma_dispatch_flip( dev );
return 0;
}
+
+static void i810_driver_pretakedown(drm_device_t *dev)
+{
+ i810_dma_cleanup( dev );
+}
+
+static void i810_driver_release(drm_device_t *dev, struct file *filp)
+{
+ i810_reclaim_buffers(filp);
+}
+
+static int i810_driver_dma_quiescent(drm_device_t *dev)
+{
+ i810_dma_quiescent( dev );
+ return 0;
+}
+
+void i810_driver_register_fns(drm_device_t *dev)
+{
+ dev->dev_priv_size = sizeof(drm_i810_buf_priv_t);
+ dev->fn_tbl.pretakedown = i810_driver_pretakedown;
+ dev->fn_tbl.release = i810_driver_release;
+ dev->fn_tbl.dma_quiescent = i810_driver_dma_quiescent;
+}
+