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

Submitted by Yu, Xiangliang on Dec. 18, 2018, 7:57 a.m.

Details

Message ID BY1PR12MB044075048255B481E1512E01EBBD0@BY1PR12MB0440.namprd12.prod.outlook.com
State New
Headers show
Series "drm/amdgpu: psp_ring_destroy cause psp->km_ring.ring_mem NULL" ( rev: 2 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Yu, Xiangliang Dec. 18, 2018, 7:57 a.m.
Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com>



-----Original Message-----
From: Lou, Wentao <Wentao.Lou@amd.com> 
Sent: Tuesday, December 18, 2018 3:52 PM
To: amd-gfx@lists.freedesktop.org
Cc: Lou, Wentao <Wentao.Lou@amd.com>
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
Signed-off-by: Wentao Lou <Wentao.Lou@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 7f5ce37..8189a90 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -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;
 	}
 

Comments

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

>-----Original Message-----

>From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Yu,

>Xiangliang

>Sent: Tuesday, December 18, 2018 3:58 PM

>To: Lou, Wentao <Wentao.Lou@amd.com>; amd-gfx@lists.freedesktop.org

>Subject: RE: [PATCH] drm/amdgpu: psp_ring_destroy cause psp-

>>km_ring.ring_mem NULL

>

>Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com>

>

>

>

>-----Original Message-----

>From: Lou, Wentao <Wentao.Lou@amd.com>

>Sent: Tuesday, December 18, 2018 3:52 PM

>To: amd-gfx@lists.freedesktop.org

>Cc: Lou, Wentao <Wentao.Lou@amd.com>

>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

>Signed-off-by: Wentao Lou <Wentao.Lou@amd.com>

>---

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

> 1 file changed, 1 insertion(+), 1 deletion(-)

>

>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

>b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

>index 7f5ce37..8189a90 100644

>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

>@@ -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;

> 	}

>

>--

>2.7.4

>

>_______________________________________________

>amd-gfx mailing list

>amd-gfx@lists.freedesktop.org

>https://lists.freedesktop.org/mailman/listinfo/amd-gfx