Skip to content

Commit

Permalink
ACPI / video: update condition to check if device is in _DOD list
Browse files Browse the repository at this point in the history
Commit 0b8db27 ("ACPI / video: check _DOD list when creating
backlight devices") checks if the video device is in the bind devices
list to decide if we should create backlight device for it, that causes
problem for one Dell Latitude E6410, where none of the video output
devices are properly bound due to the way how we did the comparing
between its _ADR and the _DOD's values. Solve this problem by comparing
the lower 12 bits of both the device's _ADR and the _DOD's values instead
of relying on bind result.

Fixes: 0b8db27 ("ACPI / video: check _DOD list when creating backlight devices")
Reported-and-tested-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Aaron Lu authored and Rafael J. Wysocki committed Dec 1, 2014
1 parent 009d043 commit 35d0565
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,8 @@ static bool acpi_video_device_in_dod(struct acpi_video_device *device)
return true;

for (i = 0; i < video->attached_count; i++) {
if (video->attached_array[i].bind_info == device)
if ((video->attached_array[i].value.int_val & 0xfff) ==
(device->device_id & 0xfff))
return true;
}

Expand Down

0 comments on commit 35d0565

Please sign in to comment.