diff options
author | Philip Yang <Philip.Yang@amd.com> | 2019-07-02 18:39:45 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-07-08 13:55:00 -0500 |
commit | e5eaa7cc0c0359cfe17b0027a6ac5eda7a9635db (patch) | |
tree | 383355a66f171d13dc663426884a61c1c3cb796e /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 3e2bb60ab2b1d9371008d4a3d0b01cd28f505cb7 (diff) | |
download | linux-stable-e5eaa7cc0c0359cfe17b0027a6ac5eda7a9635db.tar.gz linux-stable-e5eaa7cc0c0359cfe17b0027a6ac5eda7a9635db.tar.bz2 linux-stable-e5eaa7cc0c0359cfe17b0027a6ac5eda7a9635db.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 1f9f27061e2f..939f8305511b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -327,8 +327,7 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data, } if (args->flags & AMDGPU_GEM_USERPTR_VALIDATE) { - r = amdgpu_ttm_tt_get_user_pages(bo->tbo.ttm, - bo->tbo.ttm->pages); + r = amdgpu_ttm_tt_get_user_pages(bo, bo->tbo.ttm->pages); if (r) goto release_object; |