diff options
author | Christian König <christian.koenig@amd.com> | 2016-09-28 10:33:01 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-10-25 14:38:30 -0400 |
commit | b88c8796d815f80b958d6a35043d16d74bdfed24 (patch) | |
tree | 33217a942a89f2560bc44b5642427aa98437417f /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 073440d26272dc983bed51a3aa7bddc4aa344ab0 (diff) |
drm/amdgpu: use amdgpu_vm_get_pd_bo in the GEM code
Instead of messing with the PD directly.
Signed-off-by: Christian König <christian.koenig@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 | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 5dc0158b12db..cd62f6ffde2a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -553,7 +553,8 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, | |||
553 | struct amdgpu_fpriv *fpriv = filp->driver_priv; | 553 | struct amdgpu_fpriv *fpriv = filp->driver_priv; |
554 | struct amdgpu_bo *abo; | 554 | struct amdgpu_bo *abo; |
555 | struct amdgpu_bo_va *bo_va; | 555 | struct amdgpu_bo_va *bo_va; |
556 | struct ttm_validate_buffer tv, tv_pd; | 556 | struct amdgpu_bo_list_entry vm_pd; |
557 | struct ttm_validate_buffer tv; | ||
557 | struct ww_acquire_ctx ticket; | 558 | struct ww_acquire_ctx ticket; |
558 | struct list_head list, duplicates; | 559 | struct list_head list, duplicates; |
559 | uint32_t invalid_flags, va_flags = 0; | 560 | uint32_t invalid_flags, va_flags = 0; |
@@ -598,9 +599,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, | |||
598 | tv.shared = true; | 599 | tv.shared = true; |
599 | list_add(&tv.head, &list); | 600 | list_add(&tv.head, &list); |
600 | 601 | ||
601 | tv_pd.bo = &fpriv->vm.page_directory->tbo; | 602 | amdgpu_vm_get_pd_bo(&fpriv->vm, &list, &vm_pd); |
602 | tv_pd.shared = true; | ||
603 | list_add(&tv_pd.head, &list); | ||
604 | 603 | ||
605 | r = ttm_eu_reserve_buffers(&ticket, &list, true, &duplicates); | 604 | r = ttm_eu_reserve_buffers(&ticket, &list, true, &duplicates); |
606 | if (r) { | 605 | if (r) { |