Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vga_switcheroo.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010 Red Hat Inc.
3  * Author : Dave Airlie <[email protected]>
4  *
5  * Licensed under GPLv2
6  *
7  * vga_switcheroo.h - Support for laptop with dual GPU using one set of outputs
8  */
9 
10 #ifndef _LINUX_VGA_SWITCHEROO_H_
11 #define _LINUX_VGA_SWITCHEROO_H_
12 
13 #include <linux/fb.h>
14 
15 struct pci_dev;
16 
20  /* below are referred only from vga_switcheroo_get_client_state() */
23 };
24 
29 };
30 
35  int (*init)(void);
37 };
38 
41  void (*reprobe)(struct pci_dev *dev);
42  bool (*can_switch)(struct pci_dev *dev);
43 };
44 
45 #if defined(CONFIG_VGA_SWITCHEROO)
48  const struct vga_switcheroo_client_ops *ops);
50  const struct vga_switcheroo_client_ops *ops,
51  int id, bool active);
52 
54  struct fb_info *info);
55 
58 
60 
62 
63 #else
64 
65 static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {}
66 static inline int vga_switcheroo_register_client(struct pci_dev *dev,
67  const struct vga_switcheroo_client_ops *ops) { return 0; }
68 static inline void vga_switcheroo_client_fb_set(struct pci_dev *dev, struct fb_info *info) {}
69 static inline int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler) { return 0; }
70 static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev,
71  const struct vga_switcheroo_client_ops *ops,
72  int id, bool active) { return 0; }
73 static inline void vga_switcheroo_unregister_handler(void) {}
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 
77 
78 #endif
79 #endif /* _LINUX_VGA_SWITCHEROO_H_ */