From: Nirmoy Das Date: Tue, 8 Jun 2021 09:58:48 +0000 (+0200) Subject: drm/amdgpu: fix shadow bo skip condition X-Git-Tag: v5.14-rc1~114^2~12^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ceba306c05a4b33034a303ed8a97c9f2e9af3eb;p=thirdparty%2Flinux.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 00addb62f0e5b..b4e46c7222f15 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; }