Skip to contentSkip to conversation

drm/amdgpu: psp_ring_destroy cause psp->km_ring.ring_mem NULL

PATCH In review wentalou 3 participants 3 messages Dec 18, 2018 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

wentalou

author
#0 lore raw

PATCH 1/1 drm/amdgpu: psp_ring_destroy cause psp->km_ring.ring_mem NULL

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.

Change-Id Ib332004b3b9edc9e002adc532b2d45cdad929b05
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -1
index 7f5ce37..8189a90 100644
@@ -547,7 +547,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;
 	}
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1545119502-3934-1-git-send-email-Wentao.Lou-5C7GfCeVMHo@public.gmane.org

Reviewed-by Xiangliang Yu
#2 lore raw

-----Original Message-----
From: Lou, Wentao <[email protected]>
Sent: Tuesday, December 18, 2018 3:52 PM
To: [email protected]
Cc: Lou, Wentao <[email protected]>
Subject: [PATCH] drm/amdgpu: psp_ring_destroy cause psp->km_ring.ring_mem NULL

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.

Change-Id Ib332004b3b9edc9e002adc532b2d45cdad929b05
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -1
index 7f5ce37..8189a90 100644
@@ -547,7 +547,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;
 	}
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BY1PR12MB044075048255B481E1512E01EBBD0-PicGAnIBOoaYcfEdm45K0QdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#4 lore raw

Hi Wentao,
We need to check psp firmware version here instead of to change psp_ring_destroy to psp_ring_stop.

Best wishes
Emily Deng

Quoted 45 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Yu, Xiangliang
Sent: Tuesday, December 18, 2018 3:58 PM
To: Lou, Wentao <[email protected]>; [email protected]
Subject: RE: [PATCH] drm/amdgpu: psp_ring_destroy cause psp-

Quoted 1 line

km_ring.ring_mem NULL

-----Original Message-----
From: Lou, Wentao <[email protected]>
Sent: Tuesday, December 18, 2018 3:52 PM
To: [email protected]
Cc: Lou, Wentao <[email protected]>
Subject: [PATCH] drm/amdgpu: psp_ring_destroy cause psp->km_ring.ring_mem NULL

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.

Change-Id Ib332004b3b9edc9e002adc532b2d45cdad929b05

---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -1
index 7f5ce37..8189a90 100644
@@ -547,7 +547,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;
	}
Quoted 7 lines

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx