From 43de9024fe1ceb204ec0802ffd442b2d30c90324 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 24 Dec 2015 14:59:04 +0530 Subject: gpu: nvgpu: API to post channel events Add new API gk20a_channel_post_event() which adds channel event and also calls wake_up() for channel's semaphore wq Bug 200156699 Change-Id: If56f1bf8edcce79c9248809f8476ed853b7d2d9d Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/927132 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 53b85ad8..444fec13 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -2501,6 +2501,12 @@ void gk20a_channel_event(struct channel_gk20a *ch) mutex_unlock(&ch->poll_events.lock); } +void gk20a_channel_post_event(struct channel_gk20a *ch) +{ + gk20a_channel_event(ch); + wake_up_interruptible_all(&ch->semaphore_wq); +} + unsigned int gk20a_channel_poll(struct file *filep, poll_table *wait) { unsigned int mask = 0; @@ -2656,8 +2662,7 @@ void gk20a_channel_semaphore_wakeup(struct gk20a *g) for (chid = 0; chid < f->num_channels; chid++) { struct channel_gk20a *c = g->fifo.channel+chid; if (gk20a_channel_get(c)) { - gk20a_channel_event(c); - wake_up_interruptible_all(&c->semaphore_wq); + gk20a_channel_post_event(c); gk20a_channel_update(c, 0); gk20a_channel_put(c); } -- cgit v1.2.2