From 9bbffa11de08a96f7f0f1df887bca1e22a85e0f0 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 23 Feb 2015 20:51:18 -0800 Subject: 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 Reviewed-on: http://git-master/r/711302 Reviewed-on: http://git-master/r/737526 Reviewed-by: Alexander Van Brunt Tested-by: Alexander Van Brunt Reviewed-by: Automatic_Commit_Validation_User --- drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (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 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( /* Nothing to do. */ } +static int gk20a_channel_syncpt_id(struct gk20a_channel_sync *s) +{ + struct gk20a_channel_syncpt *sp = + container_of(s, struct gk20a_channel_syncpt, ops); + return sp->id; +} + static void gk20a_channel_syncpt_destroy(struct gk20a_channel_sync *s) { struct gk20a_channel_syncpt *sp = @@ -306,6 +313,7 @@ gk20a_channel_syncpt_create(struct channel_gk20a *c) sp->ops.incr_user = gk20a_channel_syncpt_incr_user; sp->ops.set_min_eq_max = gk20a_channel_syncpt_set_min_eq_max; sp->ops.signal_timeline = gk20a_channel_syncpt_signal_timeline; + sp->ops.syncpt_id = gk20a_channel_syncpt_id; sp->ops.destroy = gk20a_channel_syncpt_destroy; sp->ops.aggressive_destroy = true; @@ -587,6 +595,11 @@ static void gk20a_channel_semaphore_signal_timeline( gk20a_sync_timeline_signal(sp->timeline); } +static int gk20a_channel_semaphore_syncpt_id(struct gk20a_channel_sync *s) +{ + return -EINVAL; +} + static void gk20a_channel_semaphore_destroy(struct gk20a_channel_sync *s) { struct gk20a_channel_semaphore *sema = @@ -645,6 +658,7 @@ gk20a_channel_semaphore_create(struct channel_gk20a *c) sema->ops.incr_user = gk20a_channel_semaphore_incr_user; sema->ops.set_min_eq_max = gk20a_channel_semaphore_set_min_eq_max; sema->ops.signal_timeline = gk20a_channel_semaphore_signal_timeline; + sema->ops.syncpt_id = gk20a_channel_semaphore_syncpt_id; sema->ops.destroy = gk20a_channel_semaphore_destroy; /* Aggressively destroying the semaphore sync would cause overhead -- cgit v1.2.2