]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/amdgpu: psp_ring_destroy cause psp->km_ring.ring_mem NULL
authorwentalou <Wentao.Lou@amd.com>
Tue, 18 Dec 2018 07:42:08 +0000 (15:42 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 2 Jul 2019 10:07:53 +0000 (12:07 +0200)
BugLink: https://bugs.launchpad.net/bugs/1830906
[ Upstream commit 14d20ec7f31ef96a2e7dcf7880b13dde1d473b56 ]

psp_ring_destroy inside psp_load_fw cause psp->km_ring.ring_mem NULL.
Call Trace occurred when psp_cmd_submit.
should be psp_ring_stop instead.

Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Wentao Lou <Wentao.Lou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index 0563e04c9c18054b21bcdade54725df3b6a86673..a4a15f7c57488eddbf72728f32ae5eb7eb0427d9 100644 (file)
@@ -554,7 +554,7 @@ static int psp_load_fw(struct amdgpu_device *adev)
        struct psp_context *psp = &adev->psp;
 
        if (amdgpu_sriov_vf(adev) && adev->in_gpu_reset) {
-               psp_ring_destroy(psp, PSP_RING_TYPE__KM);
+               psp_ring_stop(psp, PSP_RING_TYPE__KM); /* should not destroy ring, only stop */
                goto skip_memalloc;
        }