From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.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 44D09296BC1 for ; Mon, 19 Jan 2026 20:22:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768854124; cv=none; b=WP0sEyJyUgIYYWhte6lMRYPCkueVwI7dbCc0MtkHwptVZXb6dKjf73qDR/hsRIeGjWt/VXx9b9ho13Fx0tjZJejnIPax2kIZ/Uahfs4xK4h6Np2eNIldiiLBrz8gCQnZ/vEM3keCrlZ81jMuZvDrNx84x5Nl3tt1AGZEW1nIikc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768854124; c=relaxed/simple; bh=1+ATMbfh4i8Fx2ZKhiRLK3SENQT3d/ijvIS3iYHK0Bo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XM3gxOr60mSoap2CrVaT+iXaLmcE1ZUK8bX7SMiwbWNdhtenpYYy8Vmkl8FrcO1SyePvveQuqEuhLKdT47IzrOSqf7T1ORjKAJX6bechiZdsmvs4BN9wV/4w7b/RPCKpmhTPQcU70e+XZvyynvEjD7UlhLmLZAOO2bRL8w//YRs= 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=UW7BJIpO; arc=none smtp.client-ip=209.85.167.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="UW7BJIpO" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-59b6f59c4f5so5546965e87.3 for ; Mon, 19 Jan 2026 12:22:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768854121; x=1769458921; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xDBK20VPaxSq0MCDY5hKGxl3s141opvsvW0EECGHPsU=; b=UW7BJIpOtAnbhWX13KI00KEbpom/nopRS4YUB6a2iX8+m2u7yD8QWewIQAk5B0W328 q0B/SkkgjHe8+QZqK0U0he7hPDun8yjDVOa7oBjb5aTrZaIBSox+0qPvDcEw5ghE400T ZvtIC9WQJRuWJDuwt8MNZUXi5exAy8UP2yzMCMM24fICiciXrnkcbUeVNGywdO3jB9rF W3cbiOKtluF4/r36+tF/3xEJ2YbxDDcCxYg0QGhLoOx2Mbd0PiBWVnec/aZaw9wxS8j8 qHcf/GOI+iJWWXV5lTgyItlLUDNPZaExwTntY7k5Dsqp6DgkbHMS+P6WeiMDZU6o50VU HLkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768854121; x=1769458921; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xDBK20VPaxSq0MCDY5hKGxl3s141opvsvW0EECGHPsU=; b=Ah9noYjr6JAPn2PQBN6fs60w0bzXCrG/Jwwtm2oYtgavCFHrzzPXKj3Jeje3v2bdax m6NRtaTHijejuKyufpE99j1uB//0tjhAvjvloVHc4eNjFNSlTcK7YvyuJ9Ovgym7vkyD hR7ydl96XWMcMm4v++l/4qb40A6G57TnmQ6tor1lR0yJAscCfRXAqpQKKwd9DS7lWOKG 55hpm/p2vqFoKMpLN+qw21mepgFrI1IxRi4738vDxZPPtGQdghPkRc19LWn40L8a4KWO EtpddDLw7KMzIuUsIIQBosuFB6P8WxG6N1GZUdygZJIdUiQbl7J8dirL6ra+Jdt8nfxi TSPg== X-Forwarded-Encrypted: i=1; AJvYcCX8EgXwHIhMh/XXVq7ZIIYAXEHnZjTin8c+2Q3UaEREmFfEBPaE2pkK1rrd8Wqm8MAId/77+eFWdATX70E=@vger.kernel.org X-Gm-Message-State: AOJu0YzF9+JkVwM/UciVWmh/ggfclJQK2OStBMl/KT2uTcF56usKlwzh Dv05CNvb9yHPYcFQTg8pVZNKIbGSKNiqPyGpYSFmSMn19JZJhOGECAEd X-Gm-Gg: AY/fxX7x6TYVWyEdOr5SRwmHVJNJxDbuDL2Cum83kBRa+1RBy0S0bbwwjs7rbroNku1 WzoXVQiHy+EJI6JkiodIs8EQkibgFGZ3+JldoqwM9wlpE81XQh4oeaBM9THVJuUnLnMqlZA1M8B +Abo1yS4py5qWb8nuoFGYzW3OtHSN9xCxr1ikNJrJcpsUPbw7bQG6yreGSxMjMHsHN5ts3pdk+6 DKJPfMRXM7VX4CFCwWC2WDfKDY+2OInzYO1mJW0414Q2/rhOI8ew6031lnbxCvSA9aTEyHiApoA HWHtKejvxqxGvdfABws2QB4ng4a+WmdFGgScXIeqhtMVl87HRVtFUSeD5x038y5/ZNtQNr9Lf6r g21AR01yw71eKZD6InA61sEHT/iqVJde0b/NIARfJEPgrHdsr+MYG3HmQt4F36masAa0RDyLL4f wucFE= X-Received: by 2002:a05:6512:132a:b0:59b:7c26:13b0 with SMTP id 2adb3069b0e04-59baeed4bdamr3652321e87.18.1768854121161; Mon, 19 Jan 2026 12:22:01 -0800 (PST) Received: from gl-laptop.flowwow.loc ([2a0c:9a40:8950:800::67d]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59baf9d442dsm3678659e87.94.2026.01.19.12.21.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 12:22:00 -0800 (PST) From: Alexey Zagorodnikov To: platform-driver-x86@vger.kernel.org Cc: Alexey Zagorodnikov , Shyam Sundar S K , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , linux-kernel@vger.kernel.org Subject: [PATCH 1/1] platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function Date: Tue, 20 Jan 2026 01:20:34 +0500 Message-ID: <20260119202100.785129-1-xglooom@gmail.com> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Addresses a low power limits issue on HP ZBook Ultra G1a https://gitlab.freedesktop.org/drm/amd/-/issues/4868 If vendor firmware capped APU power limits with 3rd-party AC adapters, the user can disable the Smart PC function via the module parameter Signed-off-by: Alexey Zagorodnikov --- drivers/platform/x86/amd/pmf/core.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c index 8fc293c9c5380..00a4fc899c727 100644 --- a/drivers/platform/x86/amd/pmf/core.c +++ b/drivers/platform/x86/amd/pmf/core.c @@ -53,6 +53,11 @@ static bool force_load; module_param(force_load, bool, 0444); MODULE_PARM_DESC(force_load, "Force load this driver on supported older platforms (experimental)"); +/* Force to disable Smart PC Solution */ +static bool disable_smart_pc; +module_param(disable_smart_pc, bool, 0444); +MODULE_PARM_DESC(disable_smart_pc, "Disable Smart PC Solution"); + static int amd_pmf_pwr_src_notify_call(struct notifier_block *nb, unsigned long event, void *data) { struct amd_pmf_dev *pmf = container_of(nb, struct amd_pmf_dev, pwr_src_notifier); @@ -362,11 +367,15 @@ static void amd_pmf_init_features(struct amd_pmf_dev *dev) dev_dbg(dev->dev, "SPS enabled and Platform Profiles registered\n"); } - amd_pmf_init_smart_pc(dev); - if (dev->smart_pc_enabled) { - dev_dbg(dev->dev, "Smart PC Solution Enabled\n"); - /* If Smart PC is enabled, no need to check for other features */ - return; + if (disable_smart_pc) { + dev->smart_pc_enabled = false; + } else { + amd_pmf_init_smart_pc(dev); + if (dev->smart_pc_enabled) { + dev_dbg(dev->dev, "Smart PC Solution Enabled\n"); + /* If Smart PC is enabled, no need to check for other features */ + return; + } } if (is_apmf_func_supported(dev, APMF_FUNC_AUTO_MODE)) { -- 2.52.0