drm/amdgpu: always repost cards that support SR-IOV
authorAlex Deucher <[email protected]>
Mon, 1 Feb 2016 16:23:15 +0000 (11:23 -0500)
committerAlex Deucher <[email protected]>
Wed, 10 Feb 2016 19:17:11 +0000 (14:17 -0500)
Generally a good idea between VM sessions.  We need a way to
detect VM pass-through in general and always run asic_init in
that case.

Reviewed-by: Monk Liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 00f3a16333cc9bbc45baf9a7c4d7e2f83a062678..f0fb938457d9f1b778e783b731c26f96e7f757b7 100644 (file)
@@ -1505,7 +1505,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,
                amdgpu_atombios_has_gpu_virtualization_table(adev);
 
        /* Post card if necessary */
-       if (!amdgpu_card_posted(adev)) {
+       if (!amdgpu_card_posted(adev) ||
+           adev->virtualization.supports_sr_iov) {
                if (!adev->bios) {
                        dev_err(adev->dev, "Card not posted and no BIOS - ignoring\n");
                        return -EINVAL;