Skip to contentSkip to conversation

drm/amdgpu: fix shadow bo skip condition

PATCH In review Nirmoy Das 2 participants 2 messages Jun 8, 2021

Subsystems (2)
lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
index 74c7d8b21c98..e2146caf6866 100644
@@ -908,7 +908,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;
 	}
Signature · 6 lines
2.31.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
maintainer Reviewed-by on v1 1/1
#1 lore raw

Am 08.06.21 um 12:06 schrieb Nirmoy Das:

Quoted 5 lines

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.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -0
index 74c7d8b21c98..e2146caf6866 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c static int amdgpu_vm_pt_create(struct amdgpu_device *adev, · line 914

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
@@ -908,7 +908,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;
  	}

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx