aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunwei Zhang2015-12-07 18:34:55 -0600
committerMarek Olšák2016-01-19 19:14:46 -0600
commit6b79c66b841dded6ffa6b56f14e4eb10a90a7c07 (patch)
treeebf3f1e58ba53822c1c99eb00f6e92533239e6d0 /amdgpu/amdgpu_cs.c
parentd4d4184363a62ece6b8830cacaf390b5638d7f8e (diff)
downloadexternal-libgbm-6b79c66b841dded6ffa6b56f14e4eb10a90a7c07.tar.gz
external-libgbm-6b79c66b841dded6ffa6b56f14e4eb10a90a7c07.tar.xz
external-libgbm-6b79c66b841dded6ffa6b56f14e4eb10a90a7c07.zip
amdgpu: list each entry safely for sw semaphore when submit ib
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: David Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_cs.c')
-rw-r--r--amdgpu/amdgpu_cs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c
index 1848ade5..b4f41b0e 100644
--- a/amdgpu/amdgpu_cs.c
+++ b/amdgpu/amdgpu_cs.c
@@ -179,7 +179,7 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context,
179 struct drm_amdgpu_cs_chunk_dep *dependencies = NULL; 179 struct drm_amdgpu_cs_chunk_dep *dependencies = NULL;
180 struct drm_amdgpu_cs_chunk_dep *sem_dependencies = NULL; 180 struct drm_amdgpu_cs_chunk_dep *sem_dependencies = NULL;
181 struct list_head *sem_list; 181 struct list_head *sem_list;
182 amdgpu_semaphore_handle sem; 182 amdgpu_semaphore_handle sem, tmp;
183 uint32_t i, size, sem_count = 0; 183 uint32_t i, size, sem_count = 0;
184 bool user_fence; 184 bool user_fence;
185 int r = 0; 185 int r = 0;
@@ -282,7 +282,7 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context,
282 goto error_unlock; 282 goto error_unlock;
283 } 283 }
284 sem_count = 0; 284 sem_count = 0;
285 LIST_FOR_EACH_ENTRY(sem, sem_list, list) { 285 LIST_FOR_EACH_ENTRY_SAFE(sem, tmp, sem_list, list) {
286 struct amdgpu_cs_fence *info = &sem->signal_fence; 286 struct amdgpu_cs_fence *info = &sem->signal_fence;
287 struct drm_amdgpu_cs_chunk_dep *dep = &sem_dependencies[sem_count++]; 287 struct drm_amdgpu_cs_chunk_dep *dep = &sem_dependencies[sem_count++];
288 dep->ip_type = info->ip_type; 288 dep->ip_type = info->ip_type;