aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/si_dpm.c
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2018-08-24 04:17:54 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-08-27 15:49:33 -0400
commit2ab4d0e74256fc49b7b270f63c1d1e47c2455abc (patch)
treec626334ee35dafffbcae420c758d6f2cf1f21fa1 /drivers/gpu/drm/amd/amdgpu/si_dpm.c
parent6d39df146ff12fb5c71634ad135144d5423590ec (diff)
drm/amdgpu: Update power state at the end of smu hw_init.
For SI/Kv, the power state is managed by function amdgpu_pm_compute_clocks. when dpm enabled, we should call amdgpu_pm_compute_clocks to update current power state instand of set boot state. this change can fix the oops when kfd driver was enabled on Kv. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/si_dpm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/si_dpm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
index db327b412562..1de96995e690 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
@@ -6887,7 +6887,6 @@ static int si_dpm_enable(struct amdgpu_device *adev)
6887 6887
6888 si_enable_auto_throttle_source(adev, AMDGPU_DPM_AUTO_THROTTLE_SRC_THERMAL, true); 6888 si_enable_auto_throttle_source(adev, AMDGPU_DPM_AUTO_THROTTLE_SRC_THERMAL, true);
6889 si_thermal_start_thermal_controller(adev); 6889 si_thermal_start_thermal_controller(adev);
6890 ni_update_current_ps(adev, boot_ps);
6891 6890
6892 return 0; 6891 return 0;
6893} 6892}
@@ -7763,7 +7762,7 @@ static int si_dpm_hw_init(void *handle)
7763 else 7762 else
7764 adev->pm.dpm_enabled = true; 7763 adev->pm.dpm_enabled = true;
7765 mutex_unlock(&adev->pm.mutex); 7764 mutex_unlock(&adev->pm.mutex);
7766 7765 amdgpu_pm_compute_clocks(adev);
7767 return ret; 7766 return ret;
7768} 7767}
7769 7768