]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: switch gtt_mgr to counting used pages
authorLang Yu <Lang.Yu@amd.com>
Tue, 22 Jun 2021 16:23:37 +0000 (12:23 -0400)
committerAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 23 Jun 2021 18:59:39 +0000 (14:59 -0400)
commitf23e2b4ec60b1cbca7344d277b6b149cc5ab4d4f
treefe80df8b3aa73852d6b8be5cac4e38f28606d098
parentdc5e369a38b59edac097f9520a74205077cd00e1
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 <Lang.Yu@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Nirmoy Das <nirmoy.das@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210622162339.761651-4-andrey.grodzovsky@amd.com
drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h