aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2016-08-24 07:39:06 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-08-25 12:24:15 -0400
commitc08770eb8a442430420efd826981bbc3b2a1e341 (patch)
treea64baf21f9cd6c2b89abaa26746d408a35a6e6a8
parent075f101ceec0446b4a651ae4a22d4de11b7e7cd6 (diff)
drm/amdgpu: refine uvd gate logic for CI.
uvd dpm will be controlled by uvd. dpm just disable uvd dpm in case of suspend when play video. due to the new logic of uvd_begin_use/end_use, if disable uvd dpm in late init, will have no chance to enable uvd dpm after resume until play video again. Change-Id: I70e3d7efe63edad37f26e6c5ea089da1135c0ab5 Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/ci_dpm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
index a0d63a293bb0..1d8c375a3561 100644
--- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
@@ -5396,7 +5396,7 @@ static void ci_dpm_disable(struct amdgpu_device *adev)
5396 amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq, 5396 amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq,
5397 AMDGPU_THERMAL_IRQ_HIGH_TO_LOW); 5397 AMDGPU_THERMAL_IRQ_HIGH_TO_LOW);
5398 5398
5399 ci_dpm_powergate_uvd(adev, false); 5399 ci_dpm_powergate_uvd(adev, true);
5400 5400
5401 if (!amdgpu_ci_is_smc_running(adev)) 5401 if (!amdgpu_ci_is_smc_running(adev))
5402 return; 5402 return;
@@ -6036,7 +6036,7 @@ static int ci_dpm_init(struct amdgpu_device *adev)
6036 6036
6037 pi->caps_dynamic_ac_timing = true; 6037 pi->caps_dynamic_ac_timing = true;
6038 6038
6039 pi->uvd_power_gated = false; 6039 pi->uvd_power_gated = true;
6040 6040
6041 /* make sure dc limits are valid */ 6041 /* make sure dc limits are valid */
6042 if ((adev->pm.dpm.dyn_state.max_clock_voltage_on_dc.sclk == 0) || 6042 if ((adev->pm.dpm.dyn_state.max_clock_voltage_on_dc.sclk == 0) ||
@@ -6179,8 +6179,6 @@ static int ci_dpm_late_init(void *handle)
6179 if (ret) 6179 if (ret)
6180 return ret; 6180 return ret;
6181 6181
6182 ci_dpm_powergate_uvd(adev, true);
6183
6184 return 0; 6182 return 0;
6185} 6183}
6186 6184