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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
index 025b000e..b47c1010 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
@@ -356,6 +356,7 @@ gk20a_channel_syncpt_create(struct channel_gk20a *c)
356 356
357 nvhost_syncpt_set_min_eq_max_ext(sp->host1x_pdev, sp->id); 357 nvhost_syncpt_set_min_eq_max_ext(sp->host1x_pdev, sp->id);
358 358
359 atomic_set(&sp->ops.refcount, 0);
359 sp->ops.wait_syncpt = gk20a_channel_syncpt_wait_syncpt; 360 sp->ops.wait_syncpt = gk20a_channel_syncpt_wait_syncpt;
360 sp->ops.wait_fd = gk20a_channel_syncpt_wait_fd; 361 sp->ops.wait_fd = gk20a_channel_syncpt_wait_fd;
361 sp->ops.incr = gk20a_channel_syncpt_incr; 362 sp->ops.incr = gk20a_channel_syncpt_incr;
@@ -711,6 +712,7 @@ gk20a_channel_semaphore_create(struct channel_gk20a *c)
711 if (!sema->timeline) 712 if (!sema->timeline)
712 goto clean_up; 713 goto clean_up;
713#endif 714#endif
715 atomic_set(&sema->ops.refcount, 0);
714 sema->ops.wait_syncpt = gk20a_channel_semaphore_wait_syncpt; 716 sema->ops.wait_syncpt = gk20a_channel_semaphore_wait_syncpt;
715 sema->ops.wait_fd = gk20a_channel_semaphore_wait_fd; 717 sema->ops.wait_fd = gk20a_channel_semaphore_wait_fd;
716 sema->ops.incr = gk20a_channel_semaphore_incr; 718 sema->ops.incr = gk20a_channel_semaphore_incr;
@@ -727,6 +729,11 @@ clean_up:
727 return NULL; 729 return NULL;
728} 730}
729 731
732void gk20a_channel_sync_destroy(struct gk20a_channel_sync *sync)
733{
734 sync->destroy(sync);
735}
736
730struct gk20a_channel_sync *gk20a_channel_sync_create(struct channel_gk20a *c) 737struct gk20a_channel_sync *gk20a_channel_sync_create(struct channel_gk20a *c)
731{ 738{
732#ifdef CONFIG_TEGRA_GK20A 739#ifdef CONFIG_TEGRA_GK20A