Skip to contentSkip to conversation

drm/amdgpu: warn on DCC in fallback copy path

PATCH New Alex Deucher 1 participant 1 message Dec 2, 2024

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: warn on DCC in fallback copy path

If SDMA is not available, warn if we try and copy
a GFX12 DCC buffer with the CPU.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +4 -2
index 9f922ec50ea2d..884e6b6984619 100644
@@ -565,10 +565,12 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,
 	}
 
 	amdgpu_bo_move_notify(bo, evict, new_mem);
-	if (adev->mman.buffer_funcs_enabled)
+	if (adev->mman.buffer_funcs_enabled) {
 		r = amdgpu_move_blit(bo, evict, new_mem, old_mem);
-	else
+	} else {
+		WARN_ON(abo->flags & AMDGPU_GEM_CREATE_GFX12_DCC);
 		r = -ENODEV;
+	}
 
 	if (r) {
 		/* Check that all memory is CPU accessible */
Signature · 1 line
2.47.0