diff options
-rw-r--r-- | drivers/acpi/video.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_opregion.c | 9 | ||||
-rw-r--r-- | include/acpi/video.h | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index fb9ffe9adc64..5bb1278e9324 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -241,13 +241,14 @@ static bool acpi_video_use_native_backlight(void) | |||
241 | return use_native_backlight_dmi; | 241 | return use_native_backlight_dmi; |
242 | } | 242 | } |
243 | 243 | ||
244 | static bool acpi_video_verify_backlight_support(void) | 244 | bool acpi_video_verify_backlight_support(void) |
245 | { | 245 | { |
246 | if (acpi_osi_is_win8() && acpi_video_use_native_backlight() && | 246 | if (acpi_osi_is_win8() && acpi_video_use_native_backlight() && |
247 | backlight_device_registered(BACKLIGHT_RAW)) | 247 | backlight_device_registered(BACKLIGHT_RAW)) |
248 | return false; | 248 | return false; |
249 | return acpi_video_backlight_support(); | 249 | return acpi_video_backlight_support(); |
250 | } | 250 | } |
251 | EXPORT_SYMBOL_GPL(acpi_video_verify_backlight_support); | ||
251 | 252 | ||
252 | /* backlight device sysfs support */ | 253 | /* backlight device sysfs support */ |
253 | static int acpi_video_get_brightness(struct backlight_device *bd) | 254 | static int acpi_video_get_brightness(struct backlight_device *bd) |
diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c index 2e2c71fcc9ed..4f6b53998d79 100644 --- a/drivers/gpu/drm/i915/intel_opregion.c +++ b/drivers/gpu/drm/i915/intel_opregion.c | |||
@@ -403,6 +403,15 @@ static u32 asle_set_backlight(struct drm_device *dev, u32 bclp) | |||
403 | 403 | ||
404 | DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp); | 404 | DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp); |
405 | 405 | ||
406 | /* | ||
407 | * If the acpi_video interface is not supposed to be used, don't | ||
408 | * bother processing backlight level change requests from firmware. | ||
409 | */ | ||
410 | if (!acpi_video_verify_backlight_support()) { | ||
411 | DRM_DEBUG_KMS("opregion backlight request ignored\n"); | ||
412 | return 0; | ||
413 | } | ||
414 | |||
406 | if (!(bclp & ASLE_BCLP_VALID)) | 415 | if (!(bclp & ASLE_BCLP_VALID)) |
407 | return ASLC_BACKLIGHT_FAILED; | 416 | return ASLC_BACKLIGHT_FAILED; |
408 | 417 | ||
diff --git a/include/acpi/video.h b/include/acpi/video.h index ea4c7bbded4d..843ef1adfbfa 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h | |||
@@ -22,6 +22,7 @@ extern void acpi_video_unregister(void); | |||
22 | extern void acpi_video_unregister_backlight(void); | 22 | extern void acpi_video_unregister_backlight(void); |
23 | extern int acpi_video_get_edid(struct acpi_device *device, int type, | 23 | extern int acpi_video_get_edid(struct acpi_device *device, int type, |
24 | int device_id, void **edid); | 24 | int device_id, void **edid); |
25 | extern bool acpi_video_verify_backlight_support(void); | ||
25 | #else | 26 | #else |
26 | static inline int acpi_video_register(void) { return 0; } | 27 | static inline int acpi_video_register(void) { return 0; } |
27 | static inline void acpi_video_unregister(void) { return; } | 28 | static inline void acpi_video_unregister(void) { return; } |
@@ -31,6 +32,7 @@ static inline int acpi_video_get_edid(struct acpi_device *device, int type, | |||
31 | { | 32 | { |
32 | return -ENODEV; | 33 | return -ENODEV; |
33 | } | 34 | } |
35 | static inline bool acpi_video_verify_backlight_support(void) { return false; } | ||
34 | #endif | 36 | #endif |
35 | 37 | ||
36 | #endif | 38 | #endif |