summaryrefslogtreecommitdiff
path: root/shared/i915_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared/i915_dma.c')
-rw-r--r--shared/i915_dma.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/shared/i915_dma.c b/shared/i915_dma.c
index cf0333f6..1b91c60a 100644
--- a/shared/i915_dma.c
+++ b/shared/i915_dma.c
@@ -7,7 +7,6 @@
*
**************************************************************************/
-#include "i915.h"
#include "drmP.h"
#include "drm.h"
#include "i915_drm.h"
@@ -84,7 +83,7 @@ int i915_dma_cleanup(drm_device_t * dev)
* is freed, it's too late.
*/
if (dev->irq)
- DRM(irq_uninstall) (dev);
+ drm_irq_uninstall (dev);
if (dev->dev_private) {
drm_i915_private_t *dev_priv =
@@ -98,7 +97,7 @@ int i915_dma_cleanup(drm_device_t * dev)
#ifdef __FreeBSD__
#if __FreeBSD_version > 500000
contigfree(dev_priv->hw_status_page, PAGE_SIZE,
- DRM(M_DRM));
+ drm_M_DRM);
#endif
#else
pci_free_consistent(dev->pdev, PAGE_SIZE,
@@ -109,7 +108,7 @@ int i915_dma_cleanup(drm_device_t * dev)
I915_WRITE(0x02080, 0x1ffff000);
}
- DRM(free) (dev->dev_private, sizeof(drm_i915_private_t),
+ drm_free (dev->dev_private, sizeof(drm_i915_private_t),
DRM_MEM_DRIVER);
dev->dev_private = NULL;
@@ -183,7 +182,7 @@ static int i915_initialize(drm_device_t * dev,
/* Program Hardware Status Page */
#ifdef __FreeBSD__
dev_priv->hw_status_page =
- contigmalloc(PAGE_SIZE, DRM(M_DRM), M_NOWAIT, 0ul, 0, 0, 0);
+ contigmalloc(PAGE_SIZE, drm_M_DRM, M_NOWAIT, 0ul, 0, 0, 0);
dev_priv->dma_status_page = vtophys(dev_priv->hw_status_page);
#else
dev_priv->hw_status_page =
@@ -255,7 +254,7 @@ int i915_dma_init(DRM_IOCTL_ARGS)
switch (init.func) {
case I915_INIT_DMA:
- dev_priv = DRM(alloc) (sizeof(drm_i915_private_t),
+ dev_priv = drm_alloc (sizeof(drm_i915_private_t),
DRM_MEM_DRIVER);
if (dev_priv == NULL)
return DRM_ERR(ENOMEM);
@@ -733,7 +732,7 @@ int i915_setparam(DRM_IOCTL_ARGS)
return 0;
}
-static void i915_driver_pretakedown(drm_device_t *dev)
+void i915_driver_pretakedown(drm_device_t *dev)
{
if (dev->dev_private) {
drm_i915_private_t *dev_priv = dev->dev_private;
@@ -742,29 +741,10 @@ static void i915_driver_pretakedown(drm_device_t *dev)
i915_dma_cleanup(dev);
}
-static void i915_driver_prerelease(drm_device_t *dev, DRMFILE filp)
+void i915_driver_prerelease(drm_device_t *dev, DRMFILE filp)
{
if (dev->dev_private) {
drm_i915_private_t *dev_priv = dev->dev_private;
i915_mem_release(dev, filp, dev_priv->agp_heap);
}
}
-
-void i915_driver_register_fns(drm_device_t *dev)
-{
- dev->driver_features =
- DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR |
- DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED;
- dev->fn_tbl.pretakedown = i915_driver_pretakedown;
- dev->fn_tbl.prerelease = i915_driver_prerelease;
- dev->fn_tbl.irq_preinstall = i915_driver_irq_preinstall;
- dev->fn_tbl.irq_postinstall = i915_driver_irq_postinstall;
- dev->fn_tbl.irq_uninstall = i915_driver_irq_uninstall;
- dev->fn_tbl.irq_handler = i915_driver_irq_handler;
-
- dev->counters += 4;
- dev->types[6] = _DRM_STAT_IRQ;
- dev->types[7] = _DRM_STAT_PRIMARY;
- dev->types[8] = _DRM_STAT_SECONDARY;
- dev->types[9] = _DRM_STAT_DMA;
-}