aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2016-10-26 01:44:12 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-10-27 15:18:29 -0400
commit3f767e3d076dd2a24a614917c8f0b05d8d82b90b (patch)
treec66fc3cc5fe12befb8bf5431aee9c2d37b4b3679 /drivers/gpu
parent86f8c599b09c916f9aad30563271440dbd79213a (diff)
drm/amdgpu: just not load smc firmware if smu is already running
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/ci_dpm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
index 1c3b5c411ef7..f1baf6715b05 100644
--- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
@@ -2207,6 +2207,11 @@ static int ci_upload_firmware(struct amdgpu_device *adev)
2207 struct ci_power_info *pi = ci_get_pi(adev); 2207 struct ci_power_info *pi = ci_get_pi(adev);
2208 int i, ret; 2208 int i, ret;
2209 2209
2210 if (amdgpu_ci_is_smc_running(adev)) {
2211 DRM_INFO("smc is running, no need to load smc firmware\n");
2212 return 0;
2213 }
2214
2210 for (i = 0; i < adev->usec_timeout; i++) { 2215 for (i = 0; i < adev->usec_timeout; i++) {
2211 if (RREG32_SMC(ixRCU_UC_EVENTS) & RCU_UC_EVENTS__boot_seq_done_MASK) 2216 if (RREG32_SMC(ixRCU_UC_EVENTS) & RCU_UC_EVENTS__boot_seq_done_MASK)
2212 break; 2217 break;
@@ -5275,8 +5280,6 @@ static int ci_dpm_enable(struct amdgpu_device *adev)
5275 struct amdgpu_ps *boot_ps = adev->pm.dpm.boot_ps; 5280 struct amdgpu_ps *boot_ps = adev->pm.dpm.boot_ps;
5276 int ret; 5281 int ret;
5277 5282
5278 if (amdgpu_ci_is_smc_running(adev))
5279 return -EINVAL;
5280 if (pi->voltage_control != CISLANDS_VOLTAGE_CONTROL_NONE) { 5283 if (pi->voltage_control != CISLANDS_VOLTAGE_CONTROL_NONE) {
5281 ci_enable_voltage_control(adev); 5284 ci_enable_voltage_control(adev);
5282 ret = ci_construct_voltage_tables(adev); 5285 ret = ci_construct_voltage_tables(adev);