From nobody Mon Dec 1 22:05:00 2025 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6BF133507E for ; Thu, 27 Nov 2025 15:16:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764256576; cv=none; b=IZXs37i0fhWRCK4zXUD+PXfmH8QgaCVUBjT7Uyhc4+8/jL9sm0IRDnx5jeA32vf4okAeMDnWi2sGbFX5rpr137zMpEAawEWmWXglZKmU/Yy5QqY0zk724sr0poUBPK9zQNmFN6WNNoAMvwrkFyBD9JtEmMjj5Ozr7/6klhmdDf0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764256576; c=relaxed/simple; bh=AWNkJhYiQSm4mam341FTvs4ijlPyZ/HkhkFPW01BwM4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y7l0oxiHXn3Xq19YG34JzbSLN71wTvXXOfRXsyzbMQ3vWQ5Epxd/oh54Zp1ED533fVfNZhj6sRWfw25aSm/0n1rT/MqFKlM29qxfxGRZYRLwF36GMes1lAZcee55KnN6937jwsQDbJfi7dSIx3r7NPsgLQDZESeBHMPTCU1tO0c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FVycLHNY; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FVycLHNY" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2958db8ae4fso9887515ad.2 for ; Thu, 27 Nov 2025 07:16:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764256573; x=1764861373; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FcvRrylsz8y/5M5RPfO3ICptGfI1sgN5Cn3FTmzcBZk=; b=FVycLHNY8xRLuaaqDGGv2Zi6HW4Sbk2XMb2nyCU+fm3HVx/BU3jtVS1KLz9TfScYPQ sypqfTAhS/chWJ5wOnypgCO1e7inaDPeuJAT7RM4s/UyL8pmlwNwOI91RxPJ8inoT1JT c+ash+G1ygFct5VJFbeI8BxQ43oXFc1qj7O4FQ9251vledxaVMmdGJKVKwTeFuYx7yWz Wnf4wCBgwnckcapMPU9KrB+3lN49FGHa+plG+kuHe0CXGOWWAhEMMxI9y/I0gcySYHhc Wwpl9ZHUctweesnOjP31F6ml9VbDiIgM+wlL4JW+dV41ZblrWSu5FMitKKgRtXwFD3+l n/uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764256573; x=1764861373; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=FcvRrylsz8y/5M5RPfO3ICptGfI1sgN5Cn3FTmzcBZk=; b=cmXi2B11l0tppR1lB4wkFPrEbGktsOjRoJybbq9jxxuGTIROER2qu7xdFdqV1nvHr+ KJnOkA9i8IT86Lo4cRXSpPmiPIByrgiyMjNSJUhiIArBbcj2HmZ5jEvi34Ho4unsSsZo k4qpAF3d4maMu02GpUfK1wDqy8+4GbQfYPPXQ12RCBMmNaskf+D+MkfzkS2v4J1gGte2 TVNjdzK+3b/QjeNw89HmKO4m8NEPgd0fzTs1Ktum8E3O+8Ql6VNaCqAMAT0+kwMvTZD2 mhnX/QxyjDIIwwq4n/7owYtiwbFRXXfMbvZfcbN8JcXfck1T0Seqy4JUsCqb5mt27xUy Pe7w== X-Forwarded-Encrypted: i=1; AJvYcCXFZX99VPwYZ/VnNW21F+CqhEzwQYrPaNYPisz4CaKW7LoHNiXdYodp9iBbX/uZI218Expv7TX6JYVrxBU=@vger.kernel.org X-Gm-Message-State: AOJu0YySCHadMWNwbEpk58lvo9Zqz9sBKg5hu1mbc7ntZqGSJ9FAwjEv TK3HrH04oC5gdzVzaPqHkCx9JRuU+G7sTjEGYuQ23vulwjrOvhx9jOIg X-Gm-Gg: ASbGncvwwSB9/hxdWf+fWgc8Sigjp+olQBeIb76lAUB/2aF/ydvPsL4IdVGa7AwPu/m /Z0fFgFOZMXBOKsi5hjjy56s8diApEIYGmeXBLodrVzkWZTZzqpvs+0p3L7DoaCMPQULNS0nV5g SWuRLqnuaD1efbE22JfFW/vv0efZ7AER3rjHDH5UlrQxgHQzyfthaV8f+YRmf/TOOr4JGO0HR3c OCVCeUstbeRvAGFMsnpmkS0bRTC42tBYLMDWGzzEuTvg4i0PW8VkvfToWF6F1/WjhiU8uxMexEe CHUBgQ4pMggPpPoC4eFmOrbBTAqwLOUWyMZwsr8QanNOunqjqxhPQbZwwBm09H08L/xc5Ti1cOz qkV5SdqcsZkOAwC8Z0EDl7jJHkP3ZMUfrBXlborhDGQQ1+rNEeoMO77bEKH9JosWaiZGJFk1T+7 01pqvpyLHmRze5/mciJVpJGeXEL180f8XKPSsRWppu0KwSMlDo4g11k/BB3TcZe4/c3FzudbkZO hWVMg== X-Google-Smtp-Source: AGHT+IFbJD3W3TjYyXHCl+ByEYJBSKUdDrYv+tvqK3Wa3b2N0x9VAT+uS1rulv/XgzRItzjJ76/F1g== X-Received: by 2002:a05:7022:438e:b0:11a:51a8:eca with SMTP id a92af1059eb24-11c9d812055mr17767856c88.18.1764256572310; Thu, 27 Nov 2025 07:16:12 -0800 (PST) Received: from bliptop (108-228-232-20.lightspeed.sndgca.sbcglobal.net. [108.228.232.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11dcb067088sm5099656c88.10.2025.11.27.07.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 07:16:12 -0800 (PST) From: "Derek J. Clark" To: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Armin Wolf , Len Brown , "Rafael J . Wysocki" , Jonathan Corbet Cc: Mario Limonciello , Zhixin Zhang , Mia Shao , Mark Pearson , "Pierre-Loup A . Griffais" , Kurt Borja , "Derek J . Clark" , platform-driver-x86@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v4 1/3] acpi: platform_profile - Add max-power profile option Date: Thu, 27 Nov 2025 07:16:03 -0800 Message-ID: <20251127151605.1018026-2-derekjohn.clark@gmail.com> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251127151605.1018026-1-derekjohn.clark@gmail.com> References: <20251127151605.1018026-1-derekjohn.clark@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some devices, namely Lenovo Legion devices, have an "extreme" mode where power draw is at the maximum limit of the cooling hardware. Add a new "max-power" platform profile to properly reflect this operating mode. Reviewed-by: Mario Limonciello (AMD) Acked-by: Rafael J. Wysocki (Intel) Signed-off-by: Derek J. Clark Reviewed-by: Armin Wolf Reviewed-by: Mark Pearson --- Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++ drivers/acpi/platform_profile.c | 7 +++++-- include/linux/platform_profile.h | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile b/Docum= entation/ABI/testing/sysfs-class-platform-profile index dc72adfb830a..fcab26894ec3 100644 --- a/Documentation/ABI/testing/sysfs-class-platform-profile +++ b/Documentation/ABI/testing/sysfs-class-platform-profile @@ -23,6 +23,8 @@ Description: This file contains a space-separated list of= profiles supported power consumption with a slight bias towards performance performance High performance operation + max-power Higher performance operation that may exceed + internal battery draw limits when on AC power custom Driver defined custom profile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profil= e.c index b43f4459a4f6..ea04a8c69215 100644 --- a/drivers/acpi/platform_profile.c +++ b/drivers/acpi/platform_profile.c @@ -37,6 +37,7 @@ static const char * const profile_names[] =3D { [PLATFORM_PROFILE_BALANCED] =3D "balanced", [PLATFORM_PROFILE_BALANCED_PERFORMANCE] =3D "balanced-performance", [PLATFORM_PROFILE_PERFORMANCE] =3D "performance", + [PLATFORM_PROFILE_MAX_POWER] =3D "max-power", [PLATFORM_PROFILE_CUSTOM] =3D "custom", }; static_assert(ARRAY_SIZE(profile_names) =3D=3D PLATFORM_PROFILE_LAST); @@ -506,7 +507,8 @@ int platform_profile_cycle(void) if (err) return err; =20 - if (profile =3D=3D PLATFORM_PROFILE_CUSTOM || + if (profile =3D=3D PLATFORM_PROFILE_MAX_POWER || + profile =3D=3D PLATFORM_PROFILE_CUSTOM || profile =3D=3D PLATFORM_PROFILE_LAST) return -EINVAL; =20 @@ -515,7 +517,8 @@ int platform_profile_cycle(void) if (err) return err; =20 - /* never iterate into a custom if all drivers supported it */ + /* never iterate into a custom or max power if all drivers supported it = */ + clear_bit(PLATFORM_PROFILE_MAX_POWER, data.aggregate); clear_bit(PLATFORM_PROFILE_CUSTOM, data.aggregate); =20 next =3D find_next_bit_wrap(data.aggregate, diff --git a/include/linux/platform_profile.h b/include/linux/platform_prof= ile.h index a299225ab92e..855b28340e95 100644 --- a/include/linux/platform_profile.h +++ b/include/linux/platform_profile.h @@ -24,6 +24,7 @@ enum platform_profile_option { PLATFORM_PROFILE_BALANCED, PLATFORM_PROFILE_BALANCED_PERFORMANCE, PLATFORM_PROFILE_PERFORMANCE, + PLATFORM_PROFILE_MAX_POWER, PLATFORM_PROFILE_CUSTOM, PLATFORM_PROFILE_LAST, /*must always be last */ }; --=20 2.51.2 From nobody Mon Dec 1 22:05:00 2025 Received: from mail-dl1-f41.google.com (mail-dl1-f41.google.com [74.125.82.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF7D932C320 for ; Thu, 27 Nov 2025 15:16:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764256578; cv=none; b=XuyhAkjziprpM8eSaoO+/eOhqujPOUi3SO1As7Hbz/N29ai/pJReTwWZvKVWAPdV96AmMMUqa28oJ9QaEOi4ypIKlv9XdsUaweDpddM/57TMyBEXgkLy8U9j5/mXPDN2XRObvxZwfHKHTeP3RLOMCUly5gGMyR6tkRP4s1oiHZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764256578; c=relaxed/simple; bh=bINqTcYBnpMiA8eKDMIKE2dhokiXwzdMKmoocGJBxvY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o2SyKCpY91Q1RQ7s69KoyKFpZ0QjJGb9KO+8e3fXfoPTF7aF9laNPawMKlVIsfFFNLdEodsChydCEmXHYX7RzUd0/L8eXPXj2Rke2qijuL2vlS/Oeg/lSqkAkjpqcm1yfXpRvRLVR5BhHv5FPc7T4n9Wx7yF1vpyXCDKaK+iRU4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NRaokIn7; arc=none smtp.client-ip=74.125.82.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NRaokIn7" Received: by mail-dl1-f41.google.com with SMTP id a92af1059eb24-11b6bc976d6so2442749c88.0 for ; Thu, 27 Nov 2025 07:16:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764256574; x=1764861374; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ETZ2FAyy2v+yzymxyjsZFHVgNltj1Cngjn3GryQ+ajM=; b=NRaokIn7ngDIF/Wq3uU5gX7ZGkhdP4fKPoY5KUPMrGq2ekYvdAipM4EkKy2GGJXoOc ENH0l4UIxN+JW2h9EKY2KA97FbaTslYFtyxT54c0oRua8lTNbkhfyap0IFMwGchgQq5Q 7nniLWnbSUGvpWIPs12LGsxPjcbFn2XhR2/KSmBjBHDlZi34SDGdENunj+7oGUtvngi6 aLsIm6/yQ2MxM9hF1TgQMYw6Ye/lrwRvMnN0m51nhJsO0Lodr9BY5mzyAyhfxoGIShqn f6pDQdBZzkU19Pd95cODQL/9COtoLbyOzqayujt3qfo/otTij1lJVwm0zxhsyXVYwSn2 QLVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764256574; x=1764861374; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ETZ2FAyy2v+yzymxyjsZFHVgNltj1Cngjn3GryQ+ajM=; b=saYdTKO7BQrk3iaek4Ri43BQeDkhXRKo/6z4YLi/DDwxnhdV5NYMXL9Yr+SraMUWhw 1WasOG0qff+itjQNf55XziIpZvpbbriCdkbApMGOPoC6d1MHQgpO4rFfAduOeVD/4h/f xQJZhcb90JvRJ6/It/i2A9vNXV5dh71qEr0m88KQfObcdzIsy0vLiyLT9rD1v717ToQX kUYQ2S/5UuRIrQl8SjoP+Guxc1j9U6FBjr61rpt9fpqcUI0dviPYCUboEUCE+39JVgGv TzHCw5iKxeF7O8FRRniTrIz3ydmwLvlsTeok7OLuMGLohb6wIeRc/Jm0n5s0e00ePsSe ZG/g== X-Forwarded-Encrypted: i=1; AJvYcCWybk042H2bYsXyhwbVpQaBPrbHaqXgVmnMmylJUEvhz7ktudwtXRKmGyUO9JkwFvkyVSKrIyV8erJLXxI=@vger.kernel.org X-Gm-Message-State: AOJu0YwWA2T2/3JEmAA7E2Ai2/FZy5TfJNFgl9NztWK+eB+VvrpsO292 9gXiAz6sZ2LpTDXr+Uw6OjAZgKUZG4nH2epgGgfwdrvrJiZ1AqjvDDNB X-Gm-Gg: ASbGncvkJ2wJhf6vCea669s0QsiXPqSeOTDc7WnyotfbhimSiahbeo9cjLvQK7wGcoM h5UB/s+hIjkAg/Kyck9Oofzz6XzacNHN29PuKL4/93+kXcyLfuPZKHbP8kcREYsAfrJYPSphgoU G0xkngUgC0u6l25J1+Z3UEqIBy48OKWOcqh5VZ1QzIat/Ti2Bc4fHa4M8EuVuAcktlP2wM7rXqM luUVXvhYqn9nfyawp0hgy2pn56jT4vgNd+niaC30UDnzJLt7Zcn22KSWBqoMgSu8AWDeTC+pBKX LRWMyW3iQh+ZWGsSD3pWDfa1cIYRzzmagPRmEeiiR3CTKWPhvWUwfiojqA0DHpYprKt1XKVpdmB dbCLkqcTX9ZPsR/VGfE+5on2apWNsdXkAxKX9W1rm2cO3RuF8bH/9Tr/nUWOV40QDuPazzRsolg DJMzTlzrduCMYb+K6bsqRbSjB/+unxGhUMk+xbZ37TcK/Q0syx0lhTy7aSpyVpkVJfmV5jVFHW3 TvEgQ== X-Google-Smtp-Source: AGHT+IGlpWqE7oPwKq75vqcftF4x8/6mDQeigZg3ZJsYLEPNDxvoQXhlWwCU0z4N+O8Cg3rUkKIDyg== X-Received: by 2002:a05:7022:ba1:b0:11b:9386:a38e with SMTP id a92af1059eb24-11c94b908a4mr18238628c88.21.1764256573509; Thu, 27 Nov 2025 07:16:13 -0800 (PST) Received: from bliptop (108-228-232-20.lightspeed.sndgca.sbcglobal.net. [108.228.232.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11dcb067088sm5099656c88.10.2025.11.27.07.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 07:16:13 -0800 (PST) From: "Derek J. Clark" To: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Armin Wolf , Len Brown , "Rafael J . Wysocki" , Jonathan Corbet Cc: Mario Limonciello , Zhixin Zhang , Mia Shao , Mark Pearson , "Pierre-Loup A . Griffais" , Kurt Borja , "Derek J . Clark" , platform-driver-x86@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v4 2/3] platform/x86: lenovo-wmi-gamezone Use max-power rather than balanced-performance Date: Thu, 27 Nov 2025 07:16:04 -0800 Message-ID: <20251127151605.1018026-3-derekjohn.clark@gmail.com> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251127151605.1018026-1-derekjohn.clark@gmail.com> References: <20251127151605.1018026-1-derekjohn.clark@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When developing the gamezone WMI drivers, "extreme mode" was matched to the performance platform profile and "performance" was matched to the balanced-performance platform profile, but only if extreme mode was fully supported; otherwise performance was matched to the "performance" platform profile. This has led to quite a bit of confusion with users not understanding why the LED color indicating the platform profile doesn't match their expectations. To solve this, replace the confusing convention by using the new max-power profile to represent "extreme mode". While add it, update the documentation to reflect the expected LED colors in each operating mode. Signed-off-by: Derek J. Clark driver Reviewed-by: Mark Pearson --- .../wmi/devices/lenovo-wmi-gamezone.rst | 31 +++++++++---------- drivers/platform/x86/lenovo/wmi-gamezone.c | 18 +++-------- 2 files changed, 20 insertions(+), 29 deletions(-) diff --git a/Documentation/wmi/devices/lenovo-wmi-gamezone.rst b/Documentat= ion/wmi/devices/lenovo-wmi-gamezone.rst index 997263e51a7d..1769ad3d57b9 100644 --- a/Documentation/wmi/devices/lenovo-wmi-gamezone.rst +++ b/Documentation/wmi/devices/lenovo-wmi-gamezone.rst @@ -19,27 +19,26 @@ WMI GUID ``887B54E3-DDDC-4B2C-8B88-68A26A8835D0`` The Gamezone Data WMI interface provides platform-profile and fan curve settings for devices that fall under the "Gaming Series" of Lenovo devices. It uses a notifier chain to inform other Lenovo WMI interface drivers of t= he -current platform profile when it changes. +current platform profile when it changes. The currently set profile can be +determined by the user on the hardware by looking at the color of the power +or profile LED, depending on the model. =20 The following platform profiles are supported: - - low-power - - balanced - - balanced-performance - - performance - - custom + - low-power, blue LED + - balanced, white LED + - performance, red LED + - max-power, purple LED + - custom, purple LED =20 -Balanced-Performance +Extreme Mode ~~~~~~~~~~~~~~~~~~~~ Some newer Lenovo "Gaming Series" laptops have an "Extreme Mode" profile -enabled in their BIOS. For these devices, the performance platform profile -corresponds to the BIOS Extreme Mode, while the balanced-performance -platform profile corresponds to the BIOS Performance mode. For legacy -devices, the performance platform profile will correspond with the BIOS -Performance mode. - -For some newer devices the "Extreme Mode" profile is incomplete in the BIOS -and setting it will cause undefined behavior. A BIOS bug quirk table is -provided to ensure these devices cannot set "Extreme Mode" from the driver. +enabled in their BIOS. When available, this mode will be represented by the +max-power platform profile. + +For a subset of these devices the "Extreme Mode" profile is incomplete in +the BIOS and setting it will cause undefined behavior. A BIOS bug quirk ta= ble +is provided to ensure these devices cannot set "Extreme Mode" from the dri= ver. =20 Custom Profile ~~~~~~~~~~~~~~ diff --git a/drivers/platform/x86/lenovo/wmi-gamezone.c b/drivers/platform/= x86/lenovo/wmi-gamezone.c index 0eb7fe8222f4..df475e52f79d 100644 --- a/drivers/platform/x86/lenovo/wmi-gamezone.c +++ b/drivers/platform/x86/lenovo/wmi-gamezone.c @@ -171,14 +171,10 @@ static int lwmi_gz_profile_get(struct device *dev, *profile =3D PLATFORM_PROFILE_BALANCED; break; case LWMI_GZ_THERMAL_MODE_PERFORMANCE: - if (priv->extreme_supported) { - *profile =3D PLATFORM_PROFILE_BALANCED_PERFORMANCE; - break; - } *profile =3D PLATFORM_PROFILE_PERFORMANCE; break; case LWMI_GZ_THERMAL_MODE_EXTREME: - *profile =3D PLATFORM_PROFILE_PERFORMANCE; + *profile =3D PLATFORM_PROFILE_MAX_POWER; break; case LWMI_GZ_THERMAL_MODE_CUSTOM: *profile =3D PLATFORM_PROFILE_CUSTOM; @@ -218,16 +214,12 @@ static int lwmi_gz_profile_set(struct device *dev, case PLATFORM_PROFILE_BALANCED: mode =3D LWMI_GZ_THERMAL_MODE_BALANCED; break; - case PLATFORM_PROFILE_BALANCED_PERFORMANCE: - mode =3D LWMI_GZ_THERMAL_MODE_PERFORMANCE; - break; case PLATFORM_PROFILE_PERFORMANCE: - if (priv->extreme_supported) { - mode =3D LWMI_GZ_THERMAL_MODE_EXTREME; - break; - } mode =3D LWMI_GZ_THERMAL_MODE_PERFORMANCE; break; + case PLATFORM_PROFILE_MAX_POWER: + mode =3D LWMI_GZ_THERMAL_MODE_EXTREME; + break; case PLATFORM_PROFILE_CUSTOM: mode =3D LWMI_GZ_THERMAL_MODE_CUSTOM; break; @@ -338,7 +330,7 @@ static int lwmi_gz_platform_profile_probe(void *drvdata= , unsigned long *choices) =20 priv->extreme_supported =3D lwmi_gz_extreme_supported(profile_support_ver= ); if (priv->extreme_supported) - set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, choices); + set_bit(PLATFORM_PROFILE_MAX_POWER, choices); =20 return 0; } --=20 2.51.2 From nobody Mon Dec 1 22:05:00 2025 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 908AE33557F for ; Thu, 27 Nov 2025 15:16:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764256579; cv=none; b=SA6YDiMK/h6xOYUqk/VAkUTqLrR4QH9VEn9ZHomG3K9lWMRiDyagKIlL0PgnaDHzcu28ejsja7DEXlZwyWpw4tHpIk0epoMYbF/YZqAbYGZgbK6p3aknfNkOh6FDIRkv8W0NZSnW12wss4kyYOyBzg+B4ous+tPItl3+WTJW86g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764256579; c=relaxed/simple; bh=EAYHD0uflfQd6sszqckCoZM9plV9potl4DoHq6i9A4c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ItErqmjei+FZ582H35OjmlP6K9scC2ydVyke0yRuO/U5LRTJFH6ZebTRSD9Q/aGOZkff+C5hUbwsxv7r5+s2OAhJuaX7yARqEKBK0ZxGdU5lwaH4Jc9ZcB3iDQs0SOIsWt10Abw06PznFKb+LBGrghuJNV/LcwSvZYYFM5o/z6A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WL1wqSw2; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WL1wqSw2" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-29844c68068so11045795ad.2 for ; Thu, 27 Nov 2025 07:16:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764256575; x=1764861375; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2SI5IT2ccA/LcmNZQUHmcdI+iq0zqrTHDtVhV8fx+VI=; b=WL1wqSw2h9maYpLMe+Aoz7zsV1mRG8SxFJEUoTLop1jyl9mr4Opl+O+jsYhQ6XSYCQ iV+TGTYl6pMZq+EiCGel0zZuQ0ha+bku6KXtjmYaidTcieXGjrycHkaZQ9eetuZetU3D 2mPDV/wd/PSt6VQgm/mBcFeppx6jdSHZuEtbvkjmE1rj1FhGAjq6DdYckOsjZHgkXhu2 zlEXGY0yo+A7GsguADhfca3aU/oNv+WRmfP3crf+xX6C+lsfCGDU2imbS1pcTT5oB+fR hBNafEJm/Ec/790+miaS7bSFo9WTAp4uB5qSV+7g5+jitsQK8G56hhH2AztpTg/cJRqe 9Z+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764256575; x=1764861375; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2SI5IT2ccA/LcmNZQUHmcdI+iq0zqrTHDtVhV8fx+VI=; b=WiWpq0xCYvLgUnGT4jxtgOhlyuEKszRGJuirIgoIzCvvLfOS1eW87ebvzs86FjtiHL Jd3vwV0WJP93KXaTf57JDy5BdYguO6cAMkRGQknZg1Kklxp755VJFVFBseVrWdt4460q LOEuxMaAfxnCidVracxJ6rmwFvRd8M1v0jz5rOxIOAArVpB7UdBpSU8tUpDT7rc+1dVt BST6jdz3C0VH1jpsmGBYkLt5WM8u9s0hjLZmTKCRqPg+63+mYtAjQlAKok7cm3Z8tqO4 Yl1sXmpJniR0rcmqkThPn5OrsovoDSKyZhMqjSPUKDgAfhu4hw/iIdGEdDSL78mzfPoO gNSA== X-Forwarded-Encrypted: i=1; AJvYcCWGKxbsmOQq3yUQ6m7AZNFgN6viq3Zc3Z3ZCuTfQSTU56sjXEuMoRL1/lJ0hEPuNYqhWTrQFqbb57YwBDc=@vger.kernel.org X-Gm-Message-State: AOJu0Yy901uqhiNxI6ynbacsqMTrLICBi6PGH0qwZVVRg1vVxOZBuZpL sI9GuCdRHC1YCpTStjLUoh7mXgTb5VpGSQiO9hUp03Wz+o0ygDMi0cfC X-Gm-Gg: ASbGncsksc/UDIv1Pd19R23jDMXna2AF+RWxJFLSVr0CMxFeEScpHl1LDVm4nHhC1Ik /sZciJZm9GB5Rv+RhpxPk5pvsniYpwr0wffdZi/kUmE2QFO20nPPaisKF12G/Fstb7IQVyJlnli CBun6W8D80TOqllr+PkigXHn/4q+H+tjyyjnfRCnv5tBuojrJzrCiemzxb0VaQr8ojIGETI1C+s Qeq+9bCkXILOmPgTeYy2lgZxsNi8GosxkkvtvE5AHTnDQICswHcvXMAyWd3P9R6Mj2Z5LqdhUPD MF69/hx+m3CXwYOlli2l9Qo3D+VSBDMzql+evevef92pHtS1EzFQ6DoAWROvtvpc01G/VeiWyOV cMS5L/Jz2zT7CXzE5AWiqRs/9fKZpF5Xvk1qHnYhF55RjG7zomuHGaFkdu622XO3P47VO9qpB8B PumRKykZUmDiYV03eRxB4J+c4Ji0LZvIxhweiNiqEvuX8CXTsFh61VYFmwZ7AxCy4vlq0= X-Google-Smtp-Source: AGHT+IF2C4VQYvmJzN4VQiQ587h8aO8/w5xYj9vrh6mYj3laNxKF6BXlbjKrvVYNuGLe/wityRhDKg== X-Received: by 2002:a05:701b:208a:b0:11b:b064:f606 with SMTP id a92af1059eb24-11c9d85009cmr11987237c88.26.1764256574538; Thu, 27 Nov 2025 07:16:14 -0800 (PST) Received: from bliptop (108-228-232-20.lightspeed.sndgca.sbcglobal.net. [108.228.232.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11dcb067088sm5099656c88.10.2025.11.27.07.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 07:16:14 -0800 (PST) From: "Derek J. Clark" To: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Armin Wolf , Len Brown , "Rafael J . Wysocki" , Jonathan Corbet Cc: Mario Limonciello , Zhixin Zhang , Mia Shao , Mark Pearson , "Pierre-Loup A . Griffais" , Kurt Borja , "Derek J . Clark" , platform-driver-x86@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v4 3/3] platform/x86: wmi-gamezone: Add Legion Go 2 Quirks Date: Thu, 27 Nov 2025 07:16:05 -0800 Message-ID: <20251127151605.1018026-4-derekjohn.clark@gmail.com> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251127151605.1018026-1-derekjohn.clark@gmail.com> References: <20251127151605.1018026-1-derekjohn.clark@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add Legion Go 2 SKU's to the Extreme Mode quirks table. Signed-off-by: Derek J. Clark Reviewed-by: Mark Pearson --- drivers/platform/x86/lenovo/wmi-gamezone.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/lenovo/wmi-gamezone.c b/drivers/platform/= x86/lenovo/wmi-gamezone.c index df475e52f79d..381836d29a96 100644 --- a/drivers/platform/x86/lenovo/wmi-gamezone.c +++ b/drivers/platform/x86/lenovo/wmi-gamezone.c @@ -266,8 +266,23 @@ static const struct dmi_system_id fwbug_list[] =3D { }, .driver_data =3D &quirk_no_extreme_bug, }, + { + .ident =3D "Legion Go 8ASP2", + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go 8ASP2"), + }, + .driver_data =3D &quirk_no_extreme_bug, + }, + { + .ident =3D "Legion Go 8AHP2", + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go 8AHP2"), + }, + .driver_data =3D &quirk_no_extreme_bug, + }, {}, - }; =20 /** --=20 2.51.2