From: wentalou Date: Thu, 17 Jan 2019 09:38:33 +0000 (+0800) Subject: drm/amdgpu: sriov should skip asic_reset in device_init X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f14899fd2a560796450e9af383dfaee6ce557d6b;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu: sriov should skip asic_reset in device_init sriov would meet guest driver load failure, if calling amdgpu_asic_reset in amdgpu_device_init. sriov should skip asic_reset in device_init. Signed-off-by: Wentao Lou Acked-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 8a61764e64cf..e20dce438d37 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2553,7 +2553,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, /* check if we need to reset the asic * E.g., driver was not cleanly unloaded previously, etc. */ - if (amdgpu_asic_need_reset_on_init(adev)) { + if (!amdgpu_sriov_vf(adev) && amdgpu_asic_need_reset_on_init(adev)) { r = amdgpu_asic_reset(adev); if (r) { dev_err(adev->dev, "asic reset on init failed\n");