drm/amdgpu: fix test for shadow page tables
authorChristian König <ckoenig.leichtzumerken@gmail.com>
Wed, 20 Dec 2017 13:21:25 +0000 (14:21 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Dec 2017 21:02:48 +0000 (16:02 -0500)
They don't work 100% correctly at the moment.

Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

index 4feee9927bce65b2bb478a48cac66e341ae5aad0..5c4c3e0d527be64386dcab0951727642f64d73db 100644 (file)
@@ -42,7 +42,11 @@ static bool amdgpu_need_backup(struct amdgpu_device *adev)
        if (adev->flags & AMD_IS_APU)
                return false;
 
-       return amdgpu_gpu_recovery;
+       if (amdgpu_gpu_recovery == 0 ||
+           (amdgpu_gpu_recovery == -1  && !amdgpu_sriov_vf(adev)))
+               return false;
+
+       return true;
 }
 
 static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo)