diff options
| author | Corentin Chary <corentin.chary@gmail.com> | 2012-06-13 03:32:01 -0400 |
|---|---|---|
| committer | Matthew Garrett <mjg@redhat.com> | 2012-07-28 00:11:48 -0400 |
| commit | f838eb5bd257e8a666aa8c451058fa198df7e299 (patch) | |
| tree | 4a0ce12abef63c20367256b24f1bdf183f284238 /include/linux | |
| parent | 1eb3fe1d3b6b9bf6045eb12f0c3ac12569169870 (diff) | |
acpi: add a way to promote/demote vendor backlight drivers
Instead of adding a big blacklist in video_detect.c to set
ACPI_VIDEO_BACKLIGHT_DMI_VENDOR correctly, let external modules
promote or demote themselves when they know the generic video
module won't work.
Currently drivers where using acpi_video_unregister() directly
but:
- That didn't respect any acpi_backlight=[video|vendor] parameter
provided by the user.
- Any later call to acpi_video_register() would still re-load the
generic video module (and some gpu drivers are doing that).
This patch fix those two issues.
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/acpi.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index f421dd84f29d..27ab2011067b 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -190,6 +190,8 @@ extern bool wmi_has_guid(const char *guid); | |||
| 190 | 190 | ||
| 191 | extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle); | 191 | extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle); |
| 192 | extern long acpi_is_video_device(struct acpi_device *device); | 192 | extern long acpi_is_video_device(struct acpi_device *device); |
| 193 | extern void acpi_video_dmi_promote_vendor(void); | ||
| 194 | extern void acpi_video_dmi_demote_vendor(void); | ||
| 193 | extern int acpi_video_backlight_support(void); | 195 | extern int acpi_video_backlight_support(void); |
| 194 | extern int acpi_video_display_switch_support(void); | 196 | extern int acpi_video_display_switch_support(void); |
| 195 | 197 | ||
| @@ -205,6 +207,14 @@ static inline long acpi_is_video_device(struct acpi_device *device) | |||
| 205 | return 0; | 207 | return 0; |
| 206 | } | 208 | } |
| 207 | 209 | ||
| 210 | static inline void acpi_video_dmi_promote_vendor(void) | ||
| 211 | { | ||
| 212 | } | ||
| 213 | |||
| 214 | static inline void acpi_video_dmi_demote_vendor(void) | ||
| 215 | { | ||
| 216 | } | ||
| 217 | |||
| 208 | static inline int acpi_video_backlight_support(void) | 218 | static inline int acpi_video_backlight_support(void) |
| 209 | { | 219 | { |
| 210 | return 0; | 220 | return 0; |
