[PATCH 4.4 175/342] drm/amdgpu: fix tonga smu resume

From: Greg Kroah-Hartman
Date: Tue Mar 01 2016 - 19:50:52 EST


4.4-stable review patch. If anyone has any objections, please let me know.

------------------

From: Alex Deucher <alexander.deucher@xxxxxxx>

commit e160e4db833c7e8587ec3c88efaed0d84f1bcf42 upstream.

Need to make sure smu buffers are pinned on resume. This
matches what Fiji does.

Reviewed-by: Junwei Zhang <Jerry.Zhang@xxxxxxx>
Reviewed-by: Christian KÃnig <christian.koenig@xxxxxxx>
Reviewed-by: Ken Wang <Qingqing.Wang@xxxxxxx>
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/gpu/drm/amd/amdgpu/tonga_dpm.c | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)

--- 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 *handl

static int tonga_dpm_suspend(void *handle)
{
- return 0;
+ return tonga_dpm_hw_fini(handle);
}

static int tonga_dpm_resume(void *handle)
{
- int ret;
- struct amdgpu_device *adev = (struct amdgpu_device *)handle;
-
- mutex_lock(&adev->pm.mutex);
-
- ret = tonga_smu_start(adev);
- if (ret) {
- DRM_ERROR("SMU start failed\n");
- goto fail;
- }
-
-fail:
- mutex_unlock(&adev->pm.mutex);
- return ret;
+ return tonga_dpm_hw_init(handle);
}

static int tonga_dpm_set_clockgating_state(void *handle,