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

drm/amdgpu: fix fence fallback timer expired error

IH is not working after switching a new gpu index for the first time.

During VM resume, QEMU programming of VF MSIX table (register GFXMSIX_VECT0_ADDR_LO)
may not work.The access could be blocked by nBIF protection as VF isn't in
exclusive access mode. Exclusive access is enabled now, disable/enable MSIX
so that QEMU reprograms MSIX table.

call amdgpu_restore_msix on resume to restore msix table.

Signed-off-by: Samuel Zhang <guoqing.zhang@amd.com>
Acked-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Samuel Zhang and committed by
Alex Deucher
4108c2be 2f405eb4

+9 -1
+7
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 5109 5109 int r; 5110 5110 unsigned int prev_physical_node_id = adev->gmc.xgmi.physical_node_id; 5111 5111 5112 + /* During VM resume, QEMU programming of VF MSIX table (register GFXMSIX_VECT0_ADDR_LO) 5113 + * may not work. The access could be blocked by nBIF protection as VF isn't in 5114 + * exclusive access mode. Exclusive access is enabled now, disable/enable MSIX 5115 + * so that QEMU reprograms MSIX table. 5116 + */ 5117 + amdgpu_restore_msix(adev); 5118 + 5112 5119 r = adev->gfxhub.funcs->get_xgmi_info(adev); 5113 5120 if (r) 5114 5121 return r;
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
··· 242 242 return true; 243 243 } 244 244 245 - static void amdgpu_restore_msix(struct amdgpu_device *adev) 245 + void amdgpu_restore_msix(struct amdgpu_device *adev) 246 246 { 247 247 u16 ctrl; 248 248
+1
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
··· 146 146 int amdgpu_irq_add_domain(struct amdgpu_device *adev); 147 147 void amdgpu_irq_remove_domain(struct amdgpu_device *adev); 148 148 unsigned amdgpu_irq_create_mapping(struct amdgpu_device *adev, unsigned src_id); 149 + void amdgpu_restore_msix(struct amdgpu_device *adev); 149 150 150 151 #endif