Commit cf9eb78a authored by Huang Rui's avatar Huang Rui

amdgpu: use amdgpu_cs_submit_raw2 in amdgpu_cs_submit

So far, amdgpu_cs_submit_raw2 is mainly used for upper layer (Mesa), however,
amdgpu_cs_submit is used for current all unit tests. Our intention is that the
unit tests can actually verify the API which is really used.
Signed-off-by: Huang Rui's avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
parent fca0849a
......@@ -226,9 +226,11 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context,
struct drm_amdgpu_cs_chunk_data *chunk_data;
struct drm_amdgpu_cs_chunk_dep *dependencies = NULL;
struct drm_amdgpu_cs_chunk_dep *sem_dependencies = NULL;
amdgpu_device_handle dev = context->dev;
struct list_head *sem_list;
amdgpu_semaphore_handle sem, tmp;
uint32_t i, size, sem_count = 0;
uint64_t seq_no;
bool user_fence;
int r = 0;
......@@ -354,12 +356,12 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context,
chunks[i].chunk_data = (uint64_t)(uintptr_t)sem_dependencies;
}
r = drmCommandWriteRead(context->dev->fd, DRM_AMDGPU_CS,
&cs, sizeof(cs));
r = amdgpu_cs_submit_raw2(dev, context, cs.in.bo_list_handle, cs.in.num_chunks,
chunks, &seq_no);
if (r)
goto error_unlock;
ibs_request->seq_no = cs.out.handle;
ibs_request->seq_no = seq_no;
context->last_seq[ibs_request->ip_type][ibs_request->ip_instance][ibs_request->ring] = ibs_request->seq_no;
error_unlock:
pthread_mutex_unlock(&context->sequence_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment