]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: svm bo enable_signal call condition
authorAlex Sierra <alex.sierra@amd.com>
Tue, 28 Jul 2020 21:04:41 +0000 (16:04 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Apr 2021 01:49:49 +0000 (21:49 -0400)
commit8ff4744f2b6d6455d8bc7d65c06d4933824547a2
tree329ca81d55cad12a734f475d4c81f19fd3967abe
parente56acfdc7efefecbc4eeeab4087112f957d30a0b
drm/amdgpu: svm bo enable_signal call condition

[why]
To support svm bo eviction mechanism.

[how]
If the BO crated has AMDGPU_AMDKFD_CREATE_SVM_BO flag set,
enable_signal callback will be called inside amdgpu_evict_flags.
This also causes gutting of the BO by removing all placements,
so that TTM won't actually do an eviction. Instead it will discard
the memory held by the BO. This is needed for HMM migration to user
mode system memory pages.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c