summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-11-23 23:03:18 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-11-23 23:03:18 +0000
commita52d9c448e05253d8fc46eec1b2b2c80f0a7223a (patch)
tree597fa3dfecdcd11eba408d7058d1c2f32bb31dd5 /sys/dev/pci
parent385d9ade05163bd9bb275d7afe77fe6fd9bf14d4 (diff)
move the lastclose function into i915_drv.c where it belongs.
kill some more dead protos while i'm touching the lines around them anyway.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/i915_dma.c13
-rw-r--r--sys/dev/pci/drm/i915_drv.c13
-rw-r--r--sys/dev/pci/drm/i915_drv.h7
3 files changed, 14 insertions, 19 deletions
diff --git a/sys/dev/pci/drm/i915_dma.c b/sys/dev/pci/drm/i915_dma.c
index 4e79f63ea4e..5e113abb926 100644
--- a/sys/dev/pci/drm/i915_dma.c
+++ b/sys/dev/pci/drm/i915_dma.c
@@ -77,7 +77,7 @@ void i915_free_hws(drm_i915_private_t *dev_priv, bus_dma_tag_t dmat)
dev_priv->hw_status_page = NULL;
}
-static int i915_dma_cleanup(struct drm_device * dev)
+int i915_dma_cleanup(struct drm_device *dev)
{
drm_i915_private_t *dev_priv = dev->dev_private;
@@ -630,14 +630,3 @@ int i915_set_status_page(struct drm_device *dev, void *data,
return 0;
}
-void i915_driver_lastclose(struct drm_device * dev)
-{
- drm_i915_private_t *dev_priv = dev->dev_private;
-
- if (dev_priv == NULL)
- return;
-
- dev_priv->sarea_priv = NULL;
-
- i915_dma_cleanup(dev);
-}
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index 5dbe9bf574c..472f1647e66 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -40,6 +40,7 @@ void inteldrm_attach(struct device *, struct device *, void *);
int inteldrm_detach(struct device *, int);
int inteldrm_ioctl(struct drm_device *, u_long, caddr_t, struct drm_file *);
int inteldrm_activate(struct device *, int);
+void inteldrm_lastclose(struct drm_device *);
void inteldrm_wrap_ring(struct drm_i915_private *);
@@ -116,7 +117,7 @@ const static struct drm_pcidev inteldrm_pciidlist[] = {
static const struct drm_driver_info inteldrm_driver = {
.buf_priv_size = 1, /* No dev_priv */
.ioctl = inteldrm_ioctl,
- .lastclose = i915_driver_lastclose,
+ .lastclose = inteldrm_lastclose,
.vblank_pipes = 2,
.get_vblank_counter = i915_get_vblank_counter,
.enable_vblank = i915_enable_vblank,
@@ -410,6 +411,16 @@ inteldrm_update_ring(struct drm_i915_private *dev_priv)
ring->head, ring->tail, ring->space);
}
+void
+inteldrm_lastclose(struct drm_device *dev)
+{
+ drm_i915_private_t *dev_priv = dev->dev_private;
+
+ dev_priv->sarea_priv = NULL;
+
+ i915_dma_cleanup(dev);
+}
+
/**
* inteldrm_pipe_enabled - check if a pipe is enabled
* @dev: DRM device
diff --git a/sys/dev/pci/drm/i915_drv.h b/sys/dev/pci/drm/i915_drv.h
index eb1bf7ecaa7..3f52e270d5f 100644
--- a/sys/dev/pci/drm/i915_drv.h
+++ b/sys/dev/pci/drm/i915_drv.h
@@ -231,15 +231,10 @@ void inteldrm_update_ring(struct drm_i915_private *);
int inteldrm_pipe_enabled(struct drm_i915_private *, int);
/* i915_dma.c */
-extern void i915_driver_lastclose(struct drm_device * dev);
-extern void i915_driver_close(struct drm_device *dev,
- struct drm_file *file_priv);
-extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
- unsigned long arg);
extern void i915_emit_breadcrumb(struct drm_device *dev);
-extern int i915_driver_firstopen(struct drm_device *dev);
extern int i915_dispatch_batchbuffer(struct drm_device * dev,
drm_i915_batchbuffer_t * batch);
+int i915_dma_cleanup(struct drm_device *);
int i915_init_phys_hws(drm_i915_private_t *, bus_dma_tag_t);
void i915_free_hws(drm_i915_private_t *, bus_dma_tag_t);