aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drmP.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/drmP.h')
-rw-r--r--drivers/char/drm/drmP.h349
1 files changed, 170 insertions, 179 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index d494315752a2..1277693e9ca4 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -274,32 +274,23 @@ typedef struct drm_ioctl_desc {
274 int flags; 274 int flags;
275} drm_ioctl_desc_t; 275} drm_ioctl_desc_t;
276 276
277typedef struct drm_devstate { 277struct drm_magic_entry {
278 pid_t owner; /**< X server pid holding x_lock */
279} drm_devstate_t;
280
281typedef struct drm_magic_entry {
282 drm_hash_item_t hash_item;
283 struct list_head head; 278 struct list_head head;
279 struct drm_hash_item hash_item;
284 struct drm_file *priv; 280 struct drm_file *priv;
285 struct drm_magic_entry *next; 281 struct drm_magic_entry *next;
286} drm_magic_entry_t; 282};
287
288typedef struct drm_magic_head {
289 struct drm_magic_entry *head;
290 struct drm_magic_entry *tail;
291} drm_magic_head_t;
292 283
293typedef struct drm_vma_entry { 284struct drm_vma_entry {
285 struct list_head head;
294 struct vm_area_struct *vma; 286 struct vm_area_struct *vma;
295 struct drm_vma_entry *next;
296 pid_t pid; 287 pid_t pid;
297} drm_vma_entry_t; 288};
298 289
299/** 290/**
300 * DMA buffer. 291 * DMA buffer.
301 */ 292 */
302typedef struct drm_buf { 293struct drm_buf {
303 int idx; /**< Index into master buflist */ 294 int idx; /**< Index into master buflist */
304 int total; /**< Buffer size */ 295 int total; /**< Buffer size */
305 int order; /**< log-base-2(total) */ 296 int order; /**< log-base-2(total) */
@@ -325,30 +316,30 @@ typedef struct drm_buf {
325 316
326 int dev_priv_size; /**< Size of buffer private storage */ 317 int dev_priv_size; /**< Size of buffer private storage */
327 void *dev_private; /**< Per-buffer private storage */ 318 void *dev_private; /**< Per-buffer private storage */
328} drm_buf_t; 319};
329 320
330/** bufs is one longer than it has to be */ 321/** bufs is one longer than it has to be */
331typedef struct drm_waitlist { 322struct drm_waitlist {
332 int count; /**< Number of possible buffers */ 323 int count; /**< Number of possible buffers */
333 drm_buf_t **bufs; /**< List of pointers to buffers */ 324 struct drm_buf **bufs; /**< List of pointers to buffers */
334 drm_buf_t **rp; /**< Read pointer */ 325 struct drm_buf **rp; /**< Read pointer */
335 drm_buf_t **wp; /**< Write pointer */ 326 struct drm_buf **wp; /**< Write pointer */
336 drm_buf_t **end; /**< End pointer */ 327 struct drm_buf **end; /**< End pointer */
337 spinlock_t read_lock; 328 spinlock_t read_lock;
338 spinlock_t write_lock; 329 spinlock_t write_lock;
339} drm_waitlist_t; 330};
340 331
341typedef struct drm_freelist { 332struct drm_freelist {
342 int initialized; /**< Freelist in use */ 333 int initialized; /**< Freelist in use */
343 atomic_t count; /**< Number of free buffers */ 334 atomic_t count; /**< Number of free buffers */
344 drm_buf_t *next; /**< End pointer */ 335 struct drm_buf *next; /**< End pointer */
345 336
346 wait_queue_head_t waiting; /**< Processes waiting on free bufs */ 337 wait_queue_head_t waiting; /**< Processes waiting on free bufs */
347 int low_mark; /**< Low water mark */ 338 int low_mark; /**< Low water mark */
348 int high_mark; /**< High water mark */ 339 int high_mark; /**< High water mark */
349 atomic_t wfh; /**< If waiting for high mark */ 340 atomic_t wfh; /**< If waiting for high mark */
350 spinlock_t lock; 341 spinlock_t lock;
351} drm_freelist_t; 342};
352 343
353typedef struct drm_dma_handle { 344typedef struct drm_dma_handle {
354 dma_addr_t busaddr; 345 dma_addr_t busaddr;
@@ -359,19 +350,19 @@ typedef struct drm_dma_handle {
359/** 350/**
360 * Buffer entry. There is one of this for each buffer size order. 351 * Buffer entry. There is one of this for each buffer size order.
361 */ 352 */
362typedef struct drm_buf_entry { 353struct drm_buf_entry {
363 int buf_size; /**< size */ 354 int buf_size; /**< size */
364 int buf_count; /**< number of buffers */ 355 int buf_count; /**< number of buffers */
365 drm_buf_t *buflist; /**< buffer list */ 356 struct drm_buf *buflist; /**< buffer list */
366 int seg_count; 357 int seg_count;
367 int page_order; 358 int page_order;
368 drm_dma_handle_t **seglist; 359 struct drm_dma_handle **seglist;
369 360
370 drm_freelist_t freelist; 361 struct drm_freelist freelist;
371} drm_buf_entry_t; 362};
372 363
373/** File private data */ 364/** File private data */
374typedef struct drm_file { 365struct drm_file {
375 int authenticated; 366 int authenticated;
376 int master; 367 int master;
377 int minor; 368 int minor;
@@ -379,16 +370,15 @@ typedef struct drm_file {
379 uid_t uid; 370 uid_t uid;
380 drm_magic_t magic; 371 drm_magic_t magic;
381 unsigned long ioctl_count; 372 unsigned long ioctl_count;
382 struct drm_file *next; 373 struct list_head lhead;
383 struct drm_file *prev;
384 struct drm_head *head; 374 struct drm_head *head;
385 int remove_auth_on_close; 375 int remove_auth_on_close;
386 unsigned long lock_count; 376 unsigned long lock_count;
387 void *driver_priv; 377 void *driver_priv;
388} drm_file_t; 378};
389 379
390/** Wait queue */ 380/** Wait queue */
391typedef struct drm_queue { 381struct drm_queue {
392 atomic_t use_count; /**< Outstanding uses (+1) */ 382 atomic_t use_count; /**< Outstanding uses (+1) */
393 atomic_t finalization; /**< Finalization in progress */ 383 atomic_t finalization; /**< Finalization in progress */
394 atomic_t block_count; /**< Count of processes waiting */ 384 atomic_t block_count; /**< Count of processes waiting */
@@ -401,16 +391,16 @@ typedef struct drm_queue {
401 atomic_t total_flushed; /**< Total flushes statistic */ 391 atomic_t total_flushed; /**< Total flushes statistic */
402 atomic_t total_locks; /**< Total locks statistics */ 392 atomic_t total_locks; /**< Total locks statistics */
403#endif 393#endif
404 drm_ctx_flags_t flags; /**< Context preserving and 2D-only */ 394 enum drm_ctx_flags flags; /**< Context preserving and 2D-only */
405 drm_waitlist_t waitlist; /**< Pending buffers */ 395 struct drm_waitlist waitlist; /**< Pending buffers */
406 wait_queue_head_t flush_queue; /**< Processes waiting until flush */ 396 wait_queue_head_t flush_queue; /**< Processes waiting until flush */
407} drm_queue_t; 397};
408 398
409/** 399/**
410 * Lock data. 400 * Lock data.
411 */ 401 */
412typedef struct drm_lock_data { 402struct drm_lock_data {
413 drm_hw_lock_t *hw_lock; /**< Hardware lock */ 403 struct drm_hw_lock *hw_lock; /**< Hardware lock */
414 struct file *filp; /**< File descr of lock holder (0=kernel) */ 404 struct file *filp; /**< File descr of lock holder (0=kernel) */
415 wait_queue_head_t lock_queue; /**< Queue of blocked processes */ 405 wait_queue_head_t lock_queue; /**< Queue of blocked processes */
416 unsigned long lock_time; /**< Time of last lock in jiffies */ 406 unsigned long lock_time; /**< Time of last lock in jiffies */
@@ -418,16 +408,16 @@ typedef struct drm_lock_data {
418 uint32_t kernel_waiters; 408 uint32_t kernel_waiters;
419 uint32_t user_waiters; 409 uint32_t user_waiters;
420 int idle_has_lock; 410 int idle_has_lock;
421} drm_lock_data_t; 411};
422 412
423/** 413/**
424 * DMA data. 414 * DMA data.
425 */ 415 */
426typedef struct drm_device_dma { 416struct drm_device_dma {
427 417
428 drm_buf_entry_t bufs[DRM_MAX_ORDER + 1]; /**< buffers, grouped by their size order */ 418 struct drm_buf_entry bufs[DRM_MAX_ORDER + 1]; /**< buffers, grouped by their size order */
429 int buf_count; /**< total number of buffers */ 419 int buf_count; /**< total number of buffers */
430 drm_buf_t **buflist; /**< Vector of pointers into drm_device_dma::bufs */ 420 struct drm_buf **buflist; /**< Vector of pointers into drm_device_dma::bufs */
431 int seg_count; 421 int seg_count;
432 int page_count; /**< number of pages */ 422 int page_count; /**< number of pages */
433 unsigned long *pagelist; /**< page list */ 423 unsigned long *pagelist; /**< page list */
@@ -439,28 +429,27 @@ typedef struct drm_device_dma {
439 _DRM_DMA_USE_PCI_RO = 0x08 429 _DRM_DMA_USE_PCI_RO = 0x08
440 } flags; 430 } flags;
441 431
442} drm_device_dma_t; 432};
443 433
444/** 434/**
445 * AGP memory entry. Stored as a doubly linked list. 435 * AGP memory entry. Stored as a doubly linked list.
446 */ 436 */
447typedef struct drm_agp_mem { 437struct drm_agp_mem {
448 unsigned long handle; /**< handle */ 438 unsigned long handle; /**< handle */
449 DRM_AGP_MEM *memory; 439 DRM_AGP_MEM *memory;
450 unsigned long bound; /**< address */ 440 unsigned long bound; /**< address */
451 int pages; 441 int pages;
452 struct drm_agp_mem *prev; /**< previous entry */ 442 struct list_head head;
453 struct drm_agp_mem *next; /**< next entry */ 443};
454} drm_agp_mem_t;
455 444
456/** 445/**
457 * AGP data. 446 * AGP data.
458 * 447 *
459 * \sa drm_agp_init() and drm_device::agp. 448 * \sa drm_agp_init() and drm_device::agp.
460 */ 449 */
461typedef struct drm_agp_head { 450struct drm_agp_head {
462 DRM_AGP_KERN agp_info; /**< AGP device information */ 451 DRM_AGP_KERN agp_info; /**< AGP device information */
463 drm_agp_mem_t *memory; /**< memory entries */ 452 struct list_head memory;
464 unsigned long mode; /**< AGP mode */ 453 unsigned long mode; /**< AGP mode */
465 struct agp_bridge_data *bridge; 454 struct agp_bridge_data *bridge;
466 int enabled; /**< whether the AGP bus as been enabled */ 455 int enabled; /**< whether the AGP bus as been enabled */
@@ -469,51 +458,51 @@ typedef struct drm_agp_head {
469 int agp_mtrr; 458 int agp_mtrr;
470 int cant_use_aperture; 459 int cant_use_aperture;
471 unsigned long page_mask; 460 unsigned long page_mask;
472} drm_agp_head_t; 461};
473 462
474/** 463/**
475 * Scatter-gather memory. 464 * Scatter-gather memory.
476 */ 465 */
477typedef struct drm_sg_mem { 466struct drm_sg_mem {
478 unsigned long handle; 467 unsigned long handle;
479 void *virtual; 468 void *virtual;
480 int pages; 469 int pages;
481 struct page **pagelist; 470 struct page **pagelist;
482 dma_addr_t *busaddr; 471 dma_addr_t *busaddr;
483} drm_sg_mem_t; 472};
484 473
485typedef struct drm_sigdata { 474struct drm_sigdata {
486 int context; 475 int context;
487 drm_hw_lock_t *lock; 476 struct drm_hw_lock *lock;
488} drm_sigdata_t; 477};
489 478
490/** 479/**
491 * Mappings list 480 * Mappings list
492 */ 481 */
493typedef struct drm_map_list { 482struct drm_map_list {
494 struct list_head head; /**< list head */ 483 struct list_head head; /**< list head */
495 drm_hash_item_t hash; 484 struct drm_hash_item hash;
496 drm_map_t *map; /**< mapping */ 485 struct drm_map *map; /**< mapping */
497 unsigned int user_token; 486 unsigned int user_token;
498} drm_map_list_t; 487};
499 488
500typedef drm_map_t drm_local_map_t; 489typedef struct drm_map drm_local_map_t;
501 490
502/** 491/**
503 * Context handle list 492 * Context handle list
504 */ 493 */
505typedef struct drm_ctx_list { 494struct drm_ctx_list {
506 struct list_head head; /**< list head */ 495 struct list_head head; /**< list head */
507 drm_context_t handle; /**< context handle */ 496 drm_context_t handle; /**< context handle */
508 drm_file_t *tag; /**< associated fd private data */ 497 struct drm_file *tag; /**< associated fd private data */
509} drm_ctx_list_t; 498};
510 499
511typedef struct drm_vbl_sig { 500struct drm_vbl_sig {
512 struct list_head head; 501 struct list_head head;
513 unsigned int sequence; 502 unsigned int sequence;
514 struct siginfo info; 503 struct siginfo info;
515 struct task_struct *task; 504 struct task_struct *task;
516} drm_vbl_sig_t; 505};
517 506
518/* location of GART table */ 507/* location of GART table */
519#define DRM_ATI_GART_MAIN 1 508#define DRM_ATI_GART_MAIN 1
@@ -523,19 +512,19 @@ typedef struct drm_vbl_sig {
523#define DRM_ATI_GART_PCIE 2 512#define DRM_ATI_GART_PCIE 2
524#define DRM_ATI_GART_IGP 3 513#define DRM_ATI_GART_IGP 3
525 514
526typedef struct ati_pcigart_info { 515struct drm_ati_pcigart_info {
527 int gart_table_location; 516 int gart_table_location;
528 int gart_reg_if; 517 int gart_reg_if;
529 void *addr; 518 void *addr;
530 dma_addr_t bus_addr; 519 dma_addr_t bus_addr;
531 drm_local_map_t mapping; 520 drm_local_map_t mapping;
532 int table_size; 521 int table_size;
533} drm_ati_pcigart_info; 522};
534 523
535/* 524/*
536 * Generic memory manager structs 525 * Generic memory manager structs
537 */ 526 */
538typedef struct drm_mm_node { 527struct drm_mm_node {
539 struct list_head fl_entry; 528 struct list_head fl_entry;
540 struct list_head ml_entry; 529 struct list_head ml_entry;
541 int free; 530 int free;
@@ -543,12 +532,12 @@ typedef struct drm_mm_node {
543 unsigned long size; 532 unsigned long size;
544 struct drm_mm *mm; 533 struct drm_mm *mm;
545 void *private; 534 void *private;
546} drm_mm_node_t; 535};
547 536
548typedef struct drm_mm { 537struct drm_mm {
549 struct list_head fl_entry; 538 struct list_head fl_entry;
550 struct list_head ml_entry; 539 struct list_head ml_entry;
551} drm_mm_t; 540};
552 541
553/** 542/**
554 * DRM driver structure. This structure represent the common code for 543 * DRM driver structure. This structure represent the common code for
@@ -560,21 +549,21 @@ struct drm_device;
560struct drm_driver { 549struct drm_driver {
561 int (*load) (struct drm_device *, unsigned long flags); 550 int (*load) (struct drm_device *, unsigned long flags);
562 int (*firstopen) (struct drm_device *); 551 int (*firstopen) (struct drm_device *);
563 int (*open) (struct drm_device *, drm_file_t *); 552 int (*open) (struct drm_device *, struct drm_file *);
564 void (*preclose) (struct drm_device *, struct file * filp); 553 void (*preclose) (struct drm_device *, struct file * filp);
565 void (*postclose) (struct drm_device *, drm_file_t *); 554 void (*postclose) (struct drm_device *, struct drm_file *);
566 void (*lastclose) (struct drm_device *); 555 void (*lastclose) (struct drm_device *);
567 int (*unload) (struct drm_device *); 556 int (*unload) (struct drm_device *);
568 int (*dma_ioctl) (DRM_IOCTL_ARGS); 557 int (*dma_ioctl) (DRM_IOCTL_ARGS);
569 void (*dma_ready) (struct drm_device *); 558 void (*dma_ready) (struct drm_device *);
570 int (*dma_quiescent) (struct drm_device *); 559 int (*dma_quiescent) (struct drm_device *);
571 int (*context_ctor) (struct drm_device * dev, int context); 560 int (*context_ctor) (struct drm_device *dev, int context);
572 int (*context_dtor) (struct drm_device * dev, int context); 561 int (*context_dtor) (struct drm_device *dev, int context);
573 int (*kernel_context_switch) (struct drm_device * dev, int old, 562 int (*kernel_context_switch) (struct drm_device *dev, int old,
574 int new); 563 int new);
575 void (*kernel_context_switch_unlock) (struct drm_device * dev); 564 void (*kernel_context_switch_unlock) (struct drm_device *dev);
576 int (*vblank_wait) (struct drm_device * dev, unsigned int *sequence); 565 int (*vblank_wait) (struct drm_device *dev, unsigned int *sequence);
577 int (*vblank_wait2) (struct drm_device * dev, unsigned int *sequence); 566 int (*vblank_wait2) (struct drm_device *dev, unsigned int *sequence);
578 int (*dri_library_name) (struct drm_device *dev, char *buf); 567 int (*dri_library_name) (struct drm_device *dev, char *buf);
579 568
580 /** 569 /**
@@ -588,22 +577,23 @@ struct drm_driver {
588 * card is absolutely \b not AGP (return of 0), absolutely \b is AGP 577 * card is absolutely \b not AGP (return of 0), absolutely \b is AGP
589 * (return of 1), or may or may not be AGP (return of 2). 578 * (return of 1), or may or may not be AGP (return of 2).
590 */ 579 */
591 int (*device_is_agp) (struct drm_device * dev); 580 int (*device_is_agp) (struct drm_device *dev);
592 581
593 /* these have to be filled in */ 582 /* these have to be filled in */
594 583
595 irqreturn_t(*irq_handler) (DRM_IRQ_ARGS); 584 irqreturn_t(*irq_handler) (DRM_IRQ_ARGS);
596 void (*irq_preinstall) (struct drm_device * dev); 585 void (*irq_preinstall) (struct drm_device *dev);
597 void (*irq_postinstall) (struct drm_device * dev); 586 void (*irq_postinstall) (struct drm_device *dev);
598 void (*irq_uninstall) (struct drm_device * dev); 587 void (*irq_uninstall) (struct drm_device *dev);
599 void (*reclaim_buffers) (struct drm_device * dev, struct file * filp); 588 void (*reclaim_buffers) (struct drm_device *dev, struct file * filp);
600 void (*reclaim_buffers_locked) (struct drm_device *dev, 589 void (*reclaim_buffers_locked) (struct drm_device *dev,
601 struct file *filp); 590 struct file *filp);
602 void (*reclaim_buffers_idlelocked) (struct drm_device *dev, 591 void (*reclaim_buffers_idlelocked) (struct drm_device *dev,
603 struct file * filp); 592 struct file * filp);
604 unsigned long (*get_map_ofs) (drm_map_t * map); 593 unsigned long (*get_map_ofs) (struct drm_map * map);
605 unsigned long (*get_reg_ofs) (struct drm_device * dev); 594 unsigned long (*get_reg_ofs) (struct drm_device *dev);
606 void (*set_version) (struct drm_device * dev, drm_set_version_t * sv); 595 void (*set_version) (struct drm_device *dev,
596 struct drm_set_version *sv);
607 597
608 int major; 598 int major;
609 int minor; 599 int minor;
@@ -625,19 +615,19 @@ struct drm_driver {
625 * that may contain multiple heads. Embed one per head of these in the 615 * that may contain multiple heads. Embed one per head of these in the
626 * private drm_device structure. 616 * private drm_device structure.
627 */ 617 */
628typedef struct drm_head { 618struct drm_head {
629 int minor; /**< Minor device number */ 619 int minor; /**< Minor device number */
630 struct drm_device *dev; 620 struct drm_device *dev;
631 struct proc_dir_entry *dev_root; /**< proc directory entry */ 621 struct proc_dir_entry *dev_root; /**< proc directory entry */
632 dev_t device; /**< Device number for mknod */ 622 dev_t device; /**< Device number for mknod */
633 struct class_device *dev_class; 623 struct class_device *dev_class;
634} drm_head_t; 624};
635 625
636/** 626/**
637 * DRM device structure. This structure represent a complete card that 627 * DRM device structure. This structure represent a complete card that
638 * may contain multiple heads. 628 * may contain multiple heads.
639 */ 629 */
640typedef struct drm_device { 630struct drm_device {
641 char *unique; /**< Unique identifier: e.g., busid */ 631 char *unique; /**< Unique identifier: e.g., busid */
642 int unique_len; /**< Length of unique field */ 632 int unique_len; /**< Length of unique field */
643 char *devname; /**< For /proc/interrupts */ 633 char *devname; /**< For /proc/interrupts */
@@ -663,35 +653,34 @@ typedef struct drm_device {
663 /** \name Performance counters */ 653 /** \name Performance counters */
664 /*@{ */ 654 /*@{ */
665 unsigned long counters; 655 unsigned long counters;
666 drm_stat_type_t types[15]; 656 enum drm_stat_type types[15];
667 atomic_t counts[15]; 657 atomic_t counts[15];
668 /*@} */ 658 /*@} */
669 659
670 /** \name Authentication */ 660 /** \name Authentication */
671 /*@{ */ 661 /*@{ */
672 drm_file_t *file_first; /**< file list head */ 662 struct list_head filelist;
673 drm_file_t *file_last; /**< file list tail */ 663 struct drm_open_hash magiclist; /**< magic hash table */
674 drm_open_hash_t magiclist; /**< magic hash table */
675 struct list_head magicfree; 664 struct list_head magicfree;
676 /*@} */ 665 /*@} */
677 666
678 /** \name Memory management */ 667 /** \name Memory management */
679 /*@{ */ 668 /*@{ */
680 drm_map_list_t *maplist; /**< Linked list of regions */ 669 struct list_head maplist; /**< Linked list of regions */
681 int map_count; /**< Number of mappable regions */ 670 int map_count; /**< Number of mappable regions */
682 drm_open_hash_t map_hash; /**< User token hash table for maps */ 671 struct drm_open_hash map_hash; /**< User token hash table for maps */
683 672
684 /** \name Context handle management */ 673 /** \name Context handle management */
685 /*@{ */ 674 /*@{ */
686 drm_ctx_list_t *ctxlist; /**< Linked list of context handles */ 675 struct list_head ctxlist; /**< Linked list of context handles */
687 int ctx_count; /**< Number of context handles */ 676 int ctx_count; /**< Number of context handles */
688 struct mutex ctxlist_mutex; /**< For ctxlist */ 677 struct mutex ctxlist_mutex; /**< For ctxlist */
689 678
690 drm_map_t **context_sareas; /**< per-context SAREA's */ 679 struct drm_map **context_sareas; /**< per-context SAREA's */
691 int max_context; 680 int max_context;
692 681
693 drm_vma_entry_t *vmalist; /**< List of vmas (for debugging) */ 682 struct list_head vmalist; /**< List of vmas (for debugging) */
694 drm_lock_data_t lock; /**< Information on hardware lock */ 683 struct drm_lock_data lock; /**< Information on hardware lock */
695 /*@} */ 684 /*@} */
696 685
697 /** \name DMA queues (contexts) */ 686 /** \name DMA queues (contexts) */
@@ -699,8 +688,8 @@ typedef struct drm_device {
699 int queue_count; /**< Number of active DMA queues */ 688 int queue_count; /**< Number of active DMA queues */
700 int queue_reserved; /**< Number of reserved DMA queues */ 689 int queue_reserved; /**< Number of reserved DMA queues */
701 int queue_slots; /**< Actual length of queuelist */ 690 int queue_slots; /**< Actual length of queuelist */
702 drm_queue_t **queuelist; /**< Vector of pointers to DMA queues */ 691 struct drm_queue **queuelist; /**< Vector of pointers to DMA queues */
703 drm_device_dma_t *dma; /**< Optional pointer for DMA support */ 692 struct drm_device_dma *dma; /**< Optional pointer for DMA support */
704 /*@} */ 693 /*@} */
705 694
706 /** \name Context support */ 695 /** \name Context support */
@@ -725,8 +714,8 @@ typedef struct drm_device {
725 atomic_t vbl_received; 714 atomic_t vbl_received;
726 atomic_t vbl_received2; /**< number of secondary VBLANK interrupts */ 715 atomic_t vbl_received2; /**< number of secondary VBLANK interrupts */
727 spinlock_t vbl_lock; 716 spinlock_t vbl_lock;
728 drm_vbl_sig_t vbl_sigs; /**< signal list to send on VBLANK */ 717 struct list_head vbl_sigs; /**< signal list to send on VBLANK */
729 drm_vbl_sig_t vbl_sigs2; /**< signals to send on secondary VBLANK */ 718 struct list_head vbl_sigs2; /**< signals to send on secondary VBLANK */
730 unsigned int vbl_pending; 719 unsigned int vbl_pending;
731 spinlock_t tasklet_lock; /**< For drm_locked_tasklet */ 720 spinlock_t tasklet_lock; /**< For drm_locked_tasklet */
732 void (*locked_tasklet_func)(struct drm_device *dev); 721 void (*locked_tasklet_func)(struct drm_device *dev);
@@ -739,7 +728,7 @@ typedef struct drm_device {
739 wait_queue_head_t buf_readers; /**< Processes waiting to read */ 728 wait_queue_head_t buf_readers; /**< Processes waiting to read */
740 wait_queue_head_t buf_writers; /**< Processes waiting to ctx switch */ 729 wait_queue_head_t buf_writers; /**< Processes waiting to ctx switch */
741 730
742 drm_agp_head_t *agp; /**< AGP data */ 731 struct drm_agp_head *agp; /**< AGP data */
743 732
744 struct pci_dev *pdev; /**< PCI device structure */ 733 struct pci_dev *pdev; /**< PCI device structure */
745 int pci_vendor; /**< PCI vendor id */ 734 int pci_vendor; /**< PCI vendor id */
@@ -747,16 +736,16 @@ typedef struct drm_device {
747#ifdef __alpha__ 736#ifdef __alpha__
748 struct pci_controller *hose; 737 struct pci_controller *hose;
749#endif 738#endif
750 drm_sg_mem_t *sg; /**< Scatter gather memory */ 739 struct drm_sg_mem *sg; /**< Scatter gather memory */
751 unsigned long *ctx_bitmap; /**< context bitmap */ 740 unsigned long *ctx_bitmap; /**< context bitmap */
752 void *dev_private; /**< device private data */ 741 void *dev_private; /**< device private data */
753 drm_sigdata_t sigdata; /**< For block_all_signals */ 742 struct drm_sigdata sigdata; /**< For block_all_signals */
754 sigset_t sigmask; 743 sigset_t sigmask;
755 744
756 struct drm_driver *driver; 745 struct drm_driver *driver;
757 drm_local_map_t *agp_buffer_map; 746 drm_local_map_t *agp_buffer_map;
758 unsigned int agp_buffer_token; 747 unsigned int agp_buffer_token;
759 drm_head_t primary; /**< primary screen head */ 748 struct drm_head primary; /**< primary screen head */
760 749
761 /** \name Drawable information */ 750 /** \name Drawable information */
762 /*@{ */ 751 /*@{ */
@@ -764,9 +753,9 @@ typedef struct drm_device {
764 unsigned int drw_bitfield_length; 753 unsigned int drw_bitfield_length;
765 u32 *drw_bitfield; 754 u32 *drw_bitfield;
766 unsigned int drw_info_length; 755 unsigned int drw_info_length;
767 drm_drawable_info_t **drw_info; 756 struct drm_drawable_info **drw_info;
768 /*@} */ 757 /*@} */
769} drm_device_t; 758};
770 759
771static __inline__ int drm_core_check_feature(struct drm_device *dev, 760static __inline__ int drm_core_check_feature(struct drm_device *dev,
772 int feature) 761 int feature)
@@ -838,7 +827,7 @@ extern int drm_ioctl(struct inode *inode, struct file *filp,
838 unsigned int cmd, unsigned long arg); 827 unsigned int cmd, unsigned long arg);
839extern long drm_compat_ioctl(struct file *filp, 828extern long drm_compat_ioctl(struct file *filp,
840 unsigned int cmd, unsigned long arg); 829 unsigned int cmd, unsigned long arg);
841extern int drm_lastclose(drm_device_t *dev); 830extern int drm_lastclose(struct drm_device *dev);
842 831
843 /* Device support (drm_fops.h) */ 832 /* Device support (drm_fops.h) */
844extern int drm_open(struct inode *inode, struct file *filp); 833extern int drm_open(struct inode *inode, struct file *filp);
@@ -857,7 +846,7 @@ extern int drm_mem_info(char *buf, char **start, off_t offset,
857 int request, int *eof, void *data); 846 int request, int *eof, void *data);
858extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area); 847extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area);
859 848
860extern DRM_AGP_MEM *drm_alloc_agp(drm_device_t * dev, int pages, u32 type); 849extern DRM_AGP_MEM *drm_alloc_agp(struct drm_device *dev, int pages, u32 type);
861extern int drm_free_agp(DRM_AGP_MEM * handle, int pages); 850extern int drm_free_agp(DRM_AGP_MEM * handle, int pages);
862extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); 851extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start);
863extern int drm_unbind_agp(DRM_AGP_MEM * handle); 852extern int drm_unbind_agp(DRM_AGP_MEM * handle);
@@ -896,9 +885,9 @@ extern int drm_newctx(struct inode *inode, struct file *filp,
896extern int drm_rmctx(struct inode *inode, struct file *filp, 885extern int drm_rmctx(struct inode *inode, struct file *filp,
897 unsigned int cmd, unsigned long arg); 886 unsigned int cmd, unsigned long arg);
898 887
899extern int drm_ctxbitmap_init(drm_device_t * dev); 888extern int drm_ctxbitmap_init(struct drm_device *dev);
900extern void drm_ctxbitmap_cleanup(drm_device_t * dev); 889extern void drm_ctxbitmap_cleanup(struct drm_device *dev);
901extern void drm_ctxbitmap_free(drm_device_t * dev, int ctx_handle); 890extern void drm_ctxbitmap_free(struct drm_device *dev, int ctx_handle);
902 891
903extern int drm_setsareactx(struct inode *inode, struct file *filp, 892extern int drm_setsareactx(struct inode *inode, struct file *filp,
904 unsigned int cmd, unsigned long arg); 893 unsigned int cmd, unsigned long arg);
@@ -912,7 +901,7 @@ extern int drm_rmdraw(struct inode *inode, struct file *filp,
912 unsigned int cmd, unsigned long arg); 901 unsigned int cmd, unsigned long arg);
913extern int drm_update_drawable_info(struct inode *inode, struct file *filp, 902extern int drm_update_drawable_info(struct inode *inode, struct file *filp,
914 unsigned int cmd, unsigned long arg); 903 unsigned int cmd, unsigned long arg);
915extern drm_drawable_info_t *drm_get_drawable_info(drm_device_t *dev, 904extern struct drm_drawable_info *drm_get_drawable_info(struct drm_device *dev,
916 drm_drawable_t id); 905 drm_drawable_t id);
917 906
918 /* Authentication IOCTL support (drm_auth.h) */ 907 /* Authentication IOCTL support (drm_auth.h) */
@@ -926,10 +915,10 @@ extern int drm_lock(struct inode *inode, struct file *filp,
926 unsigned int cmd, unsigned long arg); 915 unsigned int cmd, unsigned long arg);
927extern int drm_unlock(struct inode *inode, struct file *filp, 916extern int drm_unlock(struct inode *inode, struct file *filp,
928 unsigned int cmd, unsigned long arg); 917 unsigned int cmd, unsigned long arg);
929extern 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);
930extern 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);
931extern void drm_idlelock_take(drm_lock_data_t *lock_data); 920extern void drm_idlelock_take(struct drm_lock_data *lock_data);
932extern void drm_idlelock_release(drm_lock_data_t *lock_data); 921extern void drm_idlelock_release(struct drm_lock_data *lock_data);
933 922
934/* 923/*
935 * 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
@@ -940,15 +929,15 @@ extern int drm_i_have_hw_lock(struct file *filp);
940extern int drm_kernel_take_hw_lock(struct file *filp); 929extern int drm_kernel_take_hw_lock(struct file *filp);
941 930
942 /* Buffer management support (drm_bufs.h) */ 931 /* Buffer management support (drm_bufs.h) */
943extern int drm_addbufs_agp(drm_device_t * dev, drm_buf_desc_t * request); 932extern int drm_addbufs_agp(struct drm_device *dev, struct drm_buf_desc * request);
944extern int drm_addbufs_pci(drm_device_t * dev, drm_buf_desc_t * request); 933extern int drm_addbufs_pci(struct drm_device *dev, struct drm_buf_desc * request);
945extern int drm_addmap(drm_device_t * dev, unsigned int offset, 934extern int drm_addmap(struct drm_device *dev, unsigned int offset,
946 unsigned int size, drm_map_type_t type, 935 unsigned int size, enum drm_map_type type,
947 drm_map_flags_t flags, drm_local_map_t ** map_ptr); 936 enum drm_map_flags flags, drm_local_map_t ** map_ptr);
948extern int drm_addmap_ioctl(struct inode *inode, struct file *filp, 937extern int drm_addmap_ioctl(struct inode *inode, struct file *filp,
949 unsigned int cmd, unsigned long arg); 938 unsigned int cmd, unsigned long arg);
950extern int drm_rmmap(drm_device_t * dev, drm_local_map_t * map); 939extern int drm_rmmap(struct drm_device *dev, drm_local_map_t * map);
951extern int drm_rmmap_locked(drm_device_t * dev, drm_local_map_t * map); 940extern int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t * map);
952extern int drm_rmmap_ioctl(struct inode *inode, struct file *filp, 941extern int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
953 unsigned int cmd, unsigned long arg); 942 unsigned int cmd, unsigned long arg);
954 943
@@ -963,56 +952,56 @@ extern int drm_freebufs(struct inode *inode, struct file *filp,
963 unsigned int cmd, unsigned long arg); 952 unsigned int cmd, unsigned long arg);
964extern int drm_mapbufs(struct inode *inode, struct file *filp, 953extern int drm_mapbufs(struct inode *inode, struct file *filp,
965 unsigned int cmd, unsigned long arg); 954 unsigned int cmd, unsigned long arg);
966extern unsigned long drm_get_resource_start(drm_device_t * dev, 955extern unsigned long drm_get_resource_start(struct drm_device *dev,
967 unsigned int resource); 956 unsigned int resource);
968extern unsigned long drm_get_resource_len(drm_device_t * dev, 957extern unsigned long drm_get_resource_len(struct drm_device *dev,
969 unsigned int resource); 958 unsigned int resource);
970 959
971 /* DMA support (drm_dma.h) */ 960 /* DMA support (drm_dma.h) */
972extern int drm_dma_setup(drm_device_t * dev); 961extern int drm_dma_setup(struct drm_device *dev);
973extern void drm_dma_takedown(drm_device_t * dev); 962extern void drm_dma_takedown(struct drm_device *dev);
974extern void drm_free_buffer(drm_device_t * dev, drm_buf_t * buf); 963extern void drm_free_buffer(struct drm_device *dev, struct drm_buf * buf);
975extern void drm_core_reclaim_buffers(drm_device_t * dev, struct file *filp); 964extern void drm_core_reclaim_buffers(struct drm_device *dev, struct file *filp);
976 965
977 /* IRQ support (drm_irq.h) */ 966 /* IRQ support (drm_irq.h) */
978extern int drm_control(struct inode *inode, struct file *filp, 967extern int drm_control(struct inode *inode, struct file *filp,
979 unsigned int cmd, unsigned long arg); 968 unsigned int cmd, unsigned long arg);
980extern irqreturn_t drm_irq_handler(DRM_IRQ_ARGS); 969extern irqreturn_t drm_irq_handler(DRM_IRQ_ARGS);
981extern int drm_irq_uninstall(drm_device_t * dev); 970extern int drm_irq_uninstall(struct drm_device *dev);
982extern void drm_driver_irq_preinstall(drm_device_t * dev); 971extern void drm_driver_irq_preinstall(struct drm_device *dev);
983extern void drm_driver_irq_postinstall(drm_device_t * dev); 972extern void drm_driver_irq_postinstall(struct drm_device *dev);
984extern void drm_driver_irq_uninstall(drm_device_t * dev); 973extern void drm_driver_irq_uninstall(struct drm_device *dev);
985 974
986extern int drm_wait_vblank(struct inode *inode, struct file *filp, 975extern int drm_wait_vblank(struct inode *inode, struct file *filp,
987 unsigned int cmd, unsigned long arg); 976 unsigned int cmd, unsigned long arg);
988extern int drm_vblank_wait(drm_device_t * dev, unsigned int *vbl_seq); 977extern int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq);
989extern void drm_vbl_send_signals(drm_device_t * dev); 978extern void drm_vbl_send_signals(struct drm_device *dev);
990extern void drm_locked_tasklet(drm_device_t *dev, void(*func)(drm_device_t*)); 979extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_device*));
991 980
992 /* AGP/GART support (drm_agpsupport.h) */ 981 /* AGP/GART support (drm_agpsupport.h) */
993extern drm_agp_head_t *drm_agp_init(drm_device_t * dev); 982extern struct drm_agp_head *drm_agp_init(struct drm_device *dev);
994extern int drm_agp_acquire(drm_device_t * dev); 983extern int drm_agp_acquire(struct drm_device *dev);
995extern int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp, 984extern int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp,
996 unsigned int cmd, unsigned long arg); 985 unsigned int cmd, unsigned long arg);
997extern int drm_agp_release(drm_device_t * dev); 986extern int drm_agp_release(struct drm_device *dev);
998extern int drm_agp_release_ioctl(struct inode *inode, struct file *filp, 987extern int drm_agp_release_ioctl(struct inode *inode, struct file *filp,
999 unsigned int cmd, unsigned long arg); 988 unsigned int cmd, unsigned long arg);
1000extern int drm_agp_enable(drm_device_t * dev, drm_agp_mode_t mode); 989extern int drm_agp_enable(struct drm_device *dev, struct drm_agp_mode mode);
1001extern int drm_agp_enable_ioctl(struct inode *inode, struct file *filp, 990extern int drm_agp_enable_ioctl(struct inode *inode, struct file *filp,
1002 unsigned int cmd, unsigned long arg); 991 unsigned int cmd, unsigned long arg);
1003extern int drm_agp_info(drm_device_t * dev, drm_agp_info_t * info); 992extern int drm_agp_info(struct drm_device *dev, struct drm_agp_info * info);
1004extern int drm_agp_info_ioctl(struct inode *inode, struct file *filp, 993extern int drm_agp_info_ioctl(struct inode *inode, struct file *filp,
1005 unsigned int cmd, unsigned long arg); 994 unsigned int cmd, unsigned long arg);
1006extern int drm_agp_alloc(drm_device_t *dev, drm_agp_buffer_t *request); 995extern int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request);
1007extern int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp, 996extern int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
1008 unsigned int cmd, unsigned long arg); 997 unsigned int cmd, unsigned long arg);
1009extern int drm_agp_free(drm_device_t *dev, drm_agp_buffer_t *request); 998extern int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request);
1010extern int drm_agp_free_ioctl(struct inode *inode, struct file *filp, 999extern int drm_agp_free_ioctl(struct inode *inode, struct file *filp,
1011 unsigned int cmd, unsigned long arg); 1000 unsigned int cmd, unsigned long arg);
1012extern int drm_agp_unbind(drm_device_t *dev, drm_agp_binding_t *request); 1001extern int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request);
1013extern int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp, 1002extern int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp,
1014 unsigned int cmd, unsigned long arg); 1003 unsigned int cmd, unsigned long arg);
1015extern int drm_agp_bind(drm_device_t *dev, drm_agp_binding_t *request); 1004extern int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request);
1016extern int drm_agp_bind_ioctl(struct inode *inode, struct file *filp, 1005extern int drm_agp_bind_ioctl(struct inode *inode, struct file *filp,
1017 unsigned int cmd, unsigned long arg); 1006 unsigned int cmd, unsigned long arg);
1018extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, 1007extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge,
@@ -1024,16 +1013,18 @@ extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle);
1024 /* Stub support (drm_stub.h) */ 1013 /* Stub support (drm_stub.h) */
1025extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, 1014extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
1026 struct drm_driver *driver); 1015 struct drm_driver *driver);
1027extern int drm_put_dev(drm_device_t * dev); 1016extern int drm_put_dev(struct drm_device *dev);
1028extern int drm_put_head(drm_head_t * head); 1017extern int drm_put_head(struct drm_head *head);
1029extern unsigned int drm_debug; 1018extern unsigned int drm_debug;
1030extern unsigned int drm_cards_limit; 1019extern unsigned int drm_cards_limit;
1031extern drm_head_t **drm_heads; 1020extern struct drm_head **drm_heads;
1032extern struct class *drm_class; 1021extern struct class *drm_class;
1033extern struct proc_dir_entry *drm_proc_root; 1022extern struct proc_dir_entry *drm_proc_root;
1034 1023
1024extern drm_local_map_t *drm_getsarea(struct drm_device *dev);
1025
1035 /* Proc support (drm_proc.h) */ 1026 /* Proc support (drm_proc.h) */
1036extern int drm_proc_init(drm_device_t * dev, 1027extern int drm_proc_init(struct drm_device *dev,
1037 int minor, 1028 int minor,
1038 struct proc_dir_entry *root, 1029 struct proc_dir_entry *root,
1039 struct proc_dir_entry **dev_root); 1030 struct proc_dir_entry **dev_root);
@@ -1042,45 +1033,45 @@ extern int drm_proc_cleanup(int minor,
1042 struct proc_dir_entry *dev_root); 1033 struct proc_dir_entry *dev_root);
1043 1034
1044 /* Scatter Gather Support (drm_scatter.h) */ 1035 /* Scatter Gather Support (drm_scatter.h) */
1045extern void drm_sg_cleanup(drm_sg_mem_t * entry); 1036extern void drm_sg_cleanup(struct drm_sg_mem * entry);
1046extern int drm_sg_alloc(struct inode *inode, struct file *filp, 1037extern int drm_sg_alloc(struct inode *inode, struct file *filp,
1047 unsigned int cmd, unsigned long arg); 1038 unsigned int cmd, unsigned long arg);
1048extern int drm_sg_free(struct inode *inode, struct file *filp, 1039extern int drm_sg_free(struct inode *inode, struct file *filp,
1049 unsigned int cmd, unsigned long arg); 1040 unsigned int cmd, unsigned long arg);
1050 1041
1051 /* ATI PCIGART support (ati_pcigart.h) */ 1042 /* ATI PCIGART support (ati_pcigart.h) */
1052extern int drm_ati_pcigart_init(drm_device_t * dev, 1043extern int drm_ati_pcigart_init(struct drm_device *dev,
1053 drm_ati_pcigart_info * gart_info); 1044 struct drm_ati_pcigart_info * gart_info);
1054extern int drm_ati_pcigart_cleanup(drm_device_t * dev, 1045extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
1055 drm_ati_pcigart_info * gart_info); 1046 struct drm_ati_pcigart_info * gart_info);
1056 1047
1057extern drm_dma_handle_t *drm_pci_alloc(drm_device_t * dev, size_t size, 1048extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
1058 size_t align, dma_addr_t maxaddr); 1049 size_t align, dma_addr_t maxaddr);
1059extern void __drm_pci_free(drm_device_t * dev, drm_dma_handle_t * dmah); 1050extern void __drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
1060extern void drm_pci_free(drm_device_t * dev, drm_dma_handle_t * dmah); 1051extern void drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
1061 1052
1062 /* sysfs support (drm_sysfs.c) */ 1053 /* sysfs support (drm_sysfs.c) */
1063extern struct class *drm_sysfs_create(struct module *owner, char *name); 1054extern struct class *drm_sysfs_create(struct module *owner, char *name);
1064extern void drm_sysfs_destroy(struct class *cs); 1055extern void drm_sysfs_destroy(struct class *cs);
1065extern struct class_device *drm_sysfs_device_add(struct class *cs, 1056extern struct class_device *drm_sysfs_device_add(struct class *cs,
1066 drm_head_t *head); 1057 struct drm_head *head);
1067extern void drm_sysfs_device_remove(struct class_device *class_dev); 1058extern void drm_sysfs_device_remove(struct class_device *class_dev);
1068 1059
1069/* 1060/*
1070 * Basic memory manager support (drm_mm.c) 1061 * Basic memory manager support (drm_mm.c)
1071 */ 1062 */
1072extern 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,
1073 unsigned long size, 1064 unsigned long size,
1074 unsigned alignment); 1065 unsigned alignment);
1075void drm_mm_put_block(drm_mm_node_t * cur); 1066void drm_mm_put_block(struct drm_mm_node * cur);
1076extern 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,
1077 unsigned alignment, int best_match); 1068 unsigned alignment, int best_match);
1078extern 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);
1079extern void drm_mm_takedown(drm_mm_t *mm); 1070extern void drm_mm_takedown(struct drm_mm *mm);
1080extern int drm_mm_clean(drm_mm_t *mm); 1071extern int drm_mm_clean(struct drm_mm *mm);
1081extern unsigned long drm_mm_tail_space(drm_mm_t *mm); 1072extern unsigned long drm_mm_tail_space(struct drm_mm *mm);
1082extern 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);
1083extern 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);
1084 1075
1085extern 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);
1086extern 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);
@@ -1088,14 +1079,14 @@ extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev);
1088static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, 1079static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev,
1089 unsigned int token) 1080 unsigned int token)
1090{ 1081{
1091 drm_map_list_t *_entry; 1082 struct drm_map_list *_entry;
1092 list_for_each_entry(_entry, &dev->maplist->head, head) 1083 list_for_each_entry(_entry, &dev->maplist, head)
1093 if (_entry->user_token == token) 1084 if (_entry->user_token == token)
1094 return _entry->map; 1085 return _entry->map;
1095 return NULL; 1086 return NULL;
1096} 1087}
1097 1088
1098static __inline__ int drm_device_is_agp(drm_device_t * dev) 1089static __inline__ int drm_device_is_agp(struct drm_device *dev)
1099{ 1090{
1100 if (dev->driver->device_is_agp != NULL) { 1091 if (dev->driver->device_is_agp != NULL) {
1101 int err = (*dev->driver->device_is_agp) (dev); 1092 int err = (*dev->driver->device_is_agp) (dev);
@@ -1108,7 +1099,7 @@ static __inline__ int drm_device_is_agp(drm_device_t * dev)
1108 return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP); 1099 return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP);
1109} 1100}
1110 1101
1111static __inline__ int drm_device_is_pcie(drm_device_t * dev) 1102static __inline__ int drm_device_is_pcie(struct drm_device *dev)
1112{ 1103{
1113 return pci_find_capability(dev->pdev, PCI_CAP_ID_EXP); 1104 return pci_find_capability(dev->pdev, PCI_CAP_ID_EXP);
1114} 1105}
@@ -1143,7 +1134,7 @@ extern void *drm_calloc(size_t nmemb, size_t size, int area);
1143 1134
1144/*@}*/ 1135/*@}*/
1145 1136
1146extern unsigned long drm_core_get_map_ofs(drm_map_t * map); 1137extern unsigned long drm_core_get_map_ofs(struct drm_map * map);
1147extern unsigned long drm_core_get_reg_ofs(struct drm_device *dev); 1138extern unsigned long drm_core_get_reg_ofs(struct drm_device *dev);
1148 1139
1149#endif /* __KERNEL__ */ 1140#endif /* __KERNEL__ */