Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp14550rdb; Fri, 29 Sep 2023 14:57:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG9q8TKYgNAAXYRd9dloa2KyWwRjUBSHhG+SNHw9EaURAWacB1KHwtqxR4je2pZousws85Z X-Received: by 2002:a17:902:c254:b0:1c0:ecbb:182f with SMTP id 20-20020a170902c25400b001c0ecbb182fmr5331315plg.5.1696024669538; Fri, 29 Sep 2023 14:57:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696024669; cv=none; d=google.com; s=arc-20160816; b=wIZBHp5o7EqoknCoH5Cm0uZmO1s6B4nKlpLrSA08eskOdzZo3Ej16np8tClC0uQG/S DfAFzzsiLFrgOsoDS6qIkbd0JF9xa22mo1ebRD4m6B2kSdFUWNJVhtp1q8wCClt8zsQd d8BOAyKF7MrzQ6eLrC+/8CYT3gWzaFpFkeGAfinhQp/fL/ZUKyIVGB0k1kr/NXByQhUc kcoJ4L0SgDv1nXngmmO7L1TA3CpUxo3bfHPyMAm417nZJkNJFVhft9/eJa2qPYRVSRCo Bz/wDfpdwIreRAzzj6xZAHbE6hLDYm3PfUCsovF1004UU1YiwC/3J3r/ZYJTrsMsvKg+ qPnA== 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 :message-id:date:subject:cc:to:from; bh=o3iRCbGIxPXwOG0lGayzYpX7lbuqTamHj73jEqPCFpE=; fh=litJNyysTPMiB7YMPLxM227UlQFUv16vy1Cy+cvThis=; b=itX7KnVCuPGRuQ9LCSMava9TEnW5z6w3miDg7ivuWyq857fGDWg4IOM/gU1GxZZ6UF /nvIchd4juCKAT5YSY6m02ztj4i/aWTbpQwa9Khxj1JEo1tXo9+VmuBC//XIkbJx1JTm bDqbu+seNtgtzivs8QIiDLJ1gE2KzgeNqxyOtSlD4PMFAEzuYSu9tj3O//rb06ZbR9cX skQC0Knmd0odZQGkAs595jLYtxyux3yoesB7LTORRXDkEJamxxQtD8CzVA3vD/Ja/JSm BaNHANNW4OGEhWVVdR7IFY8K07D/MQb8gMfF07sjKYTcPo8ebjDUNJWI1p7+ZOHo9G2Y XtxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id m10-20020a170902db0a00b001b3fb1742e4si22533814plx.547.2023.09.29.14.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 14:57:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B72F58042846; Fri, 29 Sep 2023 13:30:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232923AbjI2UaS (ORCPT + 99 others); Fri, 29 Sep 2023 16:30:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232748AbjI2UaR (ORCPT ); Fri, 29 Sep 2023 16:30:17 -0400 X-Greylist: delayed 529 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 29 Sep 2023 13:30:14 PDT Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DE4451B2; Fri, 29 Sep 2023 13:30:14 -0700 (PDT) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 168A07A00A5; Fri, 29 Sep 2023 22:21:22 +0200 (CEST) From: Ondrej Zary To: "Rafael J . Wysocki" Cc: Len Brown , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] =?UTF-8?q?ACPI:=20video:=20Add=20acpi=5Fbacklight=3Dvendo?= =?UTF-8?q?r=20quirk=20for=20Toshiba=20Port=C3=A9g=C3=A9=20R100?= Date: Fri, 29 Sep 2023 22:20:55 +0200 Message-Id: <20230929202055.12724-1-linux@zary.sk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 29 Sep 2023 13:30:30 -0700 (PDT) Toshiba Portégé R100 has both acpi_video and toshiba_acpi vendor backlight driver working. But none of them gets activated as it has a VGA with no kernel driver (Trident CyberBlade XP4m32). The DMI strings are very generic ("Portable PC") so add a custom callback function to check for Trident CyberBlade XP4m32 PCI device before enabling the vendor backlight driver (better than acpi_video as it has more brightness steps). Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default") Signed-off-by: Ondrej Zary --- drivers/acpi/video_detect.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 442396f6ed1f..31205fee59d4 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -130,6 +130,16 @@ static int video_detect_force_native(const struct dmi_system_id *d) return 0; } +static int video_detect_portege_r100(const struct dmi_system_id *d) +{ + struct pci_dev *dev; + /* Search for Trident CyberBlade XP4m32 to confirm Portégé R100 */ + dev = pci_get_device(PCI_VENDOR_ID_TRIDENT, 0x2100, NULL); + if (dev) + acpi_backlight_dmi = acpi_backlight_vendor; + return 0; +} + static const struct dmi_system_id video_detect_dmi_table[] = { /* * Models which should use the vendor backlight interface, @@ -270,6 +280,22 @@ static const struct dmi_system_id video_detect_dmi_table[] = { }, }, + /* + * Toshiba Portégé R100 has working both acpi_video and toshiba_acpi + * vendor driver. But none of them gets activated as it has a VGA with + * no kernel driver (Trident CyberBlade XP4m32). + * The DMI strings are generic so check for the VGA chip in callback. + */ + { + .callback = video_detect_portege_r100, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), + DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"), + DMI_MATCH(DMI_PRODUCT_VERSION, "Version 1.0"), + DMI_MATCH(DMI_BOARD_NAME, "Portable PC") + }, + }, + /* * Models which need acpi_video backlight control where the GPU drivers * do not call acpi_video_register_backlight() because no internal panel -- Ondrej Zary