From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793211180; b=OMa3U5BC5CDdyIEpWD1IVLLBz8tmg01kuuHuYMAfAXB1bZup5Q7yITOKRU76jYMhImvo qBzSSxFgMajEb5YaqZIYOCLNGHaKJq7yCBzxUWNlfO/fMbNfF+FhqCxHVsQqqxg0Mnm4a vvDH/QHEBKcXmbT33kCX1CSm/GTAWYwehi/7m+KPBI8ezeBj2rWjAJN9jLRPKfGumrwsa Pn5gvnBkzLiydyj5CtkNrVEcTQMqb89ddowfZ3Qya/VEauwj2eIEyXGp76mkcxxPzKImX gvOCprhbYpLh/LOZ/OLvda57lZFMVsxJvFUJfeNsxyEcSBZs+I+zKn5G/rLh4BKd2Qg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793211180; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=8MLYfi5ckdp0D7JoE+K9+hemBd+bVxyuTp2IF4zRviE=; b=HaybmhSXZaPqMUFv5caTX5YKNb+bAP4qPr4fomDqY1tQDblN1b54KbOL2SWmYsoWnkeg 5uBbtlHERmtYzQBy+7ZmyL/XQ2p8De6pmBV6Uk9Yh7LrPfyTM9dVHX4xYILTflYQaLHVx iyPOLmlqJg2tHCoA+YB8uXd3B727XBsGMHTXPfLr7YuARsW41bmeVS/HYagZdqyRzwBVE xuRqoByozBkfLWy9rVdp8OMb2+2OKyeQhuO9opJFk1zPDlBtGRR17oeH+QrwbquG0waq6 dRqKlsFSmY0natoM2PzX2wFc4qU0b0bi9NFR1CkyDcAoMoPdy3QW+czlynzhTgfhmTg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=PzDb7Zz2; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50FAB60A382E; Wed, 28 Oct 2026 18:13:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=PzDb7Zz2 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0F441F031E0; Wed, 28 Oct 2026 18:12:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1793211180; bh=8MLYfi5ckdp0D7JoE+K9+hemBd+bVxyuTp2IF4zRviE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=PzDb7Zz2MJV98QtCc+17o6WOhcUsuI2LpyMmQYd9X3nrDBibY5SLQnrZsMOHnByhW 0K0DNcOi+L4Ghx0aGh2+YUe/frbNIx9T+Q5v8rOHxFGI94McU2Q1EE0Ngq4MJcGHrv yqZLjuQXcas9ccTDbzSoalbV09XrmU6RBcSoLCKs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Timur=20Krist=C3=B3f?= , Mario Limonciello , Alex Deucher , Sasha Levin Subject: [PATCH 5.15 288/571] drm/amd/pm/si: Check AMD_IS_MOBILITY flag for PPSMC_SYSTEMFLAG_GPIO_DC Date: Wed, 28 Oct 2026 17:57:15 +0100 Message-ID: <20261028170014.834146647@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261028170008.009143722@linuxfoundation.org> References: <20261028170008.009143722@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Timur Kristóf [ Upstream commit cd883d0a3937df82a5ea03709ba8ba623b868419 ] Unfortunately, some desktop boards eg. the FirePro D500 have the HARDWAREDC platform flag set and also have a battery power state configured in their VBIOS. This makes no sense for a desktop GPU and results in incorrect behaviour: the clocks are stuck at lowest. We observed that the kernel driver can work around the issue in two possible ways: 1. Set PPSMC_SWSTATE_FLAG_DC on all power states 2. Clear PPSMC_SYSTEMFLAG_GPIO_DC We think that the PPSMC_SYSTEMFLAG_GPIO_DC flag makes the SMC assume it's running on battery even though this is a desktop machine with no battery, and that's why it doesn't do DPM on power states without PPSMC_SYSTEMFLAG_GPIO_DC. Issue was uncovered by "Fix updating clock limits from power states" because previously the limits for the battery state were not tracked separately. However, battery power state has lower frequencies and voltages, so the kernel doesn't set the DC flag on the current power state anymore. That causes the SMC to be stuck on the lowest clocks. Let's clear PPSMC_SYSTEMFLAG_GPIO_DC on desktop GPUs. We can use the AMD_IS_MOBILITY flag to determine that. Fixes: e6c5d36756e7 ("drm/amd/pm/si: Fix updating clock limits from power states") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16352 Signed-off-by: Timur Kristóf Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20260923120354.1027996-1-timur.kristof@gmail.com Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher (cherry picked from commit 58473c7c49ce9f5f5a4a1c24ffb9aa1d3c8771f4) Cc: stable@vger.kernel.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/pm/powerplay/si_dpm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c b/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c index 8cf2ad07ce620..be459903139fb 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c +++ b/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c @@ -5164,7 +5164,8 @@ static int si_init_smc_table(struct amdgpu_device *adev) break; } - if (adev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_HARDWAREDC) + if ((adev->flags & AMD_IS_MOBILITY) && + (adev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_HARDWAREDC)) table->systemFlags |= PPSMC_SYSTEMFLAG_GPIO_DC; if (adev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_REGULATOR_HOT) { -- 2.53.0