aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/i915_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/i915_dma.c')
-rw-r--r--drivers/char/drm/i915_dma.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c
index 34f552f90c4a..f3aa0c370127 100644
--- a/drivers/char/drm/i915_dma.c
+++ b/drivers/char/drm/i915_dma.c
@@ -85,14 +85,14 @@ static int i915_dma_cleanup(drm_device_t * dev)
85 * is freed, it's too late. 85 * is freed, it's too late.
86 */ 86 */
87 if (dev->irq) 87 if (dev->irq)
88 drm_irq_uninstall (dev); 88 drm_irq_uninstall(dev);
89 89
90 if (dev->dev_private) { 90 if (dev->dev_private) {
91 drm_i915_private_t *dev_priv = 91 drm_i915_private_t *dev_priv =
92 (drm_i915_private_t *) dev->dev_private; 92 (drm_i915_private_t *) dev->dev_private;
93 93
94 if (dev_priv->ring.virtual_start) { 94 if (dev_priv->ring.virtual_start) {
95 drm_core_ioremapfree( &dev_priv->ring.map, dev); 95 drm_core_ioremapfree(&dev_priv->ring.map, dev);
96 } 96 }
97 97
98 if (dev_priv->status_page_dmah) { 98 if (dev_priv->status_page_dmah) {
@@ -101,8 +101,8 @@ static int i915_dma_cleanup(drm_device_t * dev)
101 I915_WRITE(0x02080, 0x1ffff000); 101 I915_WRITE(0x02080, 0x1ffff000);
102 } 102 }
103 103
104 drm_free (dev->dev_private, sizeof(drm_i915_private_t), 104 drm_free(dev->dev_private, sizeof(drm_i915_private_t),
105 DRM_MEM_DRIVER); 105 DRM_MEM_DRIVER);
106 106
107 dev->dev_private = NULL; 107 dev->dev_private = NULL;
108 } 108 }
@@ -146,7 +146,7 @@ static int i915_initialize(drm_device_t * dev,
146 dev_priv->ring.map.flags = 0; 146 dev_priv->ring.map.flags = 0;
147 dev_priv->ring.map.mtrr = 0; 147 dev_priv->ring.map.mtrr = 0;
148 148
149 drm_core_ioremap( &dev_priv->ring.map, dev ); 149 drm_core_ioremap(&dev_priv->ring.map, dev);
150 150
151 if (dev_priv->ring.map.handle == NULL) { 151 if (dev_priv->ring.map.handle == NULL) {
152 dev->dev_private = (void *)dev_priv; 152 dev->dev_private = (void *)dev_priv;
@@ -243,8 +243,8 @@ static int i915_dma_init(DRM_IOCTL_ARGS)
243 243
244 switch (init.func) { 244 switch (init.func) {
245 case I915_INIT_DMA: 245 case I915_INIT_DMA:
246 dev_priv = drm_alloc (sizeof(drm_i915_private_t), 246 dev_priv = drm_alloc(sizeof(drm_i915_private_t),
247 DRM_MEM_DRIVER); 247 DRM_MEM_DRIVER);
248 if (dev_priv == NULL) 248 if (dev_priv == NULL)
249 return DRM_ERR(ENOMEM); 249 return DRM_ERR(ENOMEM);
250 retcode = i915_initialize(dev, dev_priv, &init); 250 retcode = i915_initialize(dev, dev_priv, &init);
@@ -297,7 +297,7 @@ static int do_validate_cmd(int cmd)
297 case 0x1c: 297 case 0x1c:
298 return 1; 298 return 1;
299 case 0x1d: 299 case 0x1d:
300 switch ((cmd>>16)&0xff) { 300 switch ((cmd >> 16) & 0xff) {
301 case 0x3: 301 case 0x3:
302 return (cmd & 0x1f) + 2; 302 return (cmd & 0x1f) + 2;
303 case 0x4: 303 case 0x4:
@@ -699,20 +699,20 @@ static int i915_setparam(DRM_IOCTL_ARGS)
699 return 0; 699 return 0;
700} 700}
701 701
702void i915_driver_pretakedown(drm_device_t *dev) 702void i915_driver_pretakedown(drm_device_t * dev)
703{ 703{
704 if ( dev->dev_private ) { 704 if (dev->dev_private) {
705 drm_i915_private_t *dev_priv = dev->dev_private; 705 drm_i915_private_t *dev_priv = dev->dev_private;
706 i915_mem_takedown( &(dev_priv->agp_heap) ); 706 i915_mem_takedown(&(dev_priv->agp_heap));
707 } 707 }
708 i915_dma_cleanup( dev ); 708 i915_dma_cleanup(dev);
709} 709}
710 710
711void i915_driver_prerelease(drm_device_t *dev, DRMFILE filp) 711void i915_driver_prerelease(drm_device_t * dev, DRMFILE filp)
712{ 712{
713 if ( dev->dev_private ) { 713 if (dev->dev_private) {
714 drm_i915_private_t *dev_priv = dev->dev_private; 714 drm_i915_private_t *dev_priv = dev->dev_private;
715 i915_mem_release( dev, filp, dev_priv->agp_heap ); 715 i915_mem_release(dev, filp, dev_priv->agp_heap);
716 } 716 }
717} 717}
718 718