summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2015-02-23 23:51:18 -0500
committerAlexander Van Brunt <avanbrunt@nvidia.com>2015-05-05 16:55:35 -0400
commit9bbffa11de08a96f7f0f1df887bca1e22a85e0f0 (patch)
tree6927538a71607c6744a14318af9dce986a36c386 /drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
parent6e1dfd0131a7db58c2bf4ccf0809c76edb2e8804 (diff)
gpu: nvgpu: Reconfigure instance block with syncpt
Resetup RAMFC once sync point id is allocated for a channel. Change-Id: Idbac406bea1c94c89ef587dda08fddc740c1fadb Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/711302 Reviewed-on: http://git-master/r/737526 Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com> Tested-by: Alexander Van Brunt <avanbrunt@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
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