]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amdgpu: fix shadow bo skip condition
authorNirmoy Das <nirmoy.das@amd.com>
Tue, 8 Jun 2021 09:58:48 +0000 (11:58 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Jun 2021 16:14:18 +0000 (12:14 -0400)
Create shadow BOs only for no-compute VM context and only for dGPU.
The existing if-condition would create shadow bo for compute context
on dGPU which not what we wanted.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index 00addb62f0e5b7727a52e828b743638a27e9d8f3..b4e46c7222f15cf0a38a38bf85e84bbd407846b3 100644 (file)
@@ -909,7 +909,7 @@ static int amdgpu_vm_pt_create(struct amdgpu_device *adev,
                return r;
 
        bo = &(*vmbo)->bo;
-       if (vm->is_compute_context && (adev->flags & AMD_IS_APU)) {
+       if (vm->is_compute_context || (adev->flags & AMD_IS_APU)) {
                (*vmbo)->shadow = NULL;
                return 0;
        }