summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2014-12-15 03:01:29 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-15 09:24:23 -0500
commitb4df463678fb9c6dae9548dbb7545993779fd416 (patch)
treeec7f40a4895dc5b23ab7b6b098a01398b2ec4236 /drivers/acpi
parent667ae4ee6c29c7ea261d53d3ecc016026d9c2a9a (diff)
ACPI / video: update the skip case for acpi_video_device_in_dod()
If the firmware has declared more than 8 video output devices, and the one that control the internal panel's backlight is listed after the first 8 output devices, the _DOD will not include it due to the current i915 operation region implementation. As a result, we will not create a backlight device for it while we should. Solve this problem by special case the firmware that has 8+ output devices in that if we see such a firmware, we do not test if the device is in _DOD list. The creation of the backlight device will also enable the firmware to emit events on backlight hotkey press when the acpi_osi= cmdline option is specified on those affected ASUS laptops. Link: https://bugzilla.kernel.org/show_bug.cgi?id=70241 Reported-and-tested-by: Oleksij Rempel <linux@rempel-privat.de> Reported-and-tested-by: Dmitry Tunin <hanipouspilot@gmail.com> Reported-and-tested-by: Jimbo <jaime.91@hotmail.es> Cc: 3.18+ <stable@vger.kernel.org> # 3.18+ Signed-off-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/video.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 185a57d13723..1eaadff2e198 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -155,6 +155,7 @@ struct acpi_video_bus {
155 u8 dos_setting; 155 u8 dos_setting;
156 struct acpi_video_enumerated_device *attached_array; 156 struct acpi_video_enumerated_device *attached_array;
157 u8 attached_count; 157 u8 attached_count;
158 u8 child_count;
158 struct acpi_video_bus_cap cap; 159 struct acpi_video_bus_cap cap;
159 struct acpi_video_bus_flags flags; 160 struct acpi_video_bus_flags flags;
160 struct list_head video_device_list; 161 struct list_head video_device_list;
@@ -1159,8 +1160,12 @@ static bool acpi_video_device_in_dod(struct acpi_video_device *device)
1159 struct acpi_video_bus *video = device->video; 1160 struct acpi_video_bus *video = device->video;
1160 int i; 1161 int i;
1161 1162
1162 /* If we have a broken _DOD, no need to test */ 1163 /*
1163 if (!video->attached_count) 1164 * If we have a broken _DOD or we have more than 8 output devices
1165 * under the graphics controller node that we can't proper deal with
1166 * in the operation region code currently, no need to test.
1167 */
1168 if (!video->attached_count || video->child_count > 8)
1164 return true; 1169 return true;
1165 1170
1166 for (i = 0; i < video->attached_count; i++) { 1171 for (i = 0; i < video->attached_count; i++) {
@@ -1413,6 +1418,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
1413 dev_err(&dev->dev, "Can't attach device\n"); 1418 dev_err(&dev->dev, "Can't attach device\n");
1414 break; 1419 break;
1415 } 1420 }
1421 video->child_count++;
1416 } 1422 }
1417 return status; 1423 return status;
1418} 1424}