Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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@amd.com>
Reviewed-by: Emily Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Monk Liu and committed by
Alex Deucher
bcca6298 5a58abf5

+4
+4
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
··· 6435 6435 struct v10_compute_mqd *mqd = ring->mqd_ptr; 6436 6436 int j; 6437 6437 6438 + /* inactivate the queue */ 6439 + if (amdgpu_sriov_vf(adev)) 6440 + WREG32_SOC15(GC, 0, mmCP_HQD_ACTIVE, 0); 6441 + 6438 6442 /* disable wptr polling */ 6439 6443 WREG32_FIELD15(GC, 0, CP_PQ_WPTR_POLL_CNTL, EN, 0); 6440 6444