diff options
Diffstat (limited to 'include/linux/vga_switcheroo.h')
-rw-r--r-- | include/linux/vga_switcheroo.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h index b455c7c212eb..ddb419cf4530 100644 --- a/include/linux/vga_switcheroo.h +++ b/include/linux/vga_switcheroo.h | |||
@@ -7,11 +7,19 @@ | |||
7 | * vga_switcheroo.h - Support for laptop with dual GPU using one set of outputs | 7 | * vga_switcheroo.h - Support for laptop with dual GPU using one set of outputs |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef _LINUX_VGA_SWITCHEROO_H_ | ||
11 | #define _LINUX_VGA_SWITCHEROO_H_ | ||
12 | |||
10 | #include <linux/fb.h> | 13 | #include <linux/fb.h> |
11 | 14 | ||
15 | struct pci_dev; | ||
16 | |||
12 | enum vga_switcheroo_state { | 17 | enum vga_switcheroo_state { |
13 | VGA_SWITCHEROO_OFF, | 18 | VGA_SWITCHEROO_OFF, |
14 | VGA_SWITCHEROO_ON, | 19 | VGA_SWITCHEROO_ON, |
20 | /* below are referred only from vga_switcheroo_get_client_state() */ | ||
21 | VGA_SWITCHEROO_INIT, | ||
22 | VGA_SWITCHEROO_NOT_FOUND, | ||
15 | }; | 23 | }; |
16 | 24 | ||
17 | enum vga_switcheroo_client_id { | 25 | enum vga_switcheroo_client_id { |
@@ -50,6 +58,8 @@ void vga_switcheroo_unregister_handler(void); | |||
50 | 58 | ||
51 | int vga_switcheroo_process_delayed_switch(void); | 59 | int vga_switcheroo_process_delayed_switch(void); |
52 | 60 | ||
61 | int vga_switcheroo_get_client_state(struct pci_dev *dev); | ||
62 | |||
53 | #else | 63 | #else |
54 | 64 | ||
55 | static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} | 65 | static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} |
@@ -62,5 +72,8 @@ static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev, | |||
62 | int id, bool active) { return 0; } | 72 | int id, bool active) { return 0; } |
63 | static inline void vga_switcheroo_unregister_handler(void) {} | 73 | static inline void vga_switcheroo_unregister_handler(void) {} |
64 | static inline int vga_switcheroo_process_delayed_switch(void) { return 0; } | 74 | static inline int vga_switcheroo_process_delayed_switch(void) { return 0; } |
75 | static inline int vga_switcheroo_get_client_state(struct pci_dev *dev) { return VGA_SWITCHEROO_ON; } | ||
76 | |||
65 | 77 | ||
66 | #endif | 78 | #endif |
79 | #endif /* _LINUX_VGA_SWITCHEROO_H_ */ | ||