aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
diff options
context:
space:
mode:
authorLang Yu <[email protected]>2021-06-22 16:23:37 +0000
committerAndrey Grodzovsky <[email protected]>2021-06-23 18:59:39 +0000
commit2b70af79fd2283a356b34e6955f8a130298840bc (patch)
treefe80df8b3aa73852d6b8be5cac4e38f28606d098 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
parentydrm/amdgpu: always allow evicting to SYSTEM domain (diff)
downloadkernel-2b70af79fd2283a356b34e6955f8a130298840bc.tar.gz
kernel-2b70af79fd2283a356b34e6955f8a130298840bc.zip
drm/amdgpu: switch gtt_mgr to counting used pages
Change mgr->available into mgr->used (invert the value). Makes more sense to do it this way since we don't need the spinlock any more to double check the handling. v3 (chk): separated from the TEMPOARAY FLAG change. Signed-off-by: Lang Yu <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Andrey Grodzovsky <[email protected]> Acked-by: Nirmoy Das <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
index e69f3e8e06e5..3205fd520060 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
@@ -52,7 +52,7 @@ struct amdgpu_gtt_mgr {
struct ttm_resource_manager manager;
struct drm_mm mm;
spinlock_t lock;
- atomic64_t available;
+ atomic64_t used;
};
struct amdgpu_preempt_mgr {