]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/amdgpu: use new HMM APIs and helpers
authorPhilip Yang <Philip.Yang@amd.com>
Wed, 29 May 2019 13:52:16 +0000 (09:52 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Jun 2019 17:56:01 +0000 (12:56 -0500)
commit66c45500bfdc6a7f1c143767dfbc8fc8f9435e73
tree713e14e89711527734f243481ce43367f83707a7
parent8252562d5270c13e6123a5939d0db1bbf04327a1
drm/amdgpu: use new HMM APIs and helpers

HMM provides new APIs and helps in kernel 5.2-rc1 to simplify driver
path. The old hmm APIs are deprecated and will be removed in future.

Below are changes in driver:

1. Change hmm_vma_fault to hmm_range_register and hmm_range_fault which
supports range with multiple vmas, remove the multiple vmas handle path
and data structure.
2. Change hmm_vma_range_done to hmm_range_unregister.
3. Use default flags to avoid pre-fill pfn arrays.
4. Use new hmm_device_ helpers.

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