diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-01-14 13:48:24 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-01-15 12:43:11 -0500 |
commit | e160e4db833c7e8587ec3c88efaed0d84f1bcf42 (patch) | |
tree | 0ef4add68860ecb2d0e22227ee731b8808758db0 | |
parent | e9c5e7402dad6f4f04c2430db6f283512bcd4392 (diff) |
drm/amdgpu: fix tonga smu resume
Need to make sure smu buffers are pinned on resume. This
matches what Fiji does.
Cc: stable@vger.kernel.org
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/tonga_dpm.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_dpm.c b/drivers/gpu/drm/amd/amdgpu/tonga_dpm.c index f4a1346525fe..0497784b3652 100644 --- a/drivers/gpu/drm/amd/amdgpu/tonga_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/tonga_dpm.c | |||
@@ -122,25 +122,12 @@ static int tonga_dpm_hw_fini(void *handle) | |||
122 | 122 | ||
123 | static int tonga_dpm_suspend(void *handle) | 123 | static int tonga_dpm_suspend(void *handle) |
124 | { | 124 | { |
125 | return 0; | 125 | return tonga_dpm_hw_fini(handle); |
126 | } | 126 | } |
127 | 127 | ||
128 | static int tonga_dpm_resume(void *handle) | 128 | static int tonga_dpm_resume(void *handle) |
129 | { | 129 | { |
130 | int ret; | 130 | return tonga_dpm_hw_init(handle); |
131 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | ||
132 | |||
133 | mutex_lock(&adev->pm.mutex); | ||
134 | |||
135 | ret = tonga_smu_start(adev); | ||
136 | if (ret) { | ||
137 | DRM_ERROR("SMU start failed\n"); | ||
138 | goto fail; | ||
139 | } | ||
140 | |||
141 | fail: | ||
142 | mutex_unlock(&adev->pm.mutex); | ||
143 | return ret; | ||
144 | } | 131 | } |
145 | 132 | ||
146 | static int tonga_dpm_set_clockgating_state(void *handle, | 133 | static int tonga_dpm_set_clockgating_state(void *handle, |