summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c14
1 files changed, 2 insertions, 12 deletions
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 @@
37#include "sync_gk20a.h" 37#include "sync_gk20a.h"
38#include "mm_gk20a.h" 38#include "mm_gk20a.h"
39 39
40#ifdef CONFIG_SYNC
41#include "../drivers/staging/android/sync.h"
42#endif
43
44#ifdef CONFIG_TEGRA_GK20A_NVHOST 40#ifdef CONFIG_TEGRA_GK20A_NVHOST
45 41
46struct gk20a_channel_syncpt { 42struct gk20a_channel_syncpt {
@@ -145,7 +141,6 @@ static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s,
145 struct gk20a_channel_syncpt *sp = 141 struct gk20a_channel_syncpt *sp =
146 container_of(s, struct gk20a_channel_syncpt, ops); 142 container_of(s, struct gk20a_channel_syncpt, ops);
147 struct channel_gk20a *c = sp->c; 143 struct channel_gk20a *c = sp->c;
148 struct sync_fence *sync_fence = NULL;
149 struct nvgpu_os_fence os_fence = {0}; 144 struct nvgpu_os_fence os_fence = {0};
150 145
151 err = gk20a_channel_alloc_priv_cmdbuf(c, 146 err = gk20a_channel_alloc_priv_cmdbuf(c,
@@ -194,12 +189,10 @@ static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s,
194 189
195 if (err) 190 if (err)
196 goto clean_up_priv_cmd; 191 goto clean_up_priv_cmd;
197
198 sync_fence = (struct sync_fence *)os_fence.priv;
199 } 192 }
200 193
201 err = gk20a_fence_from_syncpt(fence, sp->nvhost_dev, 194 err = gk20a_fence_from_syncpt(fence, sp->nvhost_dev,
202 sp->id, thresh, sync_fence); 195 sp->id, thresh, os_fence);
203 196
204 if (err) { 197 if (err) {
205 if (nvgpu_os_fence_is_initialized(&os_fence)) 198 if (nvgpu_os_fence_is_initialized(&os_fence))
@@ -494,7 +487,6 @@ static int __gk20a_channel_semaphore_incr(
494 struct channel_gk20a *c = sp->c; 487 struct channel_gk20a *c = sp->c;
495 struct nvgpu_semaphore *semaphore; 488 struct nvgpu_semaphore *semaphore;
496 int err = 0; 489 int err = 0;
497 struct sync_fence *sync_fence = NULL;
498 struct nvgpu_os_fence os_fence = {0}; 490 struct nvgpu_os_fence os_fence = {0};
499 491
500 semaphore = nvgpu_semaphore_alloc(c); 492 semaphore = nvgpu_semaphore_alloc(c);
@@ -521,14 +513,12 @@ static int __gk20a_channel_semaphore_incr(
521 513
522 if (err) 514 if (err)
523 goto clean_up_sema; 515 goto clean_up_sema;
524
525 sync_fence = (struct sync_fence *)os_fence.priv;
526 } 516 }
527 517
528 err = gk20a_fence_from_semaphore(fence, 518 err = gk20a_fence_from_semaphore(fence,
529 semaphore, 519 semaphore,
530 &c->semaphore_wq, 520 &c->semaphore_wq,
531 sync_fence); 521 os_fence);
532 522
533 if (err) { 523 if (err) {
534 if (nvgpu_os_fence_is_initialized(&os_fence)) 524 if (nvgpu_os_fence_is_initialized(&os_fence))