From patchwork Sun Nov 30 01:14:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Lu X-Patchwork-Id: 5407241 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 86362BEEA8 for ; Sun, 30 Nov 2014 01:14:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A20120123 for ; Sun, 30 Nov 2014 01:14:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A330A200E6 for ; Sun, 30 Nov 2014 01:14:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751808AbaK3BOc (ORCPT ); Sat, 29 Nov 2014 20:14:32 -0500 Received: from mga03.intel.com ([134.134.136.65]:33054 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751804AbaK3BOb (ORCPT ); Sat, 29 Nov 2014 20:14:31 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 29 Nov 2014 17:11:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,485,1413270000"; d="scan'208";a="645573144" Received: from aaronlu.sh.intel.com ([10.239.37.127]) by orsmga002.jf.intel.com with ESMTP; 29 Nov 2014 17:14:29 -0800 Message-ID: <547A6F75.6050806@intel.com> Date: Sun, 30 Nov 2014 09:14:29 +0800 From: Aaron Lu MIME-Version: 1.0 To: Brian Norris CC: "Rafael J. Wysocki" , ntrrgc@gmail.com, ACPI Devel Mailing List , linux-kernel@vger.kernel.org Subject: [PATCH] ACPI / video: update the condition to check if a device is in _DOD list References: <542A4949.2020208@intel.com> <1648939.GaN1bonAuX@vostro.rjw.lan> <5436470B.3030306@intel.com> <20141128095928.GA5106@norris-Latitude-E6410> <54786294.5030105@intel.com> <20141128171812.GA3658@norris-Latitude-E6410> <5479C3BB.5080905@intel.com> <20141129173447.GA3608@norris-Latitude-E6410> In-Reply-To: <20141129173447.GA3608@norris-Latitude-E6410> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 11/30/2014 01:34 AM, Brian Norris wrote: > Tested-by: Brian Norris Thanks for the test! Updated patch with changelog: From 0b11bb529245ddceb69eb558477b9b4a81208f4b Mon Sep 17 00:00:00 2001 From: Aaron Lu Date: Sun, 30 Nov 2014 09:01:15 +0800 Subject: [PATCH] ACPI / video: update the condition to check if a device is in _DOD list Commit 0b8db271f159 ("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: 0b8db271f159 ("ACPI / video: check _DOD list when creating backlight devices") Signed-off-by: Aaron Lu Tested-by: Brian Norris --- drivers/acpi/video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 41e6b977ceb2..185a57d13723 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -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; }