Skip to content

Commit

Permalink
drm/amdgpu: Add DPM function for XGMI link power down control
Browse files Browse the repository at this point in the history
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: John Clements <john.clements@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
John Clements authored and Alex Deucher committed May 14, 2020
1 parent ab9c211 commit 5e7067b
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c
Original file line number Diff line number Diff line change
@@ -1188,3 +1188,13 @@ int amdgpu_dpm_set_df_cstate(struct amdgpu_device *adev,

return ret;
}

int amdgpu_dpm_allow_xgmi_power_down(struct amdgpu_device *adev, bool en)
{
struct smu_context *smu = &adev->smu;

if (is_support_sw_smu(adev))
return smu_allow_xgmi_power_down(smu, en);

return 0;
}
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
Original file line number Diff line number Diff line change
@@ -538,4 +538,6 @@ int amdgpu_dpm_baco_enter(struct amdgpu_device *adev);
int amdgpu_dpm_set_df_cstate(struct amdgpu_device *adev,
uint32_t cstate);

int amdgpu_dpm_allow_xgmi_power_down(struct amdgpu_device *adev, bool en);

#endif

0 comments on commit 5e7067b

Please sign in to comment.