gpu: nvgpu: wakeup semaphores after clearing the interrupt

Currently, we first invoke semaphore workqueue on all channels
and then clear the interrupt
This delay in clearing the interrupt can sometimes lead to
dropping of new interrupt

If that happens, we never invoke gk20a_channel_semaphore_wakeup()
for new semaphore interrupts and semaphore waiting
never completes.

Fix this by moving gk20a_channel_semaphore_wakeup() after
we clear the interrupt

Bug 200083084
Bug 200117718

Change-Id: I7278cb378728e3799961411c4ed71d266d178a32
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Signed-off-by: sujeet baranwal <sbaranwal@nvidia.com>
Reviewed-on: http://git-master/r/783175
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
This commit is contained in:
sujeet baranwal
2015-08-11 16:40:54 -07:00
committed by Bharat Nihalani
parent aef94648e2
commit 2b0e5ed361

View File

@@ -5612,17 +5612,17 @@ clean_up:
int gk20a_gr_nonstall_isr(struct gk20a *g)
{
u32 gr_intr = gk20a_readl(g, gr_intr_nonstall_r());
u32 clear_intr = 0;
gk20a_dbg(gpu_dbg_intr, "pgraph nonstall intr %08x", gr_intr);
if (gr_intr & gr_intr_nonstall_trap_pending_f()) {
/* Clear the interrupt */
gk20a_writel(g, gr_intr_nonstall_r(),
gr_intr_nonstall_trap_pending_f());
/* Wakeup all the waiting channels */
gk20a_channel_semaphore_wakeup(g);
clear_intr |= gr_intr_nonstall_trap_pending_f();
}
gk20a_writel(g, gr_intr_nonstall_r(), clear_intr);
return 0;
}