Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6265083rwb; Tue, 9 Aug 2022 12:03:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR5dsoXDenQW3wY6xiLLRU0Wzl3BLFGMYjtC3chU4KOuMgHHJjc+YzJIto6VidYmIi3FQ4i1 X-Received: by 2002:a17:903:22d1:b0:16f:a93:918b with SMTP id y17-20020a17090322d100b0016f0a93918bmr25389042plg.123.1660071780616; Tue, 09 Aug 2022 12:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660071780; cv=none; d=google.com; s=arc-20160816; b=UDsRTRy6NoDz/I5c0PaI8xGDzwshBMqkyNqA4OdHuc3QUEkI8zHhOaMnN/mRlQ/oVL G5BmEKTAoHScJ8s9wW9+M091B7c5KTToCD+F76SUj+yTtqC9ulkEEKVyPmGUKfPPLsjk RlIhqR5/NaAJVV7AyhxFZLSXtOSUgvB9cvkCrNFiuQm357FL690S6m3AkUNitCsePpsr XsD73fcYj0pY/lTRHZpFkKuUJaii0pxdt5t7DS/YDhxDcfrK2/ixEn5z34+G7oKYxqZ7 9Bz60QfopJZEIxyUN4y12kywaN4gBNqQ3kwGZHJRDvxLG01Hdl5tex+tKX4jCRAzOEbI 8/Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CR6OlqECW+4aSe0/OAYUe3q8RDrcRKhyrykjvBaRUT0=; b=rrePy1oi9MfaTVG674kg7/jfx74k/AwHbfEoyGQEyoS1NK3gc522a6HmzvAfojQwim H53QMd3Ods3xRApRCLyvscNNXPbqrBWxZRsdYYeSw51jog4sqN8lbkKQbd7uooCr2Lz/ 193GtLJMJzHVCt2atHkL3Slgkf5uXqu9CyH2ogO1ijS2GRvFJ0VIKENg2R8bWg1sTe2q bE7aGwLaaArPKtjXMcxFbfT3qpLl/9Rszu4OUuR0uVimQmxDhmc1NQSVc0aU6BMuXzmy 8MmEdjQDiiifOJppbwDxfevE8MdqiQaVwGv+enqn/J2GKJY5p3ME9W+NxnY2odgFVzTv KDEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bV8b7Vww; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15-20020a63fd0f000000b0041bff5ba0dasi13925833pgh.591.2022.08.09.12.02.32; Tue, 09 Aug 2022 12:03:00 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bV8b7Vww; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343607AbiHISHj (ORCPT + 99 others); Tue, 9 Aug 2022 14:07:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344853AbiHISG4 (ORCPT ); Tue, 9 Aug 2022 14:06:56 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 361FB2611B; Tue, 9 Aug 2022 11:03:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id A23F7CE18A6; Tue, 9 Aug 2022 18:03:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D66E6C433D7; Tue, 9 Aug 2022 18:03:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660068181; bh=t6omEt3IXRTOqFA+8zsUIm7gKxitv9ZMWRIYZ/i/uR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bV8b7VwwtcldX63Hw6JKShsr9hbe45zk787KQ4uKeFv0lSIMjGV4//LlCAuq1NSgG NZ9gffEXU3E7COY1c0YApJJgvmq5/YwyABUPNi5bRQ2q0dOwpXvlEOJU3SIx//eI9h yV+dtdb5f722jK7xo0LmTdgaqgGlTVEKiKygTlzM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Werner Sembach , Hans de Goede , "Rafael J. Wysocki" Subject: [PATCH 5.4 02/15] ACPI: video: Force backlight native for some TongFang devices Date: Tue, 9 Aug 2022 20:00:20 +0200 Message-Id: <20220809175510.391904671@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220809175510.312431319@linuxfoundation.org> References: <20220809175510.312431319@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Werner Sembach commit c752089f7cf5b5800c6ace4cdd1a8351ee78a598 upstream. The TongFang PF5PU1G, PF4NU1F, PF5NU1G, and PF5LUXG/TUXEDO BA15 Gen10, Pulse 14/15 Gen1, and Pulse 15 Gen2 have the same problem as the Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2: They have 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: All applicable Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/video_detect.c | 51 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -447,7 +447,56 @@ static const struct dmi_system_id video_ DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"), }, }, - + /* + * The TongFang PF5PU1G, PF4NU1F, PF5NU1G, and PF5LUXG/TUXEDO BA15 Gen10, + * Pulse 14/15 Gen1, and Pulse 15 Gen2 have the same problem as the Clevo + * NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2. See the description + * above. + */ + { + .callback = video_detect_force_native, + .ident = "TongFang PF5PU1G", + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "PF5PU1G"), + }, + }, + { + .callback = video_detect_force_native, + .ident = "TongFang PF4NU1F", + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "PF4NU1F"), + }, + }, + { + .callback = video_detect_force_native, + .ident = "TongFang PF4NU1F", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), + DMI_MATCH(DMI_BOARD_NAME, "PULSE1401"), + }, + }, + { + .callback = video_detect_force_native, + .ident = "TongFang PF5NU1G", + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "PF5NU1G"), + }, + }, + { + .callback = video_detect_force_native, + .ident = "TongFang PF5NU1G", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), + DMI_MATCH(DMI_BOARD_NAME, "PULSE1501"), + }, + }, + { + .callback = video_detect_force_native, + .ident = "TongFang PF5LUXG", + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "PF5LUXG"), + }, + }, /* * Desktops which falsely report a backlight and which our heuristics * for this do not catch.