diff options
| author | Alex Deucher <[email protected]> | 2025-03-26 14:26:25 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-04-08 20:05:17 +0000 |
| commit | 6dafb5d4c7cdfc8f994e789d050e29e0d5ca6efd (patch) | |
| tree | 5892bc350906a6b28637d487b42b47de3e64ceb6 /drivers/gpu/drm/amd/pm/amdgpu_dpm.c | |
| parent | drm/amdgpu/gfx12: dump full CP packet header FIFOs (diff) | |
| download | kernel-6dafb5d4c7cdfc8f994e789d050e29e0d5ca6efd.tar.gz kernel-6dafb5d4c7cdfc8f994e789d050e29e0d5ca6efd.zip | |
drm/amdgpu/pm: add workload profile pause helper
To be used for display idle optimizations when
we want to pause non-default profiles.
Reviewed-by: Kenneth Feng <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/amdgpu_dpm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 19 |
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 740ee2435f54..2148c8db5a59 100644 --- a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c +++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c @@ -377,6 +377,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) { |
