amdgpu: remove sequence mutex

It's not used any more.

Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
main
Christian König 2015-08-24 11:43:29 +02:00 committed by Alex Deucher
parent 1e66ee21ab
commit f6f25d67a9
2 changed files with 0 additions and 13 deletions

View File

@ -63,10 +63,6 @@ int amdgpu_cs_ctx_create(amdgpu_device_handle dev,
gpu_context->dev = dev; gpu_context->dev = dev;
r = pthread_mutex_init(&gpu_context->sequence_mutex, NULL);
if (r)
goto error;
/* Create the context */ /* Create the context */
memset(&args, 0, sizeof(args)); memset(&args, 0, sizeof(args));
args.in.op = AMDGPU_CTX_OP_ALLOC_CTX; args.in.op = AMDGPU_CTX_OP_ALLOC_CTX;
@ -80,7 +76,6 @@ int amdgpu_cs_ctx_create(amdgpu_device_handle dev,
return 0; return 0;
error: error:
pthread_mutex_destroy(&gpu_context->sequence_mutex);
free(gpu_context); free(gpu_context);
return r; return r;
} }
@ -101,8 +96,6 @@ int amdgpu_cs_ctx_free(amdgpu_context_handle context)
if (NULL == context) if (NULL == context)
return -EINVAL; return -EINVAL;
pthread_mutex_destroy(&context->sequence_mutex);
/* now deal with kernel side */ /* now deal with kernel side */
memset(&args, 0, sizeof(args)); memset(&args, 0, sizeof(args));
args.in.op = AMDGPU_CTX_OP_FREE_CTX; args.in.op = AMDGPU_CTX_OP_FREE_CTX;
@ -200,8 +193,6 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context,
chunk_data[i].ib_data.flags = ib->flags; chunk_data[i].ib_data.flags = ib->flags;
} }
pthread_mutex_lock(&context->sequence_mutex);
if (user_fence) { if (user_fence) {
i = cs.in.num_chunks++; i = cs.in.num_chunks++;
@ -254,7 +245,6 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context,
ibs_request->seq_no = cs.out.handle; ibs_request->seq_no = cs.out.handle;
error_unlock: error_unlock:
pthread_mutex_unlock(&context->sequence_mutex);
free(dependencies); free(dependencies);
return r; return r;
} }

View File

@ -111,9 +111,6 @@ struct amdgpu_bo_list {
struct amdgpu_context { struct amdgpu_context {
struct amdgpu_device *dev; struct amdgpu_device *dev;
/** Mutex for accessing fences and to maintain command submissions
in good sequence. */
pthread_mutex_t sequence_mutex;
/* context id*/ /* context id*/
uint32_t id; uint32_t id;
}; };