Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1534900pxp; Thu, 17 Mar 2022 11:01:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylz34JsEj+xIY4rNOM9UEd8R9TO+K6725/hz7/z/Cu0aOcCzrZ47LhgCzVKepFDGVt8a8K X-Received: by 2002:a17:902:9a4c:b0:14d:b0c0:1f7a with SMTP id x12-20020a1709029a4c00b0014db0c01f7amr6270416plv.57.1647540100471; Thu, 17 Mar 2022 11:01:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647540100; cv=none; d=google.com; s=arc-20160816; b=jdrR7I7qhY02XDA5jH7ZTyGJ+4wg0/RIF40uwAn9uKOJeNoi+GW1ZdX5SFLo4ZvE6e lPXYmlzXqHrltKiGuh8lt/MFXCb9D8cwieUqa28rj/bKwF4le13kUGXJoRo0MOYZ8l8a yPBNFwisV0f5sZe+TYkFcAK1srBh487N8DqcjgIHINFI4+eyowWsQHNpI0HJQQOmz/6L MjPtEpCHuPKC6TAueka6a893nOD0lMIdVFgDnajRIOqfKpehPTGmATwekLJ+mx/rcu5x Yxcb1N1yrOBVNg82bQ2Mg+YSp8C6R0yqOjNSebf8v3x0BZPCs/lB1gAhNlYiBlmyE97j vVfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=KrVPm0cGVD9kw1HlnBFNiKgwq9G5aMTytWTYTGiKmXw=; b=TsV/dYousknYqUfvuyhDGBk2qXdtqLJLP3XkzThwmU2B0OALGLQrMH0FERYGXdz5Iu 8RAvch7sH1N/evjNH7sxutwJIR4ZY/4vsrr1TjeN8aKEfMSZv5bd4Zqu6NEaW72u5SrW 98WWCDP0jLwfo2K1Yi28ykYk6lhjwLJrnQeU0oglycZIkCkknEIwijUYIghh7xhQ5Az0 dLWScAq/9tj9NK80xBgiNR4YfD6D16LoSP4OZwf9L0Qj8Yz0LlJMBYhGV3vgZnkUpdjN z0R0Uwjdk6fu2fO9GlV2hbsuw+M4stPEl7sU5Y5zbQ0ZatGNcxIAwrQO+rhVr+z4x+hV 2nbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bj17-20020a056a02019100b003816043f044si2997705pgb.569.2022.03.17.11.01.25; Thu, 17 Mar 2022 11:01:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234584AbiCQNcV (ORCPT + 99 others); Thu, 17 Mar 2022 09:32:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234589AbiCQNcU (ORCPT ); Thu, 17 Mar 2022 09:32:20 -0400 Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29E861D78A7; Thu, 17 Mar 2022 06:31:03 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id j2so10325511ybu.0; Thu, 17 Mar 2022 06:31:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KrVPm0cGVD9kw1HlnBFNiKgwq9G5aMTytWTYTGiKmXw=; b=uv8yOYu2ytWMndmlbnn3FhKljp4ukI4pS47K1qEa2F2qqeLaxREqBLuEMlTH3w3CUs m+oRDsZjRNcdrStOR1KNBS1djzqNwaEPuWkL7isptU/fvtDvOPveYRNPOFXxZAOHQRjP Swh0n1n6/9sktTyOXf61e2X5c92kmAnUiHABw95FF5SK4k21fE3lTIDrAbsgHehNmUlL /q+haTg8fcScduLtdt1uk6LGQg0GI0BhhEdzpRUGxtDD/f/g1QScCom7oUQcm12kcRCY 9u2qgWZeXsn9tfl7w/ZSWHqn2bnlf5y3zSn8G5CB4hTIxPD8EDTHJOHQt6soGbMFRsyy 4Eag== X-Gm-Message-State: AOAM530gK0S0S7Zv1uqQdZ1grqI2RQNln6k1FokSTHI3j2IVm6V+Q5C1 dc7fhBDiOYkqdrH0sNgeNSwvHL2nvSr282ij/s8D9lsE X-Received: by 2002:a25:fe10:0:b0:625:262f:e792 with SMTP id k16-20020a25fe10000000b00625262fe792mr4785672ybe.365.1647523862378; Thu, 17 Mar 2022 06:31:02 -0700 (PDT) MIME-Version: 1.0 References: <20220315190228.1503866-1-wse@tuxedocomputers.com> <20220315190228.1503866-2-wse@tuxedocomputers.com> In-Reply-To: <20220315190228.1503866-2-wse@tuxedocomputers.com> From: "Rafael J. Wysocki" Date: Thu, 17 Mar 2022 14:30:51 +0100 Message-ID: Subject: Re: [PATCH] ACPI/backlight: Force backlight native for Clevo NL5xRU and NL5xNU To: Werner Sembach Cc: "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 15, 2022 at 8:02 PM Werner Sembach wrote: > > Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2 have both a working > native and video interface. However the default detection mechanism first > registers the video interface before unregistering it again and switching > to the native interface during boot. This results in a dangling SBIOS > request for backlight change for some reason, causing the backlight to > switch to ~2% once per boot on the first power cord connect or disconnect > event. Setting the native interface explicitly circumvents this buggy > behaviour by avoiding the unregistering process. > > Signed-off-by: Werner Sembach > Cc: stable@vger.kernel.org > --- > drivers/acpi/video_detect.c | 75 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 75 insertions(+) > > diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c > index 4f64713e9917..becc198e4c22 100644 > --- a/drivers/acpi/video_detect.c > +++ b/drivers/acpi/video_detect.c > @@ -415,6 +415,81 @@ static const struct dmi_system_id video_detect_dmi_table[] = { > DMI_MATCH(DMI_PRODUCT_NAME, "GA503"), > }, > }, > + /* > + * Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2 have both a > + * working native and video interface. However the default detection > + * mechanism first registers the video interface before unregistering > + * it again and switching to the native interface during boot. This > + * results in a dangling SBIOS request for backlight change for some > + * reason, causing the backlight to switch to ~2% once per boot on the > + * first power cord connect or disconnect event. Setting the native > + * interface explicitly circumvents this buggy behaviour, by avoiding > + * the unregistering process. > + */ > + { > + .callback = video_detect_force_native, > + .ident = "Clevo NL5xRU", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), > + DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"), > + }, > + }, > + { > + .callback = video_detect_force_native, > + .ident = "Clevo NL5xRU", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "SchenkerTechnologiesGmbH"), > + DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"), > + }, > + }, > + { > + .callback = video_detect_force_native, > + .ident = "Clevo NL5xRU", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "Notebook"), > + DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"), > + }, > + }, > + { > + .callback = video_detect_force_native, > + .ident = "Clevo NL5xRU", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), > + DMI_MATCH(DMI_BOARD_NAME, "AURA1501"), > + }, > + }, > + { > + .callback = video_detect_force_native, > + .ident = "Clevo NL5xRU", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), > + DMI_MATCH(DMI_BOARD_NAME, "EDUBOOK1502"), > + }, > + }, > + { > + .callback = video_detect_force_native, > + .ident = "Clevo NL5xNU", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), > + DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"), > + }, > + }, > + { > + .callback = video_detect_force_native, > + .ident = "Clevo NL5xNU", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "SchenkerTechnologiesGmbH"), > + DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"), > + }, > + }, > + { > + .callback = video_detect_force_native, > + .ident = "Clevo NL5xNU", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "Notebook"), > + DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"), > + }, > + }, > > /* > * Desktops which falsely report a backlight and which our heuristics > -- Applied as 5.18 material, thanks!