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

drm/amdgpu/sriov: Need to clear kiq position

As will clear vf fw during unload driver, to avoid idle fail. Need
to clear KIQ portion also.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Ack-by: Monk.liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Emily Deng and committed by
Alex Deucher
7ef869ef ac1af421

+6
+6
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
··· 6876 6876 { 6877 6877 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 6878 6878 int r; 6879 + uint32_t tmp; 6879 6880 6880 6881 amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0); 6881 6882 amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0); ··· 6891 6890 DRM_ERROR("KCQ disable failed\n"); 6892 6891 if (amdgpu_sriov_vf(adev)) { 6893 6892 gfx_v10_0_cp_gfx_enable(adev, false); 6893 + /* Program KIQ position of RLC_CP_SCHEDULERS during destroy */ 6894 + tmp = RREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS); 6895 + tmp &= 0xffffff00; 6896 + WREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS, tmp); 6897 + 6894 6898 return 0; 6895 6899 } 6896 6900 gfx_v10_0_cp_enable(adev, false);