aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c10
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h1
2 files changed, 11 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
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
index e79795b59797..1b7d12d88720 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
@@ -125,6 +125,7 @@ struct amdgpu_psp_funcs {
125#define psp_prep_cmd_buf(ucode, type) (psp)->prep_cmd_buf((ucode), (type)) 125#define psp_prep_cmd_buf(ucode, type) (psp)->prep_cmd_buf((ucode), (type))
126#define psp_ring_init(psp, type) (psp)->ring_init((psp), (type)) 126#define psp_ring_init(psp, type) (psp)->ring_init((psp), (type))
127#define psp_ring_create(psp, type) (psp)->ring_create((psp), (type)) 127#define psp_ring_create(psp, type) (psp)->ring_create((psp), (type))
128#define psp_ring_stop(psp, type) (psp)->ring_stop((psp), (type))
128#define psp_ring_destroy(psp, type) ((psp)->ring_destroy((psp), (type))) 129#define psp_ring_destroy(psp, type) ((psp)->ring_destroy((psp), (type)))
129#define psp_cmd_submit(psp, ucode, cmd_mc, fence_mc, index) \ 130#define psp_cmd_submit(psp, ucode, cmd_mc, fence_mc, index) \
130 (psp)->cmd_submit((psp), (ucode), (cmd_mc), (fence_mc), (index)) 131 (psp)->cmd_submit((psp), (ucode), (cmd_mc), (fence_mc), (index))