From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (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 B2FED61FFE for ; Sun, 16 Nov 2025 19:01:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763319680; cv=none; b=IGqFrJAp3SoR5Gny4XbFNYbQQl9bCdxHLUHGVBMQGyx3kKh+F5GUnr1HnIWDCK5AsA7Vr/uVAzePDKfN2jzO/vF3rpNEI0IMgvKpCTMLewKIIJssZNRFjLKftnhECt/boPGsWUI7upL5B87exGIlw31r3MLrqS/wYrpxly2rMho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763319680; c=relaxed/simple; bh=cZS0PxUQPTpcN54RYE/jYvXcW+/9c/VgJLoIs03CWoU=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=ZXrDNCdJ3q7toAcQ2exiI9oFALetQkn3TZfmnw0UWpLecvBJpj6xN9ZmpOqjGlW251oZ7iFEdHEbimwRWJq31a7MAMeGNyQsJtjspaQwI+mH9b9PYNmJgxNFAQ8I/jE7KhqU9HV96cGNO88DJX0gEmdAHVBSPVwe3WOEBvobwFU= 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=KBApSxH2; arc=none smtp.client-ip=209.85.215.170 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="KBApSxH2" Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-b55517e74e3so2815653a12.2 for ; Sun, 16 Nov 2025 11:01:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763319678; x=1763924478; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=YOGEXFxwW48TjZB0mw3iozFgJleZ3SAxTi5WfDILBEc=; b=KBApSxH29kpjdiofXPV4IApRHe+VlYIcX6RbMVFIjVygEWNxuv+Vz0J0zRHieNEXO8 zEIRrS5tm+ilpsC5fdQ4auOKc9vU/4vaFBoQd9Fcx5cCNTseselzk1F3rtaYU1gTCvo7 RFlouxWP/TGMiEz1SN9J39pk16sIVnqxzQTgeBxVUOLx4zQfXjVQRBumGJemYSsw2cK7 Sekemg45OyRwWsy6G3UBB0NncxLptr3mQjQEW1+rFY3Zl0gFcPANn70D1IqryFQqZ9B0 I41dO8HBTIXm/ffj5kmSeHOfmsINSIXb06ED/FYAcaIiWt+IggAwyJrpiT3qrba0em5f 77rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763319678; x=1763924478; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YOGEXFxwW48TjZB0mw3iozFgJleZ3SAxTi5WfDILBEc=; b=CHY0PSaOBzb8vncDz9Yc/L3k7N3b6fDWzwCtRhwyb+hdfY2/1sQiToi2J2lXXYyRwg L7AJye/WtofppAHCl+W37jjOr0cPIfS3I8l7o9HZezIIYrnm5nK0p0e+VP3vzaRDRU+m oqfbHJpvr6UlS0qwFhSZ7P/z3PXhRStTn2b/ADam0Fj/5GDqgMfel9Buz8PWyzR0zoLR 0ZcvqqvZfmHLv6xtdWQ9PjVOdStOIS4XHk7CHGThhFo8/O1mfDZI2xGZGQR6jScxpnfu pJdZKQyczYBNqo2NeuSX+3yKRMlehVy0mY2NEIWpO2XYftQZRPLooYT9/FrIggLmpkya wkJA== X-Forwarded-Encrypted: i=1; AJvYcCV5VjWyjJ7iy3HoCxeNRlyhJfC7F4xAcqcqrhYXvh5ZZSL5K9Shu7WSYBTeuAxX/mreHGL9VdHhVBuLA74=@vger.kernel.org X-Gm-Message-State: AOJu0YxBU6EnxEdoY6BoA2LEoIWmf2vguvPS8Ey1HyoSrKGHA6MBZ/fL KC7o+jtwH8dYFmnj+u8uwVXM/PUjF9ykH0+N02VZaLp8bNFuCi9bolPw X-Gm-Gg: ASbGncuMGxDj9dnKmKhEGhYTcrTnTFeK7k41DOakxBtSJ+4SsrDoM39y7K/ujFxcfoZ ikaMUdYmMRN7xN8la8TnXdeHfjVgTFnYmDXQuQInGEAwaSSrzVjkTMXXV4Zywi+Yh4kg2BpqX37 fuEE1wtfzrGnsKPPP9kmkHFCj5FWINPCxBmtMLT2iQAzPyatue9dNscvvy7E5Yl622P/+OhCO4V H4eeGGoMI8o8z1TIwQmWccsL4jOUrN5A6Y9sB+ekt6Uu7X71z3hZ0V56ES3QzPIWwHK0h0InvE+ XlMtK4szeP5ay78jvrrHi6kM0kZKLrFlhPN2DL5/0p4PZMfl1bcjxW3+OZX/JAT0qsDRoP00x8C XbmhM1YmsrhjdUHw9aDg4PKhS72JJYREoSlHr00aWeBvY78lXWcYr3MhTn/iXg7/NMQUulQ5Xz3 de3K2kRSCjaO6QDtu3w9LHlQ== X-Google-Smtp-Source: AGHT+IGzAZalYPBCrBdPjLHParF3LDK8Sa973po1LUxsJ1+1Lsk5MmBi0pKSSk4XLoBThUNykmuT9g== X-Received: by 2002:a05:7301:4384:b0:2a4:3593:c7da with SMTP id 5a478bee46e88-2a4abd49e41mr3789692eec.26.1763319677891; Sun, 16 Nov 2025 11:01:17 -0800 (PST) Received: from ehlo.thunderbird.net ([2607:fb91:1be4:38b7:ac39:c338:9a5e:57f4]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2a49db102f5sm29610809eec.4.2025.11.16.11.01.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Nov 2025 11:01:16 -0800 (PST) Date: Sun, 16 Nov 2025 11:01:13 -0800 From: "Derek J. Clark" To: Armin Wolf , =?ISO-8859-1?Q?Ilpo_J=E4rvinen?= , Len Brown , "Rafael J . Wysocki" , Jonathan Corbet CC: Mario Limonciello , Zhixin Zhang , Mia Shao , Mark Pearson , "Pierre-Loup A . Griffais" , Kurt Borja , platform-driver-x86@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_v3_1/3=5D_acpi=3A_platform=5Fpr?= =?US-ASCII?Q?ofile_-_Add_max-power_profile_option?= User-Agent: Thunderbird for Android In-Reply-To: <7050cadc-9cb7-4f9b-8393-247bddb56965@gmx.de> References: <20251113212639.459896-1-derekjohn.clark@gmail.com> <20251113212639.459896-2-derekjohn.clark@gmail.com> <7050cadc-9cb7-4f9b-8393-247bddb56965@gmx.de> Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On November 16, 2025 8:13:17 AM PST, Armin Wolf wrote: >Am 13=2E11=2E25 um 22:26 schrieb Derek J=2E Clark: > >> Some devices, namely Lenovo Legion devices, have an "extreme" mode wher= e >> power draw is at the maximum limit of the cooling hardware=2E Add a new >> "max-power" platform profile to properly reflect this operating mode=2E >>=20 >> Reviewed-by: Mario Limonciello (AMD) >> Acked-by: Rafael J=2E Wysocki (Intel) >> Signed-off-by: Derek J=2E Clark >> --- >> Documentation/ABI/testing/sysfs-class-platform-profile | 2 ++ >> drivers/acpi/platform_profile=2Ec | 1 + >> include/linux/platform_profile=2Eh | 1 + >> 3 files changed, 4 insertions(+) >>=20 >> diff --git a/Documentation/ABI/testing/sysfs-class-platform-profile b/D= ocumentation/ABI/testing/sysfs-class-platform-profile >> index dc72adfb830a=2E=2Efcab26894ec3 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 lis= t 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 > >I am not sure if it is a good idea to allow platform_profile_cycle() to c= ycle into this >new max-power profile=2E The system could encounter a brownout if it is c= urrently operating >on battery power when selecting max-power=2E > >Maybe we should prevent platform_profile_cylce() from selecting max-power= ? At least for Lenovo devices unplugging AC will automatically throttle the = ppt values to roughly equivalent to performance=2E It will look at a differ= ent WMI data block for the values when switched, so there's no risk for cyc= ling in this case=2E This seems like smart hardware design, but we've certa= inly seen bad hardware design so the concern is warranted=2E Perhaps it is = worth visiting if another vendor implements it differently? That being said= , what you're describing would match up with how the physical profile selec= tion button works, so it would align with consumer expectation=2E I have no= strong feelings either way, but I'm a little concerned about meeting the m= erge window as this series fixes a pretty disruptive bug affecting 6=2E17 u= sers=2E Regards, - Derek >Other than that: >Reviewed-by: Armin Wolf > >> 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 >> diff --git a/drivers/acpi/platform_profile=2Ec b/drivers/acpi/platfor= m_profile=2Ec >> index b43f4459a4f6=2E=2Eaa1dce05121b 100644 >> --- a/drivers/acpi/platform_profile=2Ec >> +++ b/drivers/acpi/platform_profile=2Ec >> @@ -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)= ; >> diff --git a/include/linux/platform_profile=2Eh b/include/linux/platfor= m_profile=2Eh >> index a299225ab92e=2E=2E855b28340e95 100644 >> --- a/include/linux/platform_profile=2Eh >> +++ b/include/linux/platform_profile=2Eh >> @@ -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 */ >> };