From 4f40637c580c5f25f34f45c2c16b5332104897bc Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Tue, 24 Apr 2018 10:38:30 +0530 Subject: gpu: nvgpu: remove sync_fence dependencies from fence_gk20a Replaced all instances of sync_fence in gk20a_fence* code with nvgpu_os_fence. Added the API install_fence for the nvgpu_os_fence abstraction. sync_fence mechanism and its dependencies are completely removed from the fence_gk20a methods. Due to the recent os_fence changes and the changes to fence_gk20a, we can finally get rid of all the CONFIG_SYNCS present in the submit path. JIRA NVGPU-66 Change-Id: I3551dab04b93b1e94db83fc102a41872be89e9ed Signed-off-by: Debarshi Dutta Reviewed-on: https://git-master.nvidia.com/r/1701245 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 16898593..a2047444 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c @@ -37,10 +37,6 @@ #include "sync_gk20a.h" #include "mm_gk20a.h" -#ifdef CONFIG_SYNC -#include "../drivers/staging/android/sync.h" -#endif - #ifdef CONFIG_TEGRA_GK20A_NVHOST struct gk20a_channel_syncpt { @@ -145,7 +141,6 @@ static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s, struct gk20a_channel_syncpt *sp = container_of(s, struct gk20a_channel_syncpt, ops); struct channel_gk20a *c = sp->c; - struct sync_fence *sync_fence = NULL; struct nvgpu_os_fence os_fence = {0}; err = gk20a_channel_alloc_priv_cmdbuf(c, @@ -194,12 +189,10 @@ static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s, if (err) goto clean_up_priv_cmd; - - sync_fence = (struct sync_fence *)os_fence.priv; } err = gk20a_fence_from_syncpt(fence, sp->nvhost_dev, - sp->id, thresh, sync_fence); + sp->id, thresh, os_fence); if (err) { if (nvgpu_os_fence_is_initialized(&os_fence)) @@ -494,7 +487,6 @@ static int __gk20a_channel_semaphore_incr( struct channel_gk20a *c = sp->c; struct nvgpu_semaphore *semaphore; int err = 0; - struct sync_fence *sync_fence = NULL; struct nvgpu_os_fence os_fence = {0}; semaphore = nvgpu_semaphore_alloc(c); @@ -521,14 +513,12 @@ static int __gk20a_channel_semaphore_incr( if (err) goto clean_up_sema; - - sync_fence = (struct sync_fence *)os_fence.priv; } err = gk20a_fence_from_semaphore(fence, semaphore, &c->semaphore_wq, - sync_fence); + os_fence); if (err) { if (nvgpu_os_fence_is_initialized(&os_fence)) -- cgit v1.2.2