From f50c2af8a7d147855e5537531078bb03740abb67 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Wed, 10 Jan 2018 14:26:27 +0200 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1636344 Reviewed-by: svc-mobile-coverity Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 9 ++++----- drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 13 ++++++------- drivers/gpu/nvgpu/gk20a/fence_gk20a.h | 7 +++---- 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, } err = gk20a_fence_from_syncpt(fence, sp->nvhost_dev, sp->id, thresh, - wfi_cmd, need_sync_fence); + need_sync_fence); if (err) goto clean_up_priv_cmd; @@ -648,7 +648,7 @@ static int gk20a_channel_semaphore_wait_fd( sema->timeline, fp_sema, &c->semaphore_wq, - false, false); + false); if (err) { nvgpu_semaphore_put(fp_sema); goto clean_up_priv_cmd; @@ -658,7 +658,7 @@ static int gk20a_channel_semaphore_wait_fd( * Init an empty fence. It will instantly return * from gk20a_fence_wait(). */ - gk20a_init_fence(fence, NULL, NULL, false); + gk20a_init_fence(fence, NULL, NULL); sync_fence_put(sync_fence); goto skip_slow_path; @@ -708,7 +708,7 @@ static int gk20a_channel_semaphore_wait_fd( * already signaled */ err = gk20a_fence_from_semaphore(c->g, fence, sema->timeline, w->sema, - &c->semaphore_wq, false, false); + &c->semaphore_wq, false); if (err) goto clean_up_sema; @@ -785,7 +785,6 @@ static int __gk20a_channel_semaphore_incr( err = gk20a_fence_from_semaphore(c->g, fence, sp->timeline, semaphore, &c->semaphore_wq, - wfi_cmd, need_sync_fence); if (err) 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) void gk20a_init_fence(struct gk20a_fence *f, const struct gk20a_fence_ops *ops, - struct sync_fence *sync_fence, bool wfi) + struct sync_fence *sync_fence) { if (!f) return; f->ops = ops; f->sync_fence = sync_fence; - f->wfi = wfi; f->syncpt_id = -1; } @@ -235,7 +234,7 @@ int gk20a_fence_from_semaphore( struct sync_timeline *timeline, struct nvgpu_semaphore *semaphore, struct nvgpu_cond *semaphore_wq, - bool wfi, bool need_sync_fence) + bool need_sync_fence) { struct gk20a_fence *f = fence_out; struct sync_fence *sync_fence = NULL; @@ -250,7 +249,7 @@ int gk20a_fence_from_semaphore( } #endif - gk20a_init_fence(f, &nvgpu_semaphore_fence_ops, sync_fence, wfi); + gk20a_init_fence(f, &nvgpu_semaphore_fence_ops, sync_fence); if (!f) { #ifdef CONFIG_SYNC if (sync_fence) @@ -310,7 +309,7 @@ static const struct gk20a_fence_ops gk20a_syncpt_fence_ops = { int gk20a_fence_from_syncpt( struct gk20a_fence *fence_out, struct nvgpu_nvhost_dev *nvhost_dev, - u32 id, u32 value, bool wfi, + u32 id, u32 value, bool need_sync_fence) { struct gk20a_fence *f = fence_out; @@ -325,7 +324,7 @@ int gk20a_fence_from_syncpt( } #endif - gk20a_init_fence(f, &gk20a_syncpt_fence_ops, sync_fence, wfi); + gk20a_init_fence(f, &gk20a_syncpt_fence_ops, sync_fence); if (!f) { #ifdef CONFIG_SYNC if (sync_fence) @@ -347,7 +346,7 @@ int gk20a_fence_from_syncpt( int gk20a_fence_from_syncpt( struct gk20a_fence *fence_out, struct nvgpu_nvhost_dev *nvhost_dev, - u32 id, u32 value, bool wfi, + u32 id, u32 value, bool need_sync_fence) { 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 { /* Valid for all fence types: */ bool valid; struct nvgpu_ref ref; - bool wfi; struct sync_fence *sync_fence; const struct gk20a_fence_ops *ops; @@ -68,12 +67,12 @@ int gk20a_fence_from_semaphore( struct sync_timeline *timeline, struct nvgpu_semaphore *semaphore, struct nvgpu_cond *semaphore_wq, - bool wfi, bool need_sync_fence); + bool need_sync_fence); int gk20a_fence_from_syncpt( struct gk20a_fence *fence_out, struct nvgpu_nvhost_dev *nvhost_dev, - u32 id, u32 value, bool wfi, + u32 id, u32 value, bool need_sync_fence); int gk20a_alloc_fence_pool( @@ -88,7 +87,7 @@ struct gk20a_fence *gk20a_alloc_fence( void gk20a_init_fence(struct gk20a_fence *f, const struct gk20a_fence_ops *ops, - struct sync_fence *sync_fence, bool wfi); + struct sync_fence *sync_fence); /* Fence operations */ void gk20a_fence_put(struct gk20a_fence *f); -- cgit v1.2.2