Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3401797rwa; Tue, 23 Aug 2022 04:17:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR7LxAfzZVMpukqPNBHZvgBPVo0+Yos4hLnqZDRBW4cQt9WpAdEpr7T9OpKRFch5PDdsQxxb X-Received: by 2002:a17:90a:4e07:b0:1fb:1253:475b with SMTP id n7-20020a17090a4e0700b001fb1253475bmr2873214pjh.0.1661253464045; Tue, 23 Aug 2022 04:17:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253464; cv=none; d=google.com; s=arc-20160816; b=B/lnx85EgECRNE8WEAvTBb9rd90oGFnh8LkhTzn63pcp19zFJAR8EzfuJwyl7zDS9z 3Xk8/Mlq3ROqRHa3aSvG6lL5ggAQMWhQ9C8qRYvs/ltkWNGphVWF9tjZKB9vllduBC// lqNotmwcKe11aEgtilBsKGke8Y74izurZ7mkD+cmb6QpuC5Y3iDP8317VHpiZg0n35CZ czsU/LMSnkt2OWFJn3qP/E5p2b6XtGUOH4DU7TwDKY9Dbt3++APhR+6P4KFq//YlKSMo FZ0caCf+z3vPy3Ius58arciNQbAhcvBEPFqVFH7bYJYUQyky9U6RKvTqMuvZ4zEQB4eb 3I7w== 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=aHdvRRQPbuvYeIAORLh//pVJcUOf+lcJE4LD0NznS84=; b=vDSVUdm4EeGuQCNmSuDY07eKjEvPPJz2OZWSPWCQ8jM2MAJ8Nv+C0+tc2a7tlUUEeL LsBSk3ut7n/htRjAMTsq18Sh7YW/87sa3vtDPukixCiQOltk+4tnI/1INMCPKHdHg4k5 KYDkYpDMT/uGDqoaz2WEI/gwn5pYVcqYXh+5aVOT5S7WjxKSONp2bTolnkXy2IW7vym3 kvOgRqi/xYA89Vhb3XQyAGGVJzXWifd0zaQ9Xo5Zdi61ZStltQ+i6Ony240SW+m4kbpR TO+4gMOCsxhB4zZGiriW35tg7tQbnb4gkOIjyxyzCPjt3TSn21JKDRQDicVwA5CxtUOH UF5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RWwB4xcb; 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 oj15-20020a17090b4d8f00b001fab8938920si5709724pjb.152.2022.08.23.04.17.32; Tue, 23 Aug 2022 04:17:44 -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=RWwB4xcb; 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 S1350699AbiHWJcg (ORCPT + 99 others); Tue, 23 Aug 2022 05:32:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350940AbiHWJbD (ORCPT ); Tue, 23 Aug 2022 05:31:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C57DE77562; Tue, 23 Aug 2022 01:38:07 -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 dfw.source.kernel.org (Postfix) with ESMTPS id A41CD61541; Tue, 23 Aug 2022 08:37:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA383C433D6; Tue, 23 Aug 2022 08:37:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243838; bh=kAAceLf1VywHIek44vBXTfsB0yb0I7oJ0SqPKKlSA08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RWwB4xcbtC1S/Yj+gjW+9s+5voP1G8LgzaYUC5VESlgjxINngAXaB6toxf0VaVeHF gWHPezaxsLMGJEwEMzDN/UQr25cc2we582JCrJuy6L6Kw4ydAYLdIDAm5sVFj+ieiK c8gtPkEPEI8vs100TYLoz57YuP4bh5dza3noePeQ= 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 4.14 010/229] ACPI: video: Force backlight native for some TongFang devices Date: Tue, 23 Aug 2022 10:22:51 +0200 Message-Id: <20220823080053.733076151@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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 @@ -431,7 +431,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.