Rev 4393 | Rev 5056 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4393 | Rev 4559 | ||
---|---|---|---|
Line 57... | Line 57... | ||
57 | #include |
57 | #include |
Line 58... | Line 58... | ||
58 | 58 | ||
59 | #include |
59 | #include |
Line 60... | Line 60... | ||
60 | #include |
60 | #include |
61 | - | ||
62 | //#include |
61 | |
63 | //#include |
62 | #include |
64 | //#include |
63 | //#include |
65 | //#include |
64 | #include |
66 | #include |
65 | #include |
67 | #include |
66 | #include |
68 | #include |
67 | #include |
69 | //#include |
- | |
70 | //#include |
- | |
71 | //#include |
68 | //#include |
72 | //#include |
69 | //#include |
73 | #include |
70 | #include |
74 | //#include |
71 | //#include |
75 | //#include |
72 | //#include |
Line 107... | Line 104... | ||
107 | #include |
104 | #include |
108 | #include |
105 | #include |
Line 109... | Line 106... | ||
109 | 106 | ||
Line -... | Line 107... | ||
- | 107 | #define KHZ2PICOS(a) (1000000000UL/(a)) |
|
- | 108 | ||
- | 109 | /* Flags and return codes for get_vblank_timestamp() driver function. */ |
|
- | 110 | #define DRM_CALLED_FROM_VBLIRQ 1 |
|
- | 111 | #define DRM_VBLANKTIME_SCANOUTPOS_METHOD (1 << 0) |
|
- | 112 | #define DRM_VBLANKTIME_INVBL (1 << 1) |
|
110 | #define KHZ2PICOS(a) (1000000000UL/(a)) |
113 | |
111 | 114 | ||
112 | /* get_scanout_position() return flags */ |
115 | /* get_scanout_position() return flags */ |
113 | #define DRM_SCANOUTPOS_VALID (1 << 0) |
116 | #define DRM_SCANOUTPOS_VALID (1 << 0) |
Line 164... | Line 167... | ||
164 | /** \name DRM template customization defaults */ |
167 | /** \name DRM template customization defaults */ |
165 | /*@{*/ |
168 | /*@{*/ |
Line 166... | Line 169... | ||
166 | 169 | ||
167 | /* driver capabilities and requirements mask */ |
170 | /* driver capabilities and requirements mask */ |
168 | #define DRIVER_USE_AGP 0x1 |
- | |
169 | #define DRIVER_REQUIRE_AGP 0x2 |
171 | #define DRIVER_USE_AGP 0x1 |
170 | #define DRIVER_PCI_DMA 0x8 |
172 | #define DRIVER_PCI_DMA 0x8 |
171 | #define DRIVER_SG 0x10 |
173 | #define DRIVER_SG 0x10 |
172 | #define DRIVER_HAVE_DMA 0x20 |
174 | #define DRIVER_HAVE_DMA 0x20 |
173 | #define DRIVER_HAVE_IRQ 0x40 |
175 | #define DRIVER_HAVE_IRQ 0x40 |
Line 178... | Line 180... | ||
178 | #define DRIVER_RENDER 0x8000 |
180 | #define DRIVER_RENDER 0x8000 |
Line 179... | Line 181... | ||
179 | 181 | ||
180 | #define DRIVER_BUS_PCI 0x1 |
182 | #define DRIVER_BUS_PCI 0x1 |
181 | #define DRIVER_BUS_PLATFORM 0x2 |
183 | #define DRIVER_BUS_PLATFORM 0x2 |
- | 184 | #define DRIVER_BUS_USB 0x3 |
|
Line 182... | Line 185... | ||
182 | #define DRIVER_BUS_USB 0x3 |
185 | #define DRIVER_BUS_HOST1X 0x4 |
183 | 186 | ||
184 | /***********************************************************************/ |
187 | /***********************************************************************/ |
Line 185... | Line 188... | ||
185 | /** \name Begin the DRM... */ |
188 | /** \name Begin the DRM... */ |
186 | /*@{*/ |
189 | /*@{*/ |
Line 187... | Line 190... | ||
187 | 190 | ||
188 | #define DRM_DEBUG_CODE 0 /**< Include debugging code if > 1, then |
191 | #define DRM_DEBUG_CODE 2 /**< Include debugging code if > 1, then |
189 | also include looping detection. */ |
192 | also include looping detection. */ |
190 | - | ||
191 | #define DRM_MAGIC_HASH_ORDER 4 /**< Size of key hash table. Must be power of 2. */ |
- | |
192 | #define DRM_KERNEL_CONTEXT 0 /**< Change drm_resctx if changed */ |
- | |
193 | #define DRM_RESERVED_CONTEXTS 1 /**< Change drm_resctx if changed */ |
- | |
194 | #define DRM_LOOPING_LIMIT 5000000 |
- | |
Line 195... | Line -... | ||
195 | #define DRM_TIME_SLICE (HZ/20) /**< Time slice for GLXContexts */ |
- | |
196 | #define DRM_LOCK_SLICE 1 /**< Time slice for lock, in jiffies */ |
193 | |
Line 197... | Line 194... | ||
197 | 194 | #define DRM_MAGIC_HASH_ORDER 4 /**< Size of key hash table. Must be power of 2. */ |
|
Line 198... | Line 195... | ||
198 | #define DRM_FLAG_DEBUG 0x01 |
195 | #define DRM_KERNEL_CONTEXT 0 /**< Change drm_resctx if changed */ |
Line 213... | Line 210... | ||
213 | * \param arg arguments |
210 | * \param arg arguments |
214 | */ |
211 | */ |
215 | #define DRM_ERROR(fmt, ...) \ |
212 | #define DRM_ERROR(fmt, ...) \ |
216 | drm_err(__func__, fmt, ##__VA_ARGS__) |
213 | drm_err(__func__, fmt, ##__VA_ARGS__) |
Line -... | Line 214... | ||
- | 214 | ||
- | 215 | /** |
|
- | 216 | * Rate limited error output. Like DRM_ERROR() but won't flood the log. |
|
- | 217 | * |
|
- | 218 | * \param fmt printf() like format string. |
|
- | 219 | * \param arg arguments |
|
- | 220 | */ |
|
- | 221 | #define DRM_ERROR_RATELIMITED(fmt, ...) \ |
|
- | 222 | ({ \ |
|
- | 223 | static DEFINE_RATELIMIT_STATE(_rs, \ |
|
- | 224 | DEFAULT_RATELIMIT_INTERVAL, \ |
|
- | 225 | DEFAULT_RATELIMIT_BURST); \ |
|
- | 226 | \ |
|
- | 227 | if (__ratelimit(&_rs)) \ |
|
- | 228 | drm_err(__func__, fmt, ##__VA_ARGS__); \ |
|
- | 229 | }) |
|
217 | 230 | ||
218 | #define DRM_INFO(fmt, ...) \ |
231 | #define DRM_INFO(fmt, ...) \ |
Line 219... | Line 232... | ||
219 | printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__) |
232 | printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__) |
220 | 233 | ||
Line 440... | Line 453... | ||
440 | struct mutex lock; |
453 | struct mutex lock; |
441 | }; |
454 | }; |
Line 442... | Line 455... | ||
442 | 455 | ||
443 | /** File private data */ |
456 | /** File private data */ |
- | 457 | struct drm_file { |
|
- | 458 | unsigned always_authenticated :1; |
|
- | 459 | unsigned authenticated :1; |
|
- | 460 | unsigned is_master :1; /* this file private is a master for a minor */ |
|
- | 461 | /* true when the client has asked us to expose stereo 3D mode flags */ |
|
444 | struct drm_file { |
462 | unsigned stereo_allowed :1; |
445 | struct list_head lhead; |
463 | struct list_head lhead; |
Line 446... | Line 464... | ||
446 | unsigned long lock_count; |
464 | unsigned long lock_count; |
447 | 465 | ||
Line 516... | Line 534... | ||
516 | /** |
534 | /** |
517 | * AGP memory entry. Stored as a doubly linked list. |
535 | * AGP memory entry. Stored as a doubly linked list. |
518 | */ |
536 | */ |
519 | struct drm_agp_mem { |
537 | struct drm_agp_mem { |
520 | unsigned long handle; /**< handle */ |
538 | unsigned long handle; /**< handle */ |
521 | DRM_AGP_MEM *memory; |
539 | struct agp_memory *memory; |
522 | unsigned long bound; /**< address */ |
540 | unsigned long bound; /**< address */ |
523 | int pages; |
541 | int pages; |
524 | struct list_head head; |
542 | struct list_head head; |
525 | }; |
543 | }; |
Line 528... | Line 546... | ||
528 | * AGP data. |
546 | * AGP data. |
529 | * |
547 | * |
530 | * \sa drm_agp_init() and drm_device::agp. |
548 | * \sa drm_agp_init() and drm_device::agp. |
531 | */ |
549 | */ |
532 | struct drm_agp_head { |
550 | struct drm_agp_head { |
533 | DRM_AGP_KERN agp_info; /**< AGP device information */ |
551 | struct agp_kern_info agp_info; /**< AGP device information */ |
534 | struct list_head memory; |
552 | struct list_head memory; |
535 | unsigned long mode; /**< AGP mode */ |
553 | unsigned long mode; /**< AGP mode */ |
536 | struct agp_bridge_data *bridge; |
554 | struct agp_bridge_data *bridge; |
537 | int enabled; /**< whether the AGP bus as been enabled */ |
555 | int enabled; /**< whether the AGP bus as been enabled */ |
538 | int acquired; /**< whether the AGP device has been acquired */ |
556 | int acquired; /**< whether the AGP device has been acquired */ |
Line 614... | Line 632... | ||
614 | struct drm_local_map mapping; |
632 | struct drm_local_map mapping; |
615 | int table_size; |
633 | int table_size; |
616 | }; |
634 | }; |
Line 617... | Line 635... | ||
617 | 635 | ||
618 | /** |
- | |
619 | * GEM specific mm private for tracking GEM objects |
- | |
620 | */ |
- | |
621 | struct drm_gem_mm { |
- | |
622 | struct drm_vma_offset_manager vma_manager; |
- | |
623 | }; |
- | |
624 | - | ||
625 | /** |
636 | /** |
626 | * This structure defines the drm_mm memory object, which will be used by the |
637 | * This structure defines the drm_mm memory object, which will be used by the |
627 | * DRM for its buffer objects. |
638 | * DRM for its buffer objects. |
628 | */ |
639 | */ |
629 | struct drm_gem_object { |
640 | struct drm_gem_object { |
Line 678... | Line 689... | ||
678 | * at the point that any cache flushing occurs |
689 | * at the point that any cache flushing occurs |
679 | */ |
690 | */ |
680 | uint32_t pending_read_domains; |
691 | uint32_t pending_read_domains; |
681 | uint32_t pending_write_domain; |
692 | uint32_t pending_write_domain; |
Line 682... | Line -... | ||
682 | - | ||
- | 693 | ||
683 | void *driver_private; |
694 | |
Line 684... | Line 695... | ||
684 | }; |
695 | }; |
Line 685... | Line 696... | ||
685 | 696 | ||
Line 733... | Line 744... | ||
733 | const char *(*get_name)(struct drm_device *dev); |
744 | const char *(*get_name)(struct drm_device *dev); |
734 | int (*set_busid)(struct drm_device *dev, struct drm_master *master); |
745 | int (*set_busid)(struct drm_device *dev, struct drm_master *master); |
735 | int (*set_unique)(struct drm_device *dev, struct drm_master *master, |
746 | int (*set_unique)(struct drm_device *dev, struct drm_master *master, |
736 | struct drm_unique *unique); |
747 | struct drm_unique *unique); |
737 | int (*irq_by_busid)(struct drm_device *dev, struct drm_irq_busid *p); |
748 | int (*irq_by_busid)(struct drm_device *dev, struct drm_irq_busid *p); |
738 | /* hooks that are for PCI */ |
- | |
739 | int (*agp_init)(struct drm_device *dev); |
- | |
740 | void (*agp_destroy)(struct drm_device *dev); |
- | |
741 | - | ||
742 | }; |
749 | }; |
743 | #endif |
750 | #endif |
Line 744... | Line 751... | ||
744 | 751 | ||
Line 798... | Line 805... | ||
798 | */ |
805 | */ |
799 | void (*disable_vblank) (struct drm_device *dev, int crtc); |
806 | void (*disable_vblank) (struct drm_device *dev, int crtc); |
800 | /** |
807 | /** |
801 | * Called by vblank timestamping code. |
808 | * Called by vblank timestamping code. |
802 | * |
809 | * |
803 | * Return the current display scanout position from a crtc. |
810 | * Return the current display scanout position from a crtc, and an |
- | 811 | * optional accurate ktime_get timestamp of when position was measured. |
|
804 | * |
812 | * |
805 | * \param dev DRM device. |
813 | * \param dev DRM device. |
806 | * \param crtc Id of the crtc to query. |
814 | * \param crtc Id of the crtc to query. |
- | 815 | * \param flags Flags from the caller (DRM_CALLED_FROM_VBLIRQ or 0). |
|
807 | * \param *vpos Target location for current vertical scanout position. |
816 | * \param *vpos Target location for current vertical scanout position. |
808 | * \param *hpos Target location for current horizontal scanout position. |
817 | * \param *hpos Target location for current horizontal scanout position. |
- | 818 | * \param *stime Target location for timestamp taken immediately before |
|
- | 819 | * scanout position query. Can be NULL to skip timestamp. |
|
- | 820 | * \param *etime Target location for timestamp taken immediately after |
|
- | 821 | * scanout position query. Can be NULL to skip timestamp. |
|
809 | * |
822 | * |
810 | * Returns vpos as a positive number while in active scanout area. |
823 | * Returns vpos as a positive number while in active scanout area. |
811 | * Returns vpos as a negative number inside vblank, counting the number |
824 | * Returns vpos as a negative number inside vblank, counting the number |
812 | * of scanlines to go until end of vblank, e.g., -1 means "one scanline |
825 | * of scanlines to go until end of vblank, e.g., -1 means "one scanline |
813 | * until start of active scanout / end of vblank." |
826 | * until start of active scanout / end of vblank." |
Line 820... | Line 833... | ||
820 | * this flag means that returned position may be offset by a constant |
833 | * this flag means that returned position may be offset by a constant |
821 | * but unknown small number of scanlines wrt. real scanout position. |
834 | * but unknown small number of scanlines wrt. real scanout position. |
822 | * |
835 | * |
823 | */ |
836 | */ |
824 | int (*get_scanout_position) (struct drm_device *dev, int crtc, |
837 | int (*get_scanout_position) (struct drm_device *dev, int crtc, |
825 | int *vpos, int *hpos); |
838 | unsigned int flags, |
- | 839 | int *vpos, int *hpos, void *stime, |
|
- | 840 | void *etime); |
|
Line 826... | Line 841... | ||
826 | 841 | ||
827 | /** |
842 | /** |
828 | * Called by \c drm_get_last_vbltimestamp. Should return a precise |
843 | * Called by \c drm_get_last_vbltimestamp. Should return a precise |
829 | * timestamp when the most recent VBLANK interval ended or will end. |
844 | * timestamp when the most recent VBLANK interval ended or will end. |
Line 870... | Line 885... | ||
870 | * Driver-specific constructor for drm_gem_objects, to set up |
885 | * Driver-specific constructor for drm_gem_objects, to set up |
871 | * obj->driver_private. |
886 | * obj->driver_private. |
872 | * |
887 | * |
873 | * Returns 0 on success. |
888 | * Returns 0 on success. |
874 | */ |
889 | */ |
875 | int (*gem_init_object) (struct drm_gem_object *obj); |
- | |
876 | void (*gem_free_object) (struct drm_gem_object *obj); |
890 | void (*gem_free_object) (struct drm_gem_object *obj); |
877 | int (*gem_open_object) (struct drm_gem_object *, struct drm_file *); |
891 | int (*gem_open_object) (struct drm_gem_object *, struct drm_file *); |
878 | void (*gem_close_object) (struct drm_gem_object *, struct drm_file *); |
892 | void (*gem_close_object) (struct drm_gem_object *, struct drm_file *); |
879 | u32 driver_features; |
893 | u32 driver_features; |
880 | }; |
894 | }; |
Line 882... | Line 896... | ||
882 | #define DRM_MINOR_UNASSIGNED 0 |
896 | #define DRM_MINOR_UNASSIGNED 0 |
883 | #define DRM_MINOR_LEGACY 1 |
897 | #define DRM_MINOR_LEGACY 1 |
884 | #define DRM_MINOR_CONTROL 2 |
898 | #define DRM_MINOR_CONTROL 2 |
885 | #define DRM_MINOR_RENDER 3 |
899 | #define DRM_MINOR_RENDER 3 |
Line 886... | Line -... | ||
886 | - | ||
887 | - | ||
888 | /** |
- | |
889 | * debugfs node list. This structure represents a debugfs file to |
- | |
890 | * be created by the drm core |
- | |
891 | */ |
- | |
892 | struct drm_debugfs_list { |
- | |
893 | const char *name; /** file name */ |
- | |
894 | // int (*show)(struct seq_file*, void*); /** show callback */ |
- | |
895 | u32 driver_features; /**< Required driver features for this entry */ |
- | |
896 | }; |
- | |
897 | - | ||
898 | /** |
- | |
899 | * debugfs node structure. This structure represents a debugfs file. |
- | |
900 | */ |
- | |
901 | struct drm_debugfs_node { |
- | |
902 | struct list_head list; |
- | |
903 | struct drm_minor *minor; |
- | |
904 | struct drm_debugfs_list *debugfs_ent; |
- | |
905 | struct dentry *dent; |
- | |
906 | }; |
- | |
907 | 900 | ||
908 | /** |
901 | /** |
909 | * Info file list entry. This structure represents a debugfs or proc file to |
902 | * Info file list entry. This structure represents a debugfs or proc file to |
910 | * be created by the drm core |
903 | * be created by the drm core |
911 | */ |
904 | */ |
Line 966... | Line 959... | ||
966 | /** |
959 | /** |
967 | * DRM device structure. This structure represent a complete card that |
960 | * DRM device structure. This structure represent a complete card that |
968 | * may contain multiple heads. |
961 | * may contain multiple heads. |
969 | */ |
962 | */ |
970 | struct drm_device { |
963 | struct drm_device { |
971 | struct list_head driver_item; /**< list of devices per driver */ |
964 | struct list_head legacy_dev_list;/**< list of devices per driver for stealth attach cleanup */ |
972 | char *devname; /**< For /proc/interrupts */ |
965 | char *devname; /**< For /proc/interrupts */ |
973 | int if_version; /**< Highest interface version set */ |
966 | int if_version; /**< Highest interface version set */ |
Line 974... | Line 967... | ||
974 | 967 | ||
975 | /** \name Locks */ |
968 | /** \name Locks */ |
Line 979... | Line 972... | ||
979 | /*@} */ |
972 | /*@} */ |
Line 980... | Line 973... | ||
980 | 973 | ||
981 | /** \name Usage Counters */ |
974 | /** \name Usage Counters */ |
982 | /*@{ */ |
975 | /*@{ */ |
983 | int open_count; /**< Outstanding files open */ |
- | |
984 | atomic_t ioctl_count; /**< Outstanding IOCTLs pending */ |
- | |
985 | atomic_t vma_count; /**< Outstanding vma areas open */ |
976 | int open_count; /**< Outstanding files open */ |
986 | int buf_use; /**< Buffers in use -- cannot alloc */ |
977 | int buf_use; /**< Buffers in use -- cannot alloc */ |
987 | atomic_t buf_alloc; /**< Buffer allocation in progress */ |
978 | atomic_t buf_alloc; /**< Buffer allocation in progress */ |
Line 988... | Line -... | ||
988 | /*@} */ |
- | |
989 | - | ||
990 | /** \name Performance counters */ |
- | |
991 | /*@{ */ |
- | |
992 | unsigned long counters; |
- | |
993 | // enum drm_stat_type types[15]; |
- | |
994 | atomic_t counts[15]; |
- | |
995 | /*@} */ |
979 | /*@} */ |
Line 996... | Line 980... | ||
996 | 980 | ||
997 | struct list_head filelist; |
981 | struct list_head filelist; |
998 | 982 | ||
999 | /** \name Memory management */ |
- | |
1000 | /*@{ */ |
- | |
Line 1001... | Line 983... | ||
1001 | struct list_head maplist; /**< Linked list of regions */ |
983 | /** \name Memory management */ |
1002 | int map_count; /**< Number of mappable regions */ |
984 | /*@{ */ |
1003 | // struct drm_open_hash map_hash; /**< User token hash table for maps */ |
985 | struct list_head maplist; /**< Linked list of regions */ |
1004 | - | ||
1005 | /** \name Context handle management */ |
986 | |
Line 1006... | Line 987... | ||
1006 | /*@{ */ |
987 | /** \name Context handle management */ |
Line 1007... | Line 988... | ||
1007 | struct list_head ctxlist; /**< Linked list of context handles */ |
988 | /*@{ */ |
Line 1019... | Line 1000... | ||
1019 | // struct drm_device_dma *dma; /**< Optional pointer for DMA support */ |
1000 | // struct drm_device_dma *dma; /**< Optional pointer for DMA support */ |
1020 | /*@} */ |
1001 | /*@} */ |
Line 1021... | Line 1002... | ||
1021 | 1002 | ||
1022 | /** \name Context support */ |
1003 | /** \name Context support */ |
1023 | /*@{ */ |
1004 | /*@{ */ |
1024 | int irq_enabled; /**< True if irq handler is enabled */ |
1005 | bool irq_enabled; /**< True if irq handler is enabled */ |
1025 | __volatile__ long context_flag; /**< Context swapping flag */ |
1006 | __volatile__ long context_flag; /**< Context swapping flag */ |
1026 | int last_context; /**< Last current context */ |
1007 | int last_context; /**< Last current context */ |
Line 1027... | Line -... | ||
1027 | /*@} */ |
- | |
1028 | 1008 | /*@} */ |
|
1029 | // struct work_struct work; |
1009 | |
Line 1030... | Line 1010... | ||
1030 | /** \name VBLANK IRQ support */ |
1010 | /** \name VBLANK IRQ support */ |
1031 | /*@{ */ |
1011 | /*@{ */ |
1032 | 1012 | ||
1033 | /* |
1013 | /* |
1034 | * At load time, disabling the vblank interrupt won't be allowed since |
1014 | * At load time, disabling the vblank interrupt won't be allowed since |
1035 | * old clients may not call the modeset ioctl and therefore misbehave. |
1015 | * old clients may not call the modeset ioctl and therefore misbehave. |
1036 | * Once the modeset ioctl *has* been called though, we can safely |
1016 | * Once the modeset ioctl *has* been called though, we can safely |
Line 1037... | Line -... | ||
1037 | * disable them when unused. |
- | |
1038 | */ |
- | |
1039 | int vblank_disable_allowed; |
- | |
1040 | - | ||
1041 | // wait_queue_head_t *vbl_queue; /**< VBLANK wait queue */ |
- | |
1042 | atomic_t *_vblank_count; /**< number of VBLANK interrupts (driver must alloc the right number of counters) */ |
- | |
1043 | struct timeval *_vblank_time; /**< timestamp of current vblank_count (drivers must alloc right number of fields) */ |
- | |
1044 | spinlock_t vblank_time_lock; /**< Protects vblank count and time updates during vblank enable/disable */ |
- | |
1045 | spinlock_t vbl_lock; |
- | |
1046 | atomic_t *vblank_refcount; /* number of users of vblank interruptsper crtc */ |
- | |
1047 | u32 *last_vblank; /* protected by dev->vbl_lock, used */ |
- | |
1048 | /* for wraparound handling */ |
- | |
1049 | int *vblank_enabled; /* so we don't call enable more than |
- | |
Line 1050... | Line 1017... | ||
1050 | once per disable */ |
1017 | * disable them when unused. |
Line 1051... | Line 1018... | ||
1051 | int *vblank_inmodeset; /* Display driver is setting mode */ |
1018 | */ |
1052 | u32 *last_vblank_wait; /* Last vblank seqno waited per CRTC */ |
1019 | bool vblank_disable_allowed; |
Line 1068... | Line 1035... | ||
1068 | struct pci_dev *pdev; /**< PCI device structure */ |
1035 | struct pci_dev *pdev; /**< PCI device structure */ |
1069 | int pci_vendor; /**< PCI vendor id */ |
1036 | int pci_vendor; /**< PCI vendor id */ |
1070 | int pci_device; /**< PCI device id */ |
1037 | int pci_device; /**< PCI device id */ |
1071 | unsigned int num_crtcs; /**< Number of CRTCs on this device */ |
1038 | unsigned int num_crtcs; /**< Number of CRTCs on this device */ |
1072 | void *dev_private; /**< device private data */ |
1039 | void *dev_private; /**< device private data */ |
1073 | void *mm_private; |
- | |
1074 | struct address_space *dev_mapping; |
1040 | struct address_space *dev_mapping; |
1075 | // struct drm_sigdata sigdata; /**< For block_all_signals */ |
1041 | // struct drm_sigdata sigdata; /**< For block_all_signals */ |
1076 | // sigset_t sigmask; |
1042 | // sigset_t sigmask; |
Line 1077... | Line 1043... | ||
1077 | 1043 | ||
Line 1085... | Line 1051... | ||
1085 | 1051 | ||
1086 | /** \name GEM information */ |
1052 | /** \name GEM information */ |
1087 | /*@{ */ |
1053 | /*@{ */ |
1088 | struct mutex object_name_lock; |
1054 | struct mutex object_name_lock; |
- | 1055 | struct idr object_name_idr; |
|
1089 | struct idr object_name_idr; |
1056 | struct drm_vma_offset_manager *vma_offset_manager; |
1090 | /*@} */ |
1057 | /*@} */ |
Line 1091... | Line 1058... | ||
1091 | int switch_power_state; |
1058 | int switch_power_state; |
1092 | 1059 | ||
Line 1154... | Line 1121... | ||
1154 | extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); |
1121 | extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); |
Line 1155... | Line 1122... | ||
1155 | 1122 | ||
1156 | /* Memory management support (drm_memory.h) */ |
1123 | /* Memory management support (drm_memory.h) */ |
Line -... | Line 1124... | ||
- | 1124 | #include |
|
1157 | #include |
1125 | |
1158 | 1126 | ||
1159 | /* Misc. IOCTL support (drm_ioctl.h) */ |
1127 | /* Misc. IOCTL support (drm_ioctl.h) */ |
1160 | extern int drm_irq_by_busid(struct drm_device *dev, void *data, |
1128 | extern int drm_irq_by_busid(struct drm_device *dev, void *data, |
1161 | struct drm_file *file_priv); |
1129 | struct drm_file *file_priv); |
Line 1169... | Line 1137... | ||
1169 | struct drm_file *file_priv); |
1137 | struct drm_file *file_priv); |
1170 | extern int drm_getstats(struct drm_device *dev, void *data, |
1138 | extern int drm_getstats(struct drm_device *dev, void *data, |
1171 | struct drm_file *file_priv); |
1139 | struct drm_file *file_priv); |
1172 | extern int drm_getcap(struct drm_device *dev, void *data, |
1140 | extern int drm_getcap(struct drm_device *dev, void *data, |
1173 | struct drm_file *file_priv); |
1141 | struct drm_file *file_priv); |
- | 1142 | extern int drm_setclientcap(struct drm_device *dev, void *data, |
|
- | 1143 | struct drm_file *file_priv); |
|
1174 | extern int drm_setversion(struct drm_device *dev, void *data, |
1144 | extern int drm_setversion(struct drm_device *dev, void *data, |
1175 | struct drm_file *file_priv); |
1145 | struct drm_file *file_priv); |
1176 | extern int drm_noop(struct drm_device *dev, void *data, |
1146 | extern int drm_noop(struct drm_device *dev, void *data, |
1177 | struct drm_file *file_priv); |
1147 | struct drm_file *file_priv); |
Line 1282... | Line 1252... | ||
1282 | struct timeval *tvblank, unsigned flags); |
1252 | struct timeval *tvblank, unsigned flags); |
1283 | extern int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, |
1253 | extern int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, |
1284 | int crtc, int *max_error, |
1254 | int crtc, int *max_error, |
1285 | struct timeval *vblank_time, |
1255 | struct timeval *vblank_time, |
1286 | unsigned flags, |
1256 | unsigned flags, |
1287 | struct drm_crtc *refcrtc); |
1257 | const struct drm_crtc *refcrtc, |
- | 1258 | const struct drm_display_mode *mode); |
|
1288 | extern void drm_calc_timestamping_constants(struct drm_crtc *crtc); |
1259 | extern void drm_calc_timestamping_constants(struct drm_crtc *crtc, |
- | 1260 | const struct drm_display_mode *mode); |
|
Line 1289... | Line 1261... | ||
1289 | 1261 | ||
1290 | extern bool |
1262 | extern bool |
1291 | drm_mode_parse_command_line_for_connector(const char *mode_option, |
1263 | drm_mode_parse_command_line_for_connector(const char *mode_option, |
1292 | struct drm_connector *connector, |
1264 | struct drm_connector *connector, |
Line 1318... | Line 1290... | ||
1318 | struct drm_master *drm_master_create(struct drm_minor *minor); |
1290 | struct drm_master *drm_master_create(struct drm_minor *minor); |
1319 | extern struct drm_master *drm_master_get(struct drm_master *master); |
1291 | extern struct drm_master *drm_master_get(struct drm_master *master); |
1320 | extern void drm_master_put(struct drm_master **master); |
1292 | extern void drm_master_put(struct drm_master **master); |
Line 1321... | Line 1293... | ||
1321 | 1293 | ||
1322 | extern void drm_put_dev(struct drm_device *dev); |
- | |
1323 | extern int drm_put_minor(struct drm_minor **minor); |
1294 | extern void drm_put_dev(struct drm_device *dev); |
1324 | extern void drm_unplug_dev(struct drm_device *dev); |
1295 | extern void drm_unplug_dev(struct drm_device *dev); |
1325 | extern unsigned int drm_debug; |
1296 | extern unsigned int drm_debug; |
Line 1326... | Line 1297... | ||
1326 | extern unsigned int drm_rnodes; |
1297 | extern unsigned int drm_rnodes; |
Line 1339... | Line 1310... | ||
1339 | 1310 | ||
1340 | /* Debugfs support */ |
1311 | /* Debugfs support */ |
1341 | #if defined(CONFIG_DEBUG_FS) |
1312 | #if defined(CONFIG_DEBUG_FS) |
1342 | extern int drm_debugfs_init(struct drm_minor *minor, int minor_id, |
1313 | extern int drm_debugfs_init(struct drm_minor *minor, int minor_id, |
1343 | struct dentry *root); |
1314 | struct dentry *root); |
1344 | extern int drm_debugfs_create_files(struct drm_info_list *files, int count, |
1315 | extern int drm_debugfs_create_files(const struct drm_info_list *files, |
1345 | struct dentry *root, struct drm_minor *minor); |
- | |
1346 | extern int drm_debugfs_remove_files(struct drm_info_list *files, int count, |
1316 | int count, struct dentry *root, |
- | 1317 | struct drm_minor *minor); |
|
- | 1318 | extern int drm_debugfs_remove_files(const struct drm_info_list *files, |
|
1347 | struct drm_minor *minor); |
1319 | int count, struct drm_minor *minor); |
- | 1320 | extern int drm_debugfs_cleanup(struct drm_minor *minor); |
|
- | 1321 | #else |
|
- | 1322 | static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id, |
|
- | 1323 | struct dentry *root) |
|
- | 1324 | { |
|
- | 1325 | return 0; |
|
- | 1326 | } |
|
- | 1327 | ||
- | 1328 | static inline int drm_debugfs_create_files(const struct drm_info_list *files, |
|
- | 1329 | int count, struct dentry *root, |
|
- | 1330 | struct drm_minor *minor) |
|
- | 1331 | { |
|
- | 1332 | return 0; |
|
- | 1333 | } |
|
- | 1334 | ||
- | 1335 | static inline int drm_debugfs_remove_files(const struct drm_info_list *files, |
|
- | 1336 | int count, struct drm_minor *minor) |
|
- | 1337 | { |
|
- | 1338 | return 0; |
|
- | 1339 | } |
|
- | 1340 | ||
- | 1341 | static inline int drm_debugfs_cleanup(struct drm_minor *minor) |
|
- | 1342 | { |
|
- | 1343 | return 0; |
|
1348 | extern int drm_debugfs_cleanup(struct drm_minor *minor); |
1344 | } |
Line 1349... | Line 1345... | ||
1349 | #endif |
1345 | #endif |
1350 | 1346 | ||
1351 | /* Info file support */ |
1347 | /* Info file support */ |
Line 1394... | Line 1390... | ||
1394 | /* Graphics Execution Manager library functions (drm_gem.c) */ |
1390 | /* Graphics Execution Manager library functions (drm_gem.c) */ |
1395 | int drm_gem_init(struct drm_device *dev); |
1391 | int drm_gem_init(struct drm_device *dev); |
1396 | void drm_gem_destroy(struct drm_device *dev); |
1392 | void drm_gem_destroy(struct drm_device *dev); |
1397 | void drm_gem_object_release(struct drm_gem_object *obj); |
1393 | void drm_gem_object_release(struct drm_gem_object *obj); |
1398 | void drm_gem_object_free(struct kref *kref); |
1394 | void drm_gem_object_free(struct kref *kref); |
1399 | struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, |
- | |
1400 | size_t size); |
- | |
1401 | int drm_gem_object_init(struct drm_device *dev, |
1395 | int drm_gem_object_init(struct drm_device *dev, |
1402 | struct drm_gem_object *obj, size_t size); |
1396 | struct drm_gem_object *obj, size_t size); |
1403 | void drm_gem_private_object_init(struct drm_device *dev, |
1397 | void drm_gem_private_object_init(struct drm_device *dev, |
1404 | struct drm_gem_object *obj, size_t size); |
1398 | struct drm_gem_object *obj, size_t size); |
1405 | void drm_gem_vm_open(struct vm_area_struct *vma); |
1399 | void drm_gem_vm_open(struct vm_area_struct *vma); |
Line 1515... | Line 1509... | ||
1515 | #endif /* __KERNEL__ */ |
1509 | #endif /* __KERNEL__ */ |
Line 1516... | Line 1510... | ||
1516 | 1510 | ||
1517 | #define drm_sysfs_connector_add(connector) |
1511 | #define drm_sysfs_connector_add(connector) |
Line 1518... | Line 1512... | ||
1518 | #define drm_sysfs_connector_remove(connector) |
1512 | #define drm_sysfs_connector_remove(connector) |
1519 | 1513 | ||
1520 | #define LFB_SIZE 0xC00000 |
1514 | #define LFB_SIZE 0x1000000 |
Line 1521... | Line 1515... | ||
1521 | extern struct drm_device *main_device; |
1515 | extern struct drm_device *main_device; |