aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-09-19 10:25:08 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-12-07 17:53:44 -0500
commita9f34c70fd168b164aadffd46bb757ded52e25b9 (patch)
treefd7c5109dc72f884f21d6562481bd24073402770 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentc50fe0c5b174153669fd437c1c5fde724b3bc7f4 (diff)
drm/ttm: allow reserving more than one shared slot v3
Let's support simultaneous submissions to multiple engines. v2: rename the field to num_shared and fix up all users v3: rebased Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Huang Rui <ray.huang@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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 7b3d1ebda9df..f4f00217546e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -169,7 +169,7 @@ void amdgpu_gem_object_close(struct drm_gem_object *obj,
169 INIT_LIST_HEAD(&duplicates); 169 INIT_LIST_HEAD(&duplicates);
170 170
171 tv.bo = &bo->tbo; 171 tv.bo = &bo->tbo;
172 tv.shared = true; 172 tv.num_shared = 1;
173 list_add(&tv.head, &list); 173 list_add(&tv.head, &list);
174 174
175 amdgpu_vm_get_pd_bo(vm, &list, &vm_pd); 175 amdgpu_vm_get_pd_bo(vm, &list, &vm_pd);
@@ -604,7 +604,10 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
604 return -ENOENT; 604 return -ENOENT;
605 abo = gem_to_amdgpu_bo(gobj); 605 abo = gem_to_amdgpu_bo(gobj);
606 tv.bo = &abo->tbo; 606 tv.bo = &abo->tbo;
607 tv.shared = !!(abo->flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID); 607 if (abo->flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID)
608 tv.num_shared = 1;
609 else
610 tv.num_shared = 0;
608 list_add(&tv.head, &list); 611 list_add(&tv.head, &list);
609 } else { 612 } else {
610 gobj = NULL; 613 gobj = NULL;