Received: by 10.213.65.68 with SMTP id h4csp44975imn; Mon, 19 Mar 2018 19:01:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELtIc84K/O+Snmawb4BrdHuKsjSbKk9sJUxnw6R1S48/z0tukMayoy+BzbPqiJIyGtfcGqlE X-Received: by 2002:a17:902:f64:: with SMTP id 91-v6mr14583705ply.232.1521511314960; Mon, 19 Mar 2018 19:01:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521511314; cv=none; d=google.com; s=arc-20160816; b=YueIUdlzEpoNXfChVbEBQlHNeqZICPj9YcHp2zQ3mbIA4VpCF+LgSIO+oXHOhSzlJ7 Nhf/lq2pPAmJcVWb53Z0Rve/d7sZWHfaBBIg3uaHpB+54cQgajQJ4xNByAjzKokzZEbX YlZstmFnKur13cwdl4/rXP3hjWyjGvNt4g94YBsFG4jOJsjmbIAV5NkoxTtd3xciyhUE QzhAVnS4UkNp8jYsi6Y1qRAAryUt1WVIOmxCi1KF0Oua8qoM9Z3MDmvvudI0oJ2+gSRh qgzwfsx0tE2KtNhtrAIIKyuj1dt1Ptd5k/ksjw7W5ewJUtHz9fcfAK47AGWrrAtby/5K TYtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=txxx+LWgpbp10dYyJujSOkFgSIwXqZKBh6NHFTj2tyc=; b=tYBJLi8hViixlCFUoEAc4ALllBYaK7KyO4852vm0k7gzwDYA+yV4OVJYd4ySUm9Bul b65UjeduXZq7dNTtjQZydine4wi/PcH+A4k2QCnrd8erTU5cE6/gjYQbCb6KqwSiIxSM jFI5aapOnOaTazJkQLnsynEZkrnM0CyZE7jq9S2Bk1rjkpq1qRfllQwMaUWgCDvE+6Ur SNXQreeQkbOgIKb8ag1MYxIkF3NMNuiidXLHOXvWHuckvItxKskxwRktLiKp/Md0tezI bqZGxPxqp72LyskfJGsDxCBMp08zk5etIc2g7s65/tvsyiNgmumKL9p5xGt884p/1K2F lqAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=K26/JKU/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12-v6si593983plw.169.2018.03.19.19.01.41; Mon, 19 Mar 2018 19:01:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=K26/JKU/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936649AbeCSWjx (ORCPT + 99 others); Mon, 19 Mar 2018 18:39:53 -0400 Received: from mail-by2nam01on0130.outbound.protection.outlook.com ([104.47.34.130]:4160 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933160AbeCSPrX (ORCPT ); Mon, 19 Mar 2018 11:47:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=txxx+LWgpbp10dYyJujSOkFgSIwXqZKBh6NHFTj2tyc=; b=K26/JKU/PHyGyAaQBEyTFljyRll4Ti5p2UpdO5uentEP46qGMaTJnHTLbhjewrLoTjsUkug+VCW5fhlzD4fdxi8FVUSOAjTuzPXOzio58KQI/df2NsNdCsnI0Af4W8EVIwT/RCx5/u2rPv32GOvRh0cjkFLYmM90/07JRQVdGLw= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0728.namprd21.prod.outlook.com (10.167.110.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 15:47:17 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 15:47:17 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Hans de Goede , "Rafael J . Wysocki" , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 018/124] ACPI / video: Default lcd_only to true on Win8-ready and newer machines Thread-Topic: [PATCH AUTOSEL for 4.15 018/124] ACPI / video: Default lcd_only to true on Win8-ready and newer machines Thread-Index: AQHTv5mO41RDtvYTbkqYVxmngs9SdQ== Date: Mon, 19 Mar 2018 15:47:17 +0000 Message-ID: <20180319154645.11350-18-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0728;7:u2gImwDOdiimoAjiQYP95XlXyFsEr0PWyUwyE/eTeYE3qyZAib84dBTOPuY30m/1mlwqeD4Z7KRVkTsMjBxYXuh+ry/MJIQtz5/9og7nWcxENXpnGsk7tSaO6KT4b18rWzL9YnEd7oIwJkWkf9TrcragpWro/Rhh6Xqesg7x2LBa5DuPQhTeq6nboD6NUErIiMCYPiIgjaNllH587UnMwjUNtn2bgeBJipC4NYYTE8tV+c+sYaUt+BZj8J0oLQ/4;20:Ha/1wvcRbKLl87cRURuNiwf0OLNXDNDzFI/V6ilQg/Azb92kztafcEKWf0lt/RDdXSf7GBu58u4SGUmIhYmAwcuZtVBDm9b/4CPC5i8e8I2sQPWuFJRjHbf5pLsNM7OtMu4g31EtA0bgdXTnC2TTTZEk1nctg6XPucYvYgS1bBE= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: fc7d12e5-cdf6-4c6d-57af-08d58db0b187 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0728; x-ms-traffictypediagnostic: DM5PR2101MB0728: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(83566789882024)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0728;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0728; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(39860400002)(396003)(346002)(39380400002)(366004)(199004)(189003)(10290500003)(26005)(305945005)(68736007)(186003)(59450400001)(25786009)(4326008)(102836004)(66066001)(6506007)(8676002)(2900100001)(5660300001)(7736002)(2950100002)(81166006)(10090500001)(81156014)(97736004)(5250100002)(3280700002)(2501003)(76176011)(316002)(8936002)(478600001)(53936002)(575784001)(99286004)(86612001)(72206003)(107886003)(110136005)(966005)(54906003)(6512007)(14454004)(6436002)(22452003)(3660700001)(3846002)(6306002)(6116002)(6486002)(106356001)(1076002)(36756003)(2906002)(105586002)(86362001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0728;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: VWkLejiyGMWlxjcdiwHWx5kNgFATVABBgmnHCOCUzn4tfEq11MMwvfwcsdV9mZeZXdISMCSQfVjm7ugT9KD9OhQNx6g1yF88dIRo+prbRSiSQOer9QmgNhhMvqs2ECfU/T5Cdk3MHWRZ/EKBLzj381U30cBiul4BTqEM1eHVpGb0QS4paokuqy8nL6n0Hf7/pKT615fksYGGDhyA5HBUh+EgCfMh4X+Vo1iJhND/QSHGZ0Tv7IDcir4ioeL2tJ52aZ4pesaYaSmHNBXdva8yOKVnHQRHR9o4GYT0fR2kt0zFBhvch8vK44E0jWU9eUszpQmi9sATxYqCBxn5H7AupQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc7d12e5-cdf6-4c6d-57af-08d58db0b187 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:47:17.3749 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0728 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit 5928c281524fe451114e04f1dfa11246a37e859f ] We're seeing a lot of bogus backlight interfaces on newer machines without a LCD such as desktops, servers and HDMI sticks. This causes userspace to show a non-functional brightness slider in e.g. the GNOME3 system menu, which is undesirable. And, in general, we should simply just not register a non functional backlight interface. Checking the LCD flag causes the bogus acpi_video backlight interfaces to go away (on the machines this was tested on). This change sets the lcd_only option by default on any machines which are Win8-ready, to fix this. This is not entirely without a risk of regressions, but video_detect.c already prefers native-backlight interfaces over the acpi_video one on Win8-ready machines, calling acpi_video_unregister_backlight() as soon as a native interface shows up. This is done because the ACPI backlight interface often is broken on Win8-ready machines, because win8 does not seem to actually use it. So in practice we already end up not registering the ACPI backlight interface on (most) Win8-ready machines with a LCD panel, thus this change does not change anything for (most) machines with a LCD panel and on machines without a LCD panel we actually don't want to register any backlight interfaces. This has been tested on the following machines and fixes a bogus backlight interface showing up there: - Desktop with an Asrock B150M Pro4S/D3 m.b. using i5-6500 builtin gfx - Intel Compute Stick STK1AW32SC - Meegopad T08 HDMI stick Bogus backlight interfaces have also been reported on: - Desktop with Asus H87I-Plus m.b. - Desktop with ASRock B75M-ITX m.b. - Desktop with Gigabyte Z87-D3HP m.b. - Dell PowerEdge T20 desktop Link: https://bugzilla.redhat.com/show_bug.cgi?id=3D1097436 Link: https://bugzilla.redhat.com/show_bug.cgi?id=3D1133327 Link: https://bugzilla.redhat.com/show_bug.cgi?id=3D1133329 Link: https://bugzilla.redhat.com/show_bug.cgi?id=3D1133646 Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/acpi_video.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index 0972ec0e2eb8..f53ccc680238 100644 --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -80,8 +80,8 @@ MODULE_PARM_DESC(report_key_events, static bool device_id_scheme =3D false; module_param(device_id_scheme, bool, 0444); =20 -static bool only_lcd =3D false; -module_param(only_lcd, bool, 0444); +static int only_lcd =3D -1; +module_param(only_lcd, int, 0444); =20 static int register_count; static DEFINE_MUTEX(register_count_mutex); @@ -2136,6 +2136,16 @@ int acpi_video_register(void) goto leave; } =20 + /* + * We're seeing a lot of bogus backlight interfaces on newer machines + * without a LCD such as desktops, servers and HDMI sticks. Checking + * the lcd flag fixes this, so enable this on any machines which are + * win8 ready (where we also prefer the native backlight driver, so + * normally the acpi_video code should not register there anyways). + */ + if (only_lcd =3D=3D -1) + only_lcd =3D acpi_osi_is_win8(); + dmi_check_system(video_dmi_table); =20 ret =3D acpi_bus_register_driver(&acpi_video_bus); --=20 2.14.1