summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-08-07 18:11:33 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-08-17 22:46:02 +0300
commit9255d77d8cfd714f336a48168a9dada32912b19a (patch)
treeeb0455a12dcb2c2c04c5ee1012be5308c6954b05 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parent97cbb28451c21212cc20f2a5e6c074ba33150c3d (diff)
downloadlinux-9255d77d8cfd714f336a48168a9dada32912b19a.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 6e72fe7901ec..57d2cb6bd331 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -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);