From 1daee8b472e896f477e490ca66e58d1f8f0f4e61 Mon Sep 17 00:00:00 2001 From: Pixel Ding Date: Wed, 8 Nov 2017 11:03:14 +0800 Subject: drm/amdgpu: revise retry init to fully cleanup driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Retry at drm_dev_register instead of amdgpu_device_init. Reviewed-by: Christian König Signed-off-by: Pixel Ding Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c') diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 57267ac265f0..ee2a5f9a32f0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2390,6 +2390,9 @@ int amdgpu_device_init(struct amdgpu_device *adev, amdgpu_virt_mmio_blocked(adev) && !amdgpu_virt_wait_reset(adev)) { dev_err(adev->dev, "VF exclusive mode timeout\n"); + /* Don't send request since VF is inactive. */ + adev->virt.caps &= ~AMDGPU_SRIOV_CAPS_RUNTIME; + adev->virt.ops = NULL; r = -EAGAIN; goto failed; } -- cgit v1.2.1