[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Emily Deng <Emily.Deng@xxxxxxx> >-----Original Message----- >From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Monk >Liu >Sent: Monday, August 10, 2020 11:59 AM >To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx >Cc: Liu, Monk <Monk.Liu@xxxxxxx> >Subject: [PATCH] drm/amdgpu: fix reload KMD hang on GFX10 KIQ > >GFX10 KIQ will hang if we try below steps: >modprobe amdgpu >rmmod amdgpu >modprobe amdgpu sched_hw_submission=4 > >Due to KIQ is always living there even after KMD unloaded thus when doing the >realod KIQ will crash upon its register being programed by different values with >the previous loading (the config like HQD addr, ring size, is easily changed if we >alter the sched_hw_submission) > >the fix is we must inactive KIQ first before touching any of its registgers > >Signed-off-by: Monk Liu <Monk.Liu@xxxxxxx> >--- > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c >b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c >index 622f442..0702c94 100644 >--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c >+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c >@@ -6435,6 +6435,10 @@ static int gfx_v10_0_kiq_init_register(struct >amdgpu_ring *ring) > struct v10_compute_mqd *mqd = ring->mqd_ptr; > int j; > >+/* inactivate the queue */ >+if (amdgpu_sriov_vf(adev)) >+WREG32_SOC15(GC, 0, mmCP_HQD_ACTIVE, 0); >+ > /* disable wptr polling */ > WREG32_FIELD15(GC, 0, CP_PQ_WPTR_POLL_CNTL, EN, 0); > >-- >2.7.4 > >_______________________________________________ >amd-gfx mailing list >amd-gfx@xxxxxxxxxxxxxxxxxxxxx >https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.fre >edesktop.org%2Fmailman%2Flistinfo%2Famd- >gfx&data=02%7C01%7CEmily.Deng%40amd.com%7C07fdd33db9d74d6cf >25808d83ce1cc84%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7 >C637326287807233108&sdata=Ab4%2BYW%2BTg42YDOqD1RdAKJk9xsT >5RLAQj5LSEzuGzZU%3D&reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx