From patchwork Mon Sep 12 09:06:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 12973473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C56C8C6FA83 for ; Mon, 12 Sep 2022 09:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229512AbiILJMz (ORCPT ); Mon, 12 Sep 2022 05:12:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiILJMy (ORCPT ); Mon, 12 Sep 2022 05:12:54 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2072.outbound.protection.outlook.com [40.107.92.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C98B619029 for ; Mon, 12 Sep 2022 02:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QDWb8iWcEd0NIxu/y0S5ekCF/kXUPobMY2QqCf9Eior1ElpxXtBF4sQuwSsc/tciyVPxnqfk+6eqpFS+t5DvS9m0rN0j+dqU96eMEK9FKJRV7ZeDh43OYi1l6Ji1ItmyGFUO1kxcdF/hxuMXuCkOXhFfPE1XjsIHp5lmUs2ZhTMskFRdUgTRpEtIbXpdqEUADVXr/akZ4QoKS5fawebd0CeU6f4ww60k5PmT+7lbxeOR1nAt9dRjiy0Ab4A4zRPGvhBU5jQdFwT1Qi86RqtjFUc1EeEwrVzFMKJsz3pXJY2c8AK3rM7f2dTP36QoidRDaXs2joQXrGui+H0NYrVvEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ZIVDWMzoNldrdV9KA7XS3CDxd8HJ5KJfuS5FaG0lOu0=; b=LhEdZyJVvzqY4Jdqx7TW5SLTTukMHQvmowew3V7CMlaw6OeDFJrjZh3Oss36y67sNUgoEvBVucr8E/eWu/QuKEvKbQN/7Qpk0Ab8sr+zvrGSwhobLfk5HweHs5yAhY54C3+CUq3+t6ys8A4z8LT0TQmN892+sG3M+x2g9m+gHfVhPCT6tZE9lp14leMZM7BO6tZBXgjmrhtibopghjd8E2GLYkgfwQ9ltSgxGhZ5UIlMoXUoMZ+cFBzX4OEHHE1fRd4ourHXDqv6LfyN17b4pKLsAsYvm4OC2trnJHwkvPt9LB4n7xztXNddoP8ZKXmnkpMZU0GIiMZGJ+emFh7Bdw== 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 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=ZIVDWMzoNldrdV9KA7XS3CDxd8HJ5KJfuS5FaG0lOu0=; b=PSbG8iASDdIbMyABwq9+lKxKsKiXEV3pBYU8P156jltIrkN1C45luN/E38Ine+8oQNNA4erEAy7BJIqUJCIrl8J6r+Wylo/5DYp3pyCNIvr1xE9CaaK7fW4+0YLADF6Hgl9F81PQKJ1Uq+V77Xy/A/NGFrkUGZPbQgrMSdZkO1I= Received: from BN0PR04CA0006.namprd04.prod.outlook.com (2603:10b6:408:ee::11) by BL1PR12MB5128.namprd12.prod.outlook.com (2603:10b6:208:316::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.12; Mon, 12 Sep 2022 09:12:49 +0000 Received: from BN8NAM11FT017.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ee:cafe::45) by BN0PR04CA0006.outlook.office365.com (2603:10b6:408:ee::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.15 via Frontend Transport; Mon, 12 Sep 2022 09:12:49 +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 BN8NAM11FT017.mail.protection.outlook.com (10.13.177.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Mon, 12 Sep 2022 09:12:48 +0000 Received: from jatayu.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.2375.28; Mon, 12 Sep 2022 04:11:40 -0500 From: Shyam Sundar S K To: , CC: , , , Shyam Sundar S K Subject: [PATCH v2 1/4] platform/x86/amd/pmf: Add support for CnQF Date: Mon, 12 Sep 2022 14:36:38 +0530 Message-ID: <20220912090641.111658-2-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220912090641.111658-1-Shyam-sundar.S-k@amd.com> References: <20220912090641.111658-1-Shyam-sundar.S-k@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] 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: BN8NAM11FT017:EE_|BL1PR12MB5128:EE_ X-MS-Office365-Filtering-Correlation-Id: f57775d0-d8e8-4cf4-4014-08da949ef6a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8WLdJ5Bx+XqTmQ5mNlBKTVq9GbL0y8qr5R+ptbX7f5XJSDCAy7nCBAq5DWAH1mHGjNe9DuxZZFymVmLvqQrs2J5c6EYyqDyRxhrlPkzlRCZg9zviHgH2JmwZqedfERH/wK6mF3URfsgoigqevoNPnZfaT1eewHdG15rO3wKUPfmp7n3vaQj81pl4T5jYlj5J7Opf1pbXejCgAsc3sO3AjYdO3fVe/6Lc7kEvrAoL+kbC4sivk7PwrjE6CatzyRnzgMikeQ50ZREnTSkqN6TnknqeJOsR8CMQJoORRyGnM6BaRn/B5YP6jWBl0zrFuTiCvU7WijJQFbH3mZNIYzjQqrVYnp18VT6VepXNKpK3ZNzroIHcM6vxYFl63cl8/1k1FBim57REo+MPtqb27KoluZQqzAxMTrC4KWl29W9MfPgzrtZhrs5N6Y0+VrUuJuNIb5clraxadm1VNRyzG+Q4jzMXgi3n9CF7ak9wWJdX6kkx/fLHqan3M6kLBnHM4u9V8HLmSOyRTXILbVgluEMQUI0Y5q9Zq6GSe+AIkSt6dZv3knutXjCmJ4Q1wSSCoSIue3Cwc9i7cabiVnwqQLjkWDiUkVxxoKpKjZhKQQfQOpWVy8MX0Nh44BHohYe7vdRbIO7ebGSJbIIKVkbRL7uaueYo0YouPShMRJwtrFryd7xP+xk12X/tgL5k+mkVKG9a4ZlP8aV12ja8En5cZ8gC16xlq4rPqZVN3w542GqYDwNIPOIfJgnFW1ZROPr/On2Y9LeeW42Anee3f56xK+TD1aGzebQ9gA8m4KXKqb5uRVew128YXEqQhOyxJXX3ow/F 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:(13230016)(4636009)(346002)(376002)(136003)(396003)(39860400002)(46966006)(40470700004)(36840700001)(41300700001)(30864003)(2906002)(8936002)(54906003)(36756003)(40480700001)(110136005)(478600001)(26005)(316002)(82310400005)(5660300002)(7696005)(186003)(1076003)(36860700001)(81166007)(356005)(2616005)(47076005)(426003)(83380400001)(16526019)(336012)(82740400003)(70586007)(40460700003)(70206006)(8676002)(86362001)(4326008)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2022 09:12:48.9227 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f57775d0-d8e8-4cf4-4014-08da949ef6a1 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: BN8NAM11FT017.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5128 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org CnQF (a.k.a Cool and Quiet Framework) extends the static slider concept. PMF dynamically manages system power limits and fan policy based on system power trends which is representative of workload trend. Static slider and CnQF controls are mutually exclusive for system power budget adjustments. CnQF supports configurable number of modes which can be unique for AC and DC. Every mode is representative of a system state characterized by unique steady state and boost behavior. OEMs can configure the different modes/system states and how the transition to a mode happens. Whether to have CnQF manage system power budget dynamically in AC or DC or both is also configurable. Mode changes due to CnQF don't result in slider position change. The default OEM values are obtained after evaluating the PMF ACPI function idx 11 & 12 for AC and DC respectively. Whether to turn ON/OFF by default is guided by a "flag" passed by the OEM BIOS. Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmf/Makefile | 2 +- drivers/platform/x86/amd/pmf/acpi.c | 10 + drivers/platform/x86/amd/pmf/cnqf.c | 319 ++++++++++++++++++++++++++ drivers/platform/x86/amd/pmf/core.c | 16 +- drivers/platform/x86/amd/pmf/pmf.h | 100 ++++++++ 5 files changed, 445 insertions(+), 2 deletions(-) create mode 100644 drivers/platform/x86/amd/pmf/cnqf.c diff --git a/drivers/platform/x86/amd/pmf/Makefile b/drivers/platform/x86/amd/pmf/Makefile index ef2b08c9174d..fdededf54392 100644 --- a/drivers/platform/x86/amd/pmf/Makefile +++ b/drivers/platform/x86/amd/pmf/Makefile @@ -6,4 +6,4 @@ obj-$(CONFIG_AMD_PMF) += amd-pmf.o amd-pmf-objs := core.o acpi.o sps.o \ - auto-mode.o + auto-mode.o cnqf.o diff --git a/drivers/platform/x86/amd/pmf/acpi.c b/drivers/platform/x86/amd/pmf/acpi.c index cb46a7252414..05a2b8a056fc 100644 --- a/drivers/platform/x86/amd/pmf/acpi.c +++ b/drivers/platform/x86/amd/pmf/acpi.c @@ -233,6 +233,16 @@ static int apmf_get_system_params(struct amd_pmf_dev *dev) return 0; } +int apmf_get_dyn_slider_def_ac(struct amd_pmf_dev *pdev, struct apmf_dyn_slider_output *data) +{ + return apmf_if_call_store_buffer(pdev, APMF_FUNC_DYN_SLIDER_AC, data, sizeof(*data)); +} + +int apmf_get_dyn_slider_def_dc(struct amd_pmf_dev *pdev, struct apmf_dyn_slider_output *data) +{ + return apmf_if_call_store_buffer(pdev, APMF_FUNC_DYN_SLIDER_DC, data, sizeof(*data)); +} + void apmf_acpi_deinit(struct amd_pmf_dev *pmf_dev) { acpi_handle ahandle = ACPI_HANDLE(pmf_dev->dev); diff --git a/drivers/platform/x86/amd/pmf/cnqf.c b/drivers/platform/x86/amd/pmf/cnqf.c new file mode 100644 index 000000000000..aebcef778a0b --- /dev/null +++ b/drivers/platform/x86/amd/pmf/cnqf.c @@ -0,0 +1,319 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * AMD Platform Management Framework Driver + * + * Copyright (c) 2022, Advanced Micro Devices, Inc. + * All Rights Reserved. + * + * Author: Shyam Sundar S K + */ + +#include +#include "pmf.h" + +static struct cnqf_config config_store; + +static int amd_pmf_set_cnqf(struct amd_pmf_dev *dev, int src, int idx, + struct cnqf_config *table) +{ + struct power_table_control *pc; + + pc = &config_store.mode_set[src][idx].power_control; + + amd_pmf_send_cmd(dev, SET_SPL, false, pc->spl, NULL); + amd_pmf_send_cmd(dev, SET_FPPT, false, pc->fppt, NULL); + amd_pmf_send_cmd(dev, SET_SPPT, false, pc->sppt, NULL); + amd_pmf_send_cmd(dev, SET_SPPT_APU_ONLY, false, pc->sppt_apu_only, NULL); + amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false, pc->stt_min, NULL); + amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false, pc->stt_skin_temp[STT_TEMP_APU], + NULL); + amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false, pc->stt_skin_temp[STT_TEMP_HS2], + NULL); + + if (is_apmf_func_supported(dev, APMF_FUNC_SET_FAN_IDX)) + apmf_update_fan_idx(dev, + config_store.mode_set[src][idx].fan_control.manual, + config_store.mode_set[src][idx].fan_control.fan_id); + + return 0; +} + +static void amd_pmf_update_power_threshold(void) +{ + struct cnqf_mode_settings *ts; + struct cnqf_tran_params *tp; + int i; + + for (i = 0; i < POWER_SOURCE_MAX; i++) { + tp = &config_store.trans_param[i][CNQF_TRANSITION_TO_QUIET]; + ts = &config_store.mode_set[i][CNQF_MODE_BALANCE]; + tp->power_threshold = ts->power_floor - tp->power_delta; + + tp = &config_store.trans_param[i][CNQF_TRANSITION_TO_TURBO]; + ts = &config_store.mode_set[i][CNQF_MODE_PERFORMANCE]; + tp->power_threshold = ts->power_floor - tp->power_delta; + + tp = &config_store.trans_param[i][CNQF_TRANSITION_FROM_BALANCE_TO_PERFORMANCE]; + ts = &config_store.mode_set[i][CNQF_MODE_BALANCE]; + tp->power_threshold = ts->power_floor - tp->power_delta; + + tp = &config_store.trans_param[i][CNQF_TRANSITION_FROM_PERFORMANCE_TO_BALANCE]; + ts = &config_store.mode_set[i][CNQF_MODE_PERFORMANCE]; + tp->power_threshold = ts->power_floor - tp->power_delta; + + tp = &config_store.trans_param[i][CNQF_TRANSITION_FROM_QUIET_TO_BALANCE]; + ts = &config_store.mode_set[i][CNQF_MODE_QUIET]; + tp->power_threshold = ts->power_floor - tp->power_delta; + + tp = &config_store.trans_param[i][CNQF_TRANSITION_FROM_TURBO_TO_PERFORMANCE]; + ts = &config_store.mode_set[i][CNQF_MODE_TURBO]; + tp->power_threshold = ts->power_floor - tp->power_delta; + } +} + +static const char *state_as_str(unsigned int state) +{ + switch (state) { + case CNQF_MODE_QUIET: + return "QUIET"; + case CNQF_MODE_BALANCE: + return "BALANCED"; + case CNQF_MODE_TURBO: + return "TURBO"; + case CNQF_MODE_PERFORMANCE: + return "PERFORMANCE"; + default: + return "Unknown CnQF mode"; + } +} + +int amd_pmf_trans_cnqf(struct amd_pmf_dev *dev, int socket_power, ktime_t time_lapsed_ms) +{ + struct cnqf_tran_params *tp; + int src, i, j, index = 0; + u32 avg_power = 0; + + src = amd_pmf_get_power_source(); + + if (dev->current_profile == PLATFORM_PROFILE_BALANCED) { + amd_pmf_set_cnqf(dev, src, config_store.current_mode, NULL); + } else { + /* + * Return from here if the platform_profile is not balanced + * so that preference is given to user mode selection, rather + * than enforcing CnQF to run all the time (if enabled) + */ + return -EINVAL; + } + + for (i = 0; i < CNQF_TRANSITION_MAX; i++) { + config_store.trans_param[src][i].timer += time_lapsed_ms; + config_store.trans_param[src][i].total_power += socket_power; + config_store.trans_param[src][i].count++; + + tp = &config_store.trans_param[src][i]; + if (tp->timer >= tp->time_constant && tp->count) { + avg_power = tp->total_power / tp->count; + + /* Reset the indices */ + tp->timer = 0; + tp->total_power = 0; + tp->count = 0; + + if ((tp->shifting_up && avg_power >= tp->power_threshold) || + (!tp->shifting_up && avg_power <= tp->power_threshold)) { + tp->priority = true; + } else { + tp->priority = false; + } + } + } + + dev_dbg(dev->dev, "[CNQF] Avg power: %u mW socket power: %u mW mode:%s\n", + avg_power, socket_power, state_as_str(config_store.current_mode)); + + for (j = 0; j < CNQF_TRANSITION_MAX; j++) { + /* apply the highest priority */ + index = config_store.trans_prio[j]; + if (config_store.trans_param[src][index].priority) { + if (config_store.current_mode != + config_store.trans_param[src][index].target_mode) { + config_store.current_mode = + config_store.trans_param[src][index].target_mode; + dev_dbg(dev->dev, "Moving to Mode :%s\n", + state_as_str(config_store.current_mode)); + amd_pmf_set_cnqf(dev, src, + config_store.current_mode, NULL); + } + break; + } + } + return 0; +} + +static void amd_pmf_update_trans_data(int idx, struct apmf_dyn_slider_output out) +{ + struct cnqf_tran_params *tp; + + tp = &config_store.trans_param[idx][CNQF_TRANSITION_TO_QUIET]; + tp->time_constant = out.t_balanced_to_quiet; + tp->target_mode = CNQF_MODE_QUIET; + tp->shifting_up = false; + + tp = &config_store.trans_param[idx][CNQF_TRANSITION_FROM_BALANCE_TO_PERFORMANCE]; + tp->time_constant = out.t_balanced_to_perf; + tp->target_mode = CNQF_MODE_PERFORMANCE; + tp->shifting_up = true; + + tp = &config_store.trans_param[idx][CNQF_TRANSITION_FROM_QUIET_TO_BALANCE]; + tp->time_constant = out.t_quiet_to_balanced; + tp->target_mode = CNQF_MODE_BALANCE; + tp->shifting_up = true; + + tp = &config_store.trans_param[idx][CNQF_TRANSITION_FROM_PERFORMANCE_TO_BALANCE]; + tp->time_constant = out.t_perf_to_balanced; + tp->target_mode = CNQF_MODE_BALANCE; + tp->shifting_up = false; + + tp = &config_store.trans_param[idx][CNQF_TRANSITION_FROM_TURBO_TO_PERFORMANCE]; + tp->time_constant = out.t_turbo_to_perf; + tp->target_mode = CNQF_MODE_PERFORMANCE; + tp->shifting_up = false; + + tp = &config_store.trans_param[idx][CNQF_TRANSITION_TO_TURBO]; + tp->time_constant = out.t_perf_to_turbo; + tp->target_mode = CNQF_MODE_TURBO; + tp->shifting_up = true; +} + +static void amd_pmf_update_mode_set(int idx, struct apmf_dyn_slider_output out) +{ + struct cnqf_mode_settings *ms; + + /* Quiet Mode */ + ms = &config_store.mode_set[idx][CNQF_MODE_QUIET]; + ms->power_floor = out.ps[APMF_CNQF_QUIET].pfloor; + ms->power_control.fppt = out.ps[APMF_CNQF_QUIET].fppt; + ms->power_control.sppt = out.ps[APMF_CNQF_QUIET].sppt; + ms->power_control.sppt_apu_only = out.ps[APMF_CNQF_QUIET].sppt_apu_only; + ms->power_control.spl = out.ps[APMF_CNQF_QUIET].spl; + ms->power_control.stt_min = out.ps[APMF_CNQF_QUIET].stt_min_limit; + ms->power_control.stt_skin_temp[STT_TEMP_APU] = + out.ps[APMF_CNQF_QUIET].stt_skintemp[STT_TEMP_APU]; + ms->power_control.stt_skin_temp[STT_TEMP_HS2] = + out.ps[APMF_CNQF_QUIET].stt_skintemp[STT_TEMP_HS2]; + ms->fan_control.fan_id = out.ps[APMF_CNQF_QUIET].fan_id; + + /* Balance Mode */ + ms = &config_store.mode_set[idx][CNQF_MODE_BALANCE]; + ms->power_floor = out.ps[APMF_CNQF_BALANCE].pfloor; + ms->power_control.fppt = out.ps[APMF_CNQF_BALANCE].fppt; + ms->power_control.sppt = out.ps[APMF_CNQF_BALANCE].sppt; + ms->power_control.sppt_apu_only = out.ps[APMF_CNQF_BALANCE].sppt_apu_only; + ms->power_control.spl = out.ps[APMF_CNQF_BALANCE].spl; + ms->power_control.stt_min = out.ps[APMF_CNQF_BALANCE].stt_min_limit; + ms->power_control.stt_skin_temp[STT_TEMP_APU] = + out.ps[APMF_CNQF_BALANCE].stt_skintemp[STT_TEMP_APU]; + ms->power_control.stt_skin_temp[STT_TEMP_HS2] = + out.ps[APMF_CNQF_BALANCE].stt_skintemp[STT_TEMP_HS2]; + ms->fan_control.fan_id = out.ps[APMF_CNQF_BALANCE].fan_id; + + /* Performance Mode */ + ms = &config_store.mode_set[idx][CNQF_MODE_PERFORMANCE]; + ms->power_floor = out.ps[APMF_CNQF_PERFORMANCE].pfloor; + ms->power_control.fppt = out.ps[APMF_CNQF_PERFORMANCE].fppt; + ms->power_control.sppt = out.ps[APMF_CNQF_PERFORMANCE].sppt; + ms->power_control.sppt_apu_only = out.ps[APMF_CNQF_PERFORMANCE].sppt_apu_only; + ms->power_control.spl = out.ps[APMF_CNQF_PERFORMANCE].spl; + ms->power_control.stt_min = out.ps[APMF_CNQF_PERFORMANCE].stt_min_limit; + ms->power_control.stt_skin_temp[STT_TEMP_APU] = + out.ps[APMF_CNQF_PERFORMANCE].stt_skintemp[STT_TEMP_APU]; + ms->power_control.stt_skin_temp[STT_TEMP_HS2] = + out.ps[APMF_CNQF_PERFORMANCE].stt_skintemp[STT_TEMP_HS2]; + ms->fan_control.fan_id = out.ps[APMF_CNQF_PERFORMANCE].fan_id; + + /* Turbo Mode */ + ms = &config_store.mode_set[idx][CNQF_MODE_TURBO]; + ms->power_floor = out.ps[APMF_CNQF_TURBO].pfloor; + ms->power_control.fppt = out.ps[APMF_CNQF_TURBO].fppt; + ms->power_control.sppt = out.ps[APMF_CNQF_TURBO].sppt; + ms->power_control.sppt_apu_only = out.ps[APMF_CNQF_TURBO].sppt_apu_only; + ms->power_control.spl = out.ps[APMF_CNQF_TURBO].spl; + ms->power_control.stt_min = out.ps[APMF_CNQF_TURBO].stt_min_limit; + ms->power_control.stt_skin_temp[STT_TEMP_APU] = + out.ps[APMF_CNQF_TURBO].stt_skintemp[STT_TEMP_APU]; + ms->power_control.stt_skin_temp[STT_TEMP_HS2] = + out.ps[APMF_CNQF_TURBO].stt_skintemp[STT_TEMP_HS2]; + ms->fan_control.fan_id = out.ps[APMF_CNQF_TURBO].fan_id; +} + +static int amd_pmf_check_flags(struct amd_pmf_dev *dev) +{ + struct apmf_dyn_slider_output out = {}; + + if (is_apmf_func_supported(dev, APMF_FUNC_DYN_SLIDER_AC)) + apmf_get_dyn_slider_def_ac(dev, &out); + else if (is_apmf_func_supported(dev, APMF_FUNC_DYN_SLIDER_DC)) + apmf_get_dyn_slider_def_dc(dev, &out); + + return out.flags; +} + +void amd_pmf_load_defaults_cnqf(struct amd_pmf_dev *dev) +{ + struct apmf_dyn_slider_output out; + int i, j, ret; + + for (i = 0; i < POWER_SOURCE_MAX; i++) { + if (i == POWER_SOURCE_AC && is_apmf_func_supported(dev, APMF_FUNC_DYN_SLIDER_AC)) { + ret = apmf_get_dyn_slider_def_ac(dev, &out); + if (ret) + dev_err(dev->dev, + "APMF apmf_get_dyn_slider_def_ac failed :%d\n", ret); + } else if (i == POWER_SOURCE_DC && + is_apmf_func_supported(dev, APMF_FUNC_DYN_SLIDER_DC)) { + ret = apmf_get_dyn_slider_def_dc(dev, &out); + if (ret) + dev_err(dev->dev, + "APMF apmf_get_dyn_slider_def_dc failed :%d\n", ret); + } + + amd_pmf_update_mode_set(i, out); + amd_pmf_update_trans_data(i, out); + + for (j = 0; j < CNQF_MODE_MAX; j++) { + if (config_store.mode_set[i][j].fan_control.fan_id == FAN_INDEX_AUTO) + config_store.mode_set[i][j].fan_control.manual = false; + else + config_store.mode_set[i][j].fan_control.manual = true; + } + } + amd_pmf_update_power_threshold(); + + for (i = 0; i < CNQF_TRANSITION_MAX; i++) + config_store.trans_prio[i] = i; +} + +void amd_pmf_deinit_cnqf(struct amd_pmf_dev *dev) +{ + cancel_delayed_work_sync(&dev->work_buffer); +} + +void amd_pmf_init_cnqf(struct amd_pmf_dev *dev) +{ + int ret, src; + + ret = amd_pmf_check_flags(dev); + if (!ret) { + dev_dbg(dev->dev, "CnQF bios default_enable flag not set\n"); + return; + } + + dev->cnqf_enabled = true; + amd_pmf_load_defaults_cnqf(dev); + amd_pmf_init_metrics_table(dev); + + /* update the thermal for CnQF */ + src = amd_pmf_get_power_source(); + amd_pmf_set_cnqf(dev, src, config_store.current_mode, NULL); +} diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c index a675ca969331..2cb7793d07cf 100644 --- a/drivers/platform/x86/amd/pmf/core.c +++ b/drivers/platform/x86/amd/pmf/core.c @@ -123,6 +123,11 @@ static void amd_pmf_get_metrics(struct work_struct *work) amd_pmf_trans_automode(dev, socket_power, time_elapsed_ms); } + if (dev->cnqf_enabled) { + /* Apply the CnQF transition */ + amd_pmf_trans_cnqf(dev, socket_power, time_elapsed_ms); + } + dev->start_time = ktime_to_ms(ktime_get()); schedule_delayed_work(&dev->work_buffer, msecs_to_jiffies(metrics_table_loop_ms)); mutex_unlock(&dev->update_mutex); @@ -262,6 +267,11 @@ static void amd_pmf_init_features(struct amd_pmf_dev *dev) if (is_apmf_func_supported(dev, APMF_FUNC_AUTO_MODE)) { amd_pmf_init_auto_mode(dev); dev_dbg(dev->dev, "Auto Mode Init done\n"); + } else if (is_apmf_func_supported(dev, APMF_FUNC_DYN_SLIDER_AC) || + is_apmf_func_supported(dev, APMF_FUNC_DYN_SLIDER_DC)) { + /* Enable Cool n Quiet Framework (CnQF) */ + amd_pmf_init_cnqf(dev); + dev_dbg(dev->dev, "CnQF Init done\n"); } } @@ -270,8 +280,12 @@ static void amd_pmf_deinit_features(struct amd_pmf_dev *dev) if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) amd_pmf_deinit_sps(dev); - if (is_apmf_func_supported(dev, APMF_FUNC_AUTO_MODE)) + if (is_apmf_func_supported(dev, APMF_FUNC_AUTO_MODE)) { amd_pmf_deinit_auto_mode(dev); + } else if (is_apmf_func_supported(dev, APMF_FUNC_DYN_SLIDER_AC) || + is_apmf_func_supported(dev, APMF_FUNC_DYN_SLIDER_DC)) { + amd_pmf_deinit_cnqf(dev); + } } static const struct acpi_device_id amd_pmf_acpi_ids[] = { diff --git a/drivers/platform/x86/amd/pmf/pmf.h b/drivers/platform/x86/amd/pmf/pmf.h index 0a72a395c2ef..07ff8a7ec7b0 100644 --- a/drivers/platform/x86/amd/pmf/pmf.h +++ b/drivers/platform/x86/amd/pmf/pmf.h @@ -22,6 +22,8 @@ #define APMF_FUNC_AUTO_MODE 5 #define APMF_FUNC_SET_FAN_IDX 7 #define APMF_FUNC_STATIC_SLIDER_GRANULAR 9 +#define APMF_FUNC_DYN_SLIDER_AC 11 +#define APMF_FUNC_DYN_SLIDER_DC 12 /* Message Definitions */ #define SET_SPL 0x03 /* SPL: Sustained Power Limit */ @@ -165,6 +167,7 @@ struct amd_pmf_dev { int socket_power_history_idx; bool amt_enabled; struct mutex update_mutex; /* protects race between ACPI handler and metrics thread */ + bool cnqf_enabled; }; struct apmf_sps_prop_granular { @@ -294,6 +297,94 @@ struct apmf_auto_mode { u32 fan_id_quiet; } __packed; +/* CnQF Layer */ +enum cnqf_trans_priority { + CNQF_TRANSITION_TO_TURBO, /* Any other mode to Turbo Mode */ + CNQF_TRANSITION_FROM_BALANCE_TO_PERFORMANCE, /* quiet/balance to Performance Mode */ + CNQF_TRANSITION_FROM_QUIET_TO_BALANCE, /* Quiet Mode to Balance Mode */ + CNQF_TRANSITION_TO_QUIET, /* Any other mode to Quiet Mode */ + CNQF_TRANSITION_FROM_PERFORMANCE_TO_BALANCE, /* Performance/Turbo to Balance Mode */ + CNQF_TRANSITION_FROM_TURBO_TO_PERFORMANCE, /* Turbo mode to Performance Mode */ + CNQF_TRANSITION_MAX, +}; + +enum cnqf_mode { + CNQF_MODE_QUIET, + CNQF_MODE_BALANCE, + CNQF_MODE_PERFORMANCE, + CNQF_MODE_TURBO, + CNQF_MODE_MAX, +}; + +enum apmf_cnqf_pos { + APMF_CNQF_TURBO, + APMF_CNQF_PERFORMANCE, + APMF_CNQF_BALANCE, + APMF_CNQF_QUIET, + APMF_CNQF_MAX, +}; + +struct cnqf_mode_settings { + struct power_table_control power_control; + struct fan_table_control fan_control; + u32 power_floor; +}; + +struct cnqf_tran_params { + u32 time_constant; /* minimum time required to switch to next mode */ + u32 power_delta; /* minimum power required to switch to next mode */ + u32 power_threshold; + u32 timer; /* elapsed time. if timer > timethreshold, it will move to next mode */ + u32 total_power; + u32 count; + bool priority; + bool shifting_up; + enum cnqf_mode target_mode; +}; + +struct cnqf_power_delta { + u32 to_turbo; + u32 balance_to_perf; + u32 quiet_to_balance; + u32 to_quiet; + u32 perf_to_balance; + u32 turbo_to_perf; +}; + +struct cnqf_config { + struct cnqf_tran_params trans_param[POWER_SOURCE_MAX][CNQF_TRANSITION_MAX]; + struct cnqf_mode_settings mode_set[POWER_SOURCE_MAX][CNQF_MODE_MAX]; + struct power_table_control defaults; + enum cnqf_mode current_mode; + struct cnqf_power_delta power_delta[POWER_SOURCE_MAX]; + u32 power_src; + u32 avg_power; + enum cnqf_trans_priority trans_prio[CNQF_TRANSITION_MAX]; +}; + +struct apmf_cnqf_power_set { + u32 pfloor; + u32 fppt; + u32 sppt; + u32 sppt_apu_only; + u32 spl; + u32 stt_min_limit; + u8 stt_skintemp[STT_TEMP_COUNT]; + u32 fan_id; +} __packed; + +struct apmf_dyn_slider_output { + u16 size; + u16 flags; + u32 t_perf_to_turbo; + u32 t_balanced_to_perf; + u32 t_quiet_to_balanced; + u32 t_balanced_to_quiet; + u32 t_perf_to_balanced; + u32 t_turbo_to_perf; + struct apmf_cnqf_power_set ps[APMF_CNQF_MAX]; +} __packed; + /* Core Layer */ int apmf_acpi_init(struct amd_pmf_dev *pmf_dev); void apmf_acpi_deinit(struct amd_pmf_dev *pmf_dev); @@ -324,4 +415,13 @@ int apmf_get_sbios_requests(struct amd_pmf_dev *pdev, struct apmf_sbios_req *req void amd_pmf_update_2_cql(struct amd_pmf_dev *dev, bool is_cql_event); int amd_pmf_reset_amt(struct amd_pmf_dev *dev); void amd_pmf_handle_amt(struct amd_pmf_dev *dev); + +/* CnQF Layer */ +int apmf_get_dyn_slider_def_ac(struct amd_pmf_dev *pdev, struct apmf_dyn_slider_output *data); +int apmf_get_dyn_slider_def_dc(struct amd_pmf_dev *pdev, struct apmf_dyn_slider_output *data); +void amd_pmf_init_cnqf(struct amd_pmf_dev *dev); +void amd_pmf_deinit_cnqf(struct amd_pmf_dev *dev); +void amd_pmf_load_defaults_cnqf(struct amd_pmf_dev *dev); +int amd_pmf_trans_cnqf(struct amd_pmf_dev *dev, int socket_power, ktime_t time_lapsed_ms); + #endif /* PMF_H */ From patchwork Mon Sep 12 09:06:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 12973472 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D027EECAAD5 for ; Mon, 12 Sep 2022 09:12:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229456AbiILJMy (ORCPT ); Mon, 12 Sep 2022 05:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbiILJMx (ORCPT ); Mon, 12 Sep 2022 05:12:53 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2085.outbound.protection.outlook.com [40.107.237.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB2431B7A8 for ; Mon, 12 Sep 2022 02:12:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XulPa9xK02A98xwWu7m6mTjctHwgIJY4Z2RoaiY2kzFYwJRzSVfm2iuVbbOb9JWddNSroRsS62diH8t0L0nf4tXvTeT3THGKgzpdVF+CgjvELgfUb/uKfHQJCKajDxfIR0IBnmRXaimv34JgSOlxHBQK+YrOmMx1zMrt48w9RCn1HFs1LFzFf8/aSyDvRva6Wohl5sWSmWAV5+azsgi3X8rH8q1qB9u3TU4RPVzqQP+crFgJADxt8nYbwjK7ZEx4JE8ezuwimrMnWpGJiDjBT5ovN+En+++mB6SRW0Bta3eVolsyD4o60Vjhh5qHYvxdBUUkBpmKd8No5lOafmVJgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=MazUswK4Ldcbh3hI/a2thRaSXUj8h6q8QzEgFnTn5TE=; b=jUk7nxUqhoqvbradNRS97q9lwBa5fS8W+Nb6yA/stI1dM66lIkcfop0EHmMv7AaP/NhNstTtoLfzCSzkTZPqFbQYHgtCcfTvwnJUXSnzf9DAekMMpqKiwk5AcyuBrBPHJb6LLsNv6jcqlQfDGdbWGCaylBRM/kVVSghCBrcZMnp7Y/nYxmD7x+d4LQwc9cvW7Nb8fuR7UnJtoNjVLxiJOCskukGW7X38Dcb0HfnJ+yjj0A+SweOoKXa+g3N4XxaftjGb/NHk6pGuDiSWdZ7GWXDvFSvBQiQeiLAA1rBvG3LJ9kH19WRZAQoxnns7vowJKvb5n24EB9WFlgxVMYkXjQ== 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 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=MazUswK4Ldcbh3hI/a2thRaSXUj8h6q8QzEgFnTn5TE=; b=blzAQ2GsAq2i2Lvu+56N6xR5M6wxxV3TgkOGwCCLodkVccPGIwtjYC2Jp63ldfgUHa7lFEr0l0m1gM5EFeiLZSq4tNO9B0lZ51h5iBoyanBwlLkW2PFNvDAQB5QhJSSXaf5z9WYR83OFA5fh9B2Iym6uXjCn9rId6uis82IyFRs= Received: from BN9PR03CA0933.namprd03.prod.outlook.com (2603:10b6:408:108::8) by BL3PR12MB6619.namprd12.prod.outlook.com (2603:10b6:208:38e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.19; Mon, 12 Sep 2022 09:12:49 +0000 Received: from BN8NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:408:108:cafe::74) by BN9PR03CA0933.outlook.office365.com (2603:10b6:408:108::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22 via Frontend Transport; Mon, 12 Sep 2022 09:12:49 +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 BN8NAM11FT060.mail.protection.outlook.com (10.13.177.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Mon, 12 Sep 2022 09:12:49 +0000 Received: from jatayu.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.2375.28; Mon, 12 Sep 2022 04:12:37 -0500 From: Shyam Sundar S K To: , CC: , , , Shyam Sundar S K Subject: [PATCH v2 2/4] platform/x86/amd/pmf: Add sysfs to toggle CnQF Date: Mon, 12 Sep 2022 14:36:39 +0530 Message-ID: <20220912090641.111658-3-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220912090641.111658-1-Shyam-sundar.S-k@amd.com> References: <20220912090641.111658-1-Shyam-sundar.S-k@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] 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: BN8NAM11FT060:EE_|BL3PR12MB6619:EE_ X-MS-Office365-Filtering-Correlation-Id: 605fb27a-e9be-4992-a418-08da949ef711 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tE2aCVMXXNpIl0Tr8WsX+opikvZ+7nJE0cRY7rmDqsYmH68KTCMFv0AkDIZImdFX6SL47WwDJPqWZBx3ibvJ5DJ+kd++AsKTzUq3ERNZmFEP8LVXi9XviIR3Eyi0cUDrq5AzipAPC/NZDR5bUL7kVAR3HHHjhUeHIyeUlYKrWwkvAwyrrY/Qw4/OHIZ4R7XClc/aHJbcWH89VztP1+CVIelj/1hM8MPbgZ3CmVPMa3n5yXnoURFORQmwpbfG0NU7yrw+KIOEXsN8eimx5o323FrYTeoqzIReBCxgnvjUnqT0+D34sUKHxqq8cUtWlCj9F1wFFnWSwheQ7XiRHtLUmQ66osNkvEj43y5gg3a5wlOtEYj6MYJ0GCwwWNGaE4moqBGXvPCkW41cGcMj2D92HP9fOR4bK8i0g1rbgcnrCZElDunL4p7ss1vZ/RxLbE+OA0eLB73ngvuYSZCDV/GzS34rs4mMsvlKPUCYP2KTW5FrkrGO2x9K6kiDm0QfQQ8R5I7Rd0l1XxKvv+s3cBlvXl+ETC0Y27wblPJwvGobdsII90yOaS/rfwvMuuLASngBUJDArbAmV/viTHVALXAz2xtzY/JkF2cxuWphy341i5iURwB2vTQ4101q3hkfW0GlFS7gcW5rHCGpUUV6qOzTx46+bcwqFE0L3hNbPBGr2SSfmAKmeKgcG2diyAh7SkEwS0lU/UruhET4tb67XMNowShkUJJCN6fXoD4ZRG5h4jKvKZ+qa4i+7TTCh2F92BHGhUVvOtk/+hkxNzsJVsvY1H9P6gyscidfEZ5WOIZsrZ0= 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:(13230016)(4636009)(346002)(136003)(39860400002)(376002)(396003)(46966006)(40470700004)(36840700001)(82310400005)(54906003)(110136005)(36860700001)(86362001)(83380400001)(316002)(336012)(356005)(426003)(16526019)(186003)(2616005)(478600001)(1076003)(82740400003)(81166007)(5660300002)(47076005)(26005)(2906002)(40480700001)(40460700003)(8936002)(41300700001)(8676002)(70206006)(4326008)(70586007)(7696005)(36756003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2022 09:12:49.6593 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 605fb27a-e9be-4992-a418-08da949ef711 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: BN8NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6619 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Whether to turn CnQF on/off by default upon driver load would be decided by a BIOS flag. Add a sysfs node to provide a way to the user whether to use static slider or CnQF . Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmf/cnqf.c | 57 +++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/drivers/platform/x86/amd/pmf/cnqf.c b/drivers/platform/x86/amd/pmf/cnqf.c index aebcef778a0b..8d0c1eff1659 100644 --- a/drivers/platform/x86/amd/pmf/cnqf.c +++ b/drivers/platform/x86/amd/pmf/cnqf.c @@ -294,9 +294,64 @@ void amd_pmf_load_defaults_cnqf(struct amd_pmf_dev *dev) config_store.trans_prio[i] = i; } +static ssize_t feat_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct amd_pmf_dev *pdev = dev_get_drvdata(dev); + int mode = amd_pmf_get_pprof_modes(pdev); + int result, src; + bool input; + + result = kstrtobool(buf, &input); + if (result) + return result; + + src = amd_pmf_get_power_source(); + pdev->cnqf_enabled = input; + + if (mode < 0) + return mode; + + if (pdev->cnqf_enabled) { + amd_pmf_set_cnqf(pdev, src, config_store.current_mode, NULL); + } else { + if (is_apmf_func_supported(pdev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) { + amd_pmf_init_sps(pdev); + amd_pmf_update_slider(pdev, SLIDER_OP_SET, mode, NULL); + } + } + + dev_dbg(pdev->dev, "Received CnQF %s\n", input ? "on" : "off"); + return count; +} + +static ssize_t feat_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct amd_pmf_dev *pdev = dev_get_drvdata(dev); + + return sprintf(buf, "%s\n", pdev->cnqf_enabled ? "on" : "off"); +} + +static DEVICE_ATTR_RW(feat); + +static struct attribute *cnqf_feature_attrs[] = { + &dev_attr_feat.attr, + NULL +}; + +static const struct attribute_group cnqf_feature_attribute_group = { + .attrs = cnqf_feature_attrs, + .name = "cnqf" +}; + void amd_pmf_deinit_cnqf(struct amd_pmf_dev *dev) { cancel_delayed_work_sync(&dev->work_buffer); + sysfs_remove_group(&dev->dev->kobj, &cnqf_feature_attribute_group); + kobject_uevent(&dev->dev->kobj, KOBJ_CHANGE); } void amd_pmf_init_cnqf(struct amd_pmf_dev *dev) @@ -316,4 +371,6 @@ void amd_pmf_init_cnqf(struct amd_pmf_dev *dev) /* update the thermal for CnQF */ src = amd_pmf_get_power_source(); amd_pmf_set_cnqf(dev, src, config_store.current_mode, NULL); + ret = sysfs_create_group(&dev->dev->kobj, &cnqf_feature_attribute_group); + kobject_uevent(&dev->dev->kobj, KOBJ_CHANGE); } From patchwork Mon Sep 12 09:06:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 12973474 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44031ECAAD5 for ; Mon, 12 Sep 2022 09:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229561AbiILJM4 (ORCPT ); Mon, 12 Sep 2022 05:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiILJMz (ORCPT ); Mon, 12 Sep 2022 05:12:55 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2041.outbound.protection.outlook.com [40.107.94.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FFAB19029 for ; Mon, 12 Sep 2022 02:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NB94Q/Fa66mW3eLKf5OKRFAhaD5JgQaRqyMCEbuwUXAwOBDBTrlwonNhETfvnNjiEz59TlrxR63ALPVFhkKqWCHL0cGLoGTinj8g2hDYSIgDiCim+Z0lxNluKgPkw2ZnCx7iosi6Q1PAmgVULjVqDwSBO7wOE/oenkj4HWSx8oGmbC42EFAff+SKCsOCxxZVYPqlVNGDz+s++8cSvjRsGeaqds/y7Xi7cM0l23QCCF/yXECj/iAnA9Waw10nWHnDJfO9VvZH0huZb+dvFwGScSrczibQJ2oTW/oBpGzfqfAb9lp7G3b6X2k+2T5L4Wjp/+WIrWQl2wEKDcyoAqMiEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=bSrZWa7TFboXiYyLf1pD93Q+Yo/QNpwdD8nThWkj1Bc=; b=bT9kuo7F+NJAr4PO9plA2hngGv5w1JoYjlsey9DwYfaAT2oJXyeFtFtfkzLgLmeF1gW/PkhvJDGcxBFYWYgqqj+pvDk/IVCIdqLZA3M8Zaqfni/6jKdgB8lKCn6WWsO4xLb6oofZB9HWzIafqxEIhKEyI6ErgkabYZkRjNX6UgnBhIWSSmqOYLJyw3xYu6pDAUyW3GQHo3VfSNgIlqkRda9Bb8UH7/HhhovQdd+e9rdxnANL/2FiLoctk6n2e94NrYoFdiDhRPxSufzajjChGbxxUYtUUCRnhYSj6x58YJEhhdN6qdUpD9r2nBXRt0pAnU3KHm/EtCPj8Fp6mKDWkg== 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 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=bSrZWa7TFboXiYyLf1pD93Q+Yo/QNpwdD8nThWkj1Bc=; b=unyJqPIEfe8Zk2JKNHbx5X/kYXul7zbC5hLIXz+ZlhPHL98JZpMxDtlKD7UoB5J63/TEUKRQgMynr1sKmsvNrldKx2uRuZ3zbo6jGGtO9PcDBBHCFlcKpS0cFTVS/nyyrJzaRkhA9nsTSWQyg87jc4LgXF4rVarfm6xL+T+rJ48= Received: from BN9PR03CA0964.namprd03.prod.outlook.com (2603:10b6:408:109::9) by BL0PR12MB4851.namprd12.prod.outlook.com (2603:10b6:208:1c1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Mon, 12 Sep 2022 09:12:53 +0000 Received: from BN8NAM11FT086.eop-nam11.prod.protection.outlook.com (2603:10b6:408:109:cafe::e7) by BN9PR03CA0964.outlook.office365.com (2603:10b6:408:109::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.18 via Frontend Transport; Mon, 12 Sep 2022 09:12:53 +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 BN8NAM11FT086.mail.protection.outlook.com (10.13.176.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Mon, 12 Sep 2022 09:12:53 +0000 Received: from jatayu.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.2375.28; Mon, 12 Sep 2022 04:12:40 -0500 From: Shyam Sundar S K To: , CC: , , , Shyam Sundar S K Subject: [PATCH v2 3/4] Documentation/ABI/testing/sysfs-amd-pmf: Add ABI doc for AMD PMF Date: Mon, 12 Sep 2022 14:36:40 +0530 Message-ID: <20220912090641.111658-4-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220912090641.111658-1-Shyam-sundar.S-k@amd.com> References: <20220912090641.111658-1-Shyam-sundar.S-k@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] 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: BN8NAM11FT086:EE_|BL0PR12MB4851:EE_ X-MS-Office365-Filtering-Correlation-Id: b729236c-0872-432f-c387-08da949ef94e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LxrnFxpVSKrATqb/1n1jxZWPlCBsV/dnh+i/0qXiQeHCcxczKpk9N8IgUeVCQgFTtUOYam/a/103hGfJFb63AWgSXskkXWPJ9avtBFmhL9VrkopsftbBKC9FpiKu4gY9eXqPB//B0DVGDjLD6oqqJfrGe+NnPf064y2q0nH9aXkxvlm9K22jmWAps3fS94PDFPknBEnUwEDXNyfhMGdHcJlizJjMk0a0Ea5ZypHoE8jSiufS5/xIS6Z6SW6mh5nfLKHnjO+ahW1buDxw1HoAt3Ls7/NRt1SmeWAxVJRC+Vz9TfRVR9XE6nx1it1psJg8WdKiWA0EStCbH5om1arov6D3uEixEvIm1+wEaCmW1f8thX0oEdwl5774byX1gLPZWiAWmKeHIeyTld6Q0qxuGVrwq5MDg/Ji4pLcCu+zLeJvyEQzvnAGlGYToNQFgWHNfwn5HRzLKyGimZQs0KuBCDPaCqUej3EhjW+271br7y68xqkdCpTdgpVsQjsG7zLzXdniTV3yRDX3cqIAvsIHvkywYrqWkN0gLX6gnvt5knRcUMoFp+J+p6AHZ7hrkn9nPcARDeS9N625XDSeBVVyvu/5KqshHFEQwFYoY0ReENWpGpdO1LRIvg5krd0dS5OdWwFSGBvCr8yQqov925eTX+aeDMVzrQ1wrrnaN9HT8pLD9lBRgTddKP2yOJbC3UkCnYNM/DUOjs1vGOMec96Mb4iVDLsxiMjJ5KBPyMW+cKrS6krpAqmD1YA84x7g4KY2F3n6xyNGJdeVvgnPuBSXxqys3evBlehgg3YB3eZrtgKEaKPVLqFGQq42mGcfIZ9h 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:(13230016)(4636009)(136003)(39860400002)(346002)(396003)(376002)(36840700001)(46966006)(40470700004)(36860700001)(40460700003)(81166007)(356005)(82740400003)(316002)(110136005)(54906003)(2906002)(70206006)(5660300002)(8936002)(8676002)(70586007)(4326008)(186003)(16526019)(426003)(47076005)(2616005)(1076003)(478600001)(26005)(40480700001)(41300700001)(336012)(82310400005)(7696005)(36756003)(86362001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2022 09:12:53.3997 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b729236c-0872-432f-c387-08da949ef94e 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: BN8NAM11FT086.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4851 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org AMD PMF driver provides the flexibility to turn "on" or "off" CnQF feature (introduced in the earlier patch). Add corresponding ABI documentation for the new sysfs node. Signed-off-by: Shyam Sundar S K --- Documentation/ABI/testing/sysfs-amd-pmf | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-amd-pmf diff --git a/Documentation/ABI/testing/sysfs-amd-pmf b/Documentation/ABI/testing/sysfs-amd-pmf new file mode 100644 index 000000000000..c75d7426c2c7 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-amd-pmf @@ -0,0 +1,11 @@ +What: /sys/devices/platform/AMDI0102\:00/cnqf/feat +Date: September 2022 +Contact: Shyam Sundar S K +Description: Reading this file tells if the AMD Platform Management(PMF) + Cool n Quiet Framework(CnQF) feature is enabled or not. + + This feature is not enabled by default and gets only turned on + if OEM BIOS passes a "flag" to PMF ACPI function (index 11 or 12) + or in case the user writes "on". + + To turn off CnQF user can write "off" to the sysfs node. From patchwork Mon Sep 12 09:06:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 12973475 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4260ECAAD5 for ; Mon, 12 Sep 2022 09:12:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229546AbiILJM7 (ORCPT ); Mon, 12 Sep 2022 05:12:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiILJM6 (ORCPT ); Mon, 12 Sep 2022 05:12:58 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2061d.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::61d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A073419029 for ; Mon, 12 Sep 2022 02:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R+IoVBcCa8+QiPIRrng+Q+T8ROMSRqy2/u/N5HFEVxmvRp+dag/oDH7HyMfNgBl1wN6WjToMGPlL6oGDjSfRLgVIC6Lmx0D6vyaDFLXU0edVzkkPtqzp04T6OrvLk0aryNAYfNVC8CH0tSfcmufwRlg19fE9dfMlbWgC8vSOpMEz2FKCL6OgiYXEneFQrhxr6By/TaUu4DqCxfhKKG85ClK+qUodlGnExw09RzOVuMm9QgEAJBNAkywdIs2oOK3f7Lfg7kOGQzCI4k2ILWdNtJjwLhLyUlZH/m38YCRhApdJJ1DCHiAGFA926eVevMeKWk87YNFn0YHxPUfF7F1w3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=XJL2QtBKhCydE3bL2ffkK2MOQ1Ygg7QZ53zPMzqQ80U=; b=SGwxFEpliuUbW7kPRxInFeLnAlp+q8y0/x+k1lWsXMiiQ3cEepkQMeeHPxA2ekYkZ2lMxPlNitbEGtlh/OBST9aTa0pEJhGpOB6UsK2CaTQ88QDuxcODq+EorKuQV7yBKqdaUI2f1KvCFH66mYG0b6c/TNFrFEBEr8p9fwPMZALaaIW29Bd7+XDS9oVOgDZx/KhNYg2y3m0uY4DJ/xfov1tc6RZrtALKlg5YK30jW3QlP3l69/qCBFOdXjj/14QhCHuocbGGA9GZktXSkCdZqy1mU1dYw6CHafg/QvaEDeX5onCfJ8sxs/xIQaWwgIVES50jbej9CTHAclZF/NkuCw== 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 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=XJL2QtBKhCydE3bL2ffkK2MOQ1Ygg7QZ53zPMzqQ80U=; b=inDnGf77ziKo4k51h89WunVbfDHuQbK2NW4ImGbibjv6Hzo8oWVJG9RbsD2RSpZA8zAgFsNZjS00SNuZjIRmMYP5RyWJRE9DDx6uS0gxR7fZl30+oP+6gDh4W56vktHvKhz7XmWZA8ppnF36uNvt4k/w3WCpmoMjOYp1gzGV6PU= Received: from BN9PR03CA0989.namprd03.prod.outlook.com (2603:10b6:408:109::34) by PH7PR12MB7115.namprd12.prod.outlook.com (2603:10b6:510:1ee::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Mon, 12 Sep 2022 09:12:54 +0000 Received: from BN8NAM11FT086.eop-nam11.prod.protection.outlook.com (2603:10b6:408:109:cafe::49) by BN9PR03CA0989.outlook.office365.com (2603:10b6:408:109::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14 via Frontend Transport; Mon, 12 Sep 2022 09:12:53 +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 BN8NAM11FT086.mail.protection.outlook.com (10.13.176.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Mon, 12 Sep 2022 09:12:53 +0000 Received: from jatayu.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.2375.28; Mon, 12 Sep 2022 04:12:48 -0500 From: Shyam Sundar S K To: , CC: , , , Shyam Sundar S K Subject: [PATCH v2 4/4] MAINTAINERS: Update ABI doc path for AMD PMF Date: Mon, 12 Sep 2022 14:36:41 +0530 Message-ID: <20220912090641.111658-5-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220912090641.111658-1-Shyam-sundar.S-k@amd.com> References: <20220912090641.111658-1-Shyam-sundar.S-k@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] 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: BN8NAM11FT086:EE_|PH7PR12MB7115:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f0b0292-2601-4aa4-21c9-08da949ef98f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hhO6PLdyp2W2yPf5dToy58z9zW7CI+RcQNbKGwEhjKmv08nBmXB8wNb2ypT7cKMvHQ4YG12TUFZPl4XJswo2k1P7NWxPa4zBr8hz/vKiMkAn07dIimLFtOZ+ZzPCyVIbWAgbjdFNtPtkPMVNV15tbWoaZ8JXBTBrVnvxD0P+c+MkmdGOjy54iHsfttA0fM361ACbcyUBbWTjXwqNaLOxhtqIkRDZG/bQ7wVm9Poi+li1Tmsosazc3m1WmuyZPR8eadaSfVttZAbOONUQ1yvR8376GSiRcod1fn7MzlTbv3woUOMDJxZb1XEekf9BM0zvZG3a1gZ+j04EfxSkQLbpROHCAHcmbewp/SEFGQcQfKQG9X1C4C+O37EATOWEtldoueHGK2lfv16p6Z+Z124xaH/KKIW8HqxGmNfN83SsR4fXNgn7RlDK4Z3wmNZtSn0KcG71tGw9Dd6C/stBKM3ObvuuzfWMvN3HTTe2iV6DKI5ZHIpP6twrn4YJA9Uzmm2uB1j9C+r4o6TDMkSmj7ivz4W0i4K9zVn2DR5ZfAs+frMDCTW0oAOb9LLkAOiAtP5xr0L0m74V7Tdwd7q3uACJIQWXSWUa5QNe4LUGZ9m08N7KIAewzdN13QO7EcnH98ksnUerXGL1WGfW3kK4E3vFygk5Uy+pnCGxQBIXShlMaTWG/b8S3jBznHSTi4kZWcdsV+DjjMK+YJKf15i1s4XS4YNxn25N6m64V0cFRjRq5zMkaWeoYRPF16KyuSRiN8ICSte7NqoETyYnJUUpik+u5DcKPYw7NKxGF7vEe0OnTbEin5w8sLnpBghPfS7iAsqr 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:(13230016)(4636009)(136003)(376002)(346002)(39860400002)(396003)(40470700004)(46966006)(36840700001)(4326008)(478600001)(8676002)(86362001)(36860700001)(70586007)(70206006)(356005)(110136005)(81166007)(316002)(54906003)(82740400003)(40460700003)(8936002)(16526019)(41300700001)(15650500001)(47076005)(40480700001)(4744005)(36756003)(26005)(83380400001)(6666004)(2906002)(426003)(7696005)(5660300002)(336012)(82310400005)(186003)(1076003)(2616005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2022 09:12:53.8372 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6f0b0292-2601-4aa4-21c9-08da949ef98f 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: BN8NAM11FT086.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7115 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Update the MAINTAINERS file with ABI doc path for AMD PMF driver. Signed-off-by: Shyam Sundar S K --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index d74bf90f5056..255527be7e24 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1026,6 +1026,7 @@ AMD PMF DRIVER M: Shyam Sundar S K L: platform-driver-x86@vger.kernel.org S: Maintained +F: Documentation/ABI/testing/sysfs-amd-pmf F: drivers/platform/x86/amd/pmf/ AMD HSMP DRIVER