From: Nirmoy Das Date: Tue, 8 Jun 2021 09:58:48 +0000 (+0200) Subject: drm/amdgpu: fix shadow bo skip condition X-Git-Tag: howlett/maple/20220722_2~2859^2~12^2~38 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6ceba306c05a4b33034a303ed8a97c9f2e9af3eb;p=users%2Fjedix%2Flinux-maple.git drm/amdgpu: fix shadow bo skip condition 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 Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 00addb62f0e5..b4e46c7222f1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -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; }