summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorsujeet baranwal <sbaranwal@nvidia.com>2015-08-11 19:40:54 -0400
committerBharat Nihalani <bnihalani@nvidia.com>2015-08-15 01:08:09 -0400
commit2b0e5ed3615d74afca55454decab79a381dfe5e8 (patch)
tree59bdc991a1043bd5656d9a0a280b56164b8fe0e3 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parentaef94648e256760806a9a38bb017a793e44a82ca (diff)
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>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 472dcc26..c36f2551 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -5612,17 +5612,17 @@ clean_up:
5612int gk20a_gr_nonstall_isr(struct gk20a *g) 5612int gk20a_gr_nonstall_isr(struct gk20a *g)
5613{ 5613{
5614 u32 gr_intr = gk20a_readl(g, gr_intr_nonstall_r()); 5614 u32 gr_intr = gk20a_readl(g, gr_intr_nonstall_r());
5615 u32 clear_intr = 0;
5616 5615
5617 gk20a_dbg(gpu_dbg_intr, "pgraph nonstall intr %08x", gr_intr); 5616 gk20a_dbg(gpu_dbg_intr, "pgraph nonstall intr %08x", gr_intr);
5618 5617
5619 if (gr_intr & gr_intr_nonstall_trap_pending_f()) { 5618 if (gr_intr & gr_intr_nonstall_trap_pending_f()) {
5619 /* Clear the interrupt */
5620 gk20a_writel(g, gr_intr_nonstall_r(),
5621 gr_intr_nonstall_trap_pending_f());
5622 /* Wakeup all the waiting channels */
5620 gk20a_channel_semaphore_wakeup(g); 5623 gk20a_channel_semaphore_wakeup(g);
5621 clear_intr |= gr_intr_nonstall_trap_pending_f();
5622 } 5624 }
5623 5625
5624 gk20a_writel(g, gr_intr_nonstall_r(), clear_intr);
5625
5626 return 0; 5626 return 0;
5627} 5627}
5628 5628