Skip to content

Commit 3c22c1e

Browse files
Shikang Fanalexdeucher
authored andcommitted
drm/amdgpu: fix for suspend/resume kiq fence fallback under sriov
- in device_resume, sriov configure interrupt should be in full access, so release_full_gpu should be done after kfd_resume. - remove the previous workaround solution for sriov. Fixes: ec4927d ("drm/amdgpu: fix for suspend/resume sequence under sriov") Signed-off-by: Shikang Fan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 6066aaf commit 3c22c1e

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4181,34 +4181,35 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
41814181

41824182
r = amdgpu_device_ip_resume(adev);
41834183

4184-
/* no matter what r is, always need to properly release full GPU */
4185-
if (amdgpu_sriov_vf(adev)) {
4186-
amdgpu_virt_init_data_exchange(adev);
4187-
amdgpu_virt_release_full_gpu(adev, true);
4188-
}
4189-
41904184
if (r) {
41914185
dev_err(adev->dev, "amdgpu_device_ip_resume failed (%d).\n", r);
4192-
return r;
4186+
goto exit;
41934187
}
41944188
amdgpu_fence_driver_hw_init(adev);
41954189

41964190
r = amdgpu_device_ip_late_init(adev);
41974191
if (r)
4198-
return r;
4192+
goto exit;
41994193

42004194
queue_delayed_work(system_wq, &adev->delayed_init_work,
42014195
msecs_to_jiffies(AMDGPU_RESUME_MS));
42024196

42034197
if (!adev->in_s0ix) {
42044198
r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
42054199
if (r)
4206-
return r;
4200+
goto exit;
4201+
}
4202+
4203+
exit:
4204+
if (amdgpu_sriov_vf(adev)) {
4205+
amdgpu_virt_init_data_exchange(adev);
4206+
amdgpu_virt_release_full_gpu(adev, true);
42074207
}
42084208

4209+
if (r)
4210+
return r;
4211+
42094212
/* Make sure IB tests flushed */
4210-
if (amdgpu_sriov_vf(adev))
4211-
amdgpu_irq_gpu_reset_resume_helper(adev);
42124213
flush_delayed_work(&adev->delayed_init_work);
42134214

42144215
if (adev->in_s0ix) {

0 commit comments

Comments
 (0)