Received: by 10.192.165.156 with SMTP id m28csp51227imm; Tue, 10 Apr 2018 16:11:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx49PwDuz3o+jbuKNUx8janS3YwfoqeBC29TW8W2rRn8GGo7uoTzhbmhNBky2gyCyn2vJoldY X-Received: by 2002:a17:902:244:: with SMTP id 62-v6mr2438969plc.125.1523401879735; Tue, 10 Apr 2018 16:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523401879; cv=none; d=google.com; s=arc-20160816; b=u0jVARqufGC6LQwk+n3i73Eene7Nvv0j+pBTjcOy1lHYRGmClj0D4fs4cHJ5I2KOdb 2X/JINRa+4XQwgPya9R7d2GQgcgpkurpNxIo6uhyMvs3huMRVe1Wi13gw6KbIG0jGW3y k5GLWFPJiYs4QZE4VGPq/cz262MTxVdAlSB8Bwm2FMowvsTRFaqTg1+phvWFSb6ZZncG NLfD+a/ub4vHVmkYHXgyaVZo0LRMP0BLabB4A+NlnOdXvPCxJ2P7qohvwkVaE0kVda7L DDhoO9wFujYRfeKAHln1Vz00pjpWcfPV96VaQY+yKT4W6S2hMV56Ac7Nz/6eGEa/s36H opQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=GJ99xkCiVUovRk/R3xg1qAgd4XqUrTSx2lSyArz3Zls=; b=dYkfPzB/dlZD3DlbsCMjTUVFYyFg6IETxbphKfOtQlsnzcGKoceWCYmgeL3ZW6CrZT TOp7v3Ef+kc1mhVcJd4qxRqR/gC1fwIYyRi6MrGYELnD3DbTIFVqgLeE0K+dOT/qe3An R7Rb4v+AoqwKV7eXtvIyUahlAA40K3P9zAuhjh9B37MI2FFP4YdnFms9P8oz9od9Gsgp HsuKk8TXso5yOgGYTC/IYp27CmkkO5RO2fqfYYLxJT9e/E0TOpN2EaW5A8ejymrYQibc zR8JfGediRy59Pb8owIChNxVd0XFCOZ+g9PhrMCrQxdwtVYIiOPhHwt8DLTuTFDhuzZf I7Rw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 18si2834515pfl.407.2018.04.10.16.10.43; Tue, 10 Apr 2018 16:11:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755667AbeDJXGT (ORCPT + 99 others); Tue, 10 Apr 2018 19:06:19 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41674 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755399AbeDJWeO (ORCPT ); Tue, 10 Apr 2018 18:34:14 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C7914CDB; Tue, 10 Apr 2018 22:34:13 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.14 016/138] ACPI / video: Default lcd_only to true on Win8-ready and newer machines Date: Wed, 11 Apr 2018 00:23:26 +0200 Message-Id: <20180410212904.000064796@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212902.121524696@linuxfoundation.org> References: <20180410212902.121524696@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ 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=1097436 Link: https://bugzilla.redhat.com/show_bug.cgi?id=1133327 Link: https://bugzilla.redhat.com/show_bug.cgi?id=1133329 Link: https://bugzilla.redhat.com/show_bug.cgi?id=1133646 Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/acpi_video.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) --- 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 = false; module_param(device_id_scheme, bool, 0444); -static bool only_lcd = false; -module_param(only_lcd, bool, 0444); +static int only_lcd = -1; +module_param(only_lcd, int, 0444); static int register_count; static DEFINE_MUTEX(register_count_mutex); @@ -2136,6 +2136,16 @@ int acpi_video_register(void) goto leave; } + /* + * 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 == -1) + only_lcd = acpi_osi_is_win8(); + dmi_check_system(video_dmi_table); ret = acpi_bus_register_driver(&acpi_video_bus);