aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
diff options
context:
space:
mode:
authorIngo Molnar <[email protected]>2025-04-16 05:03:04 +0000
committerIngo Molnar <[email protected]>2025-04-16 05:03:58 +0000
commit06e09002bc1d46505d6b3bd947ebaf3cec7acab8 (patch)
treeda8b8a243b23ed3e5d9d790878924d65bc463b14 /drivers/gpu/drm/amd/pm/amdgpu_dpm.c
parentx86/cpufeatures: Shorten X86_FEATURE_AMD_HETEROGENEOUS_CORES (diff)
parentMerge tag 'edac_urgent_for_v6.15_rc3' of git://git.kernel.org/pub/scm/linux/k... (diff)
downloadkernel-06e09002bc1d46505d6b3bd947ebaf3cec7acab8.tar.gz
kernel-06e09002bc1d46505d6b3bd947ebaf3cec7acab8.zip
Merge branch 'linus' into x86/cpu, to resolve conflicts
Conflicts: tools/arch/x86/include/asm/cpufeatures.h Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/amdgpu_dpm.c')
-rw-r--r--drivers/gpu/drm/amd/pm/amdgpu_dpm.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
index 81e9b443ca0a..3533d43ed1e7 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
@@ -349,6 +349,25 @@ int amdgpu_dpm_switch_power_profile(struct amdgpu_device *adev,
return ret;
}
+int amdgpu_dpm_pause_power_profile(struct amdgpu_device *adev,
+ bool pause)
+{
+ const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
+ int ret = 0;
+
+ if (amdgpu_sriov_vf(adev))
+ return 0;
+
+ if (pp_funcs && pp_funcs->pause_power_profile) {
+ mutex_lock(&adev->pm.mutex);
+ ret = pp_funcs->pause_power_profile(
+ adev->powerplay.pp_handle, pause);
+ mutex_unlock(&adev->pm.mutex);
+ }
+
+ return ret;
+}
+
int amdgpu_dpm_set_xgmi_pstate(struct amdgpu_device *adev,
uint32_t pstate)
{