From patchwork Tue Jun 20 02:56:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luke Jones X-Patchwork-Id: 11010 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3386133vqr; Mon, 19 Jun 2023 19:58:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Kps+aPMgA2Mh+xTT96r/sLTr5kFOVr3XeV2u+MZiCNkSXVe1hxYc2Xs2/TRzh2egdhc/g X-Received: by 2002:a17:90a:68c9:b0:25b:d4bc:28d4 with SMTP id q9-20020a17090a68c900b0025bd4bc28d4mr11043498pjj.40.1687229919462; Mon, 19 Jun 2023 19:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687229919; cv=none; d=google.com; s=arc-20160816; b=oZeq+afwSCpatgoqs9HKIEgydCQEpycucaPfECtLVHGFq9HlnSnRujuEk1usz8ks0l XGF+DFZViO2TOHqBoLGFWYGcGWe/Es6qoXegX5aWaeovIsy9tJtignLEilXtWMwdyyT1 hyQiXQ5G9+OS70wbOBxyaq7LM6CuaHJjPaqr3ZWmFBKoHFYB+l3F8LI+Sh9LC3btgQpg lxqV8Ba0op2LOgnR/QErzgfGbf/w0rCkEUtYnY28R4lO+16RwmprRbcsOmHLph+pLi3T TLodSznAiapHLi9MbdwNvvWfCS9+EehQ+XJGQORw94j1ooU60/qNztGS6e6s7G+HRykC PvcA== 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:feedback-id:dkim-signature :dkim-signature; bh=9GbRm5CtvLke73jGmzLqa1s16vX991t6TY9JsVkBVzQ=; b=t3hK1Yr/uwmxrr7sXguqMNMY7/VEtusWiunt/WvKP8cZxUarzy/AW64L2s7dsM3zne jtopmdHZoeXz1K0wGIB0MCskJhzFU3Ej3z78X79XKKUKHNVWSgYAMdR4T4o0jCLUAR4I wE5pkxGSjGrEDAk60UhpQzAea2rMXK7hA7erWMwGBhuIK8a6Ln8xKTuhm4z+CUYx0EgR 6NaNEkHi0KvdmDuBQLFqVN38M1Olq8urHF30OSXUp8EpmX+/VJlvy2yftiUlOMfCjUO0 redrrWcOD+yQthxwNYuLVrFp3vdY17lLB0hWkeU26IVgLmW0VBVomPm2NkBg+ML5zOxN uv8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm3 header.b=L2Z8EDoH; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="mT6b9Wt/"; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lx3-20020a17090b4b0300b00259c1100db5si1073387pjb.188.2023.06.19.19.58.27; Mon, 19 Jun 2023 19:58:39 -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=@ljones.dev header.s=fm3 header.b=L2Z8EDoH; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="mT6b9Wt/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230015AbjFTC5L (ORCPT + 99 others); Mon, 19 Jun 2023 22:57:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjFTC5J (ORCPT ); Mon, 19 Jun 2023 22:57:09 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE4601AC; Mon, 19 Jun 2023 19:57:07 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 99F8A5C01ED; Mon, 19 Jun 2023 22:57:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 19 Jun 2023 22:57:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljones.dev; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm3; t=1687229825; x=1687316225; bh=9GbRm5CtvL ke73jGmzLqa1s16vX991t6TY9JsVkBVzQ=; b=L2Z8EDoHD1b0HgywJKMUqbYghi w4HOj/I3nsuQ8KI0h0O2GxCR7l4G//W7cOwYkjvuMRDmH7804KZHJlajDMSmFjHs g/a8at4dlV6WXwjhBatXLVqtTCXMqJKWyAMCECbgj7d8O51mbyLa5Mt1Snk8hpr1 5NpTA4/nm4XwQw99O40jQ0bTdxnInqu97uTX+rcYaUZ2+D8vahBTMr10sWPYZXgq NxYUdhpB1cBDA1cta5dQ7UWMfjHomzpeTzvZkekIApVl628quWkQ9SRIA3LB8BLM wz235mhV9NcwQvC8wsA3I9YbIGoJ6s/7XKE7++/OfwaV3efAlHTHUMZUh/Sw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1687229825; x=1687316225; bh=9GbRm5CtvLke7 3jGmzLqa1s16vX991t6TY9JsVkBVzQ=; b=mT6b9Wt/th9vO+9nY9HJrhkhYuiwy dOEqXs54lJv1wJ/SdI2/cmiK7UXp7IbtvzVUP37+OKARidx+9pguIGKQh+xInlwJ ZxV5XTucqdKGwyGEXXRM3CtuAY9CX8AtlQQvCM76sBGXLCjs5rqVKXYrHBrHO2ct Z3lOpEPpH5rOh+pP8SQK664s7GxwflndtvRwyPZXhh29ffYGJusMXaN3VHiW7aPC 5f1PEYRzaCNYaM9qOQsaTkRUPRPruq3vy8dPbYaIDfadj8LeXd7RVFUG2RsDWfDw u0Eu+k5NMdn2mtVUl4LSmZU65A86egATcePEzoTfetUJmYZGUFZDVUu1w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeefgedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpedfnfhukhgvucffrdculfhonhgvshdfuceolhhukhgvsehljhho nhgvshdruggvvheqnecuggftrfgrthhtvghrnhepgfdujedthfduudekffefkeeiffdttd dvhfegudduueffuefhfefggeefteevvdegnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheplhhukhgvsehljhhonhgvshdruggvvh X-ME-Proxy: Feedback-ID: i5ec1447f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Jun 2023 22:57:02 -0400 (EDT) From: "Luke D. Jones" To: hdegoede@redhat.com Cc: corentin.chary@gmail.com, acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, markgross@kernel.org, jdelvare@suse.com, linux@roeck-us.net, "Luke D. Jones" Subject: [PATCH 0/8] asus-wmi: add/expose more features, fixes Date: Tue, 20 Jun 2023 14:56:33 +1200 Message-Id: <20230620025641.53197-1-luke@ljones.dev> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769188799903180352?= X-GMAIL-MSGID: =?utf-8?q?1769188799903180352?= This patch series adds or exposes more features that are available in the ROG laptop series. - expose dGPU and CPU tunables for ROG - These are things like GPU boost, CPU Pl1 and PL2, package power limits - support setting mini-LED mode - Some newer laptops have a screen that can toggle between regular style backlight and using mini-LED backlight - add WMI method to show if egpu connected - This WMI method can be monitored/queried to see if it is possible to begin the change-over to eGPU - support middle fan custom curves - Some newer laptops have a center/middle fan which blows across the CPU and GPU - add support for showing middle fan RPM - add support for showing charger mode (AC, USB-C, both plugged) - add additional checks to GPU switching code - These try to prevent a sceanrio such as the user disabling the dGPU while it is driving the internal panel via MUX, resulting in no output at all. There are no checks in the ACPI code for this, but on some newer models ASUS did finally add a switch in the BIOS menu. It is best to try and prevent this at the kernel level rather than userland level. All patches pass ./scripts/checkpatch.pl Luke D. Jones (8): platform/x86: asus-wmi: add support for showing charger mode platform/x86: asus-wmi: add support for showing middle fan RPM platform/x86: asus-wmi: support middle fan custom curves platform/x86: asus-wmi: add WMI method to show if egpu connected platform/x86: asus-wmi: don't allow eGPU switching if eGPU not connected platform/x86: asus-wmi: add safety checks to gpu switching platform/x86: asus-wmi: support setting mini-LED mode platform/x86: asus-wmi: expose dGPU and CPU tunables for ROG .../ABI/testing/sysfs-platform-asus-wmi | 100 +++ drivers/platform/x86/asus-wmi.c | 685 +++++++++++++++++- include/linux/platform_data/x86/asus-wmi.h | 21 +- 3 files changed, 803 insertions(+), 3 deletions(-)