drm/amdgpu: Prepare for hmm_range_register API change (v2)
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 2 Jul 2019 22:39:45 +0000 (18:39 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Jul 2019 18:55:00 +0000 (13:55 -0500)
commite5eaa7cc0c0359cfe17b0027a6ac5eda7a9635db
tree383355a66f171d13dc663426884a61c1c3cb796e
parent3e2bb60ab2b1d9371008d4a3d0b01cd28f505cb7
drm/amdgpu: Prepare for hmm_range_register API change (v2)

An upcoming change in the hmm_range_register API requires passing in
a pointer to an hmm_mirror instead of mm_struct. To access the
hmm_mirror we need pass bo instead of ttm to amdgpu_ttm_tt_get_user_pages
because mirror is part of amdgpu_mn structure, which is accessible from bo.

v2: fix building without CONFIG_HMM_MIRROR (Arnd)

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