mirror of
https://github.com/torvalds/linux.git
synced 2026-04-22 08:44:02 -04:00
drm/amdgpu: move gtt usage tracking into the gtt manager v2
It doesn't make much sense to count those numbers twice. v2: use and atomic64_t instead Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
97cbb28451
commit
9255d77d8c
@@ -62,7 +62,6 @@ static void amdgpu_update_memory_usage(struct amdgpu_device *adev,
|
||||
if (new_mem) {
|
||||
switch (new_mem->mem_type) {
|
||||
case TTM_PL_TT:
|
||||
atomic64_add(new_mem->size, &adev->gtt_usage);
|
||||
break;
|
||||
case TTM_PL_VRAM:
|
||||
atomic64_add(new_mem->size, &adev->vram_usage);
|
||||
@@ -75,7 +74,6 @@ static void amdgpu_update_memory_usage(struct amdgpu_device *adev,
|
||||
if (old_mem) {
|
||||
switch (old_mem->mem_type) {
|
||||
case TTM_PL_TT:
|
||||
atomic64_sub(old_mem->size, &adev->gtt_usage);
|
||||
break;
|
||||
case TTM_PL_VRAM:
|
||||
atomic64_sub(old_mem->size, &adev->vram_usage);
|
||||
|
||||
Reference in New Issue
Block a user