@@ -58,10 +58,6 @@ int amdgpu_cs_ctx_create(amdgpu_device_handle dev,
gpu_context->dev = dev;
- r = pthread_mutex_init(&gpu_context->sequence_mutex, NULL);
- if (r)
- goto error;
-
/* Create the context */
memset(&args, 0, sizeof(args));
args.in.op = AMDGPU_CTX_OP_ALLOC_CTX;
@@ -75,7 +71,6 @@ int amdgpu_cs_ctx_create(amdgpu_device_handle dev,
return 0;
error:
- pthread_mutex_destroy(&gpu_context->sequence_mutex);
free(gpu_context);
return r;
}
@@ -96,8 +91,6 @@ int amdgpu_cs_ctx_free(amdgpu_context_handle context)
if (NULL == context)
return -EINVAL;
- pthread_mutex_destroy(&context->sequence_mutex);
-
/* now deal with kernel side */
memset(&args, 0, sizeof(args));
args.in.op = AMDGPU_CTX_OP_FREE_CTX;
@@ -195,8 +188,6 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context,
chunk_data[i].ib_data.flags = ib->flags;
}
- pthread_mutex_lock(&context->sequence_mutex);
-
if (user_fence) {
i = cs.in.num_chunks++;
@@ -249,7 +240,6 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context,
ibs_request->seq_no = cs.out.handle;
error_unlock:
- pthread_mutex_unlock(&context->sequence_mutex);
free(dependencies);
return r;
}
@@ -108,9 +108,6 @@ struct amdgpu_bo_list {
struct amdgpu_context {
struct amdgpu_device *dev;
- /** Mutex for accessing fences and to maintain command submissions
- in good sequence. */
- pthread_mutex_t sequence_mutex;
/* context id*/
uint32_t id;
};