From patchwork Fri Dec 6 03:19:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 848300 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2081.outbound.protection.outlook.com [40.107.93.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 313DE192597; Fri, 6 Dec 2024 03:26:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.81 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733455576; cv=fail; b=Y42VpVDWExoR9HZBFFMUUIsB0dR0Q55wD463cC0+UD6wBvFNOID/dqnoMFKjAt9DSDKUl+sTOC99UKoF1tRvbWQuYGpeUiIF/BPE+CLDQPYw9f5jzx3UREslBnBEZ0WBZiHfJnXFxWKXJAmq9+PhfasjahJ0FmQZuWbevgt1Vzk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733455576; c=relaxed/simple; bh=KVqn7cR8jWBeZhJN8eGjfBFPDg6nAG6qCoMhJRJ+uTE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=L4tQsOeqBLYCCbIZ+phf8ugVQ9DX5bEcqvJuvBzyt9ud6lPQGxrA8Q+LaE2vYQDCKFpQInE1VdBMqDPof03u1sHU/kzXCRx6uGpKHltFDWKpIaB6SBnY/LTQVSWt/yZ9Mdxf67JLcPZS/Hy8dtreigxo15YlQeIGyCIcLyAjElw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=grCVmBF8; arc=fail smtp.client-ip=40.107.93.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="grCVmBF8" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=j7Shh+Y6xCdN6icvVYS0XqQCp3pSye1iwXunFwpvbvl4XI2yDOLWx/cAJTya1Fs/97v9Bynmp/YNChmkiwI0+qooweNwYLb3gp75rdqltNg7sJiTmAvxseosff8EQZ8qBp4SlsCXRuVo92EDkQgPBOt+skN8rUnyw95Jkir7dK9yywdsCspqWr+m49/yzLdlukztH9v3/b7CrkCUa0HgSFzs3ZjNiNBzmeLsufwjn9ekuFdvDGiGRv7oNeMckrxXWpr2S6lqcoySkDh7XJ13Qv1K7nZwJWnEUjtKKVM1wo1aQJEAgPruMGK2PhxK9+JCjgK0NW77ZRe/lZsatKgMUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Q6dHsPQDWl+kzyUKP92nC6SOqRt2FM5/W/XOE/tNYOM=; b=vGXF+27wR9ghxEvAJy0wIlIizJnr21L7uTIXjE3+tKaMBwSWQfumlCdwELw3Obb2SgrEXXPCt1x5L3HRqst0HQ7hsJAiE2ocvvEwLKN1VgY9uRZhTJ2ROrsLwvTMF9mPUDXkRJuMVCTDrpmIiGmwRb6TsodGYSF/AH8oofUI5haByGVtsYnImTZjZ4GJFLBTJ62hrh+sduZ1AxZKh3k8YaX4pam3eXG8KX9xwnwdfcso50xkSAdScNCfwt4epANJMFg2c7WtZ/Fw/PWgqdWJkpEFcYJIgL6uGllMCN0iqHR5xYRqV5a5Kk7Wcuq3ouJo5sy6ulZ1/VVWfAbFb/S/ow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q6dHsPQDWl+kzyUKP92nC6SOqRt2FM5/W/XOE/tNYOM=; b=grCVmBF8jNZ13JZYCDDcfFZk8fmhJI8RUqw44LQ2TF5lhhQ2eJBTUQ+AruoQymtWSUAAMASDrl5UjBDuvqTZTYNtaRuiMIxkm702SS33TNQnc/tdqtXdLanuozQYkgbOxs11XaRMnxT4b/uA4xwMgyNxIxaOUCf9p0nQWJSz0+o= Received: from PH7P221CA0039.NAMP221.PROD.OUTLOOK.COM (2603:10b6:510:33c::18) by DM4PR12MB7669.namprd12.prod.outlook.com (2603:10b6:8:106::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.12; Fri, 6 Dec 2024 03:26:12 +0000 Received: from MWH0EPF000A672F.namprd04.prod.outlook.com (2603:10b6:510:33c:cafe::d2) by PH7P221CA0039.outlook.office365.com (2603:10b6:510:33c::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.10 via Frontend Transport; Fri, 6 Dec 2024 03:26:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by MWH0EPF000A672F.mail.protection.outlook.com (10.167.249.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8230.7 via Frontend Transport; Fri, 6 Dec 2024 03:26:11 +0000 Received: from AUS-P9-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 5 Dec 2024 21:26:08 -0600 From: Mario Limonciello To: Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= CC: "Rafael J . Wysocki" , Len Brown , Maximilian Luz , Lee Chun-Yi , "Shyam Sundar S K" , Corentin Chary , "Luke D . Jones" , Ike Panhc , Henrique de Moraes Holschuh , "Alexis Belmonte" , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Ai Chao , Gergo Koteles , open list , "open list:ACPI" , "open list:MICROSOFT SURFACE PLATFORM PROFILE DRIVER" , "open list:THINKPAD ACPI EXTRAS DRIVER" , Mark Pearson , Matthew Schwartz , Mario Limonciello , Armin Wolf Subject: [PATCH v10 16/22] ACPI: platform_profile: Add concept of a "custom" profile Date: Thu, 5 Dec 2024 21:19:12 -0600 Message-ID: <20241206031918.1537-17-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241206031918.1537-1-mario.limonciello@amd.com> References: <20241206031918.1537-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000A672F:EE_|DM4PR12MB7669:EE_ X-MS-Office365-Filtering-Correlation-Id: 76928b0e-3b56-48d8-b569-08dd15a5bb8f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|36860700013|7416014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?aPO/c+Un4j5tUUYm4X/l8fcA4jXaV27?= =?utf-8?q?W60uAAZ4U3riiSVzKsP6CXvaZDmdqU6k50QZArCfef2V2xVcTqavdsuOoz4F6YBgk?= =?utf-8?q?zk+WcRoJBcb4ibH+l3FqImzngBCoR2iQ9GeVfY4l3RWbY2bS6klhD8BGM2WQ12ASf?= =?utf-8?q?7dhuWavSVRxsrEj/GTHy+FnTespD+3pTmtoqmJiqDGcGqIErluZbV4EHKCqeyVsuq?= =?utf-8?q?MdXClEb+7MWJTmMcrb079MA2tUWGdSbGbyl+soZ4Ty5eaeGvsIW7M3+BHr5Ez9aS4?= =?utf-8?q?1hQbNRmauI+582IJnhQvU9jevAzhARbBABewRsA1GzZ3FuwijO9Z6lcOVf2qnyhki?= =?utf-8?q?pMKfZlf4qiz+ueiHGPvmsMmIsx3dUhlrzDdmlDG+KoezgMteCox6oYOkyBQ43nCrn?= =?utf-8?q?4nfUxQJIQr8SXLSoTyHPE03FPo3e3+RncbZCnnkmLPcA25ipP1SLuTtT//Jxb5F6Q?= =?utf-8?q?Vyo9GnFv1SGsnYCDwd54Cyfs0u0sSv//lgj+MbsIbBCs8+5fK4vs/p5V0Y84Z9RJW?= =?utf-8?q?BG6BY1NoSeZeHAvJg03OJzyhrDDVCOKmGNbgzua35Rxu6Q65I7WCnfAhwNM9kVuGT?= =?utf-8?q?kFB7wdxw2saVkKc1eisDqQlHLVPthi4R8cX8YBRfj65yoqdm9LviC//v5w7+h3zOT?= =?utf-8?q?tyMPIciqxXvuoUXvHPDw49n9ftjwLj34ii/7GWQpDEzGeUmES3a5gexbjb0tQrbLx?= =?utf-8?q?2rOpSYh7n4NqkqBWsMEKfMynwB7VQCcTNjDSgRfl/mgZWuOv08shdxul3RP8dJebG?= =?utf-8?q?wxWRVB5qunXM+cswse1eHOmDefTtWCQtw9eyrU5xrMggXmJwI5yMKWcTO2ipshjgy?= =?utf-8?q?7gfh0QWdFEEOhG1U/DX+DKD8p3jq2YH+6/i8sF5RSzdywb/7xiZnxB9ur2P9I/9l4?= =?utf-8?q?oxKafEGG39aOQsWAbXDQPjMwqv35peVZAKjOIPvNoYytN5ijC1FByczdL4wkqQ57s?= =?utf-8?q?jqACLUS9d2Nh+Gqw5d07vAv9WoIzOp+Ubo5ik/8o7IU1yDPEjLipN5VEJE4ec8PXl?= =?utf-8?q?BOnEf6FLpUgaFUJMA8+dewZ5C289XCGHMyVoXSfd5tXiUtE9Z7HdZPrn8vUIuGqbb?= =?utf-8?q?5UlXK7lSjfSfgy/JhAX61Bq2p+7ugEvUnTBUsHNT1AyCi+a+xXQw6vgkHNI13IaqN?= =?utf-8?q?szTdGZXHX/S2rm4SYrZtgmMpzDXVu/7PPuDFjiqVw02D/gXTZvJU+ArrLrF5N05jL?= =?utf-8?q?Udg4p/M+N2e20xovKH18v1dB464UZ9w0JuzZU9cJv9QsEF7blRcdIq2/rJtHOyaUm?= =?utf-8?q?JF0P9trzQWGl5RFt5JWyqVMMWxMvTkjYwB7Wy3JyWitARMRkX4uDYXHeqFKl2pYeA?= =?utf-8?q?u/ZDNoKAgIwFP45J+1NpfUBff4CvB4Qa1L4h5oLSrpc1XftZA0RrLtQqUCBuZzPIT?= =?utf-8?q?+P0R1ITCSjL?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(376014)(36860700013)(7416014)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2024 03:26:11.5304 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 76928b0e-3b56-48d8-b569-08dd15a5bb8f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000A672F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7669 When two profile handlers don't agree on the current profile it's ambiguous what to show to the legacy sysfs interface. Add a "custom" profile string that userspace will be able to use the legacy sysfs interface to distinguish this situation.. Additionally drivers can choose to use this to indicate that a user has modified driver settings in a way that the platform profile advertised by a driver is not accurate. Reviewed-by: Armin Wolf Tested-by: Mark Pearson Reviewed-by: Mark Pearson Reviewed-by: Ilpo Järvinen Signed-off-by: Mario Limonciello --- v10: * Update commit message --- drivers/acpi/platform_profile.c | 1 + include/linux/platform_profile.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c index bdf69255ed9ca..54483269b8834 100644 --- a/drivers/acpi/platform_profile.c +++ b/drivers/acpi/platform_profile.c @@ -20,6 +20,7 @@ static const char * const profile_names[] = { [PLATFORM_PROFILE_BALANCED] = "balanced", [PLATFORM_PROFILE_BALANCED_PERFORMANCE] = "balanced-performance", [PLATFORM_PROFILE_PERFORMANCE] = "performance", + [PLATFORM_PROFILE_CUSTOM] = "custom", }; static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST); diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h index a888fd085c513..0682bb4c57e5d 100644 --- a/include/linux/platform_profile.h +++ b/include/linux/platform_profile.h @@ -23,6 +23,7 @@ enum platform_profile_option { PLATFORM_PROFILE_BALANCED, PLATFORM_PROFILE_BALANCED_PERFORMANCE, PLATFORM_PROFILE_PERFORMANCE, + PLATFORM_PROFILE_CUSTOM, PLATFORM_PROFILE_LAST, /*must always be last */ };