diff options
author | Christian König <christian.koenig@amd.com> | 2018-09-24 07:35:08 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-12-07 17:53:45 -0500 |
commit | 07daa8a0784e3085c4c8e282a83dd8c92bf59b53 (patch) | |
tree | dad4730134b55316d951aec74c199fa9d952e58d /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
parent | 0aa7aa24cc11720a05b4492345f0adba8373c226 (diff) |
drm/amdgpu: always reserve one more shared slot for pipelined BO moves
This allows us to drop the extra reserve in TTM.
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_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 8cc640abe3de..4a6a1d4a88ea 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -50,7 +50,8 @@ static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p, | |||
50 | bo = amdgpu_bo_ref(gem_to_amdgpu_bo(gobj)); | 50 | bo = amdgpu_bo_ref(gem_to_amdgpu_bo(gobj)); |
51 | p->uf_entry.priority = 0; | 51 | p->uf_entry.priority = 0; |
52 | p->uf_entry.tv.bo = &bo->tbo; | 52 | p->uf_entry.tv.bo = &bo->tbo; |
53 | p->uf_entry.tv.num_shared = 1; | 53 | /* One for TTM and one for the CS job */ |
54 | p->uf_entry.tv.num_shared = 2; | ||
54 | p->uf_entry.user_pages = NULL; | 55 | p->uf_entry.user_pages = NULL; |
55 | 56 | ||
56 | drm_gem_object_put_unlocked(gobj); | 57 | drm_gem_object_put_unlocked(gobj); |
@@ -598,8 +599,9 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, | |||
598 | return r; | 599 | return r; |
599 | } | 600 | } |
600 | 601 | ||
602 | /* One for TTM and one for the CS job */ | ||
601 | amdgpu_bo_list_for_each_entry(e, p->bo_list) | 603 | amdgpu_bo_list_for_each_entry(e, p->bo_list) |
602 | e->tv.num_shared = 1; | 604 | e->tv.num_shared = 2; |
603 | 605 | ||
604 | amdgpu_bo_list_get_list(p->bo_list, &p->validated); | 606 | amdgpu_bo_list_get_list(p->bo_list, &p->validated); |
605 | if (p->bo_list->first_userptr != p->bo_list->num_entries) | 607 | if (p->bo_list->first_userptr != p->bo_list->num_entries) |