This source file includes following definitions.
- vga_set_legacy_decoding
- vga_get
- vga_get_interruptible
- vga_get_uninterruptible
- vga_tryget
- vga_default_device
- vga_set_default_device
- vga_remove_vgacon
- vga_conflicts
- vga_client_register
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 #ifndef LINUX_VGA_H
32 #define LINUX_VGA_H
33
34 #include <video/vga.h>
35
36
37 #define VGA_RSRC_NONE 0x00
38 #define VGA_RSRC_LEGACY_IO 0x01
39 #define VGA_RSRC_LEGACY_MEM 0x02
40 #define VGA_RSRC_LEGACY_MASK (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM)
41
42 #define VGA_RSRC_NORMAL_IO 0x04
43 #define VGA_RSRC_NORMAL_MEM 0x08
44
45
46
47
48
49 #define VGA_DEFAULT_DEVICE (NULL)
50
51 struct pci_dev;
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68 #if defined(CONFIG_VGA_ARB)
69 extern void vga_set_legacy_decoding(struct pci_dev *pdev,
70 unsigned int decodes);
71 #else
72 static inline void vga_set_legacy_decoding(struct pci_dev *pdev,
73 unsigned int decodes) { };
74 #endif
75
76 #if defined(CONFIG_VGA_ARB)
77 extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible);
78 #else
79 static inline int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible) { return 0; }
80 #endif
81
82
83
84
85
86
87
88
89
90
91 static inline int vga_get_interruptible(struct pci_dev *pdev,
92 unsigned int rsrc)
93 {
94 return vga_get(pdev, rsrc, 1);
95 }
96
97
98
99
100
101
102
103
104
105
106 static inline int vga_get_uninterruptible(struct pci_dev *pdev,
107 unsigned int rsrc)
108 {
109 return vga_get(pdev, rsrc, 0);
110 }
111
112 #if defined(CONFIG_VGA_ARB)
113 extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc);
114 #else
115 static inline int vga_tryget(struct pci_dev *pdev, unsigned int rsrc) { return 0; }
116 #endif
117
118 #if defined(CONFIG_VGA_ARB)
119 extern void vga_put(struct pci_dev *pdev, unsigned int rsrc);
120 #else
121 #define vga_put(pdev, rsrc)
122 #endif
123
124
125 #ifdef CONFIG_VGA_ARB
126 extern struct pci_dev *vga_default_device(void);
127 extern void vga_set_default_device(struct pci_dev *pdev);
128 extern int vga_remove_vgacon(struct pci_dev *pdev);
129 #else
130 static inline struct pci_dev *vga_default_device(void) { return NULL; };
131 static inline void vga_set_default_device(struct pci_dev *pdev) { };
132 static inline int vga_remove_vgacon(struct pci_dev *pdev) { return 0; };
133 #endif
134
135
136
137
138
139
140 #ifndef __ARCH_HAS_VGA_CONFLICT
141 static inline int vga_conflicts(struct pci_dev *p1, struct pci_dev *p2)
142 {
143 return 1;
144 }
145 #endif
146
147 #if defined(CONFIG_VGA_ARB)
148 int vga_client_register(struct pci_dev *pdev, void *cookie,
149 void (*irq_set_state)(void *cookie, bool state),
150 unsigned int (*set_vga_decode)(void *cookie, bool state));
151 #else
152 static inline int vga_client_register(struct pci_dev *pdev, void *cookie,
153 void (*irq_set_state)(void *cookie, bool state),
154 unsigned int (*set_vga_decode)(void *cookie, bool state))
155 {
156 return 0;
157 }
158 #endif
159
160 #endif