OSDN Git Service

drm/amdgpu: fix TLB flushing during eviction
authorChristian König <christian.koenig@amd.com>
Wed, 30 Mar 2022 08:53:15 +0000 (10:53 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Apr 2022 14:26:20 +0000 (10:26 -0400)
commit30671b44aa570a2953aead09999d13e3b5a24d30
tree42788d4bd05d6b7b8f0671f512d9a9b07ff09287
parent50e6cb3fd2cde554db646282ea10df7236e6493c
drm/amdgpu: fix TLB flushing during eviction

Testing the valid bit is not enough to figure out if we
need to invalidate the TLB or not.

During eviction it is quite likely that we move a BO from VRAM to GTT and
update the page tables immediately to the new GTT address.

Rework the whole function to get all the necessary parameters directly as
value.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
drivers/gpu/drm/amd/amdkfd/kfd_svm.c