aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-06-16 10:27:48 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-06-18 19:10:44 -0400
commit87521e16a7abbf3fa337f56cb4d1e18247f15e8a (patch)
tree63ae44bbc4a4aaf0b48f03536c825d36baaf4238 /include/acpi
parent14ca7a47d0ab2a7a35faab130e6d9682f8ff1a46 (diff)
acpi-video-detect: Rewrite backlight interface selection logic
Currently we have 2 kernel commandline options + dmi-quirks in 3 places all interacting (in interesting ways) to select which which backlight interface to use. On the commandline we've acpi_backlight=[video|vendor] and video.use_native_backlight=[0|1]. DMI quirks we have in acpi/video-detect.c, acpi/video.c and drivers/platform/x86/*.c . This commit is the first step to cleaning this up, replacing the 2 cmdline options with just acpi_backlight=[video|vendor|native|none], and adds a new API to video_detect.c to reflect this. Follow up commits will also move other related code, like unregistering the acpi_video backlight interface if it was registered before other drivers which take priority over it are loaded, to video_detect.c where this logic really belongs. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/video.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/acpi/video.h b/include/acpi/video.h
index 843ef1adfbfa..01b5cc78efd8 100644
--- a/include/acpi/video.h
+++ b/include/acpi/video.h
@@ -16,6 +16,14 @@ struct acpi_device;
16#define ACPI_VIDEO_DISPLAY_LEGACY_PANEL 0x0110 16#define ACPI_VIDEO_DISPLAY_LEGACY_PANEL 0x0110
17#define ACPI_VIDEO_DISPLAY_LEGACY_TV 0x0200 17#define ACPI_VIDEO_DISPLAY_LEGACY_TV 0x0200
18 18
19enum 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
19#if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) 27#if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE)
20extern int acpi_video_register(void); 28extern int acpi_video_register(void);
21extern void acpi_video_unregister(void); 29extern void acpi_video_unregister(void);
@@ -23,6 +31,8 @@ extern void acpi_video_unregister_backlight(void);
23extern int acpi_video_get_edid(struct acpi_device *device, int type, 31extern int acpi_video_get_edid(struct acpi_device *device, int type,
24 int device_id, void **edid); 32 int device_id, void **edid);
25extern bool acpi_video_verify_backlight_support(void); 33extern bool acpi_video_verify_backlight_support(void);
34extern enum acpi_backlight_type acpi_video_get_backlight_type(void);
35extern void acpi_video_set_dmi_backlight_type(enum acpi_backlight_type type);
26#else 36#else
27static inline int acpi_video_register(void) { return 0; } 37static inline int acpi_video_register(void) { return 0; }
28static inline void acpi_video_unregister(void) { return; } 38static inline void acpi_video_unregister(void) { return; }
@@ -33,6 +43,13 @@ static inline int acpi_video_get_edid(struct acpi_device *device, int type,
33 return -ENODEV; 43 return -ENODEV;
34} 44}
35static inline bool acpi_video_verify_backlight_support(void) { return false; } 45static inline bool acpi_video_verify_backlight_support(void) { return false; }
46static inline enum acpi_backlight_type acpi_video_get_backlight_type(void)
47{
48 return acpi_backlight_vendor;
49}
50static void acpi_video_set_dmi_backlight_type(enum acpi_backlight_type type)
51{
52}
36#endif 53#endif
37 54
38#endif 55#endif