diff options
author | Christian König | 2015-08-24 04:43:29 -0500 |
---|---|---|
committer | Alex Deucher | 2015-08-25 09:26:58 -0500 |
commit | f6f25d67a9c0d26be9b8021a45f2acf3a4042ade (patch) | |
tree | 5105dfeed7fc7f62ef6781b3662a6a07308db814 /amdgpu | |
parent | 1e66ee21ab143e345865a452e3a60ae9f0652aaf (diff) | |
download | external-libgbm-f6f25d67a9c0d26be9b8021a45f2acf3a4042ade.tar.gz external-libgbm-f6f25d67a9c0d26be9b8021a45f2acf3a4042ade.tar.xz external-libgbm-f6f25d67a9c0d26be9b8021a45f2acf3a4042ade.zip |
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>
Diffstat (limited to 'amdgpu')
-rw-r--r-- | amdgpu/amdgpu_cs.c | 10 | ||||
-rw-r--r-- | amdgpu/amdgpu_internal.h | 3 |
2 files changed, 0 insertions, 13 deletions
diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c index ea353264..c7910ada 100644 --- a/amdgpu/amdgpu_cs.c +++ b/amdgpu/amdgpu_cs.c | |||
@@ -63,10 +63,6 @@ int amdgpu_cs_ctx_create(amdgpu_device_handle dev, | |||
63 | 63 | ||
64 | gpu_context->dev = dev; | 64 | gpu_context->dev = dev; |
65 | 65 | ||
66 | r = pthread_mutex_init(&gpu_context->sequence_mutex, NULL); | ||
67 | if (r) | ||
68 | goto error; | ||
69 | |||
70 | /* Create the context */ | 66 | /* Create the context */ |
71 | memset(&args, 0, sizeof(args)); | 67 | memset(&args, 0, sizeof(args)); |
72 | args.in.op = AMDGPU_CTX_OP_ALLOC_CTX; | 68 | args.in.op = AMDGPU_CTX_OP_ALLOC_CTX; |
@@ -80,7 +76,6 @@ int amdgpu_cs_ctx_create(amdgpu_device_handle dev, | |||
80 | return 0; | 76 | return 0; |
81 | 77 | ||
82 | error: | 78 | error: |
83 | pthread_mutex_destroy(&gpu_context->sequence_mutex); | ||
84 | free(gpu_context); | 79 | free(gpu_context); |
85 | return r; | 80 | return r; |
86 | } | 81 | } |
@@ -101,8 +96,6 @@ int amdgpu_cs_ctx_free(amdgpu_context_handle context) | |||
101 | if (NULL == context) | 96 | if (NULL == context) |
102 | return -EINVAL; | 97 | return -EINVAL; |
103 | 98 | ||
104 | pthread_mutex_destroy(&context->sequence_mutex); | ||
105 | |||
106 | /* now deal with kernel side */ | 99 | /* now deal with kernel side */ |
107 | memset(&args, 0, sizeof(args)); | 100 | memset(&args, 0, sizeof(args)); |
108 | args.in.op = AMDGPU_CTX_OP_FREE_CTX; | 101 | args.in.op = AMDGPU_CTX_OP_FREE_CTX; |
@@ -200,8 +193,6 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context, | |||
200 | chunk_data[i].ib_data.flags = ib->flags; | 193 | chunk_data[i].ib_data.flags = ib->flags; |
201 | } | 194 | } |
202 | 195 | ||
203 | pthread_mutex_lock(&context->sequence_mutex); | ||
204 | |||
205 | if (user_fence) { | 196 | if (user_fence) { |
206 | i = cs.in.num_chunks++; | 197 | i = cs.in.num_chunks++; |
207 | 198 | ||
@@ -254,7 +245,6 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context, | |||
254 | ibs_request->seq_no = cs.out.handle; | 245 | ibs_request->seq_no = cs.out.handle; |
255 | 246 | ||
256 | error_unlock: | 247 | error_unlock: |
257 | pthread_mutex_unlock(&context->sequence_mutex); | ||
258 | free(dependencies); | 248 | free(dependencies); |
259 | return r; | 249 | return r; |
260 | } | 250 | } |
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h index 5d866030..7dd5c1c7 100644 --- a/amdgpu/amdgpu_internal.h +++ b/amdgpu/amdgpu_internal.h | |||
@@ -111,9 +111,6 @@ struct amdgpu_bo_list { | |||
111 | 111 | ||
112 | struct amdgpu_context { | 112 | struct amdgpu_context { |
113 | struct amdgpu_device *dev; | 113 | struct amdgpu_device *dev; |
114 | /** Mutex for accessing fences and to maintain command submissions | ||
115 | in good sequence. */ | ||
116 | pthread_mutex_t sequence_mutex; | ||
117 | /* context id*/ | 114 | /* context id*/ |
118 | uint32_t id; | 115 | uint32_t id; |
119 | }; | 116 | }; |