aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/drm/ati_pcigart.c8
-rw-r--r--drivers/char/drm/drmP.h88
-rw-r--r--drivers/char/drm/drm_agpsupport.c18
-rw-r--r--drivers/char/drm/drm_bufs.c21
-rw-r--r--drivers/char/drm/drm_context.c8
-rw-r--r--drivers/char/drm/drm_drv.c6
-rw-r--r--drivers/char/drm/drm_fops.c2
-rw-r--r--drivers/char/drm/drm_ioctl.c4
-rw-r--r--drivers/char/drm/drm_irq.c6
-rw-r--r--drivers/char/drm/drm_lock.c12
-rw-r--r--drivers/char/drm/drm_mm.c66
-rw-r--r--drivers/char/drm/drm_proc.c2
-rw-r--r--drivers/char/drm/drm_scatter.c6
-rw-r--r--drivers/char/drm/drm_sman.c12
-rw-r--r--drivers/char/drm/drm_vm.c10
-rw-r--r--drivers/char/drm/i810_dma.c2
-rw-r--r--drivers/char/drm/i830_dma.c2
-rw-r--r--drivers/char/drm/mga_dma.c2
-rw-r--r--drivers/char/drm/r128_drv.h2
-rw-r--r--drivers/char/drm/radeon_cp.c2
-rw-r--r--drivers/char/drm/radeon_drv.h2
-rw-r--r--drivers/char/drm/sis_mm.c2
-rw-r--r--drivers/char/drm/via_verifier.c2
23 files changed, 143 insertions, 142 deletions
diff --git a/drivers/char/drm/ati_pcigart.c b/drivers/char/drm/ati_pcigart.c
index f80ca01b2cfa..3345641ff904 100644
--- a/drivers/char/drm/ati_pcigart.c
+++ b/drivers/char/drm/ati_pcigart.c
@@ -73,9 +73,9 @@ static void drm_ati_free_pcigart_table(void *address, int order)
73 free_pages((unsigned long)address, order); 73 free_pages((unsigned long)address, order);
74} 74}
75 75
76int drm_ati_pcigart_cleanup(struct drm_device *dev, drm_ati_pcigart_info *gart_info) 76int drm_ati_pcigart_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info)
77{ 77{
78 drm_sg_mem_t *entry = dev->sg; 78 struct drm_sg_mem *entry = dev->sg;
79 unsigned long pages; 79 unsigned long pages;
80 int i; 80 int i;
81 int order; 81 int order;
@@ -122,9 +122,9 @@ int drm_ati_pcigart_cleanup(struct drm_device *dev, drm_ati_pcigart_info *gart_i
122} 122}
123EXPORT_SYMBOL(drm_ati_pcigart_cleanup); 123EXPORT_SYMBOL(drm_ati_pcigart_cleanup);
124 124
125int drm_ati_pcigart_init(struct drm_device *dev, drm_ati_pcigart_info *gart_info) 125int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info)
126{ 126{
127 drm_sg_mem_t *entry = dev->sg; 127 struct drm_sg_mem *entry = dev->sg;
128 void *address = NULL; 128 void *address = NULL;
129 unsigned long pages; 129 unsigned long pages;
130 u32 *pci_gart, page_base, bus_address = 0; 130 u32 *pci_gart, page_base, bus_address = 0;
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index 6cc848a83d54..c24a25606c18 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -399,7 +399,7 @@ struct drm_queue {
399/** 399/**
400 * Lock data. 400 * Lock data.
401 */ 401 */
402typedef struct drm_lock_data { 402struct drm_lock_data {
403 struct drm_hw_lock *hw_lock; /**< Hardware lock */ 403 struct drm_hw_lock *hw_lock; /**< Hardware lock */
404 struct file *filp; /**< File descr of lock holder (0=kernel) */ 404 struct file *filp; /**< File descr of lock holder (0=kernel) */
405 wait_queue_head_t lock_queue; /**< Queue of blocked processes */ 405 wait_queue_head_t lock_queue; /**< Queue of blocked processes */
@@ -408,7 +408,7 @@ typedef struct drm_lock_data {
408 uint32_t kernel_waiters; 408 uint32_t kernel_waiters;
409 uint32_t user_waiters; 409 uint32_t user_waiters;
410 int idle_has_lock; 410 int idle_has_lock;
411} drm_lock_data_t; 411};
412 412
413/** 413/**
414 * DMA data. 414 * DMA data.
@@ -434,20 +434,20 @@ struct drm_device_dma {
434/** 434/**
435 * AGP memory entry. Stored as a doubly linked list. 435 * AGP memory entry. Stored as a doubly linked list.
436 */ 436 */
437typedef struct drm_agp_mem { 437struct drm_agp_mem {
438 unsigned long handle; /**< handle */ 438 unsigned long handle; /**< handle */
439 DRM_AGP_MEM *memory; 439 DRM_AGP_MEM *memory;
440 unsigned long bound; /**< address */ 440 unsigned long bound; /**< address */
441 int pages; 441 int pages;
442 struct list_head head; 442 struct list_head head;
443} drm_agp_mem_t; 443};
444 444
445/** 445/**
446 * AGP data. 446 * AGP data.
447 * 447 *
448 * \sa drm_agp_init() and drm_device::agp. 448 * \sa drm_agp_init() and drm_device::agp.
449 */ 449 */
450typedef struct drm_agp_head { 450struct drm_agp_head {
451 DRM_AGP_KERN agp_info; /**< AGP device information */ 451 DRM_AGP_KERN agp_info; /**< AGP device information */
452 struct list_head memory; 452 struct list_head memory;
453 unsigned long mode; /**< AGP mode */ 453 unsigned long mode; /**< AGP mode */
@@ -458,51 +458,51 @@ typedef struct drm_agp_head {
458 int agp_mtrr; 458 int agp_mtrr;
459 int cant_use_aperture; 459 int cant_use_aperture;
460 unsigned long page_mask; 460 unsigned long page_mask;
461} drm_agp_head_t; 461};
462 462
463/** 463/**
464 * Scatter-gather memory. 464 * Scatter-gather memory.
465 */ 465 */
466typedef struct drm_sg_mem { 466struct drm_sg_mem {
467 unsigned long handle; 467 unsigned long handle;
468 void *virtual; 468 void *virtual;
469 int pages; 469 int pages;
470 struct page **pagelist; 470 struct page **pagelist;
471 dma_addr_t *busaddr; 471 dma_addr_t *busaddr;
472} drm_sg_mem_t; 472};
473 473
474typedef struct drm_sigdata { 474struct drm_sigdata {
475 int context; 475 int context;
476 struct drm_hw_lock *lock; 476 struct drm_hw_lock *lock;
477} drm_sigdata_t; 477};
478 478
479/** 479/**
480 * Mappings list 480 * Mappings list
481 */ 481 */
482typedef struct drm_map_list { 482struct drm_map_list {
483 struct list_head head; /**< list head */ 483 struct list_head head; /**< list head */
484 drm_hash_item_t hash; 484 drm_hash_item_t hash;
485 struct drm_map *map; /**< mapping */ 485 struct drm_map *map; /**< mapping */
486 unsigned int user_token; 486 unsigned int user_token;
487} drm_map_list_t; 487};
488 488
489typedef struct drm_map drm_local_map_t; 489typedef struct drm_map drm_local_map_t;
490 490
491/** 491/**
492 * Context handle list 492 * Context handle list
493 */ 493 */
494typedef struct drm_ctx_list { 494struct drm_ctx_list {
495 struct list_head head; /**< list head */ 495 struct list_head head; /**< list head */
496 drm_context_t handle; /**< context handle */ 496 drm_context_t handle; /**< context handle */
497 struct drm_file *tag; /**< associated fd private data */ 497 struct drm_file *tag; /**< associated fd private data */
498} drm_ctx_list_t; 498};
499 499
500typedef struct drm_vbl_sig { 500struct drm_vbl_sig {
501 struct list_head head; 501 struct list_head head;
502 unsigned int sequence; 502 unsigned int sequence;
503 struct siginfo info; 503 struct siginfo info;
504 struct task_struct *task; 504 struct task_struct *task;
505} drm_vbl_sig_t; 505};
506 506
507/* location of GART table */ 507/* location of GART table */
508#define DRM_ATI_GART_MAIN 1 508#define DRM_ATI_GART_MAIN 1
@@ -512,19 +512,19 @@ typedef struct drm_vbl_sig {
512#define DRM_ATI_GART_PCIE 2 512#define DRM_ATI_GART_PCIE 2
513#define DRM_ATI_GART_IGP 3 513#define DRM_ATI_GART_IGP 3
514 514
515typedef struct ati_pcigart_info { 515struct drm_ati_pcigart_info {
516 int gart_table_location; 516 int gart_table_location;
517 int gart_reg_if; 517 int gart_reg_if;
518 void *addr; 518 void *addr;
519 dma_addr_t bus_addr; 519 dma_addr_t bus_addr;
520 drm_local_map_t mapping; 520 drm_local_map_t mapping;
521 int table_size; 521 int table_size;
522} drm_ati_pcigart_info; 522};
523 523
524/* 524/*
525 * Generic memory manager structs 525 * Generic memory manager structs
526 */ 526 */
527typedef struct drm_mm_node { 527struct drm_mm_node {
528 struct list_head fl_entry; 528 struct list_head fl_entry;
529 struct list_head ml_entry; 529 struct list_head ml_entry;
530 int free; 530 int free;
@@ -532,12 +532,12 @@ typedef struct drm_mm_node {
532 unsigned long size; 532 unsigned long size;
533 struct drm_mm *mm; 533 struct drm_mm *mm;
534 void *private; 534 void *private;
535} drm_mm_node_t; 535};
536 536
537typedef struct drm_mm { 537struct drm_mm {
538 struct list_head fl_entry; 538 struct list_head fl_entry;
539 struct list_head ml_entry; 539 struct list_head ml_entry;
540} drm_mm_t; 540};
541 541
542/** 542/**
543 * DRM driver structure. This structure represent the common code for 543 * DRM driver structure. This structure represent the common code for
@@ -680,7 +680,7 @@ struct drm_device {
680 int max_context; 680 int max_context;
681 681
682 struct list_head vmalist; /**< List of vmas (for debugging) */ 682 struct list_head vmalist; /**< List of vmas (for debugging) */
683 drm_lock_data_t lock; /**< Information on hardware lock */ 683 struct drm_lock_data lock; /**< Information on hardware lock */
684 /*@} */ 684 /*@} */
685 685
686 /** \name DMA queues (contexts) */ 686 /** \name DMA queues (contexts) */
@@ -728,7 +728,7 @@ struct drm_device {
728 wait_queue_head_t buf_readers; /**< Processes waiting to read */ 728 wait_queue_head_t buf_readers; /**< Processes waiting to read */
729 wait_queue_head_t buf_writers; /**< Processes waiting to ctx switch */ 729 wait_queue_head_t buf_writers; /**< Processes waiting to ctx switch */
730 730
731 drm_agp_head_t *agp; /**< AGP data */ 731 struct drm_agp_head *agp; /**< AGP data */
732 732
733 struct pci_dev *pdev; /**< PCI device structure */ 733 struct pci_dev *pdev; /**< PCI device structure */
734 int pci_vendor; /**< PCI vendor id */ 734 int pci_vendor; /**< PCI vendor id */
@@ -736,10 +736,10 @@ struct drm_device {
736#ifdef __alpha__ 736#ifdef __alpha__
737 struct pci_controller *hose; 737 struct pci_controller *hose;
738#endif 738#endif
739 drm_sg_mem_t *sg; /**< Scatter gather memory */ 739 struct drm_sg_mem *sg; /**< Scatter gather memory */
740 unsigned long *ctx_bitmap; /**< context bitmap */ 740 unsigned long *ctx_bitmap; /**< context bitmap */
741 void *dev_private; /**< device private data */ 741 void *dev_private; /**< device private data */
742 drm_sigdata_t sigdata; /**< For block_all_signals */ 742 struct drm_sigdata sigdata; /**< For block_all_signals */
743 sigset_t sigmask; 743 sigset_t sigmask;
744 744
745 struct drm_driver *driver; 745 struct drm_driver *driver;
@@ -915,10 +915,10 @@ extern int drm_lock(struct inode *inode, struct file *filp,
915 unsigned int cmd, unsigned long arg); 915 unsigned int cmd, unsigned long arg);
916extern int drm_unlock(struct inode *inode, struct file *filp, 916extern int drm_unlock(struct inode *inode, struct file *filp,
917 unsigned int cmd, unsigned long arg); 917 unsigned int cmd, unsigned long arg);
918extern int drm_lock_take(drm_lock_data_t *lock_data, unsigned int context); 918extern int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context);
919extern int drm_lock_free(drm_lock_data_t *lock_data, unsigned int context); 919extern int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context);
920extern void drm_idlelock_take(drm_lock_data_t *lock_data); 920extern void drm_idlelock_take(struct drm_lock_data *lock_data);
921extern void drm_idlelock_release(drm_lock_data_t *lock_data); 921extern void drm_idlelock_release(struct drm_lock_data *lock_data);
922 922
923/* 923/*
924 * These are exported to drivers so that they can implement fencing using 924 * These are exported to drivers so that they can implement fencing using
@@ -979,7 +979,7 @@ extern void drm_vbl_send_signals(struct drm_device *dev);
979extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_device*)); 979extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_device*));
980 980
981 /* AGP/GART support (drm_agpsupport.h) */ 981 /* AGP/GART support (drm_agpsupport.h) */
982extern drm_agp_head_t *drm_agp_init(struct drm_device *dev); 982extern struct drm_agp_head *drm_agp_init(struct drm_device *dev);
983extern int drm_agp_acquire(struct drm_device *dev); 983extern int drm_agp_acquire(struct drm_device *dev);
984extern int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp, 984extern int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp,
985 unsigned int cmd, unsigned long arg); 985 unsigned int cmd, unsigned long arg);
@@ -1033,7 +1033,7 @@ extern int drm_proc_cleanup(int minor,
1033 struct proc_dir_entry *dev_root); 1033 struct proc_dir_entry *dev_root);
1034 1034
1035 /* Scatter Gather Support (drm_scatter.h) */ 1035 /* Scatter Gather Support (drm_scatter.h) */
1036extern void drm_sg_cleanup(drm_sg_mem_t * entry); 1036extern void drm_sg_cleanup(struct drm_sg_mem * entry);
1037extern int drm_sg_alloc(struct inode *inode, struct file *filp, 1037extern int drm_sg_alloc(struct inode *inode, struct file *filp,
1038 unsigned int cmd, unsigned long arg); 1038 unsigned int cmd, unsigned long arg);
1039extern int drm_sg_free(struct inode *inode, struct file *filp, 1039extern int drm_sg_free(struct inode *inode, struct file *filp,
@@ -1041,9 +1041,9 @@ extern int drm_sg_free(struct inode *inode, struct file *filp,
1041 1041
1042 /* ATI PCIGART support (ati_pcigart.h) */ 1042 /* ATI PCIGART support (ati_pcigart.h) */
1043extern int drm_ati_pcigart_init(struct drm_device *dev, 1043extern int drm_ati_pcigart_init(struct drm_device *dev,
1044 drm_ati_pcigart_info * gart_info); 1044 struct drm_ati_pcigart_info * gart_info);
1045extern int drm_ati_pcigart_cleanup(struct drm_device *dev, 1045extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
1046 drm_ati_pcigart_info * gart_info); 1046 struct drm_ati_pcigart_info * gart_info);
1047 1047
1048extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size, 1048extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
1049 size_t align, dma_addr_t maxaddr); 1049 size_t align, dma_addr_t maxaddr);
@@ -1060,18 +1060,18 @@ extern void drm_sysfs_device_remove(struct class_device *class_dev);
1060/* 1060/*
1061 * Basic memory manager support (drm_mm.c) 1061 * Basic memory manager support (drm_mm.c)
1062 */ 1062 */
1063extern drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent, 1063extern struct drm_mm_node *drm_mm_get_block(struct drm_mm_node * parent,
1064 unsigned long size, 1064 unsigned long size,
1065 unsigned alignment); 1065 unsigned alignment);
1066void drm_mm_put_block(drm_mm_node_t * cur); 1066void drm_mm_put_block(struct drm_mm_node * cur);
1067extern drm_mm_node_t *drm_mm_search_free(const drm_mm_t *mm, unsigned long size, 1067extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, unsigned long size,
1068 unsigned alignment, int best_match); 1068 unsigned alignment, int best_match);
1069extern int drm_mm_init(drm_mm_t *mm, unsigned long start, unsigned long size); 1069extern int drm_mm_init(struct drm_mm *mm, unsigned long start, unsigned long size);
1070extern void drm_mm_takedown(drm_mm_t *mm); 1070extern void drm_mm_takedown(struct drm_mm *mm);
1071extern int drm_mm_clean(drm_mm_t *mm); 1071extern int drm_mm_clean(struct drm_mm *mm);
1072extern unsigned long drm_mm_tail_space(drm_mm_t *mm); 1072extern unsigned long drm_mm_tail_space(struct drm_mm *mm);
1073extern int drm_mm_remove_space_from_tail(drm_mm_t *mm, unsigned long size); 1073extern int drm_mm_remove_space_from_tail(struct drm_mm *mm, unsigned long size);
1074extern int drm_mm_add_space_to_tail(drm_mm_t *mm, unsigned long size); 1074extern int drm_mm_add_space_to_tail(struct drm_mm *mm, unsigned long size);
1075 1075
1076extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev); 1076extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev);
1077extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev); 1077extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev);
@@ -1079,7 +1079,7 @@ extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev);
1079static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, 1079static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev,
1080 unsigned int token) 1080 unsigned int token)
1081{ 1081{
1082 drm_map_list_t *_entry; 1082 struct drm_map_list *_entry;
1083 list_for_each_entry(_entry, &dev->maplist, head) 1083 list_for_each_entry(_entry, &dev->maplist, head)
1084 if (_entry->user_token == token) 1084 if (_entry->user_token == token)
1085 return _entry->map; 1085 return _entry->map;
diff --git a/drivers/char/drm/drm_agpsupport.c b/drivers/char/drm/drm_agpsupport.c
index 059476a4e7eb..354f0e3674bf 100644
--- a/drivers/char/drm/drm_agpsupport.c
+++ b/drivers/char/drm/drm_agpsupport.c
@@ -209,7 +209,7 @@ int drm_agp_enable_ioctl(struct inode *inode, struct file *filp,
209 */ 209 */
210int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request) 210int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request)
211{ 211{
212 drm_agp_mem_t *entry; 212 struct drm_agp_mem *entry;
213 DRM_AGP_MEM *memory; 213 DRM_AGP_MEM *memory;
214 unsigned long pages; 214 unsigned long pages;
215 u32 type; 215 u32 type;
@@ -258,7 +258,7 @@ int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
258 return err; 258 return err;
259 259
260 if (copy_to_user(argp, &request, sizeof(request))) { 260 if (copy_to_user(argp, &request, sizeof(request))) {
261 drm_agp_mem_t *entry; 261 struct drm_agp_mem *entry;
262 list_for_each_entry(entry, &dev->agp->memory, head) { 262 list_for_each_entry(entry, &dev->agp->memory, head) {
263 if (entry->handle == request.handle) 263 if (entry->handle == request.handle)
264 break; 264 break;
@@ -281,10 +281,10 @@ int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
281 * 281 *
282 * Walks through drm_agp_head::memory until finding a matching handle. 282 * Walks through drm_agp_head::memory until finding a matching handle.
283 */ 283 */
284static drm_agp_mem_t *drm_agp_lookup_entry(struct drm_device * dev, 284static struct drm_agp_mem *drm_agp_lookup_entry(struct drm_device * dev,
285 unsigned long handle) 285 unsigned long handle)
286{ 286{
287 drm_agp_mem_t *entry; 287 struct drm_agp_mem *entry;
288 288
289 list_for_each_entry(entry, &dev->agp->memory, head) { 289 list_for_each_entry(entry, &dev->agp->memory, head) {
290 if (entry->handle == handle) 290 if (entry->handle == handle)
@@ -307,7 +307,7 @@ static drm_agp_mem_t *drm_agp_lookup_entry(struct drm_device * dev,
307 */ 307 */
308int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request) 308int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request)
309{ 309{
310 drm_agp_mem_t *entry; 310 struct drm_agp_mem *entry;
311 int ret; 311 int ret;
312 312
313 if (!dev->agp || !dev->agp->acquired) 313 if (!dev->agp || !dev->agp->acquired)
@@ -352,7 +352,7 @@ int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp,
352 */ 352 */
353int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request) 353int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request)
354{ 354{
355 drm_agp_mem_t *entry; 355 struct drm_agp_mem *entry;
356 int retcode; 356 int retcode;
357 int page; 357 int page;
358 358
@@ -402,7 +402,7 @@ int drm_agp_bind_ioctl(struct inode *inode, struct file *filp,
402 */ 402 */
403int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request) 403int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request)
404{ 404{
405 drm_agp_mem_t *entry; 405 struct drm_agp_mem *entry;
406 406
407 if (!dev->agp || !dev->agp->acquired) 407 if (!dev->agp || !dev->agp->acquired)
408 return -EINVAL; 408 return -EINVAL;
@@ -442,9 +442,9 @@ int drm_agp_free_ioctl(struct inode *inode, struct file *filp,
442 * via the inter_module_* functions. Creates and initializes a drm_agp_head 442 * via the inter_module_* functions. Creates and initializes a drm_agp_head
443 * structure. 443 * structure.
444 */ 444 */
445drm_agp_head_t *drm_agp_init(struct drm_device *dev) 445struct drm_agp_head *drm_agp_init(struct drm_device *dev)
446{ 446{
447 drm_agp_head_t *head = NULL; 447 struct drm_agp_head *head = NULL;
448 448
449 if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS))) 449 if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS)))
450 return NULL; 450 return NULL;
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c
index 3528453c8ece..8d17dbce56ed 100644
--- a/drivers/char/drm/drm_bufs.c
+++ b/drivers/char/drm/drm_bufs.c
@@ -49,10 +49,10 @@ unsigned long drm_get_resource_len(struct drm_device *dev, unsigned int resource
49 49
50EXPORT_SYMBOL(drm_get_resource_len); 50EXPORT_SYMBOL(drm_get_resource_len);
51 51
52static drm_map_list_t *drm_find_matching_map(struct drm_device *dev, 52static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
53 drm_local_map_t *map) 53 drm_local_map_t *map)
54{ 54{
55 drm_map_list_t *entry; 55 struct drm_map_list *entry;
56 list_for_each_entry(entry, &dev->maplist, head) { 56 list_for_each_entry(entry, &dev->maplist, head) {
57 if (entry->map && map->type == entry->map->type && 57 if (entry->map && map->type == entry->map->type &&
58 ((entry->map->offset == map->offset) || 58 ((entry->map->offset == map->offset) ||
@@ -103,10 +103,11 @@ static int drm_map_handle(struct drm_device *dev, drm_hash_item_t *hash,
103 */ 103 */
104static int drm_addmap_core(struct drm_device * dev, unsigned int offset, 104static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
105 unsigned int size, enum drm_map_type type, 105 unsigned int size, enum drm_map_type type,
106 enum drm_map_flags flags, drm_map_list_t ** maplist) 106 enum drm_map_flags flags,
107 struct drm_map_list ** maplist)
107{ 108{
108 struct drm_map *map; 109 struct drm_map *map;
109 drm_map_list_t *list; 110 struct drm_map_list *list;
110 drm_dma_handle_t *dmah; 111 drm_dma_handle_t *dmah;
111 unsigned long user_token; 112 unsigned long user_token;
112 int ret; 113 int ret;
@@ -212,7 +213,7 @@ static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
212 } 213 }
213 break; 214 break;
214 case _DRM_AGP: { 215 case _DRM_AGP: {
215 drm_agp_mem_t *entry; 216 struct drm_agp_mem *entry;
216 int valid = 0; 217 int valid = 0;
217 218
218 if (!drm_core_has_AGP(dev)) { 219 if (!drm_core_has_AGP(dev)) {
@@ -314,7 +315,7 @@ int drm_addmap(struct drm_device * dev, unsigned int offset,
314 unsigned int size, enum drm_map_type type, 315 unsigned int size, enum drm_map_type type,
315 enum drm_map_flags flags, drm_local_map_t ** map_ptr) 316 enum drm_map_flags flags, drm_local_map_t ** map_ptr)
316{ 317{
317 drm_map_list_t *list; 318 struct drm_map_list *list;
318 int rc; 319 int rc;
319 320
320 rc = drm_addmap_core(dev, offset, size, type, flags, &list); 321 rc = drm_addmap_core(dev, offset, size, type, flags, &list);
@@ -331,7 +332,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
331 struct drm_file *priv = filp->private_data; 332 struct drm_file *priv = filp->private_data;
332 struct drm_device *dev = priv->head->dev; 333 struct drm_device *dev = priv->head->dev;
333 struct drm_map map; 334 struct drm_map map;
334 drm_map_list_t *maplist; 335 struct drm_map_list *maplist;
335 struct drm_map __user *argp = (void __user *)arg; 336 struct drm_map __user *argp = (void __user *)arg;
336 int err; 337 int err;
337 338
@@ -378,7 +379,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
378 */ 379 */
379int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t *map) 380int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t *map)
380{ 381{
381 drm_map_list_t *r_list = NULL, *list_t; 382 struct drm_map_list *r_list = NULL, *list_t;
382 drm_dma_handle_t dmah; 383 drm_dma_handle_t dmah;
383 int found = 0; 384 int found = 0;
384 385
@@ -453,7 +454,7 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
453 struct drm_device *dev = priv->head->dev; 454 struct drm_device *dev = priv->head->dev;
454 struct drm_map request; 455 struct drm_map request;
455 drm_local_map_t *map = NULL; 456 drm_local_map_t *map = NULL;
456 drm_map_list_t *r_list; 457 struct drm_map_list *r_list;
457 int ret; 458 int ret;
458 459
459 if (copy_from_user(&request, (struct drm_map __user *) arg, sizeof(request))) { 460 if (copy_from_user(&request, (struct drm_map __user *) arg, sizeof(request))) {
@@ -554,7 +555,7 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
554{ 555{
555 struct drm_device_dma *dma = dev->dma; 556 struct drm_device_dma *dma = dev->dma;
556 struct drm_buf_entry *entry; 557 struct drm_buf_entry *entry;
557 drm_agp_mem_t *agp_entry; 558 struct drm_agp_mem *agp_entry;
558 struct drm_buf *buf; 559 struct drm_buf *buf;
559 unsigned long offset; 560 unsigned long offset;
560 unsigned long agp_offset; 561 unsigned long agp_offset;
diff --git a/drivers/char/drm/drm_context.c b/drivers/char/drm/drm_context.c
index 767103cae09a..7fc055adec25 100644
--- a/drivers/char/drm/drm_context.c
+++ b/drivers/char/drm/drm_context.c
@@ -217,7 +217,7 @@ int drm_getsareactx(struct inode *inode, struct file *filp,
217 struct drm_ctx_priv_map __user *argp = (void __user *)arg; 217 struct drm_ctx_priv_map __user *argp = (void __user *)arg;
218 struct drm_ctx_priv_map request; 218 struct drm_ctx_priv_map request;
219 struct drm_map *map; 219 struct drm_map *map;
220 drm_map_list_t *_entry; 220 struct drm_map_list *_entry;
221 221
222 if (copy_from_user(&request, argp, sizeof(request))) 222 if (copy_from_user(&request, argp, sizeof(request)))
223 return -EFAULT; 223 return -EFAULT;
@@ -267,7 +267,7 @@ int drm_setsareactx(struct inode *inode, struct file *filp,
267 struct drm_device *dev = priv->head->dev; 267 struct drm_device *dev = priv->head->dev;
268 struct drm_ctx_priv_map request; 268 struct drm_ctx_priv_map request;
269 struct drm_map *map = NULL; 269 struct drm_map *map = NULL;
270 drm_map_list_t *r_list = NULL; 270 struct drm_map_list *r_list = NULL;
271 271
272 if (copy_from_user(&request, 272 if (copy_from_user(&request,
273 (struct drm_ctx_priv_map __user *) arg, 273 (struct drm_ctx_priv_map __user *) arg,
@@ -410,7 +410,7 @@ int drm_addctx(struct inode *inode, struct file *filp,
410{ 410{
411 struct drm_file *priv = filp->private_data; 411 struct drm_file *priv = filp->private_data;
412 struct drm_device *dev = priv->head->dev; 412 struct drm_device *dev = priv->head->dev;
413 drm_ctx_list_t *ctx_entry; 413 struct drm_ctx_list *ctx_entry;
414 struct drm_ctx __user *argp = (void __user *)arg; 414 struct drm_ctx __user *argp = (void __user *)arg;
415 struct drm_ctx ctx; 415 struct drm_ctx ctx;
416 416
@@ -575,7 +575,7 @@ int drm_rmctx(struct inode *inode, struct file *filp,
575 575
576 mutex_lock(&dev->ctxlist_mutex); 576 mutex_lock(&dev->ctxlist_mutex);
577 if (!list_empty(&dev->ctxlist)) { 577 if (!list_empty(&dev->ctxlist)) {
578 drm_ctx_list_t *pos, *n; 578 struct drm_ctx_list *pos, *n;
579 579
580 list_for_each_entry_safe(pos, n, &dev->ctxlist, head) { 580 list_for_each_entry_safe(pos, n, &dev->ctxlist, head) {
581 if (pos->handle == ctx.handle) { 581 if (pos->handle == ctx.handle) {
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c
index 56594fd373bf..d5cf5cfccf78 100644
--- a/drivers/char/drm/drm_drv.c
+++ b/drivers/char/drm/drm_drv.c
@@ -132,7 +132,7 @@ static drm_ioctl_desc_t drm_ioctls[] = {
132int drm_lastclose(struct drm_device * dev) 132int drm_lastclose(struct drm_device * dev)
133{ 133{
134 struct drm_magic_entry *pt, *next; 134 struct drm_magic_entry *pt, *next;
135 drm_map_list_t *r_list, *list_t; 135 struct drm_map_list *r_list, *list_t;
136 struct drm_vma_entry *vma, *vma_temp; 136 struct drm_vma_entry *vma, *vma_temp;
137 int i; 137 int i;
138 138
@@ -178,7 +178,7 @@ int drm_lastclose(struct drm_device * dev)
178 178
179 /* Clear AGP information */ 179 /* Clear AGP information */
180 if (drm_core_has_AGP(dev) && dev->agp) { 180 if (drm_core_has_AGP(dev) && dev->agp) {
181 drm_agp_mem_t *entry, *tempe; 181 struct drm_agp_mem *entry, *tempe;
182 182
183 /* Remove AGP resources, but leave dev->agp 183 /* Remove AGP resources, but leave dev->agp
184 intact until drv_cleanup is called. */ 184 intact until drv_cleanup is called. */
@@ -520,7 +520,7 @@ EXPORT_SYMBOL(drm_ioctl);
520 520
521drm_local_map_t *drm_getsarea(struct drm_device *dev) 521drm_local_map_t *drm_getsarea(struct drm_device *dev)
522{ 522{
523 drm_map_list_t *entry; 523 struct drm_map_list *entry;
524 524
525 list_for_each_entry(entry, &dev->maplist, head) { 525 list_for_each_entry(entry, &dev->maplist, head) {
526 if (entry->map && entry->map->type == _DRM_SHM && 526 if (entry->map && entry->map->type == _DRM_SHM &&
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
index ef2a28af136f..7bc51bac450d 100644
--- a/drivers/char/drm/drm_fops.c
+++ b/drivers/char/drm/drm_fops.c
@@ -401,7 +401,7 @@ int drm_release(struct inode *inode, struct file *filp)
401 401
402 mutex_lock(&dev->ctxlist_mutex); 402 mutex_lock(&dev->ctxlist_mutex);
403 if (!list_empty(&dev->ctxlist)) { 403 if (!list_empty(&dev->ctxlist)) {
404 drm_ctx_list_t *pos, *n; 404 struct drm_ctx_list *pos, *n;
405 405
406 list_for_each_entry_safe(pos, n, &dev->ctxlist, head) { 406 list_for_each_entry_safe(pos, n, &dev->ctxlist, head) {
407 if (pos->tag == priv && 407 if (pos->tag == priv &&
diff --git a/drivers/char/drm/drm_ioctl.c b/drivers/char/drm/drm_ioctl.c
index 94d7428b38d2..b195e102e737 100644
--- a/drivers/char/drm/drm_ioctl.c
+++ b/drivers/char/drm/drm_ioctl.c
@@ -188,7 +188,7 @@ int drm_getmap(struct inode *inode, struct file *filp,
188 struct drm_device *dev = priv->head->dev; 188 struct drm_device *dev = priv->head->dev;
189 struct drm_map __user *argp = (void __user *)arg; 189 struct drm_map __user *argp = (void __user *)arg;
190 struct drm_map map; 190 struct drm_map map;
191 drm_map_list_t *r_list = NULL; 191 struct drm_map_list *r_list = NULL;
192 struct list_head *list; 192 struct list_head *list;
193 int idx; 193 int idx;
194 int i; 194 int i;
@@ -206,7 +206,7 @@ int drm_getmap(struct inode *inode, struct file *filp,
206 i = 0; 206 i = 0;
207 list_for_each(list, &dev->maplist) { 207 list_for_each(list, &dev->maplist) {
208 if (i == idx) { 208 if (i == idx) {
209 r_list = list_entry(list, drm_map_list_t, head); 209 r_list = list_entry(list, struct drm_map_list, head);
210 break; 210 break;
211 } 211 }
212 i++; 212 i++;
diff --git a/drivers/char/drm/drm_irq.c b/drivers/char/drm/drm_irq.c
index bbdad83f6d8c..871d2fde09b3 100644
--- a/drivers/char/drm/drm_irq.c
+++ b/drivers/char/drm/drm_irq.c
@@ -294,7 +294,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
294 unsigned long irqflags; 294 unsigned long irqflags;
295 struct list_head *vbl_sigs = (flags & _DRM_VBLANK_SECONDARY) 295 struct list_head *vbl_sigs = (flags & _DRM_VBLANK_SECONDARY)
296 ? &dev->vbl_sigs2 : &dev->vbl_sigs; 296 ? &dev->vbl_sigs2 : &dev->vbl_sigs;
297 drm_vbl_sig_t *vbl_sig; 297 struct drm_vbl_sig *vbl_sig;
298 298
299 spin_lock_irqsave(&dev->vbl_lock, irqflags); 299 spin_lock_irqsave(&dev->vbl_lock, irqflags);
300 300
@@ -324,7 +324,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
324 324
325 if (! 325 if (!
326 (vbl_sig = 326 (vbl_sig =
327 drm_alloc(sizeof(drm_vbl_sig_t), DRM_MEM_DRIVER))) { 327 drm_alloc(sizeof(struct drm_vbl_sig), DRM_MEM_DRIVER))) {
328 return -ENOMEM; 328 return -ENOMEM;
329 } 329 }
330 330
@@ -379,7 +379,7 @@ void drm_vbl_send_signals(struct drm_device * dev)
379 spin_lock_irqsave(&dev->vbl_lock, flags); 379 spin_lock_irqsave(&dev->vbl_lock, flags);
380 380
381 for (i = 0; i < 2; i++) { 381 for (i = 0; i < 2; i++) {
382 drm_vbl_sig_t *vbl_sig, *tmp; 382 struct drm_vbl_sig *vbl_sig, *tmp;
383 struct list_head *vbl_sigs = i ? &dev->vbl_sigs2 : &dev->vbl_sigs; 383 struct list_head *vbl_sigs = i ? &dev->vbl_sigs2 : &dev->vbl_sigs;
384 unsigned int vbl_seq = atomic_read(i ? &dev->vbl_received2 : 384 unsigned int vbl_seq = atomic_read(i ? &dev->vbl_received2 :
385 &dev->vbl_received); 385 &dev->vbl_received);
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c
index c3a998704106..c0534b5a8b78 100644
--- a/drivers/char/drm/drm_lock.c
+++ b/drivers/char/drm/drm_lock.c
@@ -202,7 +202,7 @@ int drm_unlock(struct inode *inode, struct file *filp,
202 * 202 *
203 * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction. 203 * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
204 */ 204 */
205int drm_lock_take(drm_lock_data_t *lock_data, 205int drm_lock_take(struct drm_lock_data *lock_data,
206 unsigned int context) 206 unsigned int context)
207{ 207{
208 unsigned int old, new, prev; 208 unsigned int old, new, prev;
@@ -251,7 +251,7 @@ int drm_lock_take(drm_lock_data_t *lock_data,
251 * Resets the lock file pointer. 251 * Resets the lock file pointer.
252 * Marks the lock as held by the given context, via the \p cmpxchg instruction. 252 * Marks the lock as held by the given context, via the \p cmpxchg instruction.
253 */ 253 */
254static int drm_lock_transfer(drm_lock_data_t *lock_data, 254static int drm_lock_transfer(struct drm_lock_data *lock_data,
255 unsigned int context) 255 unsigned int context)
256{ 256{
257 unsigned int old, new, prev; 257 unsigned int old, new, prev;
@@ -277,7 +277,7 @@ static int drm_lock_transfer(drm_lock_data_t *lock_data,
277 * Marks the lock as not held, via the \p cmpxchg instruction. Wakes any task 277 * Marks the lock as not held, via the \p cmpxchg instruction. Wakes any task
278 * waiting on the lock queue. 278 * waiting on the lock queue.
279 */ 279 */
280int drm_lock_free(drm_lock_data_t *lock_data, unsigned int context) 280int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context)
281{ 281{
282 unsigned int old, new, prev; 282 unsigned int old, new, prev;
283 volatile unsigned int *lock = &lock_data->hw_lock->lock; 283 volatile unsigned int *lock = &lock_data->hw_lock->lock;
@@ -319,7 +319,7 @@ int drm_lock_free(drm_lock_data_t *lock_data, unsigned int context)
319 */ 319 */
320static int drm_notifier(void *priv) 320static int drm_notifier(void *priv)
321{ 321{
322 drm_sigdata_t *s = (drm_sigdata_t *) priv; 322 struct drm_sigdata *s = (struct drm_sigdata *) priv;
323 unsigned int old, new, prev; 323 unsigned int old, new, prev;
324 324
325 /* Allow signal delivery if lock isn't held */ 325 /* Allow signal delivery if lock isn't held */
@@ -350,7 +350,7 @@ static int drm_notifier(void *priv)
350 * having to worry about starvation. 350 * having to worry about starvation.
351 */ 351 */
352 352
353void drm_idlelock_take(drm_lock_data_t *lock_data) 353void drm_idlelock_take(struct drm_lock_data *lock_data)
354{ 354{
355 int ret = 0; 355 int ret = 0;
356 356
@@ -369,7 +369,7 @@ void drm_idlelock_take(drm_lock_data_t *lock_data)
369} 369}
370EXPORT_SYMBOL(drm_idlelock_take); 370EXPORT_SYMBOL(drm_idlelock_take);
371 371
372void drm_idlelock_release(drm_lock_data_t *lock_data) 372void drm_idlelock_release(struct drm_lock_data *lock_data)
373{ 373{
374 unsigned int old, prev; 374 unsigned int old, prev;
375 volatile unsigned int *lock = &lock_data->hw_lock->lock; 375 volatile unsigned int *lock = &lock_data->hw_lock->lock;
diff --git a/drivers/char/drm/drm_mm.c b/drivers/char/drm/drm_mm.c
index 2ec1d9f26264..3e6bc14f7441 100644
--- a/drivers/char/drm/drm_mm.c
+++ b/drivers/char/drm/drm_mm.c
@@ -44,26 +44,26 @@
44#include "drmP.h" 44#include "drmP.h"
45#include <linux/slab.h> 45#include <linux/slab.h>
46 46
47unsigned long drm_mm_tail_space(drm_mm_t *mm) 47unsigned long drm_mm_tail_space(struct drm_mm *mm)
48{ 48{
49 struct list_head *tail_node; 49 struct list_head *tail_node;
50 drm_mm_node_t *entry; 50 struct drm_mm_node *entry;
51 51
52 tail_node = mm->ml_entry.prev; 52 tail_node = mm->ml_entry.prev;
53 entry = list_entry(tail_node, drm_mm_node_t, ml_entry); 53 entry = list_entry(tail_node, struct drm_mm_node, ml_entry);
54 if (!entry->free) 54 if (!entry->free)
55 return 0; 55 return 0;
56 56
57 return entry->size; 57 return entry->size;
58} 58}
59 59
60int drm_mm_remove_space_from_tail(drm_mm_t *mm, unsigned long size) 60int drm_mm_remove_space_from_tail(struct drm_mm *mm, unsigned long size)
61{ 61{
62 struct list_head *tail_node; 62 struct list_head *tail_node;
63 drm_mm_node_t *entry; 63 struct drm_mm_node *entry;
64 64
65 tail_node = mm->ml_entry.prev; 65 tail_node = mm->ml_entry.prev;
66 entry = list_entry(tail_node, drm_mm_node_t, ml_entry); 66 entry = list_entry(tail_node, struct drm_mm_node, ml_entry);
67 if (!entry->free) 67 if (!entry->free)
68 return -ENOMEM; 68 return -ENOMEM;
69 69
@@ -75,13 +75,13 @@ int drm_mm_remove_space_from_tail(drm_mm_t *mm, unsigned long size)
75} 75}
76 76
77 77
78static int drm_mm_create_tail_node(drm_mm_t *mm, 78static int drm_mm_create_tail_node(struct drm_mm *mm,
79 unsigned long start, 79 unsigned long start,
80 unsigned long size) 80 unsigned long size)
81{ 81{
82 drm_mm_node_t *child; 82 struct drm_mm_node *child;
83 83
84 child = (drm_mm_node_t *) 84 child = (struct drm_mm_node *)
85 drm_alloc(sizeof(*child), DRM_MEM_MM); 85 drm_alloc(sizeof(*child), DRM_MEM_MM);
86 if (!child) 86 if (!child)
87 return -ENOMEM; 87 return -ENOMEM;
@@ -98,13 +98,13 @@ static int drm_mm_create_tail_node(drm_mm_t *mm,
98} 98}
99 99
100 100
101int drm_mm_add_space_to_tail(drm_mm_t *mm, unsigned long size) 101int drm_mm_add_space_to_tail(struct drm_mm *mm, unsigned long size)
102{ 102{
103 struct list_head *tail_node; 103 struct list_head *tail_node;
104 drm_mm_node_t *entry; 104 struct drm_mm_node *entry;
105 105
106 tail_node = mm->ml_entry.prev; 106 tail_node = mm->ml_entry.prev;
107 entry = list_entry(tail_node, drm_mm_node_t, ml_entry); 107 entry = list_entry(tail_node, struct drm_mm_node, ml_entry);
108 if (!entry->free) { 108 if (!entry->free) {
109 return drm_mm_create_tail_node(mm, entry->start + entry->size, size); 109 return drm_mm_create_tail_node(mm, entry->start + entry->size, size);
110 } 110 }
@@ -112,12 +112,12 @@ int drm_mm_add_space_to_tail(drm_mm_t *mm, unsigned long size)
112 return 0; 112 return 0;
113} 113}
114 114
115static drm_mm_node_t *drm_mm_split_at_start(drm_mm_node_t *parent, 115static struct drm_mm_node *drm_mm_split_at_start(struct drm_mm_node *parent,
116 unsigned long size) 116 unsigned long size)
117{ 117{
118 drm_mm_node_t *child; 118 struct drm_mm_node *child;
119 119
120 child = (drm_mm_node_t *) 120 child = (struct drm_mm_node *)
121 drm_alloc(sizeof(*child), DRM_MEM_MM); 121 drm_alloc(sizeof(*child), DRM_MEM_MM);
122 if (!child) 122 if (!child)
123 return NULL; 123 return NULL;
@@ -139,12 +139,12 @@ static drm_mm_node_t *drm_mm_split_at_start(drm_mm_node_t *parent,
139 139
140 140
141 141
142drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent, 142struct drm_mm_node *drm_mm_get_block(struct drm_mm_node * parent,
143 unsigned long size, unsigned alignment) 143 unsigned long size, unsigned alignment)
144{ 144{
145 145
146 drm_mm_node_t *align_splitoff = NULL; 146 struct drm_mm_node *align_splitoff = NULL;
147 drm_mm_node_t *child; 147 struct drm_mm_node *child;
148 unsigned tmp = 0; 148 unsigned tmp = 0;
149 149
150 if (alignment) 150 if (alignment)
@@ -175,26 +175,26 @@ drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent,
175 * Otherwise add to the free stack. 175 * Otherwise add to the free stack.
176 */ 176 */
177 177
178void drm_mm_put_block(drm_mm_node_t * cur) 178void drm_mm_put_block(struct drm_mm_node * cur)
179{ 179{
180 180
181 drm_mm_t *mm = cur->mm; 181 struct drm_mm *mm = cur->mm;
182 struct list_head *cur_head = &cur->ml_entry; 182 struct list_head *cur_head = &cur->ml_entry;
183 struct list_head *root_head = &mm->ml_entry; 183 struct list_head *root_head = &mm->ml_entry;
184 drm_mm_node_t *prev_node = NULL; 184 struct drm_mm_node *prev_node = NULL;
185 drm_mm_node_t *next_node; 185 struct drm_mm_node *next_node;
186 186
187 int merged = 0; 187 int merged = 0;
188 188
189 if (cur_head->prev != root_head) { 189 if (cur_head->prev != root_head) {
190 prev_node = list_entry(cur_head->prev, drm_mm_node_t, ml_entry); 190 prev_node = list_entry(cur_head->prev, struct drm_mm_node, ml_entry);
191 if (prev_node->free) { 191 if (prev_node->free) {
192 prev_node->size += cur->size; 192 prev_node->size += cur->size;
193 merged = 1; 193 merged = 1;
194 } 194 }
195 } 195 }
196 if (cur_head->next != root_head) { 196 if (cur_head->next != root_head) {
197 next_node = list_entry(cur_head->next, drm_mm_node_t, ml_entry); 197 next_node = list_entry(cur_head->next, struct drm_mm_node, ml_entry);
198 if (next_node->free) { 198 if (next_node->free) {
199 if (merged) { 199 if (merged) {
200 prev_node->size += next_node->size; 200 prev_node->size += next_node->size;
@@ -218,14 +218,14 @@ void drm_mm_put_block(drm_mm_node_t * cur)
218 } 218 }
219} 219}
220 220
221drm_mm_node_t *drm_mm_search_free(const drm_mm_t * mm, 221struct drm_mm_node *drm_mm_search_free(const struct drm_mm * mm,
222 unsigned long size, 222 unsigned long size,
223 unsigned alignment, int best_match) 223 unsigned alignment, int best_match)
224{ 224{
225 struct list_head *list; 225 struct list_head *list;
226 const struct list_head *free_stack = &mm->fl_entry; 226 const struct list_head *free_stack = &mm->fl_entry;
227 drm_mm_node_t *entry; 227 struct drm_mm_node *entry;
228 drm_mm_node_t *best; 228 struct drm_mm_node *best;
229 unsigned long best_size; 229 unsigned long best_size;
230 unsigned wasted; 230 unsigned wasted;
231 231
@@ -233,7 +233,7 @@ drm_mm_node_t *drm_mm_search_free(const drm_mm_t * mm,
233 best_size = ~0UL; 233 best_size = ~0UL;
234 234
235 list_for_each(list, free_stack) { 235 list_for_each(list, free_stack) {
236 entry = list_entry(list, drm_mm_node_t, fl_entry); 236 entry = list_entry(list, struct drm_mm_node, fl_entry);
237 wasted = 0; 237 wasted = 0;
238 238
239 if (entry->size < size) 239 if (entry->size < size)
@@ -259,14 +259,14 @@ drm_mm_node_t *drm_mm_search_free(const drm_mm_t * mm,
259 return best; 259 return best;
260} 260}
261 261
262int drm_mm_clean(drm_mm_t * mm) 262int drm_mm_clean(struct drm_mm * mm)
263{ 263{
264 struct list_head *head = &mm->ml_entry; 264 struct list_head *head = &mm->ml_entry;
265 265
266 return (head->next->next == head); 266 return (head->next->next == head);
267} 267}
268 268
269int drm_mm_init(drm_mm_t * mm, unsigned long start, unsigned long size) 269int drm_mm_init(struct drm_mm * mm, unsigned long start, unsigned long size)
270{ 270{
271 INIT_LIST_HEAD(&mm->ml_entry); 271 INIT_LIST_HEAD(&mm->ml_entry);
272 INIT_LIST_HEAD(&mm->fl_entry); 272 INIT_LIST_HEAD(&mm->fl_entry);
@@ -275,12 +275,12 @@ int drm_mm_init(drm_mm_t * mm, unsigned long start, unsigned long size)
275} 275}
276 276
277 277
278void drm_mm_takedown(drm_mm_t * mm) 278void drm_mm_takedown(struct drm_mm * mm)
279{ 279{
280 struct list_head *bnode = mm->fl_entry.next; 280 struct list_head *bnode = mm->fl_entry.next;
281 drm_mm_node_t *entry; 281 struct drm_mm_node *entry;
282 282
283 entry = list_entry(bnode, drm_mm_node_t, fl_entry); 283 entry = list_entry(bnode, struct drm_mm_node, fl_entry);
284 284
285 if (entry->ml_entry.next != &mm->ml_entry || 285 if (entry->ml_entry.next != &mm->ml_entry ||
286 entry->fl_entry.next != &mm->fl_entry) { 286 entry->fl_entry.next != &mm->fl_entry) {
diff --git a/drivers/char/drm/drm_proc.c b/drivers/char/drm/drm_proc.c
index 86dd30a519c0..12dfea89c7f3 100644
--- a/drivers/char/drm/drm_proc.c
+++ b/drivers/char/drm/drm_proc.c
@@ -208,7 +208,7 @@ static int drm__vm_info(char *buf, char **start, off_t offset, int request,
208 struct drm_device *dev = (struct drm_device *) data; 208 struct drm_device *dev = (struct drm_device *) data;
209 int len = 0; 209 int len = 0;
210 struct drm_map *map; 210 struct drm_map *map;
211 drm_map_list_t *r_list; 211 struct drm_map_list *r_list;
212 212
213 /* Hardcoded from _DRM_FRAME_BUFFER, 213 /* Hardcoded from _DRM_FRAME_BUFFER,
214 _DRM_REGISTERS, _DRM_SHM, _DRM_AGP, and 214 _DRM_REGISTERS, _DRM_SHM, _DRM_AGP, and
diff --git a/drivers/char/drm/drm_scatter.c b/drivers/char/drm/drm_scatter.c
index 058495631907..067d25daaf17 100644
--- a/drivers/char/drm/drm_scatter.c
+++ b/drivers/char/drm/drm_scatter.c
@@ -36,7 +36,7 @@
36 36
37#define DEBUG_SCATTER 0 37#define DEBUG_SCATTER 0
38 38
39void drm_sg_cleanup(drm_sg_mem_t * entry) 39void drm_sg_cleanup(struct drm_sg_mem * entry)
40{ 40{
41 struct page *page; 41 struct page *page;
42 int i; 42 int i;
@@ -69,7 +69,7 @@ int drm_sg_alloc(struct inode *inode, struct file *filp,
69 struct drm_device *dev = priv->head->dev; 69 struct drm_device *dev = priv->head->dev;
70 struct drm_scatter_gather __user *argp = (void __user *)arg; 70 struct drm_scatter_gather __user *argp = (void __user *)arg;
71 struct drm_scatter_gather request; 71 struct drm_scatter_gather request;
72 drm_sg_mem_t *entry; 72 struct drm_sg_mem *entry;
73 unsigned long pages, i, j; 73 unsigned long pages, i, j;
74 74
75 DRM_DEBUG("%s\n", __FUNCTION__); 75 DRM_DEBUG("%s\n", __FUNCTION__);
@@ -204,7 +204,7 @@ int drm_sg_free(struct inode *inode, struct file *filp,
204 struct drm_file *priv = filp->private_data; 204 struct drm_file *priv = filp->private_data;
205 struct drm_device *dev = priv->head->dev; 205 struct drm_device *dev = priv->head->dev;
206 struct drm_scatter_gather request; 206 struct drm_scatter_gather request;
207 drm_sg_mem_t *entry; 207 struct drm_sg_mem *entry;
208 208
209 if (!drm_core_check_feature(dev, DRIVER_SG)) 209 if (!drm_core_check_feature(dev, DRIVER_SG))
210 return -EINVAL; 210 return -EINVAL;
diff --git a/drivers/char/drm/drm_sman.c b/drivers/char/drm/drm_sman.c
index e15db6d6bea9..8e4bfbd89632 100644
--- a/drivers/char/drm/drm_sman.c
+++ b/drivers/char/drm/drm_sman.c
@@ -88,8 +88,8 @@ EXPORT_SYMBOL(drm_sman_init);
88static void *drm_sman_mm_allocate(void *private, unsigned long size, 88static void *drm_sman_mm_allocate(void *private, unsigned long size,
89 unsigned alignment) 89 unsigned alignment)
90{ 90{
91 drm_mm_t *mm = (drm_mm_t *) private; 91 struct drm_mm *mm = (struct drm_mm *) private;
92 drm_mm_node_t *tmp; 92 struct drm_mm_node *tmp;
93 93
94 tmp = drm_mm_search_free(mm, size, alignment, 1); 94 tmp = drm_mm_search_free(mm, size, alignment, 1);
95 if (!tmp) { 95 if (!tmp) {
@@ -101,21 +101,21 @@ static void *drm_sman_mm_allocate(void *private, unsigned long size,
101 101
102static void drm_sman_mm_free(void *private, void *ref) 102static void drm_sman_mm_free(void *private, void *ref)
103{ 103{
104 drm_mm_node_t *node = (drm_mm_node_t *) ref; 104 struct drm_mm_node *node = (struct drm_mm_node *) ref;
105 105
106 drm_mm_put_block(node); 106 drm_mm_put_block(node);
107} 107}
108 108
109static void drm_sman_mm_destroy(void *private) 109static void drm_sman_mm_destroy(void *private)
110{ 110{
111 drm_mm_t *mm = (drm_mm_t *) private; 111 struct drm_mm *mm = (struct drm_mm *) private;
112 drm_mm_takedown(mm); 112 drm_mm_takedown(mm);
113 drm_free(mm, sizeof(*mm), DRM_MEM_MM); 113 drm_free(mm, sizeof(*mm), DRM_MEM_MM);
114} 114}
115 115
116static unsigned long drm_sman_mm_offset(void *private, void *ref) 116static unsigned long drm_sman_mm_offset(void *private, void *ref)
117{ 117{
118 drm_mm_node_t *node = (drm_mm_node_t *) ref; 118 struct drm_mm_node *node = (struct drm_mm_node *) ref;
119 return node->start; 119 return node->start;
120} 120}
121 121
@@ -124,7 +124,7 @@ drm_sman_set_range(drm_sman_t * sman, unsigned int manager,
124 unsigned long start, unsigned long size) 124 unsigned long start, unsigned long size)
125{ 125{
126 drm_sman_mm_t *sman_mm; 126 drm_sman_mm_t *sman_mm;
127 drm_mm_t *mm; 127 struct drm_mm *mm;
128 int ret; 128 int ret;
129 129
130 BUG_ON(manager >= sman->num_managers); 130 BUG_ON(manager >= sman->num_managers);
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
index 95f9fe5daab7..1c7a3c88702c 100644
--- a/drivers/char/drm/drm_vm.c
+++ b/drivers/char/drm/drm_vm.c
@@ -82,7 +82,7 @@ static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
82 struct drm_file *priv = vma->vm_file->private_data; 82 struct drm_file *priv = vma->vm_file->private_data;
83 struct drm_device *dev = priv->head->dev; 83 struct drm_device *dev = priv->head->dev;
84 struct drm_map *map = NULL; 84 struct drm_map *map = NULL;
85 drm_map_list_t *r_list; 85 struct drm_map_list *r_list;
86 drm_hash_item_t *hash; 86 drm_hash_item_t *hash;
87 87
88 /* 88 /*
@@ -97,7 +97,7 @@ static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
97 if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff, &hash)) 97 if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff, &hash))
98 goto vm_nopage_error; 98 goto vm_nopage_error;
99 99
100 r_list = drm_hash_entry(hash, drm_map_list_t, hash); 100 r_list = drm_hash_entry(hash, struct drm_map_list, hash);
101 map = r_list->map; 101 map = r_list->map;
102 102
103 if (map && map->type == _DRM_AGP) { 103 if (map && map->type == _DRM_AGP) {
@@ -198,7 +198,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
198 struct drm_device *dev = priv->head->dev; 198 struct drm_device *dev = priv->head->dev;
199 struct drm_vma_entry *pt, *temp; 199 struct drm_vma_entry *pt, *temp;
200 struct drm_map *map; 200 struct drm_map *map;
201 drm_map_list_t *r_list; 201 struct drm_map_list *r_list;
202 int found_maps = 0; 202 int found_maps = 0;
203 203
204 DRM_DEBUG("0x%08lx,0x%08lx\n", 204 DRM_DEBUG("0x%08lx,0x%08lx\n",
@@ -313,7 +313,7 @@ static __inline__ struct page *drm_do_vm_sg_nopage(struct vm_area_struct *vma,
313 struct drm_map *map = (struct drm_map *) vma->vm_private_data; 313 struct drm_map *map = (struct drm_map *) vma->vm_private_data;
314 struct drm_file *priv = vma->vm_file->private_data; 314 struct drm_file *priv = vma->vm_file->private_data;
315 struct drm_device *dev = priv->head->dev; 315 struct drm_device *dev = priv->head->dev;
316 drm_sg_mem_t *entry = dev->sg; 316 struct drm_sg_mem *entry = dev->sg;
317 unsigned long offset; 317 unsigned long offset;
318 unsigned long map_offset; 318 unsigned long map_offset;
319 unsigned long page_offset; 319 unsigned long page_offset;
@@ -574,7 +574,7 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
574 return -EINVAL; 574 return -EINVAL;
575 } 575 }
576 576
577 map = drm_hash_entry(hash, drm_map_list_t, hash)->map; 577 map = drm_hash_entry(hash, struct drm_map_list, hash)->map;
578 if (!map || ((map->flags & _DRM_RESTRICTED) && !capable(CAP_SYS_ADMIN))) 578 if (!map || ((map->flags & _DRM_RESTRICTED) && !capable(CAP_SYS_ADMIN)))
579 return -EPERM; 579 return -EPERM;
580 580
diff --git a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c
index 4d23bd0f8711..cb449999d0ef 100644
--- a/drivers/char/drm/i810_dma.c
+++ b/drivers/char/drm/i810_dma.c
@@ -327,7 +327,7 @@ static 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{
330 drm_map_list_t *r_list; 330 struct drm_map_list *r_list;
331 memset(dev_priv, 0, sizeof(drm_i810_private_t)); 331 memset(dev_priv, 0, sizeof(drm_i810_private_t));
332 332
333 list_for_each_entry(r_list, &dev->maplist, head) { 333 list_for_each_entry(r_list, &dev->maplist, head) {
diff --git a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c
index 72c781a7de9a..dc20c1a7834e 100644
--- a/drivers/char/drm/i830_dma.c
+++ b/drivers/char/drm/i830_dma.c
@@ -334,7 +334,7 @@ static 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{
337 drm_map_list_t *r_list; 337 struct drm_map_list *r_list;
338 338
339 memset(dev_priv, 0, sizeof(drm_i830_private_t)); 339 memset(dev_priv, 0, sizeof(drm_i830_private_t));
340 340
diff --git a/drivers/char/drm/mga_dma.c b/drivers/char/drm/mga_dma.c
index 38878d338d38..9c73a6e3861b 100644
--- a/drivers/char/drm/mga_dma.c
+++ b/drivers/char/drm/mga_dma.c
@@ -548,7 +548,7 @@ static int mga_do_agp_dma_bootstrap(struct drm_device * dev,
548 } 548 }
549 549
550 { 550 {
551 drm_map_list_t *_entry; 551 struct drm_map_list *_entry;
552 unsigned long agp_token = 0; 552 unsigned long agp_token = 0;
553 553
554 list_for_each_entry(_entry, &dev->maplist, head) { 554 list_for_each_entry(_entry, &dev->maplist, head) {
diff --git a/drivers/char/drm/r128_drv.h b/drivers/char/drm/r128_drv.h
index 8eb302e0101f..72249fb2fd1c 100644
--- a/drivers/char/drm/r128_drv.h
+++ b/drivers/char/drm/r128_drv.h
@@ -118,7 +118,7 @@ typedef struct drm_r128_private {
118 drm_local_map_t *cce_ring; 118 drm_local_map_t *cce_ring;
119 drm_local_map_t *ring_rptr; 119 drm_local_map_t *ring_rptr;
120 drm_local_map_t *agp_textures; 120 drm_local_map_t *agp_textures;
121 drm_ati_pcigart_info gart_info; 121 struct drm_ati_pcigart_info gart_info;
122} drm_r128_private_t; 122} drm_r128_private_t;
123 123
124typedef struct drm_r128_buf_priv { 124typedef struct drm_r128_buf_priv {
diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c
index 831ba1a78f03..af5790f8fd53 100644
--- a/drivers/char/drm/radeon_cp.c
+++ b/drivers/char/drm/radeon_cp.c
@@ -1174,7 +1174,7 @@ static void radeon_cp_init_ring_buffer(struct drm_device * dev,
1174 } else 1174 } else
1175#endif 1175#endif
1176 { 1176 {
1177 drm_sg_mem_t *entry = dev->sg; 1177 struct drm_sg_mem *entry = dev->sg;
1178 unsigned long tmp_ofs, page_ofs; 1178 unsigned long tmp_ofs, page_ofs;
1179 1179
1180 tmp_ofs = dev_priv->ring_rptr->offset - 1180 tmp_ofs = dev_priv->ring_rptr->offset -
diff --git a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h
index 59b1a6c111e1..3b3d9357201c 100644
--- a/drivers/char/drm/radeon_drv.h
+++ b/drivers/char/drm/radeon_drv.h
@@ -287,7 +287,7 @@ typedef struct drm_radeon_private {
287 287
288 unsigned long pcigart_offset; 288 unsigned long pcigart_offset;
289 unsigned int pcigart_offset_set; 289 unsigned int pcigart_offset_set;
290 drm_ati_pcigart_info gart_info; 290 struct drm_ati_pcigart_info gart_info;
291 291
292 u32 scratch_ages[5]; 292 u32 scratch_ages[5];
293 293
diff --git a/drivers/char/drm/sis_mm.c b/drivers/char/drm/sis_mm.c
index 59e7f48da4d3..e524b66a8ee9 100644
--- a/drivers/char/drm/sis_mm.c
+++ b/drivers/char/drm/sis_mm.c
@@ -231,7 +231,7 @@ static int sis_ioctl_agp_alloc(DRM_IOCTL_ARGS)
231 231
232static drm_local_map_t *sis_reg_init(struct drm_device *dev) 232static drm_local_map_t *sis_reg_init(struct drm_device *dev)
233{ 233{
234 drm_map_list_t *entry; 234 struct drm_map_list *entry;
235 drm_local_map_t *map; 235 drm_local_map_t *map;
236 236
237 list_for_each_entry(entry, &dev->maplist, head) { 237 list_for_each_entry(entry, &dev->maplist, head) {
diff --git a/drivers/char/drm/via_verifier.c b/drivers/char/drm/via_verifier.c
index fa3f733e7959..832d48356e91 100644
--- a/drivers/char/drm/via_verifier.c
+++ b/drivers/char/drm/via_verifier.c
@@ -254,7 +254,7 @@ static __inline__ drm_local_map_t *via_drm_lookup_agp_map(drm_via_state_t *seq,
254 unsigned long size, 254 unsigned long size,
255 struct drm_device * dev) 255 struct drm_device * dev)
256{ 256{
257 drm_map_list_t *r_list; 257 struct drm_map_list *r_list;
258 drm_local_map_t *map = seq->map_cache; 258 drm_local_map_t *map = seq->map_cache;
259 259
260 if (map && map->offset <= offset 260 if (map && map->offset <= offset