From 16658fd39da9021aeec08fe11c56d7877f723da7 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 17 Mar 2016 20:18:06 +0530 Subject: gpu: nvgpu: post BPT_INT/PAUSE and BLOCKING_SYNC events Post EVENT_ID_BPT_INT when bpt.int is pending Post EVENT_ID_BPT_PAUSE when bpt.pause is pending Post EVENT_ID_BLOCKING_SYNC whenever there is non-stalling semaphore interrupt indicating work completion from GR/CE2 engine Bug 200089620 Change-Id: I91b7bf48f8585f0d318298fc0c4a66d42055f0a7 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1112274 (cherry picked from commit d2b744b1f9acac56435cd7e7ab9a7a845579ef24) Reviewed-on: http://git-master/r/1120321 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (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 468ee7f1..da73d95d 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -2831,7 +2831,7 @@ int gk20a_channel_resume(struct gk20a *g) return 0; } -void gk20a_channel_semaphore_wakeup(struct gk20a *g) +void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events) { struct fifo_gk20a *f = &g->fifo; u32 chid; @@ -2842,6 +2842,18 @@ void gk20a_channel_semaphore_wakeup(struct gk20a *g) struct channel_gk20a *c = g->fifo.channel+chid; if (gk20a_channel_get(c)) { wake_up_interruptible_all(&c->semaphore_wq); + if (post_events) { + if (gk20a_is_channel_marked_as_tsg(c)) { + struct tsg_gk20a *tsg = + &g->fifo.tsg[c->tsgid]; + + gk20a_tsg_event_id_post_event(tsg, + NVGPU_IOCTL_CHANNEL_EVENT_ID_BLOCKING_SYNC); + } else { + gk20a_channel_event_id_post_event(c, + NVGPU_IOCTL_CHANNEL_EVENT_ID_BLOCKING_SYNC); + } + } gk20a_channel_update(c, 0); gk20a_channel_put(c); } -- cgit v1.2.2