aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-07-11 02:09:54 -0400
committerDave Airlie <airlied@linux.ie>2007-07-11 02:09:54 -0400
commiteddca551a3e7be2fed54282f255f18efe9ead131 (patch)
tree7beb8c03af45cc9659a3ff5e6483f2ed7c31527d /drivers
parent84b1fd103dbbe01b5905db1444d3fc8afa9a7207 (diff)
drm: fixup other drivers for typedef removals
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/drm/i810_dma.c124
-rw-r--r--drivers/char/drm/i810_drm.h2
-rw-r--r--drivers/char/drm/i810_drv.h16
-rw-r--r--drivers/char/drm/i830_dma.c120
-rw-r--r--drivers/char/drm/i830_drm.h2
-rw-r--r--drivers/char/drm/i830_drv.h22
-rw-r--r--drivers/char/drm/i830_irq.c20
-rw-r--r--drivers/char/drm/mga_dma.c60
-rw-r--r--drivers/char/drm/mga_drm.h6
-rw-r--r--drivers/char/drm/mga_drv.c4
-rw-r--r--drivers/char/drm/mga_drv.h20
-rw-r--r--drivers/char/drm/mga_irq.c12
-rw-r--r--drivers/char/drm/mga_state.c24
-rw-r--r--drivers/char/drm/r128_cce.c22
-rw-r--r--drivers/char/drm/r128_drm.h4
-rw-r--r--drivers/char/drm/r128_drv.h16
-rw-r--r--drivers/char/drm/r128_irq.c10
-rw-r--r--drivers/char/drm/r128_state.c38
-rw-r--r--drivers/char/drm/savage_bci.c30
-rw-r--r--drivers/char/drm/savage_drm.h4
-rw-r--r--drivers/char/drm/savage_drv.h18
-rw-r--r--drivers/char/drm/savage_state.c18
22 files changed, 296 insertions, 296 deletions
diff --git a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c
index 53b8a7931955..ca82cddb4a22 100644
--- a/drivers/char/drm/i810_dma.c
+++ b/drivers/char/drm/i810_dma.c
@@ -45,7 +45,7 @@
45#define I810_BUF_UNMAPPED 0 45#define I810_BUF_UNMAPPED 0
46#define I810_BUF_MAPPED 1 46#define I810_BUF_MAPPED 1
47 47
48static drm_buf_t *i810_freelist_get(drm_device_t * dev) 48static drm_buf_t *i810_freelist_get(struct drm_device * dev)
49{ 49{
50 drm_device_dma_t *dma = dev->dma; 50 drm_device_dma_t *dma = dev->dma;
51 int i; 51 int i;
@@ -70,7 +70,7 @@ static drm_buf_t *i810_freelist_get(drm_device_t * dev)
70 * yet, the hardware updates in use for us once its on the ring buffer. 70 * yet, the hardware updates in use for us once its on the ring buffer.
71 */ 71 */
72 72
73static int i810_freelist_put(drm_device_t * dev, drm_buf_t * buf) 73static int i810_freelist_put(struct drm_device * dev, drm_buf_t * buf)
74{ 74{
75 drm_i810_buf_priv_t *buf_priv = buf->dev_private; 75 drm_i810_buf_priv_t *buf_priv = buf->dev_private;
76 int used; 76 int used;
@@ -87,8 +87,8 @@ static int i810_freelist_put(drm_device_t * dev, drm_buf_t * buf)
87 87
88static int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma) 88static int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
89{ 89{
90 drm_file_t *priv = filp->private_data; 90 struct drm_file *priv = filp->private_data;
91 drm_device_t *dev; 91 struct drm_device *dev;
92 drm_i810_private_t *dev_priv; 92 drm_i810_private_t *dev_priv;
93 drm_buf_t *buf; 93 drm_buf_t *buf;
94 drm_i810_buf_priv_t *buf_priv; 94 drm_i810_buf_priv_t *buf_priv;
@@ -122,8 +122,8 @@ static const struct file_operations i810_buffer_fops = {
122 122
123static int i810_map_buffer(drm_buf_t * buf, struct file *filp) 123static int i810_map_buffer(drm_buf_t * buf, struct file *filp)
124{ 124{
125 drm_file_t *priv = filp->private_data; 125 struct drm_file *priv = filp->private_data;
126 drm_device_t *dev = priv->head->dev; 126 struct drm_device *dev = priv->head->dev;
127 drm_i810_buf_priv_t *buf_priv = buf->dev_private; 127 drm_i810_buf_priv_t *buf_priv = buf->dev_private;
128 drm_i810_private_t *dev_priv = dev->dev_private; 128 drm_i810_private_t *dev_priv = dev->dev_private;
129 const struct file_operations *old_fops; 129 const struct file_operations *old_fops;
@@ -172,7 +172,7 @@ static int i810_unmap_buffer(drm_buf_t * buf)
172 return retcode; 172 return retcode;
173} 173}
174 174
175static int i810_dma_get_buffer(drm_device_t * dev, drm_i810_dma_t * d, 175static int i810_dma_get_buffer(struct drm_device * dev, drm_i810_dma_t * d,
176 struct file *filp) 176 struct file *filp)
177{ 177{
178 drm_buf_t *buf; 178 drm_buf_t *buf;
@@ -202,7 +202,7 @@ static int i810_dma_get_buffer(drm_device_t * dev, drm_i810_dma_t * d,
202 return retcode; 202 return retcode;
203} 203}
204 204
205static int i810_dma_cleanup(drm_device_t * dev) 205static int i810_dma_cleanup(struct drm_device * dev)
206{ 206{
207 drm_device_dma_t *dma = dev->dma; 207 drm_device_dma_t *dma = dev->dma;
208 208
@@ -243,7 +243,7 @@ static int i810_dma_cleanup(drm_device_t * dev)
243 return 0; 243 return 0;
244} 244}
245 245
246static int i810_wait_ring(drm_device_t * dev, int n) 246static int i810_wait_ring(struct drm_device * dev, int n)
247{ 247{
248 drm_i810_private_t *dev_priv = dev->dev_private; 248 drm_i810_private_t *dev_priv = dev->dev_private;
249 drm_i810_ring_buffer_t *ring = &(dev_priv->ring); 249 drm_i810_ring_buffer_t *ring = &(dev_priv->ring);
@@ -276,7 +276,7 @@ static int i810_wait_ring(drm_device_t * dev, int n)
276 return iters; 276 return iters;
277} 277}
278 278
279static void i810_kernel_lost_context(drm_device_t * dev) 279static void i810_kernel_lost_context(struct drm_device * dev)
280{ 280{
281 drm_i810_private_t *dev_priv = dev->dev_private; 281 drm_i810_private_t *dev_priv = dev->dev_private;
282 drm_i810_ring_buffer_t *ring = &(dev_priv->ring); 282 drm_i810_ring_buffer_t *ring = &(dev_priv->ring);
@@ -288,7 +288,7 @@ static void i810_kernel_lost_context(drm_device_t * dev)
288 ring->space += ring->Size; 288 ring->space += ring->Size;
289} 289}
290 290
291static int i810_freelist_init(drm_device_t * dev, drm_i810_private_t * dev_priv) 291static int i810_freelist_init(struct drm_device * dev, drm_i810_private_t * dev_priv)
292{ 292{
293 drm_device_dma_t *dma = dev->dma; 293 drm_device_dma_t *dma = dev->dma;
294 int my_idx = 24; 294 int my_idx = 24;
@@ -323,7 +323,7 @@ static int i810_freelist_init(drm_device_t * dev, drm_i810_private_t * dev_priv)
323 return 0; 323 return 0;
324} 324}
325 325
326static int i810_dma_initialize(drm_device_t * dev, 326static int i810_dma_initialize(struct drm_device * dev,
327 drm_i810_private_t * dev_priv, 327 drm_i810_private_t * dev_priv,
328 drm_i810_init_t * init) 328 drm_i810_init_t * init)
329{ 329{
@@ -476,8 +476,8 @@ static int i810_dma_init_compat(drm_i810_init_t * init, unsigned long arg)
476static int i810_dma_init(struct inode *inode, struct file *filp, 476static int i810_dma_init(struct inode *inode, struct file *filp,
477 unsigned int cmd, unsigned long arg) 477 unsigned int cmd, unsigned long arg)
478{ 478{
479 drm_file_t *priv = filp->private_data; 479 struct drm_file *priv = filp->private_data;
480 drm_device_t *dev = priv->head->dev; 480 struct drm_device *dev = priv->head->dev;
481 drm_i810_private_t *dev_priv; 481 drm_i810_private_t *dev_priv;
482 drm_i810_init_t init; 482 drm_i810_init_t init;
483 int retcode = 0; 483 int retcode = 0;
@@ -534,7 +534,7 @@ static int i810_dma_init(struct inode *inode, struct file *filp,
534 * Use 'volatile' & local var tmp to force the emitted values to be 534 * Use 'volatile' & local var tmp to force the emitted values to be
535 * identical to the verified ones. 535 * identical to the verified ones.
536 */ 536 */
537static void i810EmitContextVerified(drm_device_t * dev, 537static void i810EmitContextVerified(struct drm_device * dev,
538 volatile unsigned int *code) 538 volatile unsigned int *code)
539{ 539{
540 drm_i810_private_t *dev_priv = dev->dev_private; 540 drm_i810_private_t *dev_priv = dev->dev_private;
@@ -567,7 +567,7 @@ static void i810EmitContextVerified(drm_device_t * dev,
567 ADVANCE_LP_RING(); 567 ADVANCE_LP_RING();
568} 568}
569 569
570static void i810EmitTexVerified(drm_device_t * dev, volatile unsigned int *code) 570static void i810EmitTexVerified(struct drm_device * dev, volatile unsigned int *code)
571{ 571{
572 drm_i810_private_t *dev_priv = dev->dev_private; 572 drm_i810_private_t *dev_priv = dev->dev_private;
573 int i, j = 0; 573 int i, j = 0;
@@ -600,7 +600,7 @@ static void i810EmitTexVerified(drm_device_t * dev, volatile unsigned int *code)
600 600
601/* Need to do some additional checking when setting the dest buffer. 601/* Need to do some additional checking when setting the dest buffer.
602 */ 602 */
603static void i810EmitDestVerified(drm_device_t * dev, 603static void i810EmitDestVerified(struct drm_device * dev,
604 volatile unsigned int *code) 604 volatile unsigned int *code)
605{ 605{
606 drm_i810_private_t *dev_priv = dev->dev_private; 606 drm_i810_private_t *dev_priv = dev->dev_private;
@@ -635,7 +635,7 @@ static void i810EmitDestVerified(drm_device_t * dev,
635 ADVANCE_LP_RING(); 635 ADVANCE_LP_RING();
636} 636}
637 637
638static void i810EmitState(drm_device_t * dev) 638static void i810EmitState(struct drm_device * dev)
639{ 639{
640 drm_i810_private_t *dev_priv = dev->dev_private; 640 drm_i810_private_t *dev_priv = dev->dev_private;
641 drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv; 641 drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv;
@@ -666,14 +666,14 @@ static void i810EmitState(drm_device_t * dev)
666 666
667/* need to verify 667/* need to verify
668 */ 668 */
669static void i810_dma_dispatch_clear(drm_device_t * dev, int flags, 669static void i810_dma_dispatch_clear(struct drm_device * dev, int flags,
670 unsigned int clear_color, 670 unsigned int clear_color,
671 unsigned int clear_zval) 671 unsigned int clear_zval)
672{ 672{
673 drm_i810_private_t *dev_priv = dev->dev_private; 673 drm_i810_private_t *dev_priv = dev->dev_private;
674 drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv; 674 drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv;
675 int nbox = sarea_priv->nbox; 675 int nbox = sarea_priv->nbox;
676 drm_clip_rect_t *pbox = sarea_priv->boxes; 676 struct drm_clip_rect *pbox = sarea_priv->boxes;
677 int pitch = dev_priv->pitch; 677 int pitch = dev_priv->pitch;
678 int cpp = 2; 678 int cpp = 2;
679 int i; 679 int i;
@@ -741,12 +741,12 @@ static void i810_dma_dispatch_clear(drm_device_t * dev, int flags,
741 } 741 }
742} 742}
743 743
744static void i810_dma_dispatch_swap(drm_device_t * dev) 744static void i810_dma_dispatch_swap(struct drm_device * dev)
745{ 745{
746 drm_i810_private_t *dev_priv = dev->dev_private; 746 drm_i810_private_t *dev_priv = dev->dev_private;
747 drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv; 747 drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv;
748 int nbox = sarea_priv->nbox; 748 int nbox = sarea_priv->nbox;
749 drm_clip_rect_t *pbox = sarea_priv->boxes; 749 struct drm_clip_rect *pbox = sarea_priv->boxes;
750 int pitch = dev_priv->pitch; 750 int pitch = dev_priv->pitch;
751 int cpp = 2; 751 int cpp = 2;
752 int i; 752 int i;
@@ -787,13 +787,13 @@ static void i810_dma_dispatch_swap(drm_device_t * dev)
787 } 787 }
788} 788}
789 789
790static void i810_dma_dispatch_vertex(drm_device_t * dev, 790static void i810_dma_dispatch_vertex(struct drm_device * dev,
791 drm_buf_t * buf, int discard, int used) 791 drm_buf_t * buf, int discard, int used)
792{ 792{
793 drm_i810_private_t *dev_priv = dev->dev_private; 793 drm_i810_private_t *dev_priv = dev->dev_private;
794 drm_i810_buf_priv_t *buf_priv = buf->dev_private; 794 drm_i810_buf_priv_t *buf_priv = buf->dev_private;
795 drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv; 795 drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv;
796 drm_clip_rect_t *box = sarea_priv->boxes; 796 struct drm_clip_rect *box = sarea_priv->boxes;
797 int nbox = sarea_priv->nbox; 797 int nbox = sarea_priv->nbox;
798 unsigned long address = (unsigned long)buf->bus_address; 798 unsigned long address = (unsigned long)buf->bus_address;
799 unsigned long start = address - dev->agp->base; 799 unsigned long start = address - dev->agp->base;
@@ -867,7 +867,7 @@ static void i810_dma_dispatch_vertex(drm_device_t * dev,
867 } 867 }
868} 868}
869 869
870static void i810_dma_dispatch_flip(drm_device_t * dev) 870static void i810_dma_dispatch_flip(struct drm_device * dev)
871{ 871{
872 drm_i810_private_t *dev_priv = dev->dev_private; 872 drm_i810_private_t *dev_priv = dev->dev_private;
873 int pitch = dev_priv->pitch; 873 int pitch = dev_priv->pitch;
@@ -914,7 +914,7 @@ static void i810_dma_dispatch_flip(drm_device_t * dev)
914 914
915} 915}
916 916
917static void i810_dma_quiescent(drm_device_t * dev) 917static void i810_dma_quiescent(struct drm_device * dev)
918{ 918{
919 drm_i810_private_t *dev_priv = dev->dev_private; 919 drm_i810_private_t *dev_priv = dev->dev_private;
920 RING_LOCALS; 920 RING_LOCALS;
@@ -933,7 +933,7 @@ static void i810_dma_quiescent(drm_device_t * dev)
933 i810_wait_ring(dev, dev_priv->ring.Size - 8); 933 i810_wait_ring(dev, dev_priv->ring.Size - 8);
934} 934}
935 935
936static int i810_flush_queue(drm_device_t * dev) 936static int i810_flush_queue(struct drm_device * dev)
937{ 937{
938 drm_i810_private_t *dev_priv = dev->dev_private; 938 drm_i810_private_t *dev_priv = dev->dev_private;
939 drm_device_dma_t *dma = dev->dma; 939 drm_device_dma_t *dma = dev->dma;
@@ -968,7 +968,7 @@ static int i810_flush_queue(drm_device_t * dev)
968} 968}
969 969
970/* Must be called with the lock held */ 970/* Must be called with the lock held */
971static void i810_reclaim_buffers(drm_device_t * dev, struct file *filp) 971static void i810_reclaim_buffers(struct drm_device * dev, struct file *filp)
972{ 972{
973 drm_device_dma_t *dma = dev->dma; 973 drm_device_dma_t *dma = dev->dma;
974 int i; 974 int i;
@@ -1001,8 +1001,8 @@ static void i810_reclaim_buffers(drm_device_t * dev, struct file *filp)
1001static int i810_flush_ioctl(struct inode *inode, struct file *filp, 1001static int i810_flush_ioctl(struct inode *inode, struct file *filp,
1002 unsigned int cmd, unsigned long arg) 1002 unsigned int cmd, unsigned long arg)
1003{ 1003{
1004 drm_file_t *priv = filp->private_data; 1004 struct drm_file *priv = filp->private_data;
1005 drm_device_t *dev = priv->head->dev; 1005 struct drm_device *dev = priv->head->dev;
1006 1006
1007 LOCK_TEST_WITH_RETURN(dev, filp); 1007 LOCK_TEST_WITH_RETURN(dev, filp);
1008 1008
@@ -1013,8 +1013,8 @@ static int i810_flush_ioctl(struct inode *inode, struct file *filp,
1013static int i810_dma_vertex(struct inode *inode, struct file *filp, 1013static int i810_dma_vertex(struct inode *inode, struct file *filp,
1014 unsigned int cmd, unsigned long arg) 1014 unsigned int cmd, unsigned long arg)
1015{ 1015{
1016 drm_file_t *priv = filp->private_data; 1016 struct drm_file *priv = filp->private_data;
1017 drm_device_t *dev = priv->head->dev; 1017 struct drm_device *dev = priv->head->dev;
1018 drm_device_dma_t *dma = dev->dma; 1018 drm_device_dma_t *dma = dev->dma;
1019 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private; 1019 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private;
1020 u32 *hw_status = dev_priv->hw_status_page; 1020 u32 *hw_status = dev_priv->hw_status_page;
@@ -1049,8 +1049,8 @@ static int i810_dma_vertex(struct inode *inode, struct file *filp,
1049static int i810_clear_bufs(struct inode *inode, struct file *filp, 1049static int i810_clear_bufs(struct inode *inode, struct file *filp,
1050 unsigned int cmd, unsigned long arg) 1050 unsigned int cmd, unsigned long arg)
1051{ 1051{
1052 drm_file_t *priv = filp->private_data; 1052 struct drm_file *priv = filp->private_data;
1053 drm_device_t *dev = priv->head->dev; 1053 struct drm_device *dev = priv->head->dev;
1054 drm_i810_clear_t clear; 1054 drm_i810_clear_t clear;
1055 1055
1056 if (copy_from_user 1056 if (copy_from_user
@@ -1072,8 +1072,8 @@ static int i810_clear_bufs(struct inode *inode, struct file *filp,
1072static int i810_swap_bufs(struct inode *inode, struct file *filp, 1072static int i810_swap_bufs(struct inode *inode, struct file *filp,
1073 unsigned int cmd, unsigned long arg) 1073 unsigned int cmd, unsigned long arg)
1074{ 1074{
1075 drm_file_t *priv = filp->private_data; 1075 struct drm_file *priv = filp->private_data;
1076 drm_device_t *dev = priv->head->dev; 1076 struct drm_device *dev = priv->head->dev;
1077 1077
1078 DRM_DEBUG("i810_swap_bufs\n"); 1078 DRM_DEBUG("i810_swap_bufs\n");
1079 1079
@@ -1086,8 +1086,8 @@ static int i810_swap_bufs(struct inode *inode, struct file *filp,
1086static int i810_getage(struct inode *inode, struct file *filp, unsigned int cmd, 1086static int i810_getage(struct inode *inode, struct file *filp, unsigned int cmd,
1087 unsigned long arg) 1087 unsigned long arg)
1088{ 1088{
1089 drm_file_t *priv = filp->private_data; 1089 struct drm_file *priv = filp->private_data;
1090 drm_device_t *dev = priv->head->dev; 1090 struct drm_device *dev = priv->head->dev;
1091 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private; 1091 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private;
1092 u32 *hw_status = dev_priv->hw_status_page; 1092 u32 *hw_status = dev_priv->hw_status_page;
1093 drm_i810_sarea_t *sarea_priv = (drm_i810_sarea_t *) 1093 drm_i810_sarea_t *sarea_priv = (drm_i810_sarea_t *)
@@ -1100,8 +1100,8 @@ static int i810_getage(struct inode *inode, struct file *filp, unsigned int cmd,
1100static int i810_getbuf(struct inode *inode, struct file *filp, unsigned int cmd, 1100static int i810_getbuf(struct inode *inode, struct file *filp, unsigned int cmd,
1101 unsigned long arg) 1101 unsigned long arg)
1102{ 1102{
1103 drm_file_t *priv = filp->private_data; 1103 struct drm_file *priv = filp->private_data;
1104 drm_device_t *dev = priv->head->dev; 1104 struct drm_device *dev = priv->head->dev;
1105 int retcode = 0; 1105 int retcode = 0;
1106 drm_i810_dma_t d; 1106 drm_i810_dma_t d;
1107 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private; 1107 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private;
@@ -1121,7 +1121,7 @@ static int i810_getbuf(struct inode *inode, struct file *filp, unsigned int cmd,
1121 DRM_DEBUG("i810_dma: %d returning %d, granted = %d\n", 1121 DRM_DEBUG("i810_dma: %d returning %d, granted = %d\n",
1122 current->pid, retcode, d.granted); 1122 current->pid, retcode, d.granted);
1123 1123
1124 if (copy_to_user((drm_dma_t __user *) arg, &d, sizeof(d))) 1124 if (copy_to_user((void __user *) arg, &d, sizeof(d)))
1125 return -EFAULT; 1125 return -EFAULT;
1126 sarea_priv->last_dispatch = (int)hw_status[5]; 1126 sarea_priv->last_dispatch = (int)hw_status[5];
1127 1127
@@ -1142,7 +1142,7 @@ static int i810_docopy(struct inode *inode, struct file *filp, unsigned int cmd,
1142 return 0; 1142 return 0;
1143} 1143}
1144 1144
1145static void i810_dma_dispatch_mc(drm_device_t * dev, drm_buf_t * buf, int used, 1145static void i810_dma_dispatch_mc(struct drm_device * dev, drm_buf_t * buf, int used,
1146 unsigned int last_render) 1146 unsigned int last_render)
1147{ 1147{
1148 drm_i810_private_t *dev_priv = dev->dev_private; 1148 drm_i810_private_t *dev_priv = dev->dev_private;
@@ -1205,8 +1205,8 @@ static void i810_dma_dispatch_mc(drm_device_t * dev, drm_buf_t * buf, int used,
1205static int i810_dma_mc(struct inode *inode, struct file *filp, 1205static int i810_dma_mc(struct inode *inode, struct file *filp,
1206 unsigned int cmd, unsigned long arg) 1206 unsigned int cmd, unsigned long arg)
1207{ 1207{
1208 drm_file_t *priv = filp->private_data; 1208 struct drm_file *priv = filp->private_data;
1209 drm_device_t *dev = priv->head->dev; 1209 struct drm_device *dev = priv->head->dev;
1210 drm_device_dma_t *dma = dev->dma; 1210 drm_device_dma_t *dma = dev->dma;
1211 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private; 1211 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private;
1212 u32 *hw_status = dev_priv->hw_status_page; 1212 u32 *hw_status = dev_priv->hw_status_page;
@@ -1236,8 +1236,8 @@ static int i810_dma_mc(struct inode *inode, struct file *filp,
1236static int i810_rstatus(struct inode *inode, struct file *filp, 1236static int i810_rstatus(struct inode *inode, struct file *filp,
1237 unsigned int cmd, unsigned long arg) 1237 unsigned int cmd, unsigned long arg)
1238{ 1238{
1239 drm_file_t *priv = filp->private_data; 1239 struct drm_file *priv = filp->private_data;
1240 drm_device_t *dev = priv->head->dev; 1240 struct drm_device *dev = priv->head->dev;
1241 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private; 1241 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private;
1242 1242
1243 return (int)(((u32 *) (dev_priv->hw_status_page))[4]); 1243 return (int)(((u32 *) (dev_priv->hw_status_page))[4]);
@@ -1246,8 +1246,8 @@ static int i810_rstatus(struct inode *inode, struct file *filp,
1246static int i810_ov0_info(struct inode *inode, struct file *filp, 1246static int i810_ov0_info(struct inode *inode, struct file *filp,
1247 unsigned int cmd, unsigned long arg) 1247 unsigned int cmd, unsigned long arg)
1248{ 1248{
1249 drm_file_t *priv = filp->private_data; 1249 struct drm_file *priv = filp->private_data;
1250 drm_device_t *dev = priv->head->dev; 1250 struct drm_device *dev = priv->head->dev;
1251 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private; 1251 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private;
1252 drm_i810_overlay_t data; 1252 drm_i810_overlay_t data;
1253 1253
@@ -1262,8 +1262,8 @@ static int i810_ov0_info(struct inode *inode, struct file *filp,
1262static int i810_fstatus(struct inode *inode, struct file *filp, 1262static int i810_fstatus(struct inode *inode, struct file *filp,
1263 unsigned int cmd, unsigned long arg) 1263 unsigned int cmd, unsigned long arg)
1264{ 1264{
1265 drm_file_t *priv = filp->private_data; 1265 struct drm_file *priv = filp->private_data;
1266 drm_device_t *dev = priv->head->dev; 1266 struct drm_device *dev = priv->head->dev;
1267 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private; 1267 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private;
1268 1268
1269 LOCK_TEST_WITH_RETURN(dev, filp); 1269 LOCK_TEST_WITH_RETURN(dev, filp);
@@ -1274,8 +1274,8 @@ static int i810_fstatus(struct inode *inode, struct file *filp,
1274static int i810_ov0_flip(struct inode *inode, struct file *filp, 1274static int i810_ov0_flip(struct inode *inode, struct file *filp,
1275 unsigned int cmd, unsigned long arg) 1275 unsigned int cmd, unsigned long arg)
1276{ 1276{
1277 drm_file_t *priv = filp->private_data; 1277 struct drm_file *priv = filp->private_data;
1278 drm_device_t *dev = priv->head->dev; 1278 struct drm_device *dev = priv->head->dev;
1279 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private; 1279 drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private;
1280 1280
1281 LOCK_TEST_WITH_RETURN(dev, filp); 1281 LOCK_TEST_WITH_RETURN(dev, filp);
@@ -1288,7 +1288,7 @@ static int i810_ov0_flip(struct inode *inode, struct file *filp,
1288 1288
1289/* Not sure why this isn't set all the time: 1289/* Not sure why this isn't set all the time:
1290 */ 1290 */
1291static void i810_do_init_pageflip(drm_device_t * dev) 1291static void i810_do_init_pageflip(struct drm_device * dev)
1292{ 1292{
1293 drm_i810_private_t *dev_priv = dev->dev_private; 1293 drm_i810_private_t *dev_priv = dev->dev_private;
1294 1294
@@ -1298,7 +1298,7 @@ static void i810_do_init_pageflip(drm_device_t * dev)
1298 dev_priv->sarea_priv->pf_current_page = dev_priv->current_page; 1298 dev_priv->sarea_priv->pf_current_page = dev_priv->current_page;
1299} 1299}
1300 1300
1301static int i810_do_cleanup_pageflip(drm_device_t * dev) 1301static int i810_do_cleanup_pageflip(struct drm_device * dev)
1302{ 1302{
1303 drm_i810_private_t *dev_priv = dev->dev_private; 1303 drm_i810_private_t *dev_priv = dev->dev_private;
1304 1304
@@ -1313,8 +1313,8 @@ static int i810_do_cleanup_pageflip(drm_device_t * dev)
1313static int i810_flip_bufs(struct inode *inode, struct file *filp, 1313static int i810_flip_bufs(struct inode *inode, struct file *filp,
1314 unsigned int cmd, unsigned long arg) 1314 unsigned int cmd, unsigned long arg)
1315{ 1315{
1316 drm_file_t *priv = filp->private_data; 1316 struct drm_file *priv = filp->private_data;
1317 drm_device_t *dev = priv->head->dev; 1317 struct drm_device *dev = priv->head->dev;
1318 drm_i810_private_t *dev_priv = dev->dev_private; 1318 drm_i810_private_t *dev_priv = dev->dev_private;
1319 1319
1320 DRM_DEBUG("%s\n", __FUNCTION__); 1320 DRM_DEBUG("%s\n", __FUNCTION__);
@@ -1328,7 +1328,7 @@ static int i810_flip_bufs(struct inode *inode, struct file *filp,
1328 return 0; 1328 return 0;
1329} 1329}
1330 1330
1331int i810_driver_load(drm_device_t *dev, unsigned long flags) 1331int i810_driver_load(struct drm_device *dev, unsigned long flags)
1332{ 1332{
1333 /* i810 has 4 more counters */ 1333 /* i810 has 4 more counters */
1334 dev->counters += 4; 1334 dev->counters += 4;
@@ -1340,12 +1340,12 @@ int i810_driver_load(drm_device_t *dev, unsigned long flags)
1340 return 0; 1340 return 0;
1341} 1341}
1342 1342
1343void i810_driver_lastclose(drm_device_t * dev) 1343void i810_driver_lastclose(struct drm_device * dev)
1344{ 1344{
1345 i810_dma_cleanup(dev); 1345 i810_dma_cleanup(dev);
1346} 1346}
1347 1347
1348void i810_driver_preclose(drm_device_t * dev, DRMFILE filp) 1348void i810_driver_preclose(struct drm_device * dev, DRMFILE filp)
1349{ 1349{
1350 if (dev->dev_private) { 1350 if (dev->dev_private) {
1351 drm_i810_private_t *dev_priv = dev->dev_private; 1351 drm_i810_private_t *dev_priv = dev->dev_private;
@@ -1355,12 +1355,12 @@ void i810_driver_preclose(drm_device_t * dev, DRMFILE filp)
1355 } 1355 }
1356} 1356}
1357 1357
1358void i810_driver_reclaim_buffers_locked(drm_device_t * dev, struct file *filp) 1358void i810_driver_reclaim_buffers_locked(struct drm_device * dev, struct file *filp)
1359{ 1359{
1360 i810_reclaim_buffers(dev, filp); 1360 i810_reclaim_buffers(dev, filp);
1361} 1361}
1362 1362
1363int i810_driver_dma_quiescent(drm_device_t * dev) 1363int i810_driver_dma_quiescent(struct drm_device * dev)
1364{ 1364{
1365 i810_dma_quiescent(dev); 1365 i810_dma_quiescent(dev);
1366 return 0; 1366 return 0;
@@ -1397,7 +1397,7 @@ int i810_max_ioctl = DRM_ARRAY_SIZE(i810_ioctls);
1397 * \returns 1397 * \returns
1398 * A value of 1 is always retured to indictate every i810 is AGP. 1398 * A value of 1 is always retured to indictate every i810 is AGP.
1399 */ 1399 */
1400int i810_driver_device_is_agp(drm_device_t * dev) 1400int i810_driver_device_is_agp(struct drm_device * dev)
1401{ 1401{
1402 return 1; 1402 return 1;
1403} 1403}
diff --git a/drivers/char/drm/i810_drm.h b/drivers/char/drm/i810_drm.h
index 2deb925a94f3..614977dbce45 100644
--- a/drivers/char/drm/i810_drm.h
+++ b/drivers/char/drm/i810_drm.h
@@ -158,7 +158,7 @@ typedef struct _drm_i810_sarea {
158 unsigned int dirty; 158 unsigned int dirty;
159 159
160 unsigned int nbox; 160 unsigned int nbox;
161 drm_clip_rect_t boxes[I810_NR_SAREA_CLIPRECTS]; 161 struct drm_clip_rect boxes[I810_NR_SAREA_CLIPRECTS];
162 162
163 /* Maintain an LRU of contiguous regions of texture space. If 163 /* Maintain an LRU of contiguous regions of texture space. If
164 * you think you own a region of texture memory, and it has an 164 * you think you own a region of texture memory, and it has an
diff --git a/drivers/char/drm/i810_drv.h b/drivers/char/drm/i810_drv.h
index e6df49f4928a..591a23d9b838 100644
--- a/drivers/char/drm/i810_drv.h
+++ b/drivers/char/drm/i810_drv.h
@@ -77,8 +77,8 @@ typedef struct _drm_i810_ring_buffer {
77} drm_i810_ring_buffer_t; 77} drm_i810_ring_buffer_t;
78 78
79typedef struct drm_i810_private { 79typedef struct drm_i810_private {
80 drm_map_t *sarea_map; 80 struct drm_map *sarea_map;
81 drm_map_t *mmio_map; 81 struct drm_map *mmio_map;
82 82
83 drm_i810_sarea_t *sarea_priv; 83 drm_i810_sarea_t *sarea_priv;
84 drm_i810_ring_buffer_t ring; 84 drm_i810_ring_buffer_t ring;
@@ -115,15 +115,15 @@ typedef struct drm_i810_private {
115} drm_i810_private_t; 115} drm_i810_private_t;
116 116
117 /* i810_dma.c */ 117 /* i810_dma.c */
118extern int i810_driver_dma_quiescent(drm_device_t * dev); 118extern int i810_driver_dma_quiescent(struct drm_device * dev);
119extern void i810_driver_reclaim_buffers_locked(drm_device_t * dev, 119extern void i810_driver_reclaim_buffers_locked(struct drm_device * dev,
120 struct file *filp); 120 struct file *filp);
121extern int i810_driver_load(struct drm_device *, unsigned long flags); 121extern int i810_driver_load(struct drm_device *, unsigned long flags);
122extern void i810_driver_lastclose(drm_device_t * dev); 122extern void i810_driver_lastclose(struct drm_device * dev);
123extern void i810_driver_preclose(drm_device_t * dev, DRMFILE filp); 123extern void i810_driver_preclose(struct drm_device * dev, DRMFILE filp);
124extern void i810_driver_reclaim_buffers_locked(drm_device_t * dev, 124extern void i810_driver_reclaim_buffers_locked(struct drm_device * dev,
125 struct file *filp); 125 struct file *filp);
126extern int i810_driver_device_is_agp(drm_device_t * dev); 126extern int i810_driver_device_is_agp(struct drm_device * dev);
127 127
128extern drm_ioctl_desc_t i810_ioctls[]; 128extern drm_ioctl_desc_t i810_ioctls[];
129extern int i810_max_ioctl; 129extern int i810_max_ioctl;
diff --git a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c
index 3103258df61e..57ce074a5597 100644
--- a/drivers/char/drm/i830_dma.c
+++ b/drivers/char/drm/i830_dma.c
@@ -47,7 +47,7 @@
47#define I830_BUF_UNMAPPED 0 47#define I830_BUF_UNMAPPED 0
48#define I830_BUF_MAPPED 1 48#define I830_BUF_MAPPED 1
49 49
50static drm_buf_t *i830_freelist_get(drm_device_t * dev) 50static drm_buf_t *i830_freelist_get(struct drm_device * dev)
51{ 51{
52 drm_device_dma_t *dma = dev->dma; 52 drm_device_dma_t *dma = dev->dma;
53 int i; 53 int i;
@@ -72,7 +72,7 @@ static drm_buf_t *i830_freelist_get(drm_device_t * dev)
72 * yet, the hardware updates in use for us once its on the ring buffer. 72 * yet, the hardware updates in use for us once its on the ring buffer.
73 */ 73 */
74 74
75static int i830_freelist_put(drm_device_t * dev, drm_buf_t * buf) 75static int i830_freelist_put(struct drm_device * dev, drm_buf_t * buf)
76{ 76{
77 drm_i830_buf_priv_t *buf_priv = buf->dev_private; 77 drm_i830_buf_priv_t *buf_priv = buf->dev_private;
78 int used; 78 int used;
@@ -89,8 +89,8 @@ static int i830_freelist_put(drm_device_t * dev, drm_buf_t * buf)
89 89
90static int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma) 90static int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
91{ 91{
92 drm_file_t *priv = filp->private_data; 92 struct drm_file *priv = filp->private_data;
93 drm_device_t *dev; 93 struct drm_device *dev;
94 drm_i830_private_t *dev_priv; 94 drm_i830_private_t *dev_priv;
95 drm_buf_t *buf; 95 drm_buf_t *buf;
96 drm_i830_buf_priv_t *buf_priv; 96 drm_i830_buf_priv_t *buf_priv;
@@ -124,8 +124,8 @@ static const struct file_operations i830_buffer_fops = {
124 124
125static int i830_map_buffer(drm_buf_t * buf, struct file *filp) 125static int i830_map_buffer(drm_buf_t * buf, struct file *filp)
126{ 126{
127 drm_file_t *priv = filp->private_data; 127 struct drm_file *priv = filp->private_data;
128 drm_device_t *dev = priv->head->dev; 128 struct drm_device *dev = priv->head->dev;
129 drm_i830_buf_priv_t *buf_priv = buf->dev_private; 129 drm_i830_buf_priv_t *buf_priv = buf->dev_private;
130 drm_i830_private_t *dev_priv = dev->dev_private; 130 drm_i830_private_t *dev_priv = dev->dev_private;
131 const struct file_operations *old_fops; 131 const struct file_operations *old_fops;
@@ -176,7 +176,7 @@ static int i830_unmap_buffer(drm_buf_t * buf)
176 return retcode; 176 return retcode;
177} 177}
178 178
179static int i830_dma_get_buffer(drm_device_t * dev, drm_i830_dma_t * d, 179static int i830_dma_get_buffer(struct drm_device * dev, drm_i830_dma_t * d,
180 struct file *filp) 180 struct file *filp)
181{ 181{
182 drm_buf_t *buf; 182 drm_buf_t *buf;
@@ -206,7 +206,7 @@ static int i830_dma_get_buffer(drm_device_t * dev, drm_i830_dma_t * d,
206 return retcode; 206 return retcode;
207} 207}
208 208
209static int i830_dma_cleanup(drm_device_t * dev) 209static int i830_dma_cleanup(struct drm_device * dev)
210{ 210{
211 drm_device_dma_t *dma = dev->dma; 211 drm_device_dma_t *dma = dev->dma;
212 212
@@ -247,7 +247,7 @@ static int i830_dma_cleanup(drm_device_t * dev)
247 return 0; 247 return 0;
248} 248}
249 249
250int i830_wait_ring(drm_device_t * dev, int n, const char *caller) 250int i830_wait_ring(struct drm_device * dev, int n, const char *caller)
251{ 251{
252 drm_i830_private_t *dev_priv = dev->dev_private; 252 drm_i830_private_t *dev_priv = dev->dev_private;
253 drm_i830_ring_buffer_t *ring = &(dev_priv->ring); 253 drm_i830_ring_buffer_t *ring = &(dev_priv->ring);
@@ -281,7 +281,7 @@ int i830_wait_ring(drm_device_t * dev, int n, const char *caller)
281 return iters; 281 return iters;
282} 282}
283 283
284static void i830_kernel_lost_context(drm_device_t * dev) 284static void i830_kernel_lost_context(struct drm_device * dev)
285{ 285{
286 drm_i830_private_t *dev_priv = dev->dev_private; 286 drm_i830_private_t *dev_priv = dev->dev_private;
287 drm_i830_ring_buffer_t *ring = &(dev_priv->ring); 287 drm_i830_ring_buffer_t *ring = &(dev_priv->ring);
@@ -296,7 +296,7 @@ static void i830_kernel_lost_context(drm_device_t * dev)
296 dev_priv->sarea_priv->perf_boxes |= I830_BOX_RING_EMPTY; 296 dev_priv->sarea_priv->perf_boxes |= I830_BOX_RING_EMPTY;
297} 297}
298 298
299static int i830_freelist_init(drm_device_t * dev, drm_i830_private_t * dev_priv) 299static int i830_freelist_init(struct drm_device * dev, drm_i830_private_t * dev_priv)
300{ 300{
301 drm_device_dma_t *dma = dev->dma; 301 drm_device_dma_t *dma = dev->dma;
302 int my_idx = 36; 302 int my_idx = 36;
@@ -330,7 +330,7 @@ static int i830_freelist_init(drm_device_t * dev, drm_i830_private_t * dev_priv)
330 return 0; 330 return 0;
331} 331}
332 332
333static int i830_dma_initialize(drm_device_t * dev, 333static int i830_dma_initialize(struct drm_device * dev,
334 drm_i830_private_t * dev_priv, 334 drm_i830_private_t * dev_priv,
335 drm_i830_init_t * init) 335 drm_i830_init_t * init)
336{ 336{
@@ -454,8 +454,8 @@ static int i830_dma_initialize(drm_device_t * dev,
454static int i830_dma_init(struct inode *inode, struct file *filp, 454static int i830_dma_init(struct inode *inode, struct file *filp,
455 unsigned int cmd, unsigned long arg) 455 unsigned int cmd, unsigned long arg)
456{ 456{
457 drm_file_t *priv = filp->private_data; 457 struct drm_file *priv = filp->private_data;
458 drm_device_t *dev = priv->head->dev; 458 struct drm_device *dev = priv->head->dev;
459 drm_i830_private_t *dev_priv; 459 drm_i830_private_t *dev_priv;
460 drm_i830_init_t init; 460 drm_i830_init_t init;
461 int retcode = 0; 461 int retcode = 0;
@@ -489,7 +489,7 @@ static int i830_dma_init(struct inode *inode, struct file *filp,
489/* Most efficient way to verify state for the i830 is as it is 489/* Most efficient way to verify state for the i830 is as it is
490 * emitted. Non-conformant state is silently dropped. 490 * emitted. Non-conformant state is silently dropped.
491 */ 491 */
492static void i830EmitContextVerified(drm_device_t * dev, unsigned int *code) 492static void i830EmitContextVerified(struct drm_device * dev, unsigned int *code)
493{ 493{
494 drm_i830_private_t *dev_priv = dev->dev_private; 494 drm_i830_private_t *dev_priv = dev->dev_private;
495 int i, j = 0; 495 int i, j = 0;
@@ -534,7 +534,7 @@ static void i830EmitContextVerified(drm_device_t * dev, unsigned int *code)
534 ADVANCE_LP_RING(); 534 ADVANCE_LP_RING();
535} 535}
536 536
537static void i830EmitTexVerified(drm_device_t * dev, unsigned int *code) 537static void i830EmitTexVerified(struct drm_device * dev, unsigned int *code)
538{ 538{
539 drm_i830_private_t *dev_priv = dev->dev_private; 539 drm_i830_private_t *dev_priv = dev->dev_private;
540 int i, j = 0; 540 int i, j = 0;
@@ -568,7 +568,7 @@ static void i830EmitTexVerified(drm_device_t * dev, unsigned int *code)
568 printk("rejected packet %x\n", code[0]); 568 printk("rejected packet %x\n", code[0]);
569} 569}
570 570
571static void i830EmitTexBlendVerified(drm_device_t * dev, 571static void i830EmitTexBlendVerified(struct drm_device * dev,
572 unsigned int *code, unsigned int num) 572 unsigned int *code, unsigned int num)
573{ 573{
574 drm_i830_private_t *dev_priv = dev->dev_private; 574 drm_i830_private_t *dev_priv = dev->dev_private;
@@ -593,7 +593,7 @@ static void i830EmitTexBlendVerified(drm_device_t * dev,
593 ADVANCE_LP_RING(); 593 ADVANCE_LP_RING();
594} 594}
595 595
596static void i830EmitTexPalette(drm_device_t * dev, 596static void i830EmitTexPalette(struct drm_device * dev,
597 unsigned int *palette, int number, int is_shared) 597 unsigned int *palette, int number, int is_shared)
598{ 598{
599 drm_i830_private_t *dev_priv = dev->dev_private; 599 drm_i830_private_t *dev_priv = dev->dev_private;
@@ -620,7 +620,7 @@ static void i830EmitTexPalette(drm_device_t * dev,
620 620
621/* Need to do some additional checking when setting the dest buffer. 621/* Need to do some additional checking when setting the dest buffer.
622 */ 622 */
623static void i830EmitDestVerified(drm_device_t * dev, unsigned int *code) 623static void i830EmitDestVerified(struct drm_device * dev, unsigned int *code)
624{ 624{
625 drm_i830_private_t *dev_priv = dev->dev_private; 625 drm_i830_private_t *dev_priv = dev->dev_private;
626 unsigned int tmp; 626 unsigned int tmp;
@@ -681,7 +681,7 @@ static void i830EmitDestVerified(drm_device_t * dev, unsigned int *code)
681 ADVANCE_LP_RING(); 681 ADVANCE_LP_RING();
682} 682}
683 683
684static void i830EmitStippleVerified(drm_device_t * dev, unsigned int *code) 684static void i830EmitStippleVerified(struct drm_device * dev, unsigned int *code)
685{ 685{
686 drm_i830_private_t *dev_priv = dev->dev_private; 686 drm_i830_private_t *dev_priv = dev->dev_private;
687 RING_LOCALS; 687 RING_LOCALS;
@@ -692,7 +692,7 @@ static void i830EmitStippleVerified(drm_device_t * dev, unsigned int *code)
692 ADVANCE_LP_RING(); 692 ADVANCE_LP_RING();
693} 693}
694 694
695static void i830EmitState(drm_device_t * dev) 695static void i830EmitState(struct drm_device * dev)
696{ 696{
697 drm_i830_private_t *dev_priv = dev->dev_private; 697 drm_i830_private_t *dev_priv = dev->dev_private;
698 drm_i830_sarea_t *sarea_priv = dev_priv->sarea_priv; 698 drm_i830_sarea_t *sarea_priv = dev_priv->sarea_priv;
@@ -795,7 +795,7 @@ static void i830EmitState(drm_device_t * dev)
795 * Performance monitoring functions 795 * Performance monitoring functions
796 */ 796 */
797 797
798static void i830_fill_box(drm_device_t * dev, 798static void i830_fill_box(struct drm_device * dev,
799 int x, int y, int w, int h, int r, int g, int b) 799 int x, int y, int w, int h, int r, int g, int b)
800{ 800{
801 drm_i830_private_t *dev_priv = dev->dev_private; 801 drm_i830_private_t *dev_priv = dev->dev_private;
@@ -833,7 +833,7 @@ static void i830_fill_box(drm_device_t * dev,
833 ADVANCE_LP_RING(); 833 ADVANCE_LP_RING();
834} 834}
835 835
836static void i830_cp_performance_boxes(drm_device_t * dev) 836static void i830_cp_performance_boxes(struct drm_device * dev)
837{ 837{
838 drm_i830_private_t *dev_priv = dev->dev_private; 838 drm_i830_private_t *dev_priv = dev->dev_private;
839 839
@@ -878,7 +878,7 @@ static void i830_cp_performance_boxes(drm_device_t * dev)
878 dev_priv->sarea_priv->perf_boxes = 0; 878 dev_priv->sarea_priv->perf_boxes = 0;
879} 879}
880 880
881static void i830_dma_dispatch_clear(drm_device_t * dev, int flags, 881static void i830_dma_dispatch_clear(struct drm_device * dev, int flags,
882 unsigned int clear_color, 882 unsigned int clear_color,
883 unsigned int clear_zval, 883 unsigned int clear_zval,
884 unsigned int clear_depthmask) 884 unsigned int clear_depthmask)
@@ -886,7 +886,7 @@ static void i830_dma_dispatch_clear(drm_device_t * dev, int flags,
886 drm_i830_private_t *dev_priv = dev->dev_private; 886 drm_i830_private_t *dev_priv = dev->dev_private;
887 drm_i830_sarea_t *sarea_priv = dev_priv->sarea_priv; 887 drm_i830_sarea_t *sarea_priv = dev_priv->sarea_priv;
888 int nbox = sarea_priv->nbox; 888 int nbox = sarea_priv->nbox;
889 drm_clip_rect_t *pbox = sarea_priv->boxes; 889 struct drm_clip_rect *pbox = sarea_priv->boxes;
890 int pitch = dev_priv->pitch; 890 int pitch = dev_priv->pitch;
891 int cpp = dev_priv->cpp; 891 int cpp = dev_priv->cpp;
892 int i; 892 int i;
@@ -973,12 +973,12 @@ static void i830_dma_dispatch_clear(drm_device_t * dev, int flags,
973 } 973 }
974} 974}
975 975
976static void i830_dma_dispatch_swap(drm_device_t * dev) 976static void i830_dma_dispatch_swap(struct drm_device * dev)
977{ 977{
978 drm_i830_private_t *dev_priv = dev->dev_private; 978 drm_i830_private_t *dev_priv = dev->dev_private;
979 drm_i830_sarea_t *sarea_priv = dev_priv->sarea_priv; 979 drm_i830_sarea_t *sarea_priv = dev_priv->sarea_priv;
980 int nbox = sarea_priv->nbox; 980 int nbox = sarea_priv->nbox;
981 drm_clip_rect_t *pbox = sarea_priv->boxes; 981 struct drm_clip_rect *pbox = sarea_priv->boxes;
982 int pitch = dev_priv->pitch; 982 int pitch = dev_priv->pitch;
983 int cpp = dev_priv->cpp; 983 int cpp = dev_priv->cpp;
984 int i; 984 int i;
@@ -1043,7 +1043,7 @@ static void i830_dma_dispatch_swap(drm_device_t * dev)
1043 } 1043 }
1044} 1044}
1045 1045
1046static void i830_dma_dispatch_flip(drm_device_t * dev) 1046static void i830_dma_dispatch_flip(struct drm_device * dev)
1047{ 1047{
1048 drm_i830_private_t *dev_priv = dev->dev_private; 1048 drm_i830_private_t *dev_priv = dev->dev_private;
1049 RING_LOCALS; 1049 RING_LOCALS;
@@ -1086,13 +1086,13 @@ static void i830_dma_dispatch_flip(drm_device_t * dev)
1086 dev_priv->sarea_priv->pf_current_page = dev_priv->current_page; 1086 dev_priv->sarea_priv->pf_current_page = dev_priv->current_page;
1087} 1087}
1088 1088
1089static void i830_dma_dispatch_vertex(drm_device_t * dev, 1089static void i830_dma_dispatch_vertex(struct drm_device * dev,
1090 drm_buf_t * buf, int discard, int used) 1090 drm_buf_t * buf, int discard, int used)
1091{ 1091{
1092 drm_i830_private_t *dev_priv = dev->dev_private; 1092 drm_i830_private_t *dev_priv = dev->dev_private;
1093 drm_i830_buf_priv_t *buf_priv = buf->dev_private; 1093 drm_i830_buf_priv_t *buf_priv = buf->dev_private;
1094 drm_i830_sarea_t *sarea_priv = dev_priv->sarea_priv; 1094 drm_i830_sarea_t *sarea_priv = dev_priv->sarea_priv;
1095 drm_clip_rect_t *box = sarea_priv->boxes; 1095 struct drm_clip_rect *box = sarea_priv->boxes;
1096 int nbox = sarea_priv->nbox; 1096 int nbox = sarea_priv->nbox;
1097 unsigned long address = (unsigned long)buf->bus_address; 1097 unsigned long address = (unsigned long)buf->bus_address;
1098 unsigned long start = address - dev->agp->base; 1098 unsigned long start = address - dev->agp->base;
@@ -1198,7 +1198,7 @@ static void i830_dma_dispatch_vertex(drm_device_t * dev,
1198 } 1198 }
1199} 1199}
1200 1200
1201static void i830_dma_quiescent(drm_device_t * dev) 1201static void i830_dma_quiescent(struct drm_device * dev)
1202{ 1202{
1203 drm_i830_private_t *dev_priv = dev->dev_private; 1203 drm_i830_private_t *dev_priv = dev->dev_private;
1204 RING_LOCALS; 1204 RING_LOCALS;
@@ -1215,7 +1215,7 @@ static void i830_dma_quiescent(drm_device_t * dev)
1215 i830_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__); 1215 i830_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__);
1216} 1216}
1217 1217
1218static int i830_flush_queue(drm_device_t * dev) 1218static int i830_flush_queue(struct drm_device * dev)
1219{ 1219{
1220 drm_i830_private_t *dev_priv = dev->dev_private; 1220 drm_i830_private_t *dev_priv = dev->dev_private;
1221 drm_device_dma_t *dma = dev->dma; 1221 drm_device_dma_t *dma = dev->dma;
@@ -1248,7 +1248,7 @@ static int i830_flush_queue(drm_device_t * dev)
1248} 1248}
1249 1249
1250/* Must be called with the lock held */ 1250/* Must be called with the lock held */
1251static void i830_reclaim_buffers(drm_device_t * dev, struct file *filp) 1251static void i830_reclaim_buffers(struct drm_device * dev, struct file *filp)
1252{ 1252{
1253 drm_device_dma_t *dma = dev->dma; 1253 drm_device_dma_t *dma = dev->dma;
1254 int i; 1254 int i;
@@ -1281,8 +1281,8 @@ static void i830_reclaim_buffers(drm_device_t * dev, struct file *filp)
1281static int i830_flush_ioctl(struct inode *inode, struct file *filp, 1281static int i830_flush_ioctl(struct inode *inode, struct file *filp,
1282 unsigned int cmd, unsigned long arg) 1282 unsigned int cmd, unsigned long arg)
1283{ 1283{
1284 drm_file_t *priv = filp->private_data; 1284 struct drm_file *priv = filp->private_data;
1285 drm_device_t *dev = priv->head->dev; 1285 struct drm_device *dev = priv->head->dev;
1286 1286
1287 LOCK_TEST_WITH_RETURN(dev, filp); 1287 LOCK_TEST_WITH_RETURN(dev, filp);
1288 1288
@@ -1293,8 +1293,8 @@ static int i830_flush_ioctl(struct inode *inode, struct file *filp,
1293static int i830_dma_vertex(struct inode *inode, struct file *filp, 1293static int i830_dma_vertex(struct inode *inode, struct file *filp,
1294 unsigned int cmd, unsigned long arg) 1294 unsigned int cmd, unsigned long arg)
1295{ 1295{
1296 drm_file_t *priv = filp->private_data; 1296 struct drm_file *priv = filp->private_data;
1297 drm_device_t *dev = priv->head->dev; 1297 struct drm_device *dev = priv->head->dev;
1298 drm_device_dma_t *dma = dev->dma; 1298 drm_device_dma_t *dma = dev->dma;
1299 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private; 1299 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private;
1300 u32 *hw_status = dev_priv->hw_status_page; 1300 u32 *hw_status = dev_priv->hw_status_page;
@@ -1327,8 +1327,8 @@ static int i830_dma_vertex(struct inode *inode, struct file *filp,
1327static int i830_clear_bufs(struct inode *inode, struct file *filp, 1327static int i830_clear_bufs(struct inode *inode, struct file *filp,
1328 unsigned int cmd, unsigned long arg) 1328 unsigned int cmd, unsigned long arg)
1329{ 1329{
1330 drm_file_t *priv = filp->private_data; 1330 struct drm_file *priv = filp->private_data;
1331 drm_device_t *dev = priv->head->dev; 1331 struct drm_device *dev = priv->head->dev;
1332 drm_i830_clear_t clear; 1332 drm_i830_clear_t clear;
1333 1333
1334 if (copy_from_user 1334 if (copy_from_user
@@ -1351,8 +1351,8 @@ static int i830_clear_bufs(struct inode *inode, struct file *filp,
1351static int i830_swap_bufs(struct inode *inode, struct file *filp, 1351static int i830_swap_bufs(struct inode *inode, struct file *filp,
1352 unsigned int cmd, unsigned long arg) 1352 unsigned int cmd, unsigned long arg)
1353{ 1353{
1354 drm_file_t *priv = filp->private_data; 1354 struct drm_file *priv = filp->private_data;
1355 drm_device_t *dev = priv->head->dev; 1355 struct drm_device *dev = priv->head->dev;
1356 1356
1357 DRM_DEBUG("i830_swap_bufs\n"); 1357 DRM_DEBUG("i830_swap_bufs\n");
1358 1358
@@ -1364,7 +1364,7 @@ static int i830_swap_bufs(struct inode *inode, struct file *filp,
1364 1364
1365/* Not sure why this isn't set all the time: 1365/* Not sure why this isn't set all the time:
1366 */ 1366 */
1367static void i830_do_init_pageflip(drm_device_t * dev) 1367static void i830_do_init_pageflip(struct drm_device * dev)
1368{ 1368{
1369 drm_i830_private_t *dev_priv = dev->dev_private; 1369 drm_i830_private_t *dev_priv = dev->dev_private;
1370 1370
@@ -1374,7 +1374,7 @@ static void i830_do_init_pageflip(drm_device_t * dev)
1374 dev_priv->sarea_priv->pf_current_page = dev_priv->current_page; 1374 dev_priv->sarea_priv->pf_current_page = dev_priv->current_page;
1375} 1375}
1376 1376
1377static int i830_do_cleanup_pageflip(drm_device_t * dev) 1377static int i830_do_cleanup_pageflip(struct drm_device * dev)
1378{ 1378{
1379 drm_i830_private_t *dev_priv = dev->dev_private; 1379 drm_i830_private_t *dev_priv = dev->dev_private;
1380 1380
@@ -1389,8 +1389,8 @@ static int i830_do_cleanup_pageflip(drm_device_t * dev)
1389static int i830_flip_bufs(struct inode *inode, struct file *filp, 1389static int i830_flip_bufs(struct inode *inode, struct file *filp,
1390 unsigned int cmd, unsigned long arg) 1390 unsigned int cmd, unsigned long arg)
1391{ 1391{
1392 drm_file_t *priv = filp->private_data; 1392 struct drm_file *priv = filp->private_data;
1393 drm_device_t *dev = priv->head->dev; 1393 struct drm_device *dev = priv->head->dev;
1394 drm_i830_private_t *dev_priv = dev->dev_private; 1394 drm_i830_private_t *dev_priv = dev->dev_private;
1395 1395
1396 DRM_DEBUG("%s\n", __FUNCTION__); 1396 DRM_DEBUG("%s\n", __FUNCTION__);
@@ -1407,8 +1407,8 @@ static int i830_flip_bufs(struct inode *inode, struct file *filp,
1407static int i830_getage(struct inode *inode, struct file *filp, unsigned int cmd, 1407static int i830_getage(struct inode *inode, struct file *filp, unsigned int cmd,
1408 unsigned long arg) 1408 unsigned long arg)
1409{ 1409{
1410 drm_file_t *priv = filp->private_data; 1410 struct drm_file *priv = filp->private_data;
1411 drm_device_t *dev = priv->head->dev; 1411 struct drm_device *dev = priv->head->dev;
1412 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private; 1412 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private;
1413 u32 *hw_status = dev_priv->hw_status_page; 1413 u32 *hw_status = dev_priv->hw_status_page;
1414 drm_i830_sarea_t *sarea_priv = (drm_i830_sarea_t *) 1414 drm_i830_sarea_t *sarea_priv = (drm_i830_sarea_t *)
@@ -1421,8 +1421,8 @@ static int i830_getage(struct inode *inode, struct file *filp, unsigned int cmd,
1421static int i830_getbuf(struct inode *inode, struct file *filp, unsigned int cmd, 1421static int i830_getbuf(struct inode *inode, struct file *filp, unsigned int cmd,
1422 unsigned long arg) 1422 unsigned long arg)
1423{ 1423{
1424 drm_file_t *priv = filp->private_data; 1424 struct drm_file *priv = filp->private_data;
1425 drm_device_t *dev = priv->head->dev; 1425 struct drm_device *dev = priv->head->dev;
1426 int retcode = 0; 1426 int retcode = 0;
1427 drm_i830_dma_t d; 1427 drm_i830_dma_t d;
1428 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private; 1428 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private;
@@ -1443,7 +1443,7 @@ static int i830_getbuf(struct inode *inode, struct file *filp, unsigned int cmd,
1443 DRM_DEBUG("i830_dma: %d returning %d, granted = %d\n", 1443 DRM_DEBUG("i830_dma: %d returning %d, granted = %d\n",
1444 current->pid, retcode, d.granted); 1444 current->pid, retcode, d.granted);
1445 1445
1446 if (copy_to_user((drm_dma_t __user *) arg, &d, sizeof(d))) 1446 if (copy_to_user((void __user *) arg, &d, sizeof(d)))
1447 return -EFAULT; 1447 return -EFAULT;
1448 sarea_priv->last_dispatch = (int)hw_status[5]; 1448 sarea_priv->last_dispatch = (int)hw_status[5];
1449 1449
@@ -1466,8 +1466,8 @@ static int i830_docopy(struct inode *inode, struct file *filp, unsigned int cmd,
1466static int i830_getparam(struct inode *inode, struct file *filp, 1466static int i830_getparam(struct inode *inode, struct file *filp,
1467 unsigned int cmd, unsigned long arg) 1467 unsigned int cmd, unsigned long arg)
1468{ 1468{
1469 drm_file_t *priv = filp->private_data; 1469 struct drm_file *priv = filp->private_data;
1470 drm_device_t *dev = priv->head->dev; 1470 struct drm_device *dev = priv->head->dev;
1471 drm_i830_private_t *dev_priv = dev->dev_private; 1471 drm_i830_private_t *dev_priv = dev->dev_private;
1472 drm_i830_getparam_t param; 1472 drm_i830_getparam_t param;
1473 int value; 1473 int value;
@@ -1500,8 +1500,8 @@ static int i830_getparam(struct inode *inode, struct file *filp,
1500static int i830_setparam(struct inode *inode, struct file *filp, 1500static int i830_setparam(struct inode *inode, struct file *filp,
1501 unsigned int cmd, unsigned long arg) 1501 unsigned int cmd, unsigned long arg)
1502{ 1502{
1503 drm_file_t *priv = filp->private_data; 1503 struct drm_file *priv = filp->private_data;
1504 drm_device_t *dev = priv->head->dev; 1504 struct drm_device *dev = priv->head->dev;
1505 drm_i830_private_t *dev_priv = dev->dev_private; 1505 drm_i830_private_t *dev_priv = dev->dev_private;
1506 drm_i830_setparam_t param; 1506 drm_i830_setparam_t param;
1507 1507
@@ -1525,7 +1525,7 @@ static int i830_setparam(struct inode *inode, struct file *filp,
1525 return 0; 1525 return 0;
1526} 1526}
1527 1527
1528int i830_driver_load(drm_device_t *dev, unsigned long flags) 1528int i830_driver_load(struct drm_device *dev, unsigned long flags)
1529{ 1529{
1530 /* i830 has 4 more counters */ 1530 /* i830 has 4 more counters */
1531 dev->counters += 4; 1531 dev->counters += 4;
@@ -1537,12 +1537,12 @@ int i830_driver_load(drm_device_t *dev, unsigned long flags)
1537 return 0; 1537 return 0;
1538} 1538}
1539 1539
1540void i830_driver_lastclose(drm_device_t * dev) 1540void i830_driver_lastclose(struct drm_device * dev)
1541{ 1541{
1542 i830_dma_cleanup(dev); 1542 i830_dma_cleanup(dev);
1543} 1543}
1544 1544
1545void i830_driver_preclose(drm_device_t * dev, DRMFILE filp) 1545void i830_driver_preclose(struct drm_device * dev, DRMFILE filp)
1546{ 1546{
1547 if (dev->dev_private) { 1547 if (dev->dev_private) {
1548 drm_i830_private_t *dev_priv = dev->dev_private; 1548 drm_i830_private_t *dev_priv = dev->dev_private;
@@ -1552,12 +1552,12 @@ void i830_driver_preclose(drm_device_t * dev, DRMFILE filp)
1552 } 1552 }
1553} 1553}
1554 1554
1555void i830_driver_reclaim_buffers_locked(drm_device_t * dev, struct file *filp) 1555void i830_driver_reclaim_buffers_locked(struct drm_device * dev, struct file *filp)
1556{ 1556{
1557 i830_reclaim_buffers(dev, filp); 1557 i830_reclaim_buffers(dev, filp);
1558} 1558}
1559 1559
1560int i830_driver_dma_quiescent(drm_device_t * dev) 1560int i830_driver_dma_quiescent(struct drm_device * dev)
1561{ 1561{
1562 i830_dma_quiescent(dev); 1562 i830_dma_quiescent(dev);
1563 return 0; 1563 return 0;
@@ -1593,7 +1593,7 @@ int i830_max_ioctl = DRM_ARRAY_SIZE(i830_ioctls);
1593 * \returns 1593 * \returns
1594 * A value of 1 is always retured to indictate every i8xx is AGP. 1594 * A value of 1 is always retured to indictate every i8xx is AGP.
1595 */ 1595 */
1596int i830_driver_device_is_agp(drm_device_t * dev) 1596int i830_driver_device_is_agp(struct drm_device * dev)
1597{ 1597{
1598 return 1; 1598 return 1;
1599} 1599}
diff --git a/drivers/char/drm/i830_drm.h b/drivers/char/drm/i830_drm.h
index 66dd75027967..968a6d9f9dcb 100644
--- a/drivers/char/drm/i830_drm.h
+++ b/drivers/char/drm/i830_drm.h
@@ -191,7 +191,7 @@ typedef struct _drm_i830_sarea {
191 unsigned int dirty; 191 unsigned int dirty;
192 192
193 unsigned int nbox; 193 unsigned int nbox;
194 drm_clip_rect_t boxes[I830_NR_SAREA_CLIPRECTS]; 194 struct drm_clip_rect boxes[I830_NR_SAREA_CLIPRECTS];
195 195
196 /* Maintain an LRU of contiguous regions of texture space. If 196 /* Maintain an LRU of contiguous regions of texture space. If
197 * you think you own a region of texture memory, and it has an 197 * you think you own a region of texture memory, and it has an
diff --git a/drivers/char/drm/i830_drv.h b/drivers/char/drm/i830_drv.h
index e91f94afb4bb..bf2170318dd3 100644
--- a/drivers/char/drm/i830_drv.h
+++ b/drivers/char/drm/i830_drv.h
@@ -84,8 +84,8 @@ typedef struct _drm_i830_ring_buffer {
84} drm_i830_ring_buffer_t; 84} drm_i830_ring_buffer_t;
85 85
86typedef struct drm_i830_private { 86typedef struct drm_i830_private {
87 drm_map_t *sarea_map; 87 struct drm_map *sarea_map;
88 drm_map_t *mmio_map; 88 struct drm_map *mmio_map;
89 89
90 drm_i830_sarea_t *sarea_priv; 90 drm_i830_sarea_t *sarea_priv;
91 drm_i830_ring_buffer_t ring; 91 drm_i830_ring_buffer_t ring;
@@ -132,16 +132,16 @@ extern int i830_irq_wait(struct inode *inode, struct file *filp,
132 unsigned int cmd, unsigned long arg); 132 unsigned int cmd, unsigned long arg);
133 133
134extern irqreturn_t i830_driver_irq_handler(DRM_IRQ_ARGS); 134extern irqreturn_t i830_driver_irq_handler(DRM_IRQ_ARGS);
135extern void i830_driver_irq_preinstall(drm_device_t * dev); 135extern void i830_driver_irq_preinstall(struct drm_device * dev);
136extern void i830_driver_irq_postinstall(drm_device_t * dev); 136extern void i830_driver_irq_postinstall(struct drm_device * dev);
137extern void i830_driver_irq_uninstall(drm_device_t * dev); 137extern void i830_driver_irq_uninstall(struct drm_device * dev);
138extern int i830_driver_load(struct drm_device *, unsigned long flags); 138extern int i830_driver_load(struct drm_device *, unsigned long flags);
139extern void i830_driver_preclose(drm_device_t * dev, DRMFILE filp); 139extern void i830_driver_preclose(struct drm_device * dev, DRMFILE filp);
140extern void i830_driver_lastclose(drm_device_t * dev); 140extern void i830_driver_lastclose(struct drm_device * dev);
141extern void i830_driver_reclaim_buffers_locked(drm_device_t * dev, 141extern void i830_driver_reclaim_buffers_locked(struct drm_device * dev,
142 struct file *filp); 142 struct file *filp);
143extern int i830_driver_dma_quiescent(drm_device_t * dev); 143extern int i830_driver_dma_quiescent(struct drm_device * dev);
144extern int i830_driver_device_is_agp(drm_device_t * dev); 144extern int i830_driver_device_is_agp(struct drm_device * dev);
145 145
146#define I830_READ(reg) DRM_READ32(dev_priv->mmio_map, reg) 146#define I830_READ(reg) DRM_READ32(dev_priv->mmio_map, reg)
147#define I830_WRITE(reg,val) DRM_WRITE32(dev_priv->mmio_map, reg, val) 147#define I830_WRITE(reg,val) DRM_WRITE32(dev_priv->mmio_map, reg, val)
@@ -180,7 +180,7 @@ extern int i830_driver_device_is_agp(drm_device_t * dev);
180 I830_WRITE(LP_RING + RING_TAIL, outring); \ 180 I830_WRITE(LP_RING + RING_TAIL, outring); \
181} while(0) 181} while(0)
182 182
183extern int i830_wait_ring(drm_device_t * dev, int n, const char *caller); 183extern int i830_wait_ring(struct drm_device * dev, int n, const char *caller);
184 184
185#define GFX_OP_USER_INTERRUPT ((0<<29)|(2<<23)) 185#define GFX_OP_USER_INTERRUPT ((0<<29)|(2<<23))
186#define GFX_OP_BREAKPOINT_INTERRUPT ((0<<29)|(1<<23)) 186#define GFX_OP_BREAKPOINT_INTERRUPT ((0<<29)|(1<<23))
diff --git a/drivers/char/drm/i830_irq.c b/drivers/char/drm/i830_irq.c
index 5841f7674956..a1b5c63c3c3e 100644
--- a/drivers/char/drm/i830_irq.c
+++ b/drivers/char/drm/i830_irq.c
@@ -35,7 +35,7 @@
35 35
36irqreturn_t i830_driver_irq_handler(DRM_IRQ_ARGS) 36irqreturn_t i830_driver_irq_handler(DRM_IRQ_ARGS)
37{ 37{
38 drm_device_t *dev = (drm_device_t *) arg; 38 struct drm_device *dev = (struct drm_device *) arg;
39 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private; 39 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private;
40 u16 temp; 40 u16 temp;
41 41
@@ -53,7 +53,7 @@ irqreturn_t i830_driver_irq_handler(DRM_IRQ_ARGS)
53 return IRQ_HANDLED; 53 return IRQ_HANDLED;
54} 54}
55 55
56static int i830_emit_irq(drm_device_t * dev) 56static int i830_emit_irq(struct drm_device * dev)
57{ 57{
58 drm_i830_private_t *dev_priv = dev->dev_private; 58 drm_i830_private_t *dev_priv = dev->dev_private;
59 RING_LOCALS; 59 RING_LOCALS;
@@ -70,7 +70,7 @@ static int i830_emit_irq(drm_device_t * dev)
70 return atomic_read(&dev_priv->irq_emitted); 70 return atomic_read(&dev_priv->irq_emitted);
71} 71}
72 72
73static int i830_wait_irq(drm_device_t * dev, int irq_nr) 73static int i830_wait_irq(struct drm_device * dev, int irq_nr)
74{ 74{
75 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private; 75 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private;
76 DECLARE_WAITQUEUE(entry, current); 76 DECLARE_WAITQUEUE(entry, current);
@@ -117,8 +117,8 @@ static int i830_wait_irq(drm_device_t * dev, int irq_nr)
117int i830_irq_emit(struct inode *inode, struct file *filp, unsigned int cmd, 117int i830_irq_emit(struct inode *inode, struct file *filp, unsigned int cmd,
118 unsigned long arg) 118 unsigned long arg)
119{ 119{
120 drm_file_t *priv = filp->private_data; 120 struct drm_file *priv = filp->private_data;
121 drm_device_t *dev = priv->head->dev; 121 struct drm_device *dev = priv->head->dev;
122 drm_i830_private_t *dev_priv = dev->dev_private; 122 drm_i830_private_t *dev_priv = dev->dev_private;
123 drm_i830_irq_emit_t emit; 123 drm_i830_irq_emit_t emit;
124 int result; 124 int result;
@@ -149,8 +149,8 @@ int i830_irq_emit(struct inode *inode, struct file *filp, unsigned int cmd,
149int i830_irq_wait(struct inode *inode, struct file *filp, unsigned int cmd, 149int i830_irq_wait(struct inode *inode, struct file *filp, unsigned int cmd,
150 unsigned long arg) 150 unsigned long arg)
151{ 151{
152 drm_file_t *priv = filp->private_data; 152 struct drm_file *priv = filp->private_data;
153 drm_device_t *dev = priv->head->dev; 153 struct drm_device *dev = priv->head->dev;
154 drm_i830_private_t *dev_priv = dev->dev_private; 154 drm_i830_private_t *dev_priv = dev->dev_private;
155 drm_i830_irq_wait_t irqwait; 155 drm_i830_irq_wait_t irqwait;
156 156
@@ -168,7 +168,7 @@ int i830_irq_wait(struct inode *inode, struct file *filp, unsigned int cmd,
168 168
169/* drm_dma.h hooks 169/* drm_dma.h hooks
170*/ 170*/
171void i830_driver_irq_preinstall(drm_device_t * dev) 171void i830_driver_irq_preinstall(struct drm_device * dev)
172{ 172{
173 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private; 173 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private;
174 174
@@ -180,14 +180,14 @@ void i830_driver_irq_preinstall(drm_device_t * dev)
180 init_waitqueue_head(&dev_priv->irq_queue); 180 init_waitqueue_head(&dev_priv->irq_queue);
181} 181}
182 182
183void i830_driver_irq_postinstall(drm_device_t * dev) 183void i830_driver_irq_postinstall(struct drm_device * dev)
184{ 184{
185 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private; 185 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private;
186 186
187 I830_WRITE16(I830REG_INT_ENABLE_R, 0x2); 187 I830_WRITE16(I830REG_INT_ENABLE_R, 0x2);
188} 188}
189 189
190void i830_driver_irq_uninstall(drm_device_t * dev) 190void i830_driver_irq_uninstall(struct drm_device * dev)
191{ 191{
192 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private; 192 drm_i830_private_t *dev_priv = (drm_i830_private_t *) dev->dev_private;
193 if (!dev_priv) 193 if (!dev_priv)
diff --git a/drivers/char/drm/mga_dma.c b/drivers/char/drm/mga_dma.c
index 769fee8cc309..61feb6d06811 100644
--- a/drivers/char/drm/mga_dma.c
+++ b/drivers/char/drm/mga_dma.c
@@ -46,7 +46,7 @@
46 46
47#define MINIMAL_CLEANUP 0 47#define MINIMAL_CLEANUP 0
48#define FULL_CLEANUP 1 48#define FULL_CLEANUP 1
49static int mga_do_cleanup_dma(drm_device_t *dev, int full_cleanup); 49static int mga_do_cleanup_dma(struct drm_device *dev, int full_cleanup);
50 50
51/* ================================================================ 51/* ================================================================
52 * Engine control 52 * Engine control
@@ -224,7 +224,7 @@ void mga_do_dma_wrap_end(drm_mga_private_t * dev_priv)
224#define MGA_BUFFER_FREE 0 224#define MGA_BUFFER_FREE 0
225 225
226#if MGA_FREELIST_DEBUG 226#if MGA_FREELIST_DEBUG
227static void mga_freelist_print(drm_device_t * dev) 227static void mga_freelist_print(struct drm_device * dev)
228{ 228{
229 drm_mga_private_t *dev_priv = dev->dev_private; 229 drm_mga_private_t *dev_priv = dev->dev_private;
230 drm_mga_freelist_t *entry; 230 drm_mga_freelist_t *entry;
@@ -245,7 +245,7 @@ static void mga_freelist_print(drm_device_t * dev)
245} 245}
246#endif 246#endif
247 247
248static int mga_freelist_init(drm_device_t * dev, drm_mga_private_t * dev_priv) 248static int mga_freelist_init(struct drm_device * dev, drm_mga_private_t * dev_priv)
249{ 249{
250 drm_device_dma_t *dma = dev->dma; 250 drm_device_dma_t *dma = dev->dma;
251 drm_buf_t *buf; 251 drm_buf_t *buf;
@@ -291,7 +291,7 @@ static int mga_freelist_init(drm_device_t * dev, drm_mga_private_t * dev_priv)
291 return 0; 291 return 0;
292} 292}
293 293
294static void mga_freelist_cleanup(drm_device_t * dev) 294static void mga_freelist_cleanup(struct drm_device * dev)
295{ 295{
296 drm_mga_private_t *dev_priv = dev->dev_private; 296 drm_mga_private_t *dev_priv = dev->dev_private;
297 drm_mga_freelist_t *entry; 297 drm_mga_freelist_t *entry;
@@ -311,7 +311,7 @@ static void mga_freelist_cleanup(drm_device_t * dev)
311#if 0 311#if 0
312/* FIXME: Still needed? 312/* FIXME: Still needed?
313 */ 313 */
314static void mga_freelist_reset(drm_device_t * dev) 314static void mga_freelist_reset(struct drm_device * dev)
315{ 315{
316 drm_device_dma_t *dma = dev->dma; 316 drm_device_dma_t *dma = dev->dma;
317 drm_buf_t *buf; 317 drm_buf_t *buf;
@@ -326,7 +326,7 @@ static void mga_freelist_reset(drm_device_t * dev)
326} 326}
327#endif 327#endif
328 328
329static drm_buf_t *mga_freelist_get(drm_device_t * dev) 329static drm_buf_t *mga_freelist_get(struct drm_device * dev)
330{ 330{
331 drm_mga_private_t *dev_priv = dev->dev_private; 331 drm_mga_private_t *dev_priv = dev->dev_private;
332 drm_mga_freelist_t *next; 332 drm_mga_freelist_t *next;
@@ -359,7 +359,7 @@ static drm_buf_t *mga_freelist_get(drm_device_t * dev)
359 return NULL; 359 return NULL;
360} 360}
361 361
362int mga_freelist_put(drm_device_t * dev, drm_buf_t * buf) 362int mga_freelist_put(struct drm_device * dev, drm_buf_t * buf)
363{ 363{
364 drm_mga_private_t *dev_priv = dev->dev_private; 364 drm_mga_private_t *dev_priv = dev->dev_private;
365 drm_mga_buf_priv_t *buf_priv = buf->dev_private; 365 drm_mga_buf_priv_t *buf_priv = buf->dev_private;
@@ -393,7 +393,7 @@ int mga_freelist_put(drm_device_t * dev, drm_buf_t * buf)
393 * DMA initialization, cleanup 393 * DMA initialization, cleanup
394 */ 394 */
395 395
396int mga_driver_load(drm_device_t * dev, unsigned long flags) 396int mga_driver_load(struct drm_device * dev, unsigned long flags)
397{ 397{
398 drm_mga_private_t *dev_priv; 398 drm_mga_private_t *dev_priv;
399 399
@@ -434,7 +434,7 @@ int mga_driver_load(drm_device_t * dev, unsigned long flags)
434 * 434 *
435 * \sa mga_do_dma_bootstrap, mga_do_pci_dma_bootstrap 435 * \sa mga_do_dma_bootstrap, mga_do_pci_dma_bootstrap
436 */ 436 */
437static int mga_do_agp_dma_bootstrap(drm_device_t * dev, 437static int mga_do_agp_dma_bootstrap(struct drm_device * dev,
438 drm_mga_dma_bootstrap_t * dma_bs) 438 drm_mga_dma_bootstrap_t * dma_bs)
439{ 439{
440 drm_mga_private_t *const dev_priv = 440 drm_mga_private_t *const dev_priv =
@@ -445,11 +445,11 @@ static int mga_do_agp_dma_bootstrap(drm_device_t * dev,
445 const unsigned secondary_size = dma_bs->secondary_bin_count 445 const unsigned secondary_size = dma_bs->secondary_bin_count
446 * dma_bs->secondary_bin_size; 446 * dma_bs->secondary_bin_size;
447 const unsigned agp_size = (dma_bs->agp_size << 20); 447 const unsigned agp_size = (dma_bs->agp_size << 20);
448 drm_buf_desc_t req; 448 struct drm_buf_desc req;
449 drm_agp_mode_t mode; 449 struct drm_agp_mode mode;
450 drm_agp_info_t info; 450 struct drm_agp_info info;
451 drm_agp_buffer_t agp_req; 451 struct drm_agp_buffer agp_req;
452 drm_agp_binding_t bind_req; 452 struct drm_agp_binding bind_req;
453 453
454 /* Acquire AGP. */ 454 /* Acquire AGP. */
455 err = drm_agp_acquire(dev); 455 err = drm_agp_acquire(dev);
@@ -588,7 +588,7 @@ static int mga_do_agp_dma_bootstrap(drm_device_t * dev,
588 return 0; 588 return 0;
589} 589}
590#else 590#else
591static int mga_do_agp_dma_bootstrap(drm_device_t * dev, 591static int mga_do_agp_dma_bootstrap(struct drm_device * dev,
592 drm_mga_dma_bootstrap_t * dma_bs) 592 drm_mga_dma_bootstrap_t * dma_bs)
593{ 593{
594 return -EINVAL; 594 return -EINVAL;
@@ -609,7 +609,7 @@ static int mga_do_agp_dma_bootstrap(drm_device_t * dev,
609 * 609 *
610 * \sa mga_do_dma_bootstrap, mga_do_agp_dma_bootstrap 610 * \sa mga_do_dma_bootstrap, mga_do_agp_dma_bootstrap
611 */ 611 */
612static int mga_do_pci_dma_bootstrap(drm_device_t * dev, 612static int mga_do_pci_dma_bootstrap(struct drm_device * dev,
613 drm_mga_dma_bootstrap_t * dma_bs) 613 drm_mga_dma_bootstrap_t * dma_bs)
614{ 614{
615 drm_mga_private_t *const dev_priv = 615 drm_mga_private_t *const dev_priv =
@@ -618,7 +618,7 @@ static int mga_do_pci_dma_bootstrap(drm_device_t * dev,
618 unsigned int primary_size; 618 unsigned int primary_size;
619 unsigned int bin_count; 619 unsigned int bin_count;
620 int err; 620 int err;
621 drm_buf_desc_t req; 621 struct drm_buf_desc req;
622 622
623 if (dev->dma == NULL) { 623 if (dev->dma == NULL) {
624 DRM_ERROR("dev->dma is NULL\n"); 624 DRM_ERROR("dev->dma is NULL\n");
@@ -699,7 +699,7 @@ static int mga_do_pci_dma_bootstrap(drm_device_t * dev,
699 return 0; 699 return 0;
700} 700}
701 701
702static int mga_do_dma_bootstrap(drm_device_t * dev, 702static int mga_do_dma_bootstrap(struct drm_device * dev,
703 drm_mga_dma_bootstrap_t * dma_bs) 703 drm_mga_dma_bootstrap_t * dma_bs)
704{ 704{
705 const int is_agp = (dma_bs->agp_mode != 0) && drm_device_is_agp(dev); 705 const int is_agp = (dma_bs->agp_mode != 0) && drm_device_is_agp(dev);
@@ -793,7 +793,7 @@ int mga_dma_bootstrap(DRM_IOCTL_ARGS)
793 return err; 793 return err;
794} 794}
795 795
796static int mga_do_init_dma(drm_device_t * dev, drm_mga_init_t * init) 796static int mga_do_init_dma(struct drm_device * dev, drm_mga_init_t * init)
797{ 797{
798 drm_mga_private_t *dev_priv; 798 drm_mga_private_t *dev_priv;
799 int ret; 799 int ret;
@@ -933,7 +933,7 @@ static int mga_do_init_dma(drm_device_t * dev, drm_mga_init_t * init)
933 return 0; 933 return 0;
934} 934}
935 935
936static int mga_do_cleanup_dma(drm_device_t *dev, int full_cleanup) 936static int mga_do_cleanup_dma(struct drm_device *dev, int full_cleanup)
937{ 937{
938 int err = 0; 938 int err = 0;
939 DRM_DEBUG("\n"); 939 DRM_DEBUG("\n");
@@ -962,8 +962,8 @@ static int mga_do_cleanup_dma(drm_device_t *dev, int full_cleanup)
962 if (dev_priv->used_new_dma_init) { 962 if (dev_priv->used_new_dma_init) {
963#if __OS_HAS_AGP 963#if __OS_HAS_AGP
964 if (dev_priv->agp_handle != 0) { 964 if (dev_priv->agp_handle != 0) {
965 drm_agp_binding_t unbind_req; 965 struct drm_agp_binding unbind_req;
966 drm_agp_buffer_t free_req; 966 struct drm_agp_buffer free_req;
967 967
968 unbind_req.handle = dev_priv->agp_handle; 968 unbind_req.handle = dev_priv->agp_handle;
969 drm_agp_unbind(dev, &unbind_req); 969 drm_agp_unbind(dev, &unbind_req);
@@ -1040,11 +1040,11 @@ int mga_dma_flush(DRM_IOCTL_ARGS)
1040{ 1040{
1041 DRM_DEVICE; 1041 DRM_DEVICE;
1042 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; 1042 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
1043 drm_lock_t lock; 1043 struct drm_lock lock;
1044 1044
1045 LOCK_TEST_WITH_RETURN(dev, filp); 1045 LOCK_TEST_WITH_RETURN(dev, filp);
1046 1046
1047 DRM_COPY_FROM_USER_IOCTL(lock, (drm_lock_t __user *) data, 1047 DRM_COPY_FROM_USER_IOCTL(lock, (struct drm_lock __user *) data,
1048 sizeof(lock)); 1048 sizeof(lock));
1049 1049
1050 DRM_DEBUG("%s%s%s\n", 1050 DRM_DEBUG("%s%s%s\n",
@@ -1086,7 +1086,7 @@ int mga_dma_reset(DRM_IOCTL_ARGS)
1086 * DMA buffer management 1086 * DMA buffer management
1087 */ 1087 */
1088 1088
1089static int mga_dma_get_buffers(DRMFILE filp, drm_device_t * dev, drm_dma_t * d) 1089static int mga_dma_get_buffers(DRMFILE filp, struct drm_device * dev, struct drm_dma * d)
1090{ 1090{
1091 drm_buf_t *buf; 1091 drm_buf_t *buf;
1092 int i; 1092 int i;
@@ -1115,8 +1115,8 @@ int mga_dma_buffers(DRM_IOCTL_ARGS)
1115 DRM_DEVICE; 1115 DRM_DEVICE;
1116 drm_device_dma_t *dma = dev->dma; 1116 drm_device_dma_t *dma = dev->dma;
1117 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; 1117 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
1118 drm_dma_t __user *argp = (void __user *)data; 1118 struct drm_dma __user *argp = (void __user *)data;
1119 drm_dma_t d; 1119 struct drm_dma d;
1120 int ret = 0; 1120 int ret = 0;
1121 1121
1122 LOCK_TEST_WITH_RETURN(dev, filp); 1122 LOCK_TEST_WITH_RETURN(dev, filp);
@@ -1155,7 +1155,7 @@ int mga_dma_buffers(DRM_IOCTL_ARGS)
1155/** 1155/**
1156 * Called just before the module is unloaded. 1156 * Called just before the module is unloaded.
1157 */ 1157 */
1158int mga_driver_unload(drm_device_t * dev) 1158int mga_driver_unload(struct drm_device * dev)
1159{ 1159{
1160 drm_free(dev->dev_private, sizeof(drm_mga_private_t), DRM_MEM_DRIVER); 1160 drm_free(dev->dev_private, sizeof(drm_mga_private_t), DRM_MEM_DRIVER);
1161 dev->dev_private = NULL; 1161 dev->dev_private = NULL;
@@ -1166,12 +1166,12 @@ int mga_driver_unload(drm_device_t * dev)
1166/** 1166/**
1167 * Called when the last opener of the device is closed. 1167 * Called when the last opener of the device is closed.
1168 */ 1168 */
1169void mga_driver_lastclose(drm_device_t * dev) 1169void mga_driver_lastclose(struct drm_device * dev)
1170{ 1170{
1171 mga_do_cleanup_dma(dev, FULL_CLEANUP); 1171 mga_do_cleanup_dma(dev, FULL_CLEANUP);
1172} 1172}
1173 1173
1174int mga_driver_dma_quiescent(drm_device_t * dev) 1174int mga_driver_dma_quiescent(struct drm_device * dev)
1175{ 1175{
1176 drm_mga_private_t *dev_priv = dev->dev_private; 1176 drm_mga_private_t *dev_priv = dev->dev_private;
1177 return mga_do_wait_for_idle(dev_priv); 1177 return mga_do_wait_for_idle(dev_priv);
diff --git a/drivers/char/drm/mga_drm.h b/drivers/char/drm/mga_drm.h
index 44d1293e2947..944b50a5ff24 100644
--- a/drivers/char/drm/mga_drm.h
+++ b/drivers/char/drm/mga_drm.h
@@ -181,7 +181,7 @@ typedef struct _drm_mga_sarea {
181 181
182 /* The current cliprects, or a subset thereof. 182 /* The current cliprects, or a subset thereof.
183 */ 183 */
184 drm_clip_rect_t boxes[MGA_NR_SAREA_CLIPRECTS]; 184 struct drm_clip_rect boxes[MGA_NR_SAREA_CLIPRECTS];
185 unsigned int nbox; 185 unsigned int nbox;
186 186
187 /* Information about the most recently used 3d drawable. The 187 /* Information about the most recently used 3d drawable. The
@@ -202,7 +202,7 @@ typedef struct _drm_mga_sarea {
202 unsigned int exported_nback; 202 unsigned int exported_nback;
203 int exported_back_x, exported_front_x, exported_w; 203 int exported_back_x, exported_front_x, exported_w;
204 int exported_back_y, exported_front_y, exported_h; 204 int exported_back_y, exported_front_y, exported_h;
205 drm_clip_rect_t exported_boxes[MGA_NR_SAREA_CLIPRECTS]; 205 struct drm_clip_rect exported_boxes[MGA_NR_SAREA_CLIPRECTS];
206 206
207 /* Counters for aging textures and for client-side throttling. 207 /* Counters for aging textures and for client-side throttling.
208 */ 208 */
@@ -216,7 +216,7 @@ typedef struct _drm_mga_sarea {
216 216
217 /* LRU lists for texture memory in agp space and on the card. 217 /* LRU lists for texture memory in agp space and on the card.
218 */ 218 */
219 drm_tex_region_t texList[MGA_NR_TEX_HEAPS][MGA_NR_TEX_REGIONS + 1]; 219 struct drm_tex_region texList[MGA_NR_TEX_HEAPS][MGA_NR_TEX_REGIONS + 1];
220 unsigned int texAge[MGA_NR_TEX_HEAPS]; 220 unsigned int texAge[MGA_NR_TEX_HEAPS];
221 221
222 /* Mechanism to validate card state. 222 /* Mechanism to validate card state.
diff --git a/drivers/char/drm/mga_drv.c b/drivers/char/drm/mga_drv.c
index be49dbb9ec3f..5572939fc7d1 100644
--- a/drivers/char/drm/mga_drv.c
+++ b/drivers/char/drm/mga_drv.c
@@ -36,7 +36,7 @@
36 36
37#include "drm_pciids.h" 37#include "drm_pciids.h"
38 38
39static int mga_driver_device_is_agp(drm_device_t * dev); 39static int mga_driver_device_is_agp(struct drm_device * dev);
40 40
41static struct pci_device_id pciidlist[] = { 41static struct pci_device_id pciidlist[] = {
42 mga_PCI_IDS 42 mga_PCI_IDS
@@ -118,7 +118,7 @@ MODULE_LICENSE("GPL and additional rights");
118 * \returns 118 * \returns
119 * If the device is a PCI G450, zero is returned. Otherwise 2 is returned. 119 * If the device is a PCI G450, zero is returned. Otherwise 2 is returned.
120 */ 120 */
121static int mga_driver_device_is_agp(drm_device_t * dev) 121static int mga_driver_device_is_agp(struct drm_device * dev)
122{ 122{
123 const struct pci_dev *const pdev = dev->pdev; 123 const struct pci_dev *const pdev = dev->pdev;
124 124
diff --git a/drivers/char/drm/mga_drv.h b/drivers/char/drm/mga_drv.h
index 6b0c53193506..bf3852125cc5 100644
--- a/drivers/char/drm/mga_drv.h
+++ b/drivers/char/drm/mga_drv.h
@@ -157,10 +157,10 @@ extern int mga_dma_init(DRM_IOCTL_ARGS);
157extern int mga_dma_flush(DRM_IOCTL_ARGS); 157extern int mga_dma_flush(DRM_IOCTL_ARGS);
158extern int mga_dma_reset(DRM_IOCTL_ARGS); 158extern int mga_dma_reset(DRM_IOCTL_ARGS);
159extern int mga_dma_buffers(DRM_IOCTL_ARGS); 159extern int mga_dma_buffers(DRM_IOCTL_ARGS);
160extern int mga_driver_load(drm_device_t *dev, unsigned long flags); 160extern int mga_driver_load(struct drm_device *dev, unsigned long flags);
161extern int mga_driver_unload(drm_device_t * dev); 161extern int mga_driver_unload(struct drm_device * dev);
162extern void mga_driver_lastclose(drm_device_t * dev); 162extern void mga_driver_lastclose(struct drm_device * dev);
163extern int mga_driver_dma_quiescent(drm_device_t * dev); 163extern int mga_driver_dma_quiescent(struct drm_device * dev);
164 164
165extern int mga_do_wait_for_idle(drm_mga_private_t * dev_priv); 165extern int mga_do_wait_for_idle(drm_mga_private_t * dev_priv);
166 166
@@ -168,7 +168,7 @@ extern void mga_do_dma_flush(drm_mga_private_t * dev_priv);
168extern void mga_do_dma_wrap_start(drm_mga_private_t * dev_priv); 168extern void mga_do_dma_wrap_start(drm_mga_private_t * dev_priv);
169extern void mga_do_dma_wrap_end(drm_mga_private_t * dev_priv); 169extern void mga_do_dma_wrap_end(drm_mga_private_t * dev_priv);
170 170
171extern int mga_freelist_put(drm_device_t * dev, drm_buf_t * buf); 171extern int mga_freelist_put(struct drm_device * dev, drm_buf_t * buf);
172 172
173 /* mga_warp.c */ 173 /* mga_warp.c */
174extern unsigned int mga_warp_microcode_size(const drm_mga_private_t * dev_priv); 174extern unsigned int mga_warp_microcode_size(const drm_mga_private_t * dev_priv);
@@ -176,12 +176,12 @@ extern int mga_warp_install_microcode(drm_mga_private_t * dev_priv);
176extern int mga_warp_init(drm_mga_private_t * dev_priv); 176extern int mga_warp_init(drm_mga_private_t * dev_priv);
177 177
178 /* mga_irq.c */ 178 /* mga_irq.c */
179extern int mga_driver_fence_wait(drm_device_t * dev, unsigned int *sequence); 179extern int mga_driver_fence_wait(struct drm_device * dev, unsigned int *sequence);
180extern int mga_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence); 180extern int mga_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence);
181extern irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS); 181extern irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS);
182extern void mga_driver_irq_preinstall(drm_device_t * dev); 182extern void mga_driver_irq_preinstall(struct drm_device * dev);
183extern void mga_driver_irq_postinstall(drm_device_t * dev); 183extern void mga_driver_irq_postinstall(struct drm_device * dev);
184extern void mga_driver_irq_uninstall(drm_device_t * dev); 184extern void mga_driver_irq_uninstall(struct drm_device * dev);
185extern long mga_compat_ioctl(struct file *filp, unsigned int cmd, 185extern long mga_compat_ioctl(struct file *filp, unsigned int cmd,
186 unsigned long arg); 186 unsigned long arg);
187 187
diff --git a/drivers/char/drm/mga_irq.c b/drivers/char/drm/mga_irq.c
index eb9644024172..9302cb8f0f83 100644
--- a/drivers/char/drm/mga_irq.c
+++ b/drivers/char/drm/mga_irq.c
@@ -37,7 +37,7 @@
37 37
38irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS) 38irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS)
39{ 39{
40 drm_device_t *dev = (drm_device_t *) arg; 40 struct drm_device *dev = (struct drm_device *) arg;
41 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; 41 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
42 int status; 42 int status;
43 int handled = 0; 43 int handled = 0;
@@ -78,7 +78,7 @@ irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS)
78 return IRQ_NONE; 78 return IRQ_NONE;
79} 79}
80 80
81int mga_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence) 81int mga_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence)
82{ 82{
83 unsigned int cur_vblank; 83 unsigned int cur_vblank;
84 int ret = 0; 84 int ret = 0;
@@ -96,7 +96,7 @@ int mga_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence)
96 return ret; 96 return ret;
97} 97}
98 98
99int mga_driver_fence_wait(drm_device_t * dev, unsigned int *sequence) 99int mga_driver_fence_wait(struct drm_device * dev, unsigned int *sequence)
100{ 100{
101 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; 101 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
102 unsigned int cur_fence; 102 unsigned int cur_fence;
@@ -115,7 +115,7 @@ int mga_driver_fence_wait(drm_device_t * dev, unsigned int *sequence)
115 return ret; 115 return ret;
116} 116}
117 117
118void mga_driver_irq_preinstall(drm_device_t * dev) 118void mga_driver_irq_preinstall(struct drm_device * dev)
119{ 119{
120 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; 120 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
121 121
@@ -125,7 +125,7 @@ void mga_driver_irq_preinstall(drm_device_t * dev)
125 MGA_WRITE(MGA_ICLEAR, ~0); 125 MGA_WRITE(MGA_ICLEAR, ~0);
126} 126}
127 127
128void mga_driver_irq_postinstall(drm_device_t * dev) 128void mga_driver_irq_postinstall(struct drm_device * dev)
129{ 129{
130 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; 130 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
131 131
@@ -135,7 +135,7 @@ void mga_driver_irq_postinstall(drm_device_t * dev)
135 MGA_WRITE(MGA_IEN, MGA_VLINEIEN | MGA_SOFTRAPEN); 135 MGA_WRITE(MGA_IEN, MGA_VLINEIEN | MGA_SOFTRAPEN);
136} 136}
137 137
138void mga_driver_irq_uninstall(drm_device_t * dev) 138void mga_driver_irq_uninstall(struct drm_device * dev)
139{ 139{
140 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; 140 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
141 if (!dev_priv) 141 if (!dev_priv)
diff --git a/drivers/char/drm/mga_state.c b/drivers/char/drm/mga_state.c
index 2837e669183a..6d5ab9ff69c7 100644
--- a/drivers/char/drm/mga_state.c
+++ b/drivers/char/drm/mga_state.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44static void mga_emit_clip_rect(drm_mga_private_t * dev_priv, 44static void mga_emit_clip_rect(drm_mga_private_t * dev_priv,
45 drm_clip_rect_t * box) 45 struct drm_clip_rect * box)
46{ 46{
47 drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; 47 drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
48 drm_mga_context_regs_t *ctx = &sarea_priv->context_state; 48 drm_mga_context_regs_t *ctx = &sarea_priv->context_state;
@@ -480,12 +480,12 @@ static int mga_verify_blit(drm_mga_private_t * dev_priv,
480 * 480 *
481 */ 481 */
482 482
483static void mga_dma_dispatch_clear(drm_device_t * dev, drm_mga_clear_t * clear) 483static void mga_dma_dispatch_clear(struct drm_device * dev, drm_mga_clear_t * clear)
484{ 484{
485 drm_mga_private_t *dev_priv = dev->dev_private; 485 drm_mga_private_t *dev_priv = dev->dev_private;
486 drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; 486 drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
487 drm_mga_context_regs_t *ctx = &sarea_priv->context_state; 487 drm_mga_context_regs_t *ctx = &sarea_priv->context_state;
488 drm_clip_rect_t *pbox = sarea_priv->boxes; 488 struct drm_clip_rect *pbox = sarea_priv->boxes;
489 int nbox = sarea_priv->nbox; 489 int nbox = sarea_priv->nbox;
490 int i; 490 int i;
491 DMA_LOCALS; 491 DMA_LOCALS;
@@ -500,7 +500,7 @@ static void mga_dma_dispatch_clear(drm_device_t * dev, drm_mga_clear_t * clear)
500 ADVANCE_DMA(); 500 ADVANCE_DMA();
501 501
502 for (i = 0; i < nbox; i++) { 502 for (i = 0; i < nbox; i++) {
503 drm_clip_rect_t *box = &pbox[i]; 503 struct drm_clip_rect *box = &pbox[i];
504 u32 height = box->y2 - box->y1; 504 u32 height = box->y2 - box->y1;
505 505
506 DRM_DEBUG(" from=%d,%d to=%d,%d\n", 506 DRM_DEBUG(" from=%d,%d to=%d,%d\n",
@@ -568,12 +568,12 @@ static void mga_dma_dispatch_clear(drm_device_t * dev, drm_mga_clear_t * clear)
568 FLUSH_DMA(); 568 FLUSH_DMA();
569} 569}
570 570
571static void mga_dma_dispatch_swap(drm_device_t * dev) 571static void mga_dma_dispatch_swap(struct drm_device * dev)
572{ 572{
573 drm_mga_private_t *dev_priv = dev->dev_private; 573 drm_mga_private_t *dev_priv = dev->dev_private;
574 drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; 574 drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
575 drm_mga_context_regs_t *ctx = &sarea_priv->context_state; 575 drm_mga_context_regs_t *ctx = &sarea_priv->context_state;
576 drm_clip_rect_t *pbox = sarea_priv->boxes; 576 struct drm_clip_rect *pbox = sarea_priv->boxes;
577 int nbox = sarea_priv->nbox; 577 int nbox = sarea_priv->nbox;
578 int i; 578 int i;
579 DMA_LOCALS; 579 DMA_LOCALS;
@@ -598,7 +598,7 @@ static void mga_dma_dispatch_swap(drm_device_t * dev)
598 MGA_PLNWT, 0xffffffff, MGA_DWGCTL, MGA_DWGCTL_COPY); 598 MGA_PLNWT, 0xffffffff, MGA_DWGCTL, MGA_DWGCTL_COPY);
599 599
600 for (i = 0; i < nbox; i++) { 600 for (i = 0; i < nbox; i++) {
601 drm_clip_rect_t *box = &pbox[i]; 601 struct drm_clip_rect *box = &pbox[i];
602 u32 height = box->y2 - box->y1; 602 u32 height = box->y2 - box->y1;
603 u32 start = box->y1 * dev_priv->front_pitch; 603 u32 start = box->y1 * dev_priv->front_pitch;
604 604
@@ -622,7 +622,7 @@ static void mga_dma_dispatch_swap(drm_device_t * dev)
622 DRM_DEBUG("%s... done.\n", __FUNCTION__); 622 DRM_DEBUG("%s... done.\n", __FUNCTION__);
623} 623}
624 624
625static void mga_dma_dispatch_vertex(drm_device_t * dev, drm_buf_t * buf) 625static void mga_dma_dispatch_vertex(struct drm_device * dev, drm_buf_t * buf)
626{ 626{
627 drm_mga_private_t *dev_priv = dev->dev_private; 627 drm_mga_private_t *dev_priv = dev->dev_private;
628 drm_mga_buf_priv_t *buf_priv = buf->dev_private; 628 drm_mga_buf_priv_t *buf_priv = buf->dev_private;
@@ -669,7 +669,7 @@ static void mga_dma_dispatch_vertex(drm_device_t * dev, drm_buf_t * buf)
669 FLUSH_DMA(); 669 FLUSH_DMA();
670} 670}
671 671
672static void mga_dma_dispatch_indices(drm_device_t * dev, drm_buf_t * buf, 672static void mga_dma_dispatch_indices(struct drm_device * dev, drm_buf_t * buf,
673 unsigned int start, unsigned int end) 673 unsigned int start, unsigned int end)
674{ 674{
675 drm_mga_private_t *dev_priv = dev->dev_private; 675 drm_mga_private_t *dev_priv = dev->dev_private;
@@ -718,7 +718,7 @@ static void mga_dma_dispatch_indices(drm_device_t * dev, drm_buf_t * buf,
718/* This copies a 64 byte aligned agp region to the frambuffer with a 718/* This copies a 64 byte aligned agp region to the frambuffer with a
719 * standard blit, the ioctl needs to do checking. 719 * standard blit, the ioctl needs to do checking.
720 */ 720 */
721static void mga_dma_dispatch_iload(drm_device_t * dev, drm_buf_t * buf, 721static void mga_dma_dispatch_iload(struct drm_device * dev, drm_buf_t * buf,
722 unsigned int dstorg, unsigned int length) 722 unsigned int dstorg, unsigned int length)
723{ 723{
724 drm_mga_private_t *dev_priv = dev->dev_private; 724 drm_mga_private_t *dev_priv = dev->dev_private;
@@ -766,12 +766,12 @@ static void mga_dma_dispatch_iload(drm_device_t * dev, drm_buf_t * buf,
766 FLUSH_DMA(); 766 FLUSH_DMA();
767} 767}
768 768
769static void mga_dma_dispatch_blit(drm_device_t * dev, drm_mga_blit_t * blit) 769static void mga_dma_dispatch_blit(struct drm_device * dev, drm_mga_blit_t * blit)
770{ 770{
771 drm_mga_private_t *dev_priv = dev->dev_private; 771 drm_mga_private_t *dev_priv = dev->dev_private;
772 drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; 772 drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
773 drm_mga_context_regs_t *ctx = &sarea_priv->context_state; 773 drm_mga_context_regs_t *ctx = &sarea_priv->context_state;
774 drm_clip_rect_t *pbox = sarea_priv->boxes; 774 struct drm_clip_rect *pbox = sarea_priv->boxes;
775 int nbox = sarea_priv->nbox; 775 int nbox = sarea_priv->nbox;
776 u32 scandir = 0, i; 776 u32 scandir = 0, i;
777 DMA_LOCALS; 777 DMA_LOCALS;
diff --git a/drivers/char/drm/r128_cce.c b/drivers/char/drm/r128_cce.c
index eabb4c42c319..d1e762e4eb54 100644
--- a/drivers/char/drm/r128_cce.c
+++ b/drivers/char/drm/r128_cce.c
@@ -81,7 +81,7 @@ static u32 r128_cce_microcode[] = {
81 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 81 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
82}; 82};
83 83
84static int R128_READ_PLL(drm_device_t * dev, int addr) 84static int R128_READ_PLL(struct drm_device * dev, int addr)
85{ 85{
86 drm_r128_private_t *dev_priv = dev->dev_private; 86 drm_r128_private_t *dev_priv = dev->dev_private;
87 87
@@ -271,7 +271,7 @@ static void r128_do_cce_stop(drm_r128_private_t * dev_priv)
271 271
272/* Reset the engine. This will stop the CCE if it is running. 272/* Reset the engine. This will stop the CCE if it is running.
273 */ 273 */
274static int r128_do_engine_reset(drm_device_t * dev) 274static int r128_do_engine_reset(struct drm_device * dev)
275{ 275{
276 drm_r128_private_t *dev_priv = dev->dev_private; 276 drm_r128_private_t *dev_priv = dev->dev_private;
277 u32 clock_cntl_index, mclk_cntl, gen_reset_cntl; 277 u32 clock_cntl_index, mclk_cntl, gen_reset_cntl;
@@ -308,7 +308,7 @@ static int r128_do_engine_reset(drm_device_t * dev)
308 return 0; 308 return 0;
309} 309}
310 310
311static void r128_cce_init_ring_buffer(drm_device_t * dev, 311static void r128_cce_init_ring_buffer(struct drm_device * dev,
312 drm_r128_private_t * dev_priv) 312 drm_r128_private_t * dev_priv)
313{ 313{
314 u32 ring_start; 314 u32 ring_start;
@@ -347,7 +347,7 @@ static void r128_cce_init_ring_buffer(drm_device_t * dev,
347 R128_WRITE(R128_BUS_CNTL, tmp); 347 R128_WRITE(R128_BUS_CNTL, tmp);
348} 348}
349 349
350static int r128_do_init_cce(drm_device_t * dev, drm_r128_init_t * init) 350static int r128_do_init_cce(struct drm_device * dev, drm_r128_init_t * init)
351{ 351{
352 drm_r128_private_t *dev_priv; 352 drm_r128_private_t *dev_priv;
353 353
@@ -584,7 +584,7 @@ static int r128_do_init_cce(drm_device_t * dev, drm_r128_init_t * init)
584 return 0; 584 return 0;
585} 585}
586 586
587int r128_do_cleanup_cce(drm_device_t * dev) 587int r128_do_cleanup_cce(struct drm_device * dev)
588{ 588{
589 589
590 /* Make sure interrupts are disabled here because the uninstall ioctl 590 /* Make sure interrupts are disabled here because the uninstall ioctl
@@ -769,7 +769,7 @@ int r128_fullscreen(DRM_IOCTL_ARGS)
769#define R128_BUFFER_FREE 0 769#define R128_BUFFER_FREE 0
770 770
771#if 0 771#if 0
772static int r128_freelist_init(drm_device_t * dev) 772static int r128_freelist_init(struct drm_device * dev)
773{ 773{
774 drm_device_dma_t *dma = dev->dma; 774 drm_device_dma_t *dma = dev->dma;
775 drm_r128_private_t *dev_priv = dev->dev_private; 775 drm_r128_private_t *dev_priv = dev->dev_private;
@@ -815,7 +815,7 @@ static int r128_freelist_init(drm_device_t * dev)
815} 815}
816#endif 816#endif
817 817
818static drm_buf_t *r128_freelist_get(drm_device_t * dev) 818static drm_buf_t *r128_freelist_get(struct drm_device * dev)
819{ 819{
820 drm_device_dma_t *dma = dev->dma; 820 drm_device_dma_t *dma = dev->dma;
821 drm_r128_private_t *dev_priv = dev->dev_private; 821 drm_r128_private_t *dev_priv = dev->dev_private;
@@ -853,7 +853,7 @@ static drm_buf_t *r128_freelist_get(drm_device_t * dev)
853 return NULL; 853 return NULL;
854} 854}
855 855
856void r128_freelist_reset(drm_device_t * dev) 856void r128_freelist_reset(struct drm_device * dev)
857{ 857{
858 drm_device_dma_t *dma = dev->dma; 858 drm_device_dma_t *dma = dev->dma;
859 int i; 859 int i;
@@ -886,7 +886,7 @@ int r128_wait_ring(drm_r128_private_t * dev_priv, int n)
886 return DRM_ERR(EBUSY); 886 return DRM_ERR(EBUSY);
887} 887}
888 888
889static int r128_cce_get_buffers(DRMFILE filp, drm_device_t * dev, drm_dma_t * d) 889static int r128_cce_get_buffers(DRMFILE filp, struct drm_device * dev, struct drm_dma * d)
890{ 890{
891 int i; 891 int i;
892 drm_buf_t *buf; 892 drm_buf_t *buf;
@@ -915,8 +915,8 @@ int r128_cce_buffers(DRM_IOCTL_ARGS)
915 DRM_DEVICE; 915 DRM_DEVICE;
916 drm_device_dma_t *dma = dev->dma; 916 drm_device_dma_t *dma = dev->dma;
917 int ret = 0; 917 int ret = 0;
918 drm_dma_t __user *argp = (void __user *)data; 918 struct drm_dma __user *argp = (void __user *)data;
919 drm_dma_t d; 919 struct drm_dma d;
920 920
921 LOCK_TEST_WITH_RETURN(dev, filp); 921 LOCK_TEST_WITH_RETURN(dev, filp);
922 922
diff --git a/drivers/char/drm/r128_drm.h b/drivers/char/drm/r128_drm.h
index 6e8af313f2b4..e94a39c6e327 100644
--- a/drivers/char/drm/r128_drm.h
+++ b/drivers/char/drm/r128_drm.h
@@ -153,7 +153,7 @@ typedef struct drm_r128_sarea {
153 153
154 /* The current cliprects, or a subset thereof. 154 /* The current cliprects, or a subset thereof.
155 */ 155 */
156 drm_clip_rect_t boxes[R128_NR_SAREA_CLIPRECTS]; 156 struct drm_clip_rect boxes[R128_NR_SAREA_CLIPRECTS];
157 unsigned int nbox; 157 unsigned int nbox;
158 158
159 /* Counters for client-side throttling of rendering clients. 159 /* Counters for client-side throttling of rendering clients.
@@ -161,7 +161,7 @@ typedef struct drm_r128_sarea {
161 unsigned int last_frame; 161 unsigned int last_frame;
162 unsigned int last_dispatch; 162 unsigned int last_dispatch;
163 163
164 drm_tex_region_t tex_list[R128_NR_TEX_HEAPS][R128_NR_TEX_REGIONS + 1]; 164 struct drm_tex_region tex_list[R128_NR_TEX_HEAPS][R128_NR_TEX_REGIONS + 1];
165 unsigned int tex_age[R128_NR_TEX_HEAPS]; 165 unsigned int tex_age[R128_NR_TEX_HEAPS];
166 int ctx_owner; 166 int ctx_owner;
167 int pfAllowPageFlip; /* number of 3d windows (0,1,2 or more) */ 167 int pfAllowPageFlip; /* number of 3d windows (0,1,2 or more) */
diff --git a/drivers/char/drm/r128_drv.h b/drivers/char/drm/r128_drv.h
index 9086835686dc..1e3deaba2b03 100644
--- a/drivers/char/drm/r128_drv.h
+++ b/drivers/char/drm/r128_drv.h
@@ -142,21 +142,21 @@ extern int r128_engine_reset(DRM_IOCTL_ARGS);
142extern int r128_fullscreen(DRM_IOCTL_ARGS); 142extern int r128_fullscreen(DRM_IOCTL_ARGS);
143extern int r128_cce_buffers(DRM_IOCTL_ARGS); 143extern int r128_cce_buffers(DRM_IOCTL_ARGS);
144 144
145extern void r128_freelist_reset(drm_device_t * dev); 145extern void r128_freelist_reset(struct drm_device * dev);
146 146
147extern int r128_wait_ring(drm_r128_private_t * dev_priv, int n); 147extern int r128_wait_ring(drm_r128_private_t * dev_priv, int n);
148 148
149extern int r128_do_cce_idle(drm_r128_private_t * dev_priv); 149extern int r128_do_cce_idle(drm_r128_private_t * dev_priv);
150extern int r128_do_cleanup_cce(drm_device_t * dev); 150extern int r128_do_cleanup_cce(struct drm_device * dev);
151 151
152extern int r128_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence); 152extern int r128_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence);
153 153
154extern irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS); 154extern irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS);
155extern void r128_driver_irq_preinstall(drm_device_t * dev); 155extern void r128_driver_irq_preinstall(struct drm_device * dev);
156extern void r128_driver_irq_postinstall(drm_device_t * dev); 156extern void r128_driver_irq_postinstall(struct drm_device * dev);
157extern void r128_driver_irq_uninstall(drm_device_t * dev); 157extern void r128_driver_irq_uninstall(struct drm_device * dev);
158extern void r128_driver_lastclose(drm_device_t * dev); 158extern void r128_driver_lastclose(struct drm_device * dev);
159extern void r128_driver_preclose(drm_device_t * dev, DRMFILE filp); 159extern void r128_driver_preclose(struct drm_device * dev, DRMFILE filp);
160 160
161extern long r128_compat_ioctl(struct file *filp, unsigned int cmd, 161extern long r128_compat_ioctl(struct file *filp, unsigned int cmd,
162 unsigned long arg); 162 unsigned long arg);
diff --git a/drivers/char/drm/r128_irq.c b/drivers/char/drm/r128_irq.c
index 87f8ca2b0685..c76fdca7662d 100644
--- a/drivers/char/drm/r128_irq.c
+++ b/drivers/char/drm/r128_irq.c
@@ -37,7 +37,7 @@
37 37
38irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS) 38irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS)
39{ 39{
40 drm_device_t *dev = (drm_device_t *) arg; 40 struct drm_device *dev = (struct drm_device *) arg;
41 drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private; 41 drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private;
42 int status; 42 int status;
43 43
@@ -54,7 +54,7 @@ irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS)
54 return IRQ_NONE; 54 return IRQ_NONE;
55} 55}
56 56
57int r128_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence) 57int r128_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence)
58{ 58{
59 unsigned int cur_vblank; 59 unsigned int cur_vblank;
60 int ret = 0; 60 int ret = 0;
@@ -72,7 +72,7 @@ int r128_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence)
72 return ret; 72 return ret;
73} 73}
74 74
75void r128_driver_irq_preinstall(drm_device_t * dev) 75void r128_driver_irq_preinstall(struct drm_device * dev)
76{ 76{
77 drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private; 77 drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private;
78 78
@@ -82,7 +82,7 @@ void r128_driver_irq_preinstall(drm_device_t * dev)
82 R128_WRITE(R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK); 82 R128_WRITE(R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK);
83} 83}
84 84
85void r128_driver_irq_postinstall(drm_device_t * dev) 85void r128_driver_irq_postinstall(struct drm_device * dev)
86{ 86{
87 drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private; 87 drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private;
88 88
@@ -90,7 +90,7 @@ void r128_driver_irq_postinstall(drm_device_t * dev)
90 R128_WRITE(R128_GEN_INT_CNTL, R128_CRTC_VBLANK_INT_EN); 90 R128_WRITE(R128_GEN_INT_CNTL, R128_CRTC_VBLANK_INT_EN);
91} 91}
92 92
93void r128_driver_irq_uninstall(drm_device_t * dev) 93void r128_driver_irq_uninstall(struct drm_device * dev)
94{ 94{
95 drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private; 95 drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private;
96 if (!dev_priv) 96 if (!dev_priv)
diff --git a/drivers/char/drm/r128_state.c b/drivers/char/drm/r128_state.c
index 17b11e7d8f32..21d445e8e418 100644
--- a/drivers/char/drm/r128_state.c
+++ b/drivers/char/drm/r128_state.c
@@ -38,7 +38,7 @@
38 */ 38 */
39 39
40static void r128_emit_clip_rects(drm_r128_private_t * dev_priv, 40static void r128_emit_clip_rects(drm_r128_private_t * dev_priv,
41 drm_clip_rect_t * boxes, int count) 41 struct drm_clip_rect * boxes, int count)
42{ 42{
43 u32 aux_sc_cntl = 0x00000000; 43 u32 aux_sc_cntl = 0x00000000;
44 RING_LOCALS; 44 RING_LOCALS;
@@ -352,13 +352,13 @@ static void r128_print_dirty(const char *msg, unsigned int flags)
352 (flags & R128_REQUIRE_QUIESCENCE) ? "quiescence, " : ""); 352 (flags & R128_REQUIRE_QUIESCENCE) ? "quiescence, " : "");
353} 353}
354 354
355static void r128_cce_dispatch_clear(drm_device_t * dev, 355static void r128_cce_dispatch_clear(struct drm_device * dev,
356 drm_r128_clear_t * clear) 356 drm_r128_clear_t * clear)
357{ 357{
358 drm_r128_private_t *dev_priv = dev->dev_private; 358 drm_r128_private_t *dev_priv = dev->dev_private;
359 drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; 359 drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
360 int nbox = sarea_priv->nbox; 360 int nbox = sarea_priv->nbox;
361 drm_clip_rect_t *pbox = sarea_priv->boxes; 361 struct drm_clip_rect *pbox = sarea_priv->boxes;
362 unsigned int flags = clear->flags; 362 unsigned int flags = clear->flags;
363 int i; 363 int i;
364 RING_LOCALS; 364 RING_LOCALS;
@@ -458,12 +458,12 @@ static void r128_cce_dispatch_clear(drm_device_t * dev,
458 } 458 }
459} 459}
460 460
461static void r128_cce_dispatch_swap(drm_device_t * dev) 461static void r128_cce_dispatch_swap(struct drm_device * dev)
462{ 462{
463 drm_r128_private_t *dev_priv = dev->dev_private; 463 drm_r128_private_t *dev_priv = dev->dev_private;
464 drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; 464 drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
465 int nbox = sarea_priv->nbox; 465 int nbox = sarea_priv->nbox;
466 drm_clip_rect_t *pbox = sarea_priv->boxes; 466 struct drm_clip_rect *pbox = sarea_priv->boxes;
467 int i; 467 int i;
468 RING_LOCALS; 468 RING_LOCALS;
469 DRM_DEBUG("%s\n", __FUNCTION__); 469 DRM_DEBUG("%s\n", __FUNCTION__);
@@ -524,7 +524,7 @@ static void r128_cce_dispatch_swap(drm_device_t * dev)
524 ADVANCE_RING(); 524 ADVANCE_RING();
525} 525}
526 526
527static void r128_cce_dispatch_flip(drm_device_t * dev) 527static void r128_cce_dispatch_flip(struct drm_device * dev)
528{ 528{
529 drm_r128_private_t *dev_priv = dev->dev_private; 529 drm_r128_private_t *dev_priv = dev->dev_private;
530 RING_LOCALS; 530 RING_LOCALS;
@@ -567,7 +567,7 @@ static void r128_cce_dispatch_flip(drm_device_t * dev)
567 ADVANCE_RING(); 567 ADVANCE_RING();
568} 568}
569 569
570static void r128_cce_dispatch_vertex(drm_device_t * dev, drm_buf_t * buf) 570static void r128_cce_dispatch_vertex(struct drm_device * dev, drm_buf_t * buf)
571{ 571{
572 drm_r128_private_t *dev_priv = dev->dev_private; 572 drm_r128_private_t *dev_priv = dev->dev_private;
573 drm_r128_buf_priv_t *buf_priv = buf->dev_private; 573 drm_r128_buf_priv_t *buf_priv = buf->dev_private;
@@ -637,7 +637,7 @@ static void r128_cce_dispatch_vertex(drm_device_t * dev, drm_buf_t * buf)
637 sarea_priv->nbox = 0; 637 sarea_priv->nbox = 0;
638} 638}
639 639
640static void r128_cce_dispatch_indirect(drm_device_t * dev, 640static void r128_cce_dispatch_indirect(struct drm_device * dev,
641 drm_buf_t * buf, int start, int end) 641 drm_buf_t * buf, int start, int end)
642{ 642{
643 drm_r128_private_t *dev_priv = dev->dev_private; 643 drm_r128_private_t *dev_priv = dev->dev_private;
@@ -692,7 +692,7 @@ static void r128_cce_dispatch_indirect(drm_device_t * dev,
692 dev_priv->sarea_priv->last_dispatch++; 692 dev_priv->sarea_priv->last_dispatch++;
693} 693}
694 694
695static void r128_cce_dispatch_indices(drm_device_t * dev, 695static void r128_cce_dispatch_indices(struct drm_device * dev,
696 drm_buf_t * buf, 696 drm_buf_t * buf,
697 int start, int end, int count) 697 int start, int end, int count)
698{ 698{
@@ -777,7 +777,7 @@ static void r128_cce_dispatch_indices(drm_device_t * dev,
777} 777}
778 778
779static int r128_cce_dispatch_blit(DRMFILE filp, 779static int r128_cce_dispatch_blit(DRMFILE filp,
780 drm_device_t * dev, drm_r128_blit_t * blit) 780 struct drm_device * dev, drm_r128_blit_t * blit)
781{ 781{
782 drm_r128_private_t *dev_priv = dev->dev_private; 782 drm_r128_private_t *dev_priv = dev->dev_private;
783 drm_device_dma_t *dma = dev->dma; 783 drm_device_dma_t *dma = dev->dma;
@@ -887,7 +887,7 @@ static int r128_cce_dispatch_blit(DRMFILE filp,
887 * have hardware stencil support. 887 * have hardware stencil support.
888 */ 888 */
889 889
890static int r128_cce_dispatch_write_span(drm_device_t * dev, 890static int r128_cce_dispatch_write_span(struct drm_device * dev,
891 drm_r128_depth_t * depth) 891 drm_r128_depth_t * depth)
892{ 892{
893 drm_r128_private_t *dev_priv = dev->dev_private; 893 drm_r128_private_t *dev_priv = dev->dev_private;
@@ -983,7 +983,7 @@ static int r128_cce_dispatch_write_span(drm_device_t * dev,
983 return 0; 983 return 0;
984} 984}
985 985
986static int r128_cce_dispatch_write_pixels(drm_device_t * dev, 986static int r128_cce_dispatch_write_pixels(struct drm_device * dev,
987 drm_r128_depth_t * depth) 987 drm_r128_depth_t * depth)
988{ 988{
989 drm_r128_private_t *dev_priv = dev->dev_private; 989 drm_r128_private_t *dev_priv = dev->dev_private;
@@ -1105,7 +1105,7 @@ static int r128_cce_dispatch_write_pixels(drm_device_t * dev,
1105 return 0; 1105 return 0;
1106} 1106}
1107 1107
1108static int r128_cce_dispatch_read_span(drm_device_t * dev, 1108static int r128_cce_dispatch_read_span(struct drm_device * dev,
1109 drm_r128_depth_t * depth) 1109 drm_r128_depth_t * depth)
1110{ 1110{
1111 drm_r128_private_t *dev_priv = dev->dev_private; 1111 drm_r128_private_t *dev_priv = dev->dev_private;
@@ -1148,7 +1148,7 @@ static int r128_cce_dispatch_read_span(drm_device_t * dev,
1148 return 0; 1148 return 0;
1149} 1149}
1150 1150
1151static int r128_cce_dispatch_read_pixels(drm_device_t * dev, 1151static int r128_cce_dispatch_read_pixels(struct drm_device * dev,
1152 drm_r128_depth_t * depth) 1152 drm_r128_depth_t * depth)
1153{ 1153{
1154 drm_r128_private_t *dev_priv = dev->dev_private; 1154 drm_r128_private_t *dev_priv = dev->dev_private;
@@ -1220,7 +1220,7 @@ static int r128_cce_dispatch_read_pixels(drm_device_t * dev,
1220 * Polygon stipple 1220 * Polygon stipple
1221 */ 1221 */
1222 1222
1223static void r128_cce_dispatch_stipple(drm_device_t * dev, u32 * stipple) 1223static void r128_cce_dispatch_stipple(struct drm_device * dev, u32 * stipple)
1224{ 1224{
1225 drm_r128_private_t *dev_priv = dev->dev_private; 1225 drm_r128_private_t *dev_priv = dev->dev_private;
1226 int i; 1226 int i;
@@ -1269,7 +1269,7 @@ static int r128_cce_clear(DRM_IOCTL_ARGS)
1269 return 0; 1269 return 0;
1270} 1270}
1271 1271
1272static int r128_do_init_pageflip(drm_device_t * dev) 1272static int r128_do_init_pageflip(struct drm_device * dev)
1273{ 1273{
1274 drm_r128_private_t *dev_priv = dev->dev_private; 1274 drm_r128_private_t *dev_priv = dev->dev_private;
1275 DRM_DEBUG("\n"); 1275 DRM_DEBUG("\n");
@@ -1288,7 +1288,7 @@ static int r128_do_init_pageflip(drm_device_t * dev)
1288 return 0; 1288 return 0;
1289} 1289}
1290 1290
1291static int r128_do_cleanup_pageflip(drm_device_t * dev) 1291static int r128_do_cleanup_pageflip(struct drm_device * dev)
1292{ 1292{
1293 drm_r128_private_t *dev_priv = dev->dev_private; 1293 drm_r128_private_t *dev_priv = dev->dev_private;
1294 DRM_DEBUG("\n"); 1294 DRM_DEBUG("\n");
@@ -1675,7 +1675,7 @@ static int r128_getparam(DRM_IOCTL_ARGS)
1675 return 0; 1675 return 0;
1676} 1676}
1677 1677
1678void r128_driver_preclose(drm_device_t * dev, DRMFILE filp) 1678void r128_driver_preclose(struct drm_device * dev, DRMFILE filp)
1679{ 1679{
1680 if (dev->dev_private) { 1680 if (dev->dev_private) {
1681 drm_r128_private_t *dev_priv = dev->dev_private; 1681 drm_r128_private_t *dev_priv = dev->dev_private;
@@ -1685,7 +1685,7 @@ void r128_driver_preclose(drm_device_t * dev, DRMFILE filp)
1685 } 1685 }
1686} 1686}
1687 1687
1688void r128_driver_lastclose(drm_device_t * dev) 1688void r128_driver_lastclose(struct drm_device * dev)
1689{ 1689{
1690 r128_do_cleanup_cce(dev); 1690 r128_do_cleanup_cce(dev);
1691} 1691}
diff --git a/drivers/char/drm/savage_bci.c b/drivers/char/drm/savage_bci.c
index 0321144e7a35..1061e7bb6854 100644
--- a/drivers/char/drm/savage_bci.c
+++ b/drivers/char/drm/savage_bci.c
@@ -32,7 +32,7 @@
32#define SAVAGE_EVENT_USEC_TIMEOUT 5000000 /* 5s */ 32#define SAVAGE_EVENT_USEC_TIMEOUT 5000000 /* 5s */
33#define SAVAGE_FREELIST_DEBUG 0 33#define SAVAGE_FREELIST_DEBUG 0
34 34
35static int savage_do_cleanup_bci(drm_device_t *dev); 35static int savage_do_cleanup_bci(struct drm_device *dev);
36 36
37static int 37static int
38savage_bci_wait_fifo_shadow(drm_savage_private_t * dev_priv, unsigned int n) 38savage_bci_wait_fifo_shadow(drm_savage_private_t * dev_priv, unsigned int n)
@@ -203,7 +203,7 @@ uint16_t savage_bci_emit_event(drm_savage_private_t * dev_priv,
203/* 203/*
204 * Freelist management 204 * Freelist management
205 */ 205 */
206static int savage_freelist_init(drm_device_t * dev) 206static int savage_freelist_init(struct drm_device * dev)
207{ 207{
208 drm_savage_private_t *dev_priv = dev->dev_private; 208 drm_savage_private_t *dev_priv = dev->dev_private;
209 drm_device_dma_t *dma = dev->dma; 209 drm_device_dma_t *dma = dev->dma;
@@ -236,7 +236,7 @@ static int savage_freelist_init(drm_device_t * dev)
236 return 0; 236 return 0;
237} 237}
238 238
239static drm_buf_t *savage_freelist_get(drm_device_t * dev) 239static drm_buf_t *savage_freelist_get(struct drm_device * dev)
240{ 240{
241 drm_savage_private_t *dev_priv = dev->dev_private; 241 drm_savage_private_t *dev_priv = dev->dev_private;
242 drm_savage_buf_priv_t *tail = dev_priv->tail.prev; 242 drm_savage_buf_priv_t *tail = dev_priv->tail.prev;
@@ -269,7 +269,7 @@ static drm_buf_t *savage_freelist_get(drm_device_t * dev)
269 return NULL; 269 return NULL;
270} 270}
271 271
272void savage_freelist_put(drm_device_t * dev, drm_buf_t * buf) 272void savage_freelist_put(struct drm_device * dev, drm_buf_t * buf)
273{ 273{
274 drm_savage_private_t *dev_priv = dev->dev_private; 274 drm_savage_private_t *dev_priv = dev->dev_private;
275 drm_savage_buf_priv_t *entry = buf->dev_private, *prev, *next; 275 drm_savage_buf_priv_t *entry = buf->dev_private, *prev, *next;
@@ -535,7 +535,7 @@ static void savage_fake_dma_flush(drm_savage_private_t * dev_priv)
535 dev_priv->first_dma_page = dev_priv->current_dma_page = 0; 535 dev_priv->first_dma_page = dev_priv->current_dma_page = 0;
536} 536}
537 537
538int savage_driver_load(drm_device_t *dev, unsigned long chipset) 538int savage_driver_load(struct drm_device *dev, unsigned long chipset)
539{ 539{
540 drm_savage_private_t *dev_priv; 540 drm_savage_private_t *dev_priv;
541 541
@@ -558,7 +558,7 @@ int savage_driver_load(drm_device_t *dev, unsigned long chipset)
558 * in drm_addmap. Therefore we add them manually before the maps are 558 * in drm_addmap. Therefore we add them manually before the maps are
559 * initialized, and tear them down on last close. 559 * initialized, and tear them down on last close.
560 */ 560 */
561int savage_driver_firstopen(drm_device_t *dev) 561int savage_driver_firstopen(struct drm_device *dev)
562{ 562{
563 drm_savage_private_t *dev_priv = dev->dev_private; 563 drm_savage_private_t *dev_priv = dev->dev_private;
564 unsigned long mmio_base, fb_base, fb_size, aperture_base; 564 unsigned long mmio_base, fb_base, fb_size, aperture_base;
@@ -655,7 +655,7 @@ int savage_driver_firstopen(drm_device_t *dev)
655/* 655/*
656 * Delete MTRRs and free device-private data. 656 * Delete MTRRs and free device-private data.
657 */ 657 */
658void savage_driver_lastclose(drm_device_t *dev) 658void savage_driver_lastclose(struct drm_device *dev)
659{ 659{
660 drm_savage_private_t *dev_priv = dev->dev_private; 660 drm_savage_private_t *dev_priv = dev->dev_private;
661 int i; 661 int i;
@@ -667,7 +667,7 @@ void savage_driver_lastclose(drm_device_t *dev)
667 dev_priv->mtrr[i].size, DRM_MTRR_WC); 667 dev_priv->mtrr[i].size, DRM_MTRR_WC);
668} 668}
669 669
670int savage_driver_unload(drm_device_t *dev) 670int savage_driver_unload(struct drm_device *dev)
671{ 671{
672 drm_savage_private_t *dev_priv = dev->dev_private; 672 drm_savage_private_t *dev_priv = dev->dev_private;
673 673
@@ -676,7 +676,7 @@ int savage_driver_unload(drm_device_t *dev)
676 return 0; 676 return 0;
677} 677}
678 678
679static int savage_do_init_bci(drm_device_t * dev, drm_savage_init_t * init) 679static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init)
680{ 680{
681 drm_savage_private_t *dev_priv = dev->dev_private; 681 drm_savage_private_t *dev_priv = dev->dev_private;
682 682
@@ -898,7 +898,7 @@ static int savage_do_init_bci(drm_device_t * dev, drm_savage_init_t * init)
898 return 0; 898 return 0;
899} 899}
900 900
901static int savage_do_cleanup_bci(drm_device_t * dev) 901static int savage_do_cleanup_bci(struct drm_device * dev)
902{ 902{
903 drm_savage_private_t *dev_priv = dev->dev_private; 903 drm_savage_private_t *dev_priv = dev->dev_private;
904 904
@@ -1007,7 +1007,7 @@ static int savage_bci_event_wait(DRM_IOCTL_ARGS)
1007 * DMA buffer management 1007 * DMA buffer management
1008 */ 1008 */
1009 1009
1010static int savage_bci_get_buffers(DRMFILE filp, drm_device_t *dev, drm_dma_t *d) 1010static int savage_bci_get_buffers(DRMFILE filp, struct drm_device *dev, struct drm_dma *d)
1011{ 1011{
1012 drm_buf_t *buf; 1012 drm_buf_t *buf;
1013 int i; 1013 int i;
@@ -1035,12 +1035,12 @@ int savage_bci_buffers(DRM_IOCTL_ARGS)
1035{ 1035{
1036 DRM_DEVICE; 1036 DRM_DEVICE;
1037 drm_device_dma_t *dma = dev->dma; 1037 drm_device_dma_t *dma = dev->dma;
1038 drm_dma_t d; 1038 struct drm_dma d;
1039 int ret = 0; 1039 int ret = 0;
1040 1040
1041 LOCK_TEST_WITH_RETURN(dev, filp); 1041 LOCK_TEST_WITH_RETURN(dev, filp);
1042 1042
1043 DRM_COPY_FROM_USER_IOCTL(d, (drm_dma_t __user *) data, sizeof(d)); 1043 DRM_COPY_FROM_USER_IOCTL(d, (struct drm_dma __user *) data, sizeof(d));
1044 1044
1045 /* Please don't send us buffers. 1045 /* Please don't send us buffers.
1046 */ 1046 */
@@ -1064,12 +1064,12 @@ int savage_bci_buffers(DRM_IOCTL_ARGS)
1064 ret = savage_bci_get_buffers(filp, dev, &d); 1064 ret = savage_bci_get_buffers(filp, dev, &d);
1065 } 1065 }
1066 1066
1067 DRM_COPY_TO_USER_IOCTL((drm_dma_t __user *) data, d, sizeof(d)); 1067 DRM_COPY_TO_USER_IOCTL((struct drm_dma __user *) data, d, sizeof(d));
1068 1068
1069 return ret; 1069 return ret;
1070} 1070}
1071 1071
1072void savage_reclaim_buffers(drm_device_t *dev, DRMFILE filp) 1072void savage_reclaim_buffers(struct drm_device *dev, DRMFILE filp)
1073{ 1073{
1074 drm_device_dma_t *dma = dev->dma; 1074 drm_device_dma_t *dma = dev->dma;
1075 drm_savage_private_t *dev_priv = dev->dev_private; 1075 drm_savage_private_t *dev_priv = dev->dev_private;
diff --git a/drivers/char/drm/savage_drm.h b/drivers/char/drm/savage_drm.h
index e1148e8e7994..8a576ef01821 100644
--- a/drivers/char/drm/savage_drm.h
+++ b/drivers/char/drm/savage_drm.h
@@ -47,7 +47,7 @@
47typedef struct _drm_savage_sarea { 47typedef struct _drm_savage_sarea {
48 /* LRU lists for texture memory in agp space and on the card. 48 /* LRU lists for texture memory in agp space and on the card.
49 */ 49 */
50 drm_tex_region_t texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS + 50 struct drm_tex_region texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS +
51 1]; 51 1];
52 unsigned int texAge[SAVAGE_NR_TEX_HEAPS]; 52 unsigned int texAge[SAVAGE_NR_TEX_HEAPS];
53 53
@@ -113,7 +113,7 @@ typedef struct drm_savage_cmdbuf {
113 unsigned int vb_size; /* size of client vertex buffer in bytes */ 113 unsigned int vb_size; /* size of client vertex buffer in bytes */
114 unsigned int vb_stride; /* stride of vertices in 32bit words */ 114 unsigned int vb_stride; /* stride of vertices in 32bit words */
115 /* boxes in client's address space */ 115 /* boxes in client's address space */
116 drm_clip_rect_t __user *box_addr; 116 struct drm_clip_rect __user *box_addr;
117 unsigned int nbox; /* number of clipping boxes */ 117 unsigned int nbox; /* number of clipping boxes */
118} drm_savage_cmdbuf_t; 118} drm_savage_cmdbuf_t;
119 119
diff --git a/drivers/char/drm/savage_drv.h b/drivers/char/drm/savage_drv.h
index 8f04b3d82292..da8afb37b3c9 100644
--- a/drivers/char/drm/savage_drv.h
+++ b/drivers/char/drm/savage_drv.h
@@ -192,7 +192,7 @@ typedef struct drm_savage_private {
192 /* Err, there is a macro wait_event in include/linux/wait.h. 192 /* Err, there is a macro wait_event in include/linux/wait.h.
193 * Avoid unwanted macro expansion. */ 193 * Avoid unwanted macro expansion. */
194 void (*emit_clip_rect) (struct drm_savage_private * dev_priv, 194 void (*emit_clip_rect) (struct drm_savage_private * dev_priv,
195 const drm_clip_rect_t * pbox); 195 const struct drm_clip_rect * pbox);
196 void (*dma_flush) (struct drm_savage_private * dev_priv); 196 void (*dma_flush) (struct drm_savage_private * dev_priv);
197} drm_savage_private_t; 197} drm_savage_private_t;
198 198
@@ -203,22 +203,22 @@ extern int savage_bci_buffers(DRM_IOCTL_ARGS);
203/* BCI functions */ 203/* BCI functions */
204extern uint16_t savage_bci_emit_event(drm_savage_private_t * dev_priv, 204extern uint16_t savage_bci_emit_event(drm_savage_private_t * dev_priv,
205 unsigned int flags); 205 unsigned int flags);
206extern void savage_freelist_put(drm_device_t * dev, drm_buf_t * buf); 206extern void savage_freelist_put(struct drm_device * dev, drm_buf_t * buf);
207extern void savage_dma_reset(drm_savage_private_t * dev_priv); 207extern void savage_dma_reset(drm_savage_private_t * dev_priv);
208extern void savage_dma_wait(drm_savage_private_t * dev_priv, unsigned int page); 208extern void savage_dma_wait(drm_savage_private_t * dev_priv, unsigned int page);
209extern uint32_t *savage_dma_alloc(drm_savage_private_t * dev_priv, 209extern uint32_t *savage_dma_alloc(drm_savage_private_t * dev_priv,
210 unsigned int n); 210 unsigned int n);
211extern int savage_driver_load(drm_device_t *dev, unsigned long chipset); 211extern int savage_driver_load(struct drm_device *dev, unsigned long chipset);
212extern int savage_driver_firstopen(drm_device_t *dev); 212extern int savage_driver_firstopen(struct drm_device *dev);
213extern void savage_driver_lastclose(drm_device_t *dev); 213extern void savage_driver_lastclose(struct drm_device *dev);
214extern int savage_driver_unload(drm_device_t *dev); 214extern int savage_driver_unload(struct drm_device *dev);
215extern void savage_reclaim_buffers(drm_device_t * dev, DRMFILE filp); 215extern void savage_reclaim_buffers(struct drm_device * dev, DRMFILE filp);
216 216
217/* state functions */ 217/* state functions */
218extern void savage_emit_clip_rect_s3d(drm_savage_private_t * dev_priv, 218extern void savage_emit_clip_rect_s3d(drm_savage_private_t * dev_priv,
219 const drm_clip_rect_t * pbox); 219 const struct drm_clip_rect * pbox);
220extern void savage_emit_clip_rect_s4(drm_savage_private_t * dev_priv, 220extern void savage_emit_clip_rect_s4(drm_savage_private_t * dev_priv,
221 const drm_clip_rect_t * pbox); 221 const struct drm_clip_rect * pbox);
222 222
223#define SAVAGE_FB_SIZE_S3 0x01000000 /* 16MB */ 223#define SAVAGE_FB_SIZE_S3 0x01000000 /* 16MB */
224#define SAVAGE_FB_SIZE_S4 0x02000000 /* 32MB */ 224#define SAVAGE_FB_SIZE_S4 0x02000000 /* 32MB */
diff --git a/drivers/char/drm/savage_state.c b/drivers/char/drm/savage_state.c
index 1ca1e9cb5a33..73fa9ef43c57 100644
--- a/drivers/char/drm/savage_state.c
+++ b/drivers/char/drm/savage_state.c
@@ -27,7 +27,7 @@
27#include "savage_drv.h" 27#include "savage_drv.h"
28 28
29void savage_emit_clip_rect_s3d(drm_savage_private_t * dev_priv, 29void savage_emit_clip_rect_s3d(drm_savage_private_t * dev_priv,
30 const drm_clip_rect_t * pbox) 30 const struct drm_clip_rect * pbox)
31{ 31{
32 uint32_t scstart = dev_priv->state.s3d.new_scstart; 32 uint32_t scstart = dev_priv->state.s3d.new_scstart;
33 uint32_t scend = dev_priv->state.s3d.new_scend; 33 uint32_t scend = dev_priv->state.s3d.new_scend;
@@ -53,7 +53,7 @@ void savage_emit_clip_rect_s3d(drm_savage_private_t * dev_priv,
53} 53}
54 54
55void savage_emit_clip_rect_s4(drm_savage_private_t * dev_priv, 55void savage_emit_clip_rect_s4(drm_savage_private_t * dev_priv,
56 const drm_clip_rect_t * pbox) 56 const struct drm_clip_rect * pbox)
57{ 57{
58 uint32_t drawctrl0 = dev_priv->state.s4.new_drawctrl0; 58 uint32_t drawctrl0 = dev_priv->state.s4.new_drawctrl0;
59 uint32_t drawctrl1 = dev_priv->state.s4.new_drawctrl1; 59 uint32_t drawctrl1 = dev_priv->state.s4.new_drawctrl1;
@@ -792,7 +792,7 @@ static int savage_dispatch_clear(drm_savage_private_t * dev_priv,
792 const drm_savage_cmd_header_t * cmd_header, 792 const drm_savage_cmd_header_t * cmd_header,
793 const drm_savage_cmd_header_t *data, 793 const drm_savage_cmd_header_t *data,
794 unsigned int nbox, 794 unsigned int nbox,
795 const drm_clip_rect_t *boxes) 795 const struct drm_clip_rect *boxes)
796{ 796{
797 unsigned int flags = cmd_header->clear0.flags; 797 unsigned int flags = cmd_header->clear0.flags;
798 unsigned int clear_cmd; 798 unsigned int clear_cmd;
@@ -861,7 +861,7 @@ static int savage_dispatch_clear(drm_savage_private_t * dev_priv,
861} 861}
862 862
863static int savage_dispatch_swap(drm_savage_private_t * dev_priv, 863static int savage_dispatch_swap(drm_savage_private_t * dev_priv,
864 unsigned int nbox, const drm_clip_rect_t *boxes) 864 unsigned int nbox, const struct drm_clip_rect *boxes)
865{ 865{
866 unsigned int swap_cmd; 866 unsigned int swap_cmd;
867 unsigned int i; 867 unsigned int i;
@@ -896,7 +896,7 @@ static int savage_dispatch_draw(drm_savage_private_t * dev_priv,
896 const unsigned int *vtxbuf, 896 const unsigned int *vtxbuf,
897 unsigned int vb_size, unsigned int vb_stride, 897 unsigned int vb_size, unsigned int vb_stride,
898 unsigned int nbox, 898 unsigned int nbox,
899 const drm_clip_rect_t *boxes) 899 const struct drm_clip_rect *boxes)
900{ 900{
901 unsigned int i, j; 901 unsigned int i, j;
902 int ret; 902 int ret;
@@ -963,7 +963,7 @@ int savage_bci_cmdbuf(DRM_IOCTL_ARGS)
963 drm_savage_cmd_header_t *kcmd_addr = NULL; 963 drm_savage_cmd_header_t *kcmd_addr = NULL;
964 drm_savage_cmd_header_t *first_draw_cmd; 964 drm_savage_cmd_header_t *first_draw_cmd;
965 unsigned int *kvb_addr = NULL; 965 unsigned int *kvb_addr = NULL;
966 drm_clip_rect_t *kbox_addr = NULL; 966 struct drm_clip_rect *kbox_addr = NULL;
967 unsigned int i, j; 967 unsigned int i, j;
968 int ret = 0; 968 int ret = 0;
969 969
@@ -1019,7 +1019,7 @@ int savage_bci_cmdbuf(DRM_IOCTL_ARGS)
1019 cmdbuf.vb_addr = kvb_addr; 1019 cmdbuf.vb_addr = kvb_addr;
1020 } 1020 }
1021 if (cmdbuf.nbox) { 1021 if (cmdbuf.nbox) {
1022 kbox_addr = drm_alloc(cmdbuf.nbox * sizeof(drm_clip_rect_t), 1022 kbox_addr = drm_alloc(cmdbuf.nbox * sizeof(struct drm_clip_rect),
1023 DRM_MEM_DRIVER); 1023 DRM_MEM_DRIVER);
1024 if (kbox_addr == NULL) { 1024 if (kbox_addr == NULL) {
1025 ret = DRM_ERR(ENOMEM); 1025 ret = DRM_ERR(ENOMEM);
@@ -1027,7 +1027,7 @@ int savage_bci_cmdbuf(DRM_IOCTL_ARGS)
1027 } 1027 }
1028 1028
1029 if (DRM_COPY_FROM_USER(kbox_addr, cmdbuf.box_addr, 1029 if (DRM_COPY_FROM_USER(kbox_addr, cmdbuf.box_addr,
1030 cmdbuf.nbox * sizeof(drm_clip_rect_t))) { 1030 cmdbuf.nbox * sizeof(struct drm_clip_rect))) {
1031 ret = DRM_ERR(EFAULT); 1031 ret = DRM_ERR(EFAULT);
1032 goto done; 1032 goto done;
1033 } 1033 }
@@ -1158,7 +1158,7 @@ done:
1158 /* If we didn't need to allocate them, these'll be NULL */ 1158 /* If we didn't need to allocate them, these'll be NULL */
1159 drm_free(kcmd_addr, cmdbuf.size * 8, DRM_MEM_DRIVER); 1159 drm_free(kcmd_addr, cmdbuf.size * 8, DRM_MEM_DRIVER);
1160 drm_free(kvb_addr, cmdbuf.vb_size, DRM_MEM_DRIVER); 1160 drm_free(kvb_addr, cmdbuf.vb_size, DRM_MEM_DRIVER);
1161 drm_free(kbox_addr, cmdbuf.nbox * sizeof(drm_clip_rect_t), 1161 drm_free(kbox_addr, cmdbuf.nbox * sizeof(struct drm_clip_rect),
1162 DRM_MEM_DRIVER); 1162 DRM_MEM_DRIVER);
1163 1163
1164 return ret; 1164 return ret;