summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-12-11 16:39:05 +0300
committerAlex Deucher <alexander.deucher@amd.com>2015-12-19 01:29:45 +0300
commit3c0eea6c35d932c4d25070868067dc9cd9ceab91 (patch)
treeab641062a62fe4177378b74a3e3fec4374fd73c6 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parent5b0112356cf9a735632b26ff5f3450e1716c8598 (diff)
downloadlinux-3c0eea6c35d932c4d25070868067dc9cd9ceab91.tar.xz
drm/amdgpu: put VM page tables directly into duplicates list
They share the reservation object with the page directory anyway. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index fce4c6d952c8..f6c1d6f0bf37 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -78,14 +78,16 @@ static unsigned amdgpu_vm_directory_size(struct amdgpu_device *adev)
* amdgpu_vm_get_bos - add the vm BOs to a validation list
*
* @vm: vm providing the BOs
- * @head: head of validation list
+ * @validated: head of validation list
+ * @duplicates: head of duplicates list
*
* Add the page directory to the list of BOs to
* validate for command submission (cayman+).
*/
struct amdgpu_bo_list_entry *amdgpu_vm_get_bos(struct amdgpu_device *adev,
- struct amdgpu_vm *vm,
- struct list_head *head)
+ struct amdgpu_vm *vm,
+ struct list_head *validated,
+ struct list_head *duplicates)
{
struct amdgpu_bo_list_entry *list;
unsigned i, idx;
@@ -103,7 +105,7 @@ struct amdgpu_bo_list_entry *amdgpu_vm_get_bos(struct amdgpu_device *adev,
list[0].priority = 0;
list[0].tv.bo = &vm->page_directory->tbo;
list[0].tv.shared = true;
- list_add(&list[0].tv.head, head);
+ list_add(&list[0].tv.head, validated);
for (i = 0, idx = 1; i <= vm->max_pde_used; i++) {
if (!vm->page_tables[i].bo)
@@ -115,7 +117,7 @@ struct amdgpu_bo_list_entry *amdgpu_vm_get_bos(struct amdgpu_device *adev,
list[idx].priority = 0;
list[idx].tv.bo = &list[idx].robj->tbo;
list[idx].tv.shared = true;
- list_add(&list[idx++].tv.head, head);
+ list_add(&list[idx++].tv.head, duplicates);
}
return list;