drm/amdgpu: reset psp ring wptr during ring_create
Subsystems (2)
PATCH 1/1 drm/amdgpu: reset psp ring wptr during ring_create
[Why]
psp ring wptr is not initialized properly in ring_create, which would lead to psp failure after several gpu reset.
[How]
Set ring_wptr to zero in psp_ring_create.
--- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +1 -0
@@ -468,6 +468,7 @@ static int psp_v11_0_ring_create(struct psp_context *psp,struct amdgpu_device *adev = psp->adev;if (amdgpu_sriov_vf (adev)) { + ring->ring_wptr =0 ; ret =psp_v11_0_ring_stop (psp, ring_type);if (ret) {DRM_ERROR ("psp_v11_0_ring_stop_sriov failed!\n" );
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c +1 -0
@@ -231,6 +231,7 @@ static int psp_v3_1_ring_create(struct psp_context *psp,psp_v3_1_reroute_ih (psp);if (amdgpu_sriov_vf (adev)) { + ring->ring_wptr =0 ; ret =psp_v3_1_ring_stop (psp, ring_type);if (ret) {DRM_ERROR ("psp_v3_1_ring_stop_sriov failed!\n" );
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only]
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of YuBiao Wang
Sent: Wednesday, June 9, 2021 11:02 AM
To: [email protected]
Cc: Wang, YuBiao <[email protected]>; Grodzovsky, Andrey <[email protected]>; Xiao, Jack <[email protected]>; Xu, Feifei <[email protected]>; Chen, Horace <[email protected]>; Wang, Kevin(Yang) <[email protected]>; Xiaojie Yuan <[email protected]>; Tuikov, Luben <[email protected]>; Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>; Koenig, Christian <[email protected]>; Liu, Monk <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu: reset psp ring wptr during ring_create
[Why]
psp ring wptr is not initialized properly in ring_create, which would lead to psp failure after several gpu reset.
[How]
Set ring_wptr to zero in psp_ring_create.
--- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +1 -0
@@ -468,6 +468,7 @@ static int psp_v11_0_ring_create(struct psp_context *psp,struct amdgpu_device *adev = psp->adev;if (amdgpu_sriov_vf (adev)) { + ring->ring_wptr =0 ; ret =psp_v11_0_ring_stop (psp, ring_type);if (ret) { DRM_ERROR("psp_v11_0_ring_stop_sriov failed!\n"); diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
index 908664a5774b..be05d9cbd41e 100644
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c +1 -0
@@ -231,6 +231,7 @@ static int psp_v3_1_ring_create(struct psp_context *psp,psp_v3_1_reroute_ih (psp);if (amdgpu_sriov_vf (adev)) { + ring->ring_wptr =0 ; ret =psp_v3_1_ring_stop (psp, ring_type);if (ret) {DRM_ERROR ("psp_v3_1_ring_stop_sriov failed!\n" );
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Chorace.chen%40amd.com%7Cf0c4d8c71e76407bef2008d92af30323%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637588045485244771%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=eozuFP5rS0dwOstJwqjeMWA%2BbhXAfjFDMRi1G%2FISzFI%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only]
-----邮件原件-----
发件人: amd-gfx <[email protected]> 代表 YuBiao Wang
发送时间: 2021年6月9日 11:02
收件人: [email protected]
抄送: Wang, YuBiao <[email protected]>; Grodzovsky, Andrey <[email protected]>; Xiao, Jack <[email protected]>; Xu, Feifei <[email protected]>; Chen, Horace <[email protected]>; Wang, Kevin(Yang) <[email protected]>; Xiaojie Yuan <[email protected]>; Tuikov, Luben <[email protected]>; Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>; Koenig, Christian <[email protected]>; Liu, Monk <[email protected]>; Zhang, Hawking <[email protected]> 主题: [PATCH] drm/amdgpu: reset psp ring wptr during ring_create
[Why]
psp ring wptr is not initialized properly in ring_create, which would lead to psp failure after several gpu reset.
[How]
Set ring_wptr to zero in psp_ring_create.
--- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +1 -0
@@ -468,6 +468,7 @@ static int psp_v11_0_ring_create(struct psp_context *psp,struct amdgpu_device *adev = psp->adev;if (amdgpu_sriov_vf (adev)) { + ring->ring_wptr =0 ; ret =psp_v11_0_ring_stop (psp, ring_type);if (ret) { DRM_ERROR("psp_v11_0_ring_stop_sriov failed!\n"); diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
index 908664a5774b..be05d9cbd41e 100644
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c +1 -0
@@ -231,6 +231,7 @@ static int psp_v3_1_ring_create(struct psp_context *psp,psp_v3_1_reroute_ih (psp);if (amdgpu_sriov_vf (adev)) { + ring->ring_wptr =0 ; ret =psp_v3_1_ring_stop (psp, ring_type);if (ret) {DRM_ERROR ("psp_v3_1_ring_stop_sriov failed!\n" );
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cmonk.liu%40amd.com%7Cf0c4d8c71e76407bef2008d92af30323%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637588045484809541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=00y48SAaF%2Fl%2Bdc5NKGlHOVhtmn4gn9hWIyiaATiYf5w%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx