aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2017-09-08 01:09:50 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-12 14:30:21 -0400
commitbcd6eab837fc9db67292c1d071ce2d96bb9689be (patch)
tree7720e070aa21a2c8ca356b93f11c34ef37cf4320 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
parent4ef72453311a697b3fb90da9c86c83012911ccf9 (diff)
drm/amdgpu: stop psp ring on suspend
Otherwise, the ring will fail to create on next resume. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index abd20819ba6b..0d530524ab21 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -455,6 +455,16 @@ static int psp_hw_fini(void *handle)
455 455
456static int psp_suspend(void *handle) 456static int psp_suspend(void *handle)
457{ 457{
458 int ret;
459 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
460 struct psp_context *psp = &adev->psp;
461
462 ret = psp_ring_stop(psp, PSP_RING_TYPE__KM);
463 if (ret) {
464 DRM_ERROR("PSP ring stop failed\n");
465 return ret;
466 }
467
458 return 0; 468 return 0;
459} 469}
460 470