summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2014-09-10 10:23:31 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:11:19 -0400
commitad178917259b30330e8432e2cd33d50c03e9602b (patch)
tree194c769517bfa3707bd0fb8f0b89e5d00f4ea5f4 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parent91ada92f61eeb41026a678b58863acafa7a33674 (diff)
gpu: nvgpu: implement poll() for semaphores
Add poll interface and control ioctls for waiting for GPU job completion via semaphores. Poll on a gk20a channel file waits for events from pending semaphore interrupts (stalling) of that channel. New ioctls enable and disable the events, and clear a single interrupt event so that next poll doesn't wake up for it again. Bug 1528781 Change-Id: I5c6238966b5d0900c8ab263c6a7f8f2611901f33 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/497750 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index f5c3bd62..db655c32 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -5075,6 +5075,7 @@ static int gk20a_gr_handle_semaphore_pending(struct gk20a *g,
5075 struct fifo_gk20a *f = &g->fifo; 5075 struct fifo_gk20a *f = &g->fifo;
5076 struct channel_gk20a *ch = &f->channel[isr_data->chid]; 5076 struct channel_gk20a *ch = &f->channel[isr_data->chid];
5077 5077
5078 gk20a_channel_event(ch);
5078 wake_up(&ch->semaphore_wq); 5079 wake_up(&ch->semaphore_wq);
5079 5080
5080 return 0; 5081 return 0;