aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/mga_dma.c
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/char/drm/mga_dma.c
parent84b1fd103dbbe01b5905db1444d3fc8afa9a7207 (diff)
drm: fixup other drivers for typedef removals
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/mga_dma.c')
-rw-r--r--drivers/char/drm/mga_dma.c60
1 files changed, 30 insertions, 30 deletions
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);