[PATCH 3/4] drm/amdgpu: Stop reporting special chip memory pools as CPU memory in fdinfo

Tvrtko Ursulin tursulin at igalia.com
Thu Oct 24 09:23:40 UTC 2024


From: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>

So far these specialized on chip memory pools were reported as system
memory (aka 'cpu') which is not correct and misleading. Lets remove that
and consider later making them visible as their own thing.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>
Suggested-by: Christian König <christian.koenig at amd.com>
Cc: Yunxiang Li <Yunxiang.Li at amd.com>
Cc: Alex Deucher <alexdeucher at gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 0d3fb6b4212e..b5f65ef1efcd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -1209,17 +1209,6 @@ void amdgpu_bo_get_memory(struct amdgpu_bo *bo,
 		type = res->mem_type;
 	}
 
-	/* Squash some into 'cpu' to keep the legacy userspace view. */
-	switch (type) {
-	case TTM_PL_VRAM:
-	case TTM_PL_TT:
-	case TTM_PL_SYSTEM:
-		break;
-	default:
-		type = TTM_PL_SYSTEM;
-		break;
-	}
-
 	if (drm_WARN_ON_ONCE(&adev->ddev, type >= sz))
 		return;
 
-- 
2.46.0



More information about the amd-gfx mailing list