diff options
| author | Evan Quan <[email protected]> | 2020-08-12 05:11:24 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2020-08-14 20:22:41 +0000 |
| commit | b89e9eb681653868e3ecb0287f1cf65aaec853da (patch) | |
| tree | 254a18414938d1c3988fa1f501384848a828d3fb /drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | |
| parent | drm/amd/pm: drop redundant MEM_TYPE_* macros (diff) | |
| download | kernel-b89e9eb681653868e3ecb0287f1cf65aaec853da.tar.gz kernel-b89e9eb681653868e3ecb0287f1cf65aaec853da.zip | |
drm/amd/powerplay: optimize amdgpu_dpm_set_clockgating_by_smu() implementation
Cover the implementation details from outside(of power part).
Signed-off-by: Evan Quan <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Acked-by: Nirmoy Das <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c index 240c440cbe00..5e9baca556a4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c @@ -1232,3 +1232,18 @@ int amdgpu_dpm_enable_mgpu_fan_boost(struct amdgpu_device *adev) return ret; } + +int amdgpu_dpm_set_clockgating_by_smu(struct amdgpu_device *adev, + uint32_t msg_id) +{ + void *pp_handle = adev->powerplay.pp_handle; + const struct amd_pm_funcs *pp_funcs = + adev->powerplay.pp_funcs; + int ret = 0; + + if (pp_funcs && pp_funcs->set_clockgating_by_smu) + ret = pp_funcs->set_clockgating_by_smu(pp_handle, + msg_id); + + return ret; +} |
