diff options
author | Xiangliang Yu <Xiangliang.Yu@amd.com> | 2018-12-05 01:36:33 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-12-07 17:53:46 -0500 |
commit | 53450efd6eb9e3155e16c14ce2ece387fc2d65e7 (patch) | |
tree | e46496ff96a5db6577ce15f6102ae44243cf08e3 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
parent | 5ec996dfb6a19f3ea6d7ab9e74e9f32954af8466 (diff) |
drm/amdgpu/psp: Destroy psp ring when doing gpu reset
PSP ring need to be destroy before starting reinit for vf.
This patche move it from hypervisor driver into guest.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Frank Min <Frank.Min@amd.com>
Acked-by: Alex Deucher <alexander.deucher@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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 3142f844fd32..6759d898b3ab 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |||
@@ -548,8 +548,10 @@ static int psp_load_fw(struct amdgpu_device *adev) | |||
548 | int ret; | 548 | int ret; |
549 | struct psp_context *psp = &adev->psp; | 549 | struct psp_context *psp = &adev->psp; |
550 | 550 | ||
551 | if (amdgpu_sriov_vf(adev) && adev->in_gpu_reset != 0) | 551 | if (amdgpu_sriov_vf(adev) && adev->in_gpu_reset) { |
552 | psp_ring_destroy(psp, PSP_RING_TYPE__KM); | ||
552 | goto skip_memalloc; | 553 | goto skip_memalloc; |
554 | } | ||
553 | 555 | ||
554 | psp->cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL); | 556 | psp->cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL); |
555 | if (!psp->cmd) | 557 | if (!psp->cmd) |