mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
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>
This commit is contained in:
parent
073440d262
commit
b88c8796d8
1 changed files with 3 additions and 4 deletions
|
@ -553,7 +553,8 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
|
||||||
struct amdgpu_fpriv *fpriv = filp->driver_priv;
|
struct amdgpu_fpriv *fpriv = filp->driver_priv;
|
||||||
struct amdgpu_bo *abo;
|
struct amdgpu_bo *abo;
|
||||||
struct amdgpu_bo_va *bo_va;
|
struct amdgpu_bo_va *bo_va;
|
||||||
struct ttm_validate_buffer tv, tv_pd;
|
struct amdgpu_bo_list_entry vm_pd;
|
||||||
|
struct ttm_validate_buffer tv;
|
||||||
struct ww_acquire_ctx ticket;
|
struct ww_acquire_ctx ticket;
|
||||||
struct list_head list, duplicates;
|
struct list_head list, duplicates;
|
||||||
uint32_t invalid_flags, va_flags = 0;
|
uint32_t invalid_flags, va_flags = 0;
|
||||||
|
@ -598,9 +599,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
|
||||||
tv.shared = true;
|
tv.shared = true;
|
||||||
list_add(&tv.head, &list);
|
list_add(&tv.head, &list);
|
||||||
|
|
||||||
tv_pd.bo = &fpriv->vm.page_directory->tbo;
|
amdgpu_vm_get_pd_bo(&fpriv->vm, &list, &vm_pd);
|
||||||
tv_pd.shared = true;
|
|
||||||
list_add(&tv_pd.head, &list);
|
|
||||||
|
|
||||||
r = ttm_eu_reserve_buffers(&ticket, &list, true, &duplicates);
|
r = ttm_eu_reserve_buffers(&ticket, &list, true, &duplicates);
|
||||||
if (r) {
|
if (r) {
|
||||||
|
|
Loading…
Reference in a new issue