]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: Add DPM function for XGMI link power down control
authorJohn Clements <john.clements@amd.com>
Wed, 13 May 2020 09:45:57 +0000 (17:45 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 May 2020 21:42:27 +0000 (17:42 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h

index 0e8018c9aa8ed647587cb48f256057a3dd8e5aa6..d2a105e3bf7cccd98e70681b31b32f028d0e9367 100644 (file)
@@ -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;
+}
\ No newline at end of file
index 936d85aa0fbc5fd4387793e6d851c9cddd45c028..956f6c71067081da2d217dbe700cc2b4319a3d09 100644 (file)
@@ -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