From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 50C77390608; Fri, 7 Aug 2026 15:47:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786117650; cv=none; b=lty5yNqoGO0HmHQWazvzYKDBTuG0NWkovQKKvkYQeCVgzLeXsnN+V2Qf20ysYXufPHE41U3X+ika5yVT4sb47hCGR0GUUoVS02NLONKB8HvJkVKyvWImtqEHfgeovIiuSpKr+B45BcP0qA7o+O8qNcXHDjvguJsq0nbdT1YwFNY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786117650; c=relaxed/simple; bh=cqZfrkalYHLrqsWggy55F8Ot5QmXxgMUJSQRUvF5YKU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rT9spk6sxQl4tQExY77M8M4M7ArOn+4VtJGsyegdoXOu2OtgpaOItpOTlZ2HTBSAEZEgNO7wJihIUX4XWXZIeK7YRwkcjjqDpxWJCelUg4An7X+EfHyYRjHF8g1s2d4oAI4uH7bXoPflu/5w0E94scQL+XjRy/Jh4x5VWTs7kRY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uwoiYe+6; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uwoiYe+6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A43E71F000E9; Fri, 7 Aug 2026 15:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786117649; bh=8KBqvQiqZVKvg8X2O7tnZDJw/LGStfsTJNGljyJSeeM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=uwoiYe+6K2ofZqo05q/06Av+zi1mUB3671viX+SnF7g4jnpUkpO3ARS9q2+Mhuu6w u36FJYiiKPuD3njLAKg0oSWTkUd3RZfcCkYZYDIYzfDnPBwckJaA3sfM3WxvYO2OOP mR3XIZwuYOLgt2tvRYm6QjAGv43Hwft7zF1brvgI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Candice Li , Hawking Zhang , Yang Wang , Alex Deucher Subject: [PATCH 7.1 391/438] drm/amdgpu: restore UMD profile pstate after runtime resume Date: Fri, 7 Aug 2026 16:39:47 +0200 Message-ID: <20260807143436.300297948@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260807143428.008222056@linuxfoundation.org> References: <20260807143428.008222056@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Candice Li commit f931c54b241ce2f36bfc34955aec43a188276b8d upstream. Runtime suspend runs GFX hw_fini and clears perfmon clock gating while the UMD profile DPM level remains set in software. Re-apply stable pstate after a successful runtime resume when a profile mode is active. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher (cherry picked from commit 138531c8850cc247aa12b104bb29ea387bcdcbb1) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2876,6 +2876,19 @@ static int amdgpu_pmops_runtime_suspend( return 0; } +static void amdgpu_restore_umd_profile_pstate_after_runpm(struct amdgpu_device *adev) +{ + enum amd_dpm_forced_level level; + uint32_t profile_mode_mask = AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD | + AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK | + AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK | + AMD_DPM_FORCED_LEVEL_PROFILE_PEAK; + + level = amdgpu_dpm_get_performance_level(adev); + if (level & profile_mode_mask) + amdgpu_asic_update_umd_stable_pstate(adev, true); +} + static int amdgpu_pmops_runtime_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); @@ -2920,6 +2933,8 @@ static int amdgpu_pmops_runtime_resume(s if (adev->pm.rpm_mode == AMDGPU_RUNPM_PX) drm_dev->switch_power_state = DRM_SWITCH_POWER_ON; + + amdgpu_restore_umd_profile_pstate_after_runpm(adev); adev->in_runpm = false; return 0; }