From 6ceba306c05a4b33034a303ed8a97c9f2e9af3eb Mon Sep 17 00:00:00 2001 From: Nirmoy Das Date: Tue, 8 Jun 2021 11:58:48 +0200 Subject: [PATCH] drm/amdgpu: fix shadow bo skip condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }