blob: c62392d9b52ad6ee06b98a3fd9e6832c73ebcae1 [file] [log] [blame]
Matthew Garrett74a365b2009-03-19 21:35:39 +00001#ifndef __ACPI_VIDEO_H
2#define __ACPI_VIDEO_H
3
Chris Wilsonb72512e2010-09-05 14:51:49 +01004#include <linux/errno.h> /* for ENODEV */
5
6struct acpi_device;
7
Matthew Garrettf5a3d0c2011-07-12 18:30:52 -04008#define ACPI_VIDEO_CLASS "video"
9
Matthew Garrette92a7162010-01-12 14:17:03 -050010#define ACPI_VIDEO_DISPLAY_CRT 1
11#define ACPI_VIDEO_DISPLAY_TV 2
12#define ACPI_VIDEO_DISPLAY_DVI 3
13#define ACPI_VIDEO_DISPLAY_LCD 4
14
15#define ACPI_VIDEO_DISPLAY_LEGACY_MONITOR 0x0100
16#define ACPI_VIDEO_DISPLAY_LEGACY_PANEL 0x0110
17#define ACPI_VIDEO_DISPLAY_LEGACY_TV 0x0200
18
Hans de Goede87521e12015-06-16 16:27:48 +020019enum acpi_backlight_type {
20 acpi_backlight_undef = -1,
21 acpi_backlight_none = 0,
22 acpi_backlight_video,
23 acpi_backlight_vendor,
24 acpi_backlight_native,
25};
26
Sudeep Hollabcb2b0b2015-09-14 16:01:55 +010027#if IS_ENABLED(CONFIG_ACPI_VIDEO)
Rafael J. Wysocki8e5c2b72013-07-25 21:43:39 +020028extern int acpi_video_register(void);
Zhao Yakui86e437f2009-06-16 11:23:13 +080029extern void acpi_video_unregister(void);
Matthew Garrette92a7162010-01-12 14:17:03 -050030extern int acpi_video_get_edid(struct acpi_device *device, int type,
31 int device_id, void **edid);
Hans de Goede87521e12015-06-16 16:27:48 +020032extern enum acpi_backlight_type acpi_video_get_backlight_type(void);
33extern void acpi_video_set_dmi_backlight_type(enum acpi_backlight_type type);
Matthew Garrett74a365b2009-03-19 21:35:39 +000034#else
35static inline int acpi_video_register(void) { return 0; }
Zhao Yakui86e437f2009-06-16 11:23:13 +080036static inline void acpi_video_unregister(void) { return; }
Matthew Garrette92a7162010-01-12 14:17:03 -050037static inline int acpi_video_get_edid(struct acpi_device *device, int type,
38 int device_id, void **edid)
39{
40 return -ENODEV;
41}
Hans de Goede87521e12015-06-16 16:27:48 +020042static inline enum acpi_backlight_type acpi_video_get_backlight_type(void)
43{
44 return acpi_backlight_vendor;
45}
Borislav Petkoveddda192015-06-24 12:01:49 +020046static inline void acpi_video_set_dmi_backlight_type(enum acpi_backlight_type type)
Hans de Goede87521e12015-06-16 16:27:48 +020047{
48}
Matthew Garrett74a365b2009-03-19 21:35:39 +000049#endif
50
51#endif