Browse Source

drm/amdgpu: release exclusive mode after hw_init

Signed-off-by: pding <Pixel.Ding@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
pding 7 years ago
parent
commit
c6332b97fa

+ 4 - 0
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

@@ -1790,6 +1790,10 @@ static int amdgpu_init(struct amdgpu_device *adev)
 	}
 
 	amdgpu_amdkfd_device_init(adev);
+
+	if (amdgpu_sriov_vf(adev))
+		amdgpu_virt_release_full_gpu(adev, true);
+
 	return 0;
 }
 

+ 0 - 3
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

@@ -177,9 +177,6 @@ retry_init:
 		pm_runtime_put_autosuspend(dev->dev);
 	}
 
-	if (amdgpu_sriov_vf(adev))
-		amdgpu_virt_release_full_gpu(adev, true);
-
 out:
 	if (r) {
 		/* balance pm_runtime_get_sync in amdgpu_driver_unload_kms */