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, 14 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
index 73b2d7ec..a488178f 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
@@ -271,6 +271,13 @@ static void gk20a_channel_syncpt_signal_timeline(
271 /* Nothing to do. */ 271 /* Nothing to do. */
272} 272}
273 273
274static int gk20a_channel_syncpt_id(struct gk20a_channel_sync *s)
275{
276 struct gk20a_channel_syncpt *sp =
277 container_of(s, struct gk20a_channel_syncpt, ops);
278 return sp->id;
279}
280
274static void gk20a_channel_syncpt_destroy(struct gk20a_channel_sync *s) 281static void gk20a_channel_syncpt_destroy(struct gk20a_channel_sync *s)
275{ 282{
276 struct gk20a_channel_syncpt *sp = 283 struct gk20a_channel_syncpt *sp =
@@ -306,6 +313,7 @@ gk20a_channel_syncpt_create(struct channel_gk20a *c)
306 sp->ops.incr_user = gk20a_channel_syncpt_incr_user; 313 sp->ops.incr_user = gk20a_channel_syncpt_incr_user;
307 sp->ops.set_min_eq_max = gk20a_channel_syncpt_set_min_eq_max; 314 sp->ops.set_min_eq_max = gk20a_channel_syncpt_set_min_eq_max;
308 sp->ops.signal_timeline = gk20a_channel_syncpt_signal_timeline; 315 sp->ops.signal_timeline = gk20a_channel_syncpt_signal_timeline;
316 sp->ops.syncpt_id = gk20a_channel_syncpt_id;
309 sp->ops.destroy = gk20a_channel_syncpt_destroy; 317 sp->ops.destroy = gk20a_channel_syncpt_destroy;
310 318
311 sp->ops.aggressive_destroy = true; 319 sp->ops.aggressive_destroy = true;
@@ -587,6 +595,11 @@ static void gk20a_channel_semaphore_signal_timeline(
587 gk20a_sync_timeline_signal(sp->timeline); 595 gk20a_sync_timeline_signal(sp->timeline);
588} 596}
589 597
598static int gk20a_channel_semaphore_syncpt_id(struct gk20a_channel_sync *s)
599{
600 return -EINVAL;
601}
602
590static void gk20a_channel_semaphore_destroy(struct gk20a_channel_sync *s) 603static void gk20a_channel_semaphore_destroy(struct gk20a_channel_sync *s)
591{ 604{
592 struct gk20a_channel_semaphore *sema = 605 struct gk20a_channel_semaphore *sema =
@@ -645,6 +658,7 @@ gk20a_channel_semaphore_create(struct channel_gk20a *c)
645 sema->ops.incr_user = gk20a_channel_semaphore_incr_user; 658 sema->ops.incr_user = gk20a_channel_semaphore_incr_user;
646 sema->ops.set_min_eq_max = gk20a_channel_semaphore_set_min_eq_max; 659 sema->ops.set_min_eq_max = gk20a_channel_semaphore_set_min_eq_max;
647 sema->ops.signal_timeline = gk20a_channel_semaphore_signal_timeline; 660 sema->ops.signal_timeline = gk20a_channel_semaphore_signal_timeline;
661 sema->ops.syncpt_id = gk20a_channel_semaphore_syncpt_id;
648 sema->ops.destroy = gk20a_channel_semaphore_destroy; 662 sema->ops.destroy = gk20a_channel_semaphore_destroy;
649 663
650 /* Aggressively destroying the semaphore sync would cause overhead 664 /* Aggressively destroying the semaphore sync would cause overhead