OSDN Git Service

drm/amdgpu: Fix tracking of invalid userptrs
authorFelix Kuehling <Felix.Kuehling@amd.com>
Sat, 29 Jun 2019 05:50:35 +0000 (01:50 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jul 2019 19:31:57 +0000 (14:31 -0500)
commitf4fd28b6c78cef054daf8d8b8dff8ef614ddfc00
tree937ff0200150157f55bd48ab487c14fec0f7b1b7
parente7e2505326496c140db26c797fafea48a492b8c2
drm/amdgpu: Fix tracking of invalid userptrs

Restore the code that resets mem->invalid. Othewise so mapping
userptrs after they got an MMU notifiers would always be skipped.

This also avoids unnecessarily calling get_user_pages on BOs that
have not been invalidated since the last try.

Signed-off-by: Felix Kuehling <Felix.Kuehling@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_amdkfd_gpuvm.c