aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/drm/drmP.h52
-rw-r--r--drivers/char/drm/drm_proc.c4
2 files changed, 28 insertions, 28 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index dde02a15fa59..110629653a87 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -292,7 +292,6 @@ struct drm_magic_entry {
292 struct list_head head; 292 struct list_head head;
293 struct drm_hash_item hash_item; 293 struct drm_hash_item hash_item;
294 struct drm_file *priv; 294 struct drm_file *priv;
295 struct drm_magic_entry *next;
296}; 295};
297 296
298struct drm_vma_entry { 297struct drm_vma_entry {
@@ -388,8 +387,8 @@ struct drm_file {
388 struct drm_head *head; 387 struct drm_head *head;
389 int remove_auth_on_close; 388 int remove_auth_on_close;
390 unsigned long lock_count; 389 unsigned long lock_count;
391 void *driver_priv;
392 struct file *filp; 390 struct file *filp;
391 void *driver_priv;
393}; 392};
394 393
395/** Wait queue */ 394/** Wait queue */
@@ -401,11 +400,9 @@ struct drm_queue {
401 wait_queue_head_t read_queue; /**< Processes waiting on block_read */ 400 wait_queue_head_t read_queue; /**< Processes waiting on block_read */
402 atomic_t block_write; /**< Queue blocked for writes */ 401 atomic_t block_write; /**< Queue blocked for writes */
403 wait_queue_head_t write_queue; /**< Processes waiting on block_write */ 402 wait_queue_head_t write_queue; /**< Processes waiting on block_write */
404#if 1
405 atomic_t total_queued; /**< Total queued statistic */ 403 atomic_t total_queued; /**< Total queued statistic */
406 atomic_t total_flushed; /**< Total flushes statistic */ 404 atomic_t total_flushed; /**< Total flushes statistic */
407 atomic_t total_locks; /**< Total locks statistics */ 405 atomic_t total_locks; /**< Total locks statistics */
408#endif
409 enum drm_ctx_flags flags; /**< Context preserving and 2D-only */ 406 enum drm_ctx_flags flags; /**< Context preserving and 2D-only */
410 struct drm_waitlist waitlist; /**< Pending buffers */ 407 struct drm_waitlist waitlist; /**< Pending buffers */
411 wait_queue_head_t flush_queue; /**< Processes waiting until flush */ 408 wait_queue_head_t flush_queue; /**< Processes waiting until flush */
@@ -416,7 +413,8 @@ struct drm_queue {
416 */ 413 */
417struct drm_lock_data { 414struct drm_lock_data {
418 struct drm_hw_lock *hw_lock; /**< Hardware lock */ 415 struct drm_hw_lock *hw_lock; /**< Hardware lock */
419 struct drm_file *file_priv; /**< File descr of lock holder (0=kernel) */ 416 /** Private of lock holder's file (NULL=kernel) */
417 struct drm_file *file_priv;
420 wait_queue_head_t lock_queue; /**< Queue of blocked processes */ 418 wait_queue_head_t lock_queue; /**< Queue of blocked processes */
421 unsigned long lock_time; /**< Time of last lock in jiffies */ 419 unsigned long lock_time; /**< Time of last lock in jiffies */
422 spinlock_t spinlock; 420 spinlock_t spinlock;
@@ -491,6 +489,27 @@ struct drm_sigdata {
491 struct drm_hw_lock *lock; 489 struct drm_hw_lock *lock;
492}; 490};
493 491
492
493/*
494 * Generic memory manager structs
495 */
496
497struct drm_mm_node {
498 struct list_head fl_entry;
499 struct list_head ml_entry;
500 int free;
501 unsigned long start;
502 unsigned long size;
503 struct drm_mm *mm;
504 void *private;
505};
506
507struct drm_mm {
508 struct list_head fl_entry;
509 struct list_head ml_entry;
510};
511
512
494/** 513/**
495 * Mappings list 514 * Mappings list
496 */ 515 */
@@ -498,7 +517,7 @@ struct drm_map_list {
498 struct list_head head; /**< list head */ 517 struct list_head head; /**< list head */
499 struct drm_hash_item hash; 518 struct drm_hash_item hash;
500 struct drm_map *map; /**< mapping */ 519 struct drm_map *map; /**< mapping */
501 unsigned int user_token; 520 uint64_t user_token;
502}; 521};
503 522
504typedef struct drm_map drm_local_map_t; 523typedef struct drm_map drm_local_map_t;
@@ -536,24 +555,6 @@ struct drm_ati_pcigart_info {
536 int table_size; 555 int table_size;
537}; 556};
538 557
539/*
540 * Generic memory manager structs
541 */
542struct drm_mm_node {
543 struct list_head fl_entry;
544 struct list_head ml_entry;
545 int free;
546 unsigned long start;
547 unsigned long size;
548 struct drm_mm *mm;
549 void *private;
550};
551
552struct drm_mm {
553 struct list_head fl_entry;
554 struct list_head ml_entry;
555};
556
557/** 558/**
558 * DRM driver structure. This structure represent the common code for 559 * DRM driver structure. This structure represent the common code for
559 * a family of cards. There will one drm_device for each card present 560 * a family of cards. There will one drm_device for each card present
@@ -750,7 +751,6 @@ struct drm_device {
750 struct pci_controller *hose; 751 struct pci_controller *hose;
751#endif 752#endif
752 struct drm_sg_mem *sg; /**< Scatter gather memory */ 753 struct drm_sg_mem *sg; /**< Scatter gather memory */
753 unsigned long *ctx_bitmap; /**< context bitmap */
754 void *dev_private; /**< device private data */ 754 void *dev_private; /**< device private data */
755 struct drm_sigdata sigdata; /**< For block_all_signals */ 755 struct drm_sigdata sigdata; /**< For block_all_signals */
756 sigset_t sigmask; 756 sigset_t sigmask;
@@ -1073,7 +1073,7 @@ extern void drm_sysfs_device_remove(struct class_device *class_dev);
1073extern struct drm_mm_node *drm_mm_get_block(struct drm_mm_node * parent, 1073extern struct drm_mm_node *drm_mm_get_block(struct drm_mm_node * parent,
1074 unsigned long size, 1074 unsigned long size,
1075 unsigned alignment); 1075 unsigned alignment);
1076void drm_mm_put_block(struct drm_mm_node * cur); 1076extern void drm_mm_put_block(struct drm_mm_node * cur);
1077extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, unsigned long size, 1077extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, unsigned long size,
1078 unsigned alignment, int best_match); 1078 unsigned alignment, int best_match);
1079extern int drm_mm_init(struct drm_mm *mm, unsigned long start, unsigned long size); 1079extern int drm_mm_init(struct drm_mm *mm, unsigned long start, unsigned long size);
diff --git a/drivers/char/drm/drm_proc.c b/drivers/char/drm/drm_proc.c
index 12dfea89c7f3..d9b560fe9bbe 100644
--- a/drivers/char/drm/drm_proc.c
+++ b/drivers/char/drm/drm_proc.c
@@ -236,11 +236,11 @@ static int drm__vm_info(char *buf, char **start, off_t offset, int request,
236 type = "??"; 236 type = "??";
237 else 237 else
238 type = types[map->type]; 238 type = types[map->type];
239 DRM_PROC_PRINT("%4d 0x%08lx 0x%08lx %4.4s 0x%02x 0x%08x ", 239 DRM_PROC_PRINT("%4d 0x%08lx 0x%08lx %4.4s 0x%02x 0x%08lx ",
240 i, 240 i,
241 map->offset, 241 map->offset,
242 map->size, type, map->flags, 242 map->size, type, map->flags,
243 r_list->user_token); 243 (unsigned long) r_list->user_token);
244 if (map->mtrr < 0) { 244 if (map->mtrr < 0) {
245 DRM_PROC_PRINT("none\n"); 245 DRM_PROC_PRINT("none\n");
246 } else { 246 } else {