aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2008-08-01 11:37:55 -0400
committerLen Brown <len.brown@intel.com>2008-11-07 23:57:55 -0500
commitc3d6de698c84efdbdd3781b7058bcc339ab43da8 (patch)
tree07e08d88bbaaef8a5a1dd58b9d19f7c860442d3a /include
parent22c13f9d8179f4c9caecfcb60a95214562b9addc (diff)
ACPI video: if no ACPI backlight support, use vendor drivers
If an ACPI graphics device supports backlight brightness functions (cmp. with latest ACPI spec Appendix B), let the ACPI video driver control backlight and switch backlight control off in vendor specific ACPI drivers (asus_acpi, thinkpad_acpi, eeepc, fujitsu_laptop, msi_laptop, sony_laptop, acer-wmi). Currently it is possible to load above drivers and let both poke on the brightness HW registers, the video and vendor specific ACPI drivers -> bad. This patch provides the basic support to check for BIOS capabilities before driver loading time. Driver specific modifications are in separate follow up patches. "acpi_backlight=vendor" Prever vendor driver over ACPI driver for backlight. "acpi_backlight=video" (default) Prever ACPI driver over vendor driver for backlight. Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/acpi.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index fd6a452b0ceb..7f23761ace35 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -194,6 +194,50 @@ extern bool wmi_has_guid(const char *guid);
194 194
195#endif /* CONFIG_ACPI_WMI */ 195#endif /* CONFIG_ACPI_WMI */
196 196
197#define ACPI_VIDEO_OUTPUT_SWITCHING 0x0001
198#define ACPI_VIDEO_DEVICE_POSTING 0x0002
199#define ACPI_VIDEO_ROM_AVAILABLE 0x0004
200#define ACPI_VIDEO_BACKLIGHT 0x0008
201#define ACPI_VIDEO_BACKLIGHT_FORCE_VENDOR 0x0010
202#define ACPI_VIDEO_BACKLIGHT_FORCE_VIDEO 0x0020
203#define ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VENDOR 0x0040
204#define ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO 0x0080
205#define ACPI_VIDEO_BACKLIGHT_DMI_VENDOR 0x0100
206#define ACPI_VIDEO_BACKLIGHT_DMI_VIDEO 0x0200
207#define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR 0x0400
208#define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VIDEO 0x0800
209
210#if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE)
211
212extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle);
213extern long acpi_is_video_device(struct acpi_device *device);
214extern int acpi_video_backlight_support(void);
215extern int acpi_video_display_switch_support(void);
216
217#else
218
219static inline long acpi_video_get_capabilities(acpi_handle graphics_dev_handle)
220{
221 return 0;
222}
223
224static inline long acpi_is_video_device(struct acpi_device *device)
225{
226 return 0;
227}
228
229static inline int acpi_video_backlight_support(void)
230{
231 return 0;
232}
233
234static inline int acpi_video_display_switch_support(void)
235{
236 return 0;
237}
238
239#endif /* defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) */
240
197extern int acpi_blacklisted(void); 241extern int acpi_blacklisted(void);
198#ifdef CONFIG_DMI 242#ifdef CONFIG_DMI
199extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); 243extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d);