summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-01-10 07:26:27 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-19 11:13:13 -0500
commitf50c2af8a7d147855e5537531078bb03740abb67 (patch)
tree2c67786c1f544fd248994b64992712c6f890ac67
parentd52b88315a24ed014fa4a737c2806394061e9dfb (diff)
gpu: nvgpu: delete unused wfi in gk20a_fence
The boolean wfi field in struct gk20a_fence is not used for anything. Delete it and a couple of function parameters that carried the flag. Jira NVGPU-43 Change-Id: I399c8709102a3f944cab669ff806761aedaeb6d3 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1636344 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c9
-rw-r--r--drivers/gpu/nvgpu/gk20a/fence_gk20a.c13
-rw-r--r--drivers/gpu/nvgpu/gk20a/fence_gk20a.h7
3 files changed, 13 insertions, 16 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
index d83684e4..4a6b8162 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
@@ -223,7 +223,7 @@ static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s,
223 } 223 }
224 224
225 err = gk20a_fence_from_syncpt(fence, sp->nvhost_dev, sp->id, thresh, 225 err = gk20a_fence_from_syncpt(fence, sp->nvhost_dev, sp->id, thresh,
226 wfi_cmd, need_sync_fence); 226 need_sync_fence);
227 if (err) 227 if (err)
228 goto clean_up_priv_cmd; 228 goto clean_up_priv_cmd;
229 229
@@ -648,7 +648,7 @@ static int gk20a_channel_semaphore_wait_fd(
648 sema->timeline, 648 sema->timeline,
649 fp_sema, 649 fp_sema,
650 &c->semaphore_wq, 650 &c->semaphore_wq,
651 false, false); 651 false);
652 if (err) { 652 if (err) {
653 nvgpu_semaphore_put(fp_sema); 653 nvgpu_semaphore_put(fp_sema);
654 goto clean_up_priv_cmd; 654 goto clean_up_priv_cmd;
@@ -658,7 +658,7 @@ static int gk20a_channel_semaphore_wait_fd(
658 * Init an empty fence. It will instantly return 658 * Init an empty fence. It will instantly return
659 * from gk20a_fence_wait(). 659 * from gk20a_fence_wait().
660 */ 660 */
661 gk20a_init_fence(fence, NULL, NULL, false); 661 gk20a_init_fence(fence, NULL, NULL);
662 662
663 sync_fence_put(sync_fence); 663 sync_fence_put(sync_fence);
664 goto skip_slow_path; 664 goto skip_slow_path;
@@ -708,7 +708,7 @@ static int gk20a_channel_semaphore_wait_fd(
708 * already signaled 708 * already signaled
709 */ 709 */
710 err = gk20a_fence_from_semaphore(c->g, fence, sema->timeline, w->sema, 710 err = gk20a_fence_from_semaphore(c->g, fence, sema->timeline, w->sema,
711 &c->semaphore_wq, false, false); 711 &c->semaphore_wq, false);
712 if (err) 712 if (err)
713 goto clean_up_sema; 713 goto clean_up_sema;
714 714
@@ -785,7 +785,6 @@ static int __gk20a_channel_semaphore_incr(
785 err = gk20a_fence_from_semaphore(c->g, fence, 785 err = gk20a_fence_from_semaphore(c->g, fence,
786 sp->timeline, semaphore, 786 sp->timeline, semaphore,
787 &c->semaphore_wq, 787 &c->semaphore_wq,
788 wfi_cmd,
789 need_sync_fence); 788 need_sync_fence);
790 if (err) 789 if (err)
791 goto clean_up_sema; 790 goto clean_up_sema;
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
index e31770c3..f74afd6e 100644
--- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
@@ -195,13 +195,12 @@ struct gk20a_fence *gk20a_alloc_fence(struct channel_gk20a *c)
195 195
196void gk20a_init_fence(struct gk20a_fence *f, 196void gk20a_init_fence(struct gk20a_fence *f,
197 const struct gk20a_fence_ops *ops, 197 const struct gk20a_fence_ops *ops,
198 struct sync_fence *sync_fence, bool wfi) 198 struct sync_fence *sync_fence)
199{ 199{
200 if (!f) 200 if (!f)
201 return; 201 return;
202 f->ops = ops; 202 f->ops = ops;
203 f->sync_fence = sync_fence; 203 f->sync_fence = sync_fence;
204 f->wfi = wfi;
205 f->syncpt_id = -1; 204 f->syncpt_id = -1;
206} 205}
207 206
@@ -235,7 +234,7 @@ int gk20a_fence_from_semaphore(
235 struct sync_timeline *timeline, 234 struct sync_timeline *timeline,
236 struct nvgpu_semaphore *semaphore, 235 struct nvgpu_semaphore *semaphore,
237 struct nvgpu_cond *semaphore_wq, 236 struct nvgpu_cond *semaphore_wq,
238 bool wfi, bool need_sync_fence) 237 bool need_sync_fence)
239{ 238{
240 struct gk20a_fence *f = fence_out; 239 struct gk20a_fence *f = fence_out;
241 struct sync_fence *sync_fence = NULL; 240 struct sync_fence *sync_fence = NULL;
@@ -250,7 +249,7 @@ int gk20a_fence_from_semaphore(
250 } 249 }
251#endif 250#endif
252 251
253 gk20a_init_fence(f, &nvgpu_semaphore_fence_ops, sync_fence, wfi); 252 gk20a_init_fence(f, &nvgpu_semaphore_fence_ops, sync_fence);
254 if (!f) { 253 if (!f) {
255#ifdef CONFIG_SYNC 254#ifdef CONFIG_SYNC
256 if (sync_fence) 255 if (sync_fence)
@@ -310,7 +309,7 @@ static const struct gk20a_fence_ops gk20a_syncpt_fence_ops = {
310int gk20a_fence_from_syncpt( 309int gk20a_fence_from_syncpt(
311 struct gk20a_fence *fence_out, 310 struct gk20a_fence *fence_out,
312 struct nvgpu_nvhost_dev *nvhost_dev, 311 struct nvgpu_nvhost_dev *nvhost_dev,
313 u32 id, u32 value, bool wfi, 312 u32 id, u32 value,
314 bool need_sync_fence) 313 bool need_sync_fence)
315{ 314{
316 struct gk20a_fence *f = fence_out; 315 struct gk20a_fence *f = fence_out;
@@ -325,7 +324,7 @@ int gk20a_fence_from_syncpt(
325 } 324 }
326#endif 325#endif
327 326
328 gk20a_init_fence(f, &gk20a_syncpt_fence_ops, sync_fence, wfi); 327 gk20a_init_fence(f, &gk20a_syncpt_fence_ops, sync_fence);
329 if (!f) { 328 if (!f) {
330#ifdef CONFIG_SYNC 329#ifdef CONFIG_SYNC
331 if (sync_fence) 330 if (sync_fence)
@@ -347,7 +346,7 @@ int gk20a_fence_from_syncpt(
347int gk20a_fence_from_syncpt( 346int gk20a_fence_from_syncpt(
348 struct gk20a_fence *fence_out, 347 struct gk20a_fence *fence_out,
349 struct nvgpu_nvhost_dev *nvhost_dev, 348 struct nvgpu_nvhost_dev *nvhost_dev,
350 u32 id, u32 value, bool wfi, 349 u32 id, u32 value,
351 bool need_sync_fence) 350 bool need_sync_fence)
352{ 351{
353 return -EINVAL; 352 return -EINVAL;
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h
index 2cddfdd8..277603d1 100644
--- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h
@@ -44,7 +44,6 @@ struct gk20a_fence {
44 /* Valid for all fence types: */ 44 /* Valid for all fence types: */
45 bool valid; 45 bool valid;
46 struct nvgpu_ref ref; 46 struct nvgpu_ref ref;
47 bool wfi;
48 struct sync_fence *sync_fence; 47 struct sync_fence *sync_fence;
49 const struct gk20a_fence_ops *ops; 48 const struct gk20a_fence_ops *ops;
50 49
@@ -68,12 +67,12 @@ int gk20a_fence_from_semaphore(
68 struct sync_timeline *timeline, 67 struct sync_timeline *timeline,
69 struct nvgpu_semaphore *semaphore, 68 struct nvgpu_semaphore *semaphore,
70 struct nvgpu_cond *semaphore_wq, 69 struct nvgpu_cond *semaphore_wq,
71 bool wfi, bool need_sync_fence); 70 bool need_sync_fence);
72 71
73int gk20a_fence_from_syncpt( 72int gk20a_fence_from_syncpt(
74 struct gk20a_fence *fence_out, 73 struct gk20a_fence *fence_out,
75 struct nvgpu_nvhost_dev *nvhost_dev, 74 struct nvgpu_nvhost_dev *nvhost_dev,
76 u32 id, u32 value, bool wfi, 75 u32 id, u32 value,
77 bool need_sync_fence); 76 bool need_sync_fence);
78 77
79int gk20a_alloc_fence_pool( 78int gk20a_alloc_fence_pool(
@@ -88,7 +87,7 @@ struct gk20a_fence *gk20a_alloc_fence(
88 87
89void gk20a_init_fence(struct gk20a_fence *f, 88void gk20a_init_fence(struct gk20a_fence *f,
90 const struct gk20a_fence_ops *ops, 89 const struct gk20a_fence_ops *ops,
91 struct sync_fence *sync_fence, bool wfi); 90 struct sync_fence *sync_fence);
92 91
93/* Fence operations */ 92/* Fence operations */
94void gk20a_fence_put(struct gk20a_fence *f); 93void gk20a_fence_put(struct gk20a_fence *f);