diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-07-10 19:04:25 (GMT) |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-07-10 19:04:25 (GMT) |
commit | ff253d3d405fd313a4c3d2195e4b8514d9d2ca21 (patch) | |
tree | ac0a62143b888c83319f309432092fde456f5ec2 | |
parent | 0b80a8ff07e0ff006dcb5286afaeddcb1114d0f1 (diff) | |
parent | ab7027de5c01e4fba0e5ef946f0db27b2e3d799d (diff) | |
download | linux-ff253d3d405fd313a4c3d2195e4b8514d9d2ca21.tar.xz |
Merge branch 'acpi-video'
* acpi-video:
ACPI / video: Add Acer TravelMate B113 to native backlight blacklist
ACPI / video: Add Dell Inspiron 5737 to the blacklist
ACPI / i915: ignore firmware requests for backlight change
-rw-r--r-- | drivers/acpi/video.c | 11 | ||||
-rw-r--r-- | drivers/acpi/video_detect.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_opregion.c | 9 | ||||
-rw-r--r-- | include/acpi/video.h | 2 |
4 files changed, 29 insertions, 1 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index fb9ffe9..071c1df 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -241,13 +241,14 @@ static bool acpi_video_use_native_backlight(void) return use_native_backlight_dmi; } -static bool acpi_video_verify_backlight_support(void) +bool acpi_video_verify_backlight_support(void) { if (acpi_osi_is_win8() && acpi_video_use_native_backlight() && backlight_device_registered(BACKLIGHT_RAW)) return false; return acpi_video_backlight_support(); } +EXPORT_SYMBOL_GPL(acpi_video_verify_backlight_support); /* backlight device sysfs support */ static int acpi_video_get_brightness(struct backlight_device *bd) @@ -563,6 +564,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { }, }, { + .callback = video_set_use_native_backlight, + .ident = "Acer TravelMate B113", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate B113"), + }, + }, + { .callback = video_set_use_native_backlight, .ident = "HP ProBook 4340s", .matches = { diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 33e3db5..c42feb2 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -166,6 +166,14 @@ static struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "UL30A"), }, }, + { + .callback = video_detect_force_vendor, + .ident = "Dell Inspiron 5737", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 5737"), + }, + }, { }, }; diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c index 2e2c71f..4f6b539 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) DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp); + /* + * If the acpi_video interface is not supposed to be used, don't + * bother processing backlight level change requests from firmware. + */ + if (!acpi_video_verify_backlight_support()) { + DRM_DEBUG_KMS("opregion backlight request ignored\n"); + return 0; + } + if (!(bclp & ASLE_BCLP_VALID)) return ASLC_BACKLIGHT_FAILED; diff --git a/include/acpi/video.h b/include/acpi/video.h index ea4c7bb..843ef1a 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h @@ -22,6 +22,7 @@ extern void acpi_video_unregister(void); extern void acpi_video_unregister_backlight(void); extern int acpi_video_get_edid(struct acpi_device *device, int type, int device_id, void **edid); +extern bool acpi_video_verify_backlight_support(void); #else static inline int acpi_video_register(void) { return 0; } 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, { return -ENODEV; } +static inline bool acpi_video_verify_backlight_support(void) { return false; } #endif #endif |