diff options
author | Sachit Kadle <skadle@nvidia.com> | 2016-11-14 19:26:40 -0500 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:51 -0500 |
commit | 108c98a7d011f6ba275ff039193e5bc35e061e24 (patch) | |
tree | 0aad82dc62966536b4f7473ad1711c010aceee5d /drivers/gpu/nvgpu/gp10b/ce_gp10b.c | |
parent | 06a03fba267ce34c3a601941f25476ae937da1fc (diff) |
gpu: nvgpu: gp10b: clear ce isr before wakeup
In gp10b_ce_nonstall_isr(), we trigger a semaphore wakeup.
Currently, we clear the interrupt status register after the
wakeup is complete. There is potential for an interrupt to
come in while the wake-up operation is in progress, and it
is possible that:
1) We miss processing the interrupt in that ISR iteration AND
2) We clear the interrupt status register anyways
This change clears the status register before triggering wakeup,
so the interrupt will properly re-fire.
Bug 200244458
Change-Id: Ia3338252eeea4eb60d11c0e241279989a46dac04
Signed-off-by: Sachit Kadle <skadle@nvidia.com>
Reviewed-on: http://git-master/r/1253107
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/ce_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/ce_gp10b.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/ce_gp10b.c b/drivers/gpu/nvgpu/gp10b/ce_gp10b.c index a35c9817..e5082778 100644 --- a/drivers/gpu/nvgpu/gp10b/ce_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/ce_gp10b.c | |||
@@ -20,13 +20,13 @@ | |||
20 | #include "hw_ce_gp10b.h" | 20 | #include "hw_ce_gp10b.h" |
21 | #include "ce_gp10b.h" | 21 | #include "ce_gp10b.h" |
22 | 22 | ||
23 | static u32 ce_nonblockpipe_isr(struct gk20a *g, u32 fifo_intr) | 23 | static void ce_nonblockpipe_isr(struct gk20a *g, u32 fifo_intr) |
24 | { | 24 | { |
25 | gk20a_dbg(gpu_dbg_intr, "ce non-blocking pipe interrupt\n"); | 25 | gk20a_dbg(gpu_dbg_intr, "ce non-blocking pipe interrupt\n"); |
26 | 26 | ||
27 | /* wake theads waiting in this channel */ | 27 | /* wake theads waiting in this channel */ |
28 | gk20a_channel_semaphore_wakeup(g, true); | 28 | gk20a_channel_semaphore_wakeup(g, true); |
29 | return ce_intr_status_nonblockpipe_pending_f(); | 29 | return; |
30 | } | 30 | } |
31 | 31 | ||
32 | static u32 ce_blockpipe_isr(struct gk20a *g, u32 fifo_intr) | 32 | static u32 ce_blockpipe_isr(struct gk20a *g, u32 fifo_intr) |
@@ -64,14 +64,14 @@ static void gp10b_ce_isr(struct gk20a *g, u32 inst_id, u32 pri_base) | |||
64 | static void gp10b_ce_nonstall_isr(struct gk20a *g, u32 inst_id, u32 pri_base) | 64 | static void gp10b_ce_nonstall_isr(struct gk20a *g, u32 inst_id, u32 pri_base) |
65 | { | 65 | { |
66 | u32 ce_intr = gk20a_readl(g, ce_intr_status_r(inst_id)); | 66 | u32 ce_intr = gk20a_readl(g, ce_intr_status_r(inst_id)); |
67 | u32 clear_intr = 0; | ||
68 | 67 | ||
69 | gk20a_dbg(gpu_dbg_intr, "ce nonstall isr %08x %08x\n", ce_intr, inst_id); | 68 | gk20a_dbg(gpu_dbg_intr, "ce nonstall isr %08x %08x\n", ce_intr, inst_id); |
70 | 69 | ||
71 | if (ce_intr & ce_intr_status_nonblockpipe_pending_f()) | 70 | if (ce_intr & ce_intr_status_nonblockpipe_pending_f()) { |
72 | clear_intr |= ce_nonblockpipe_isr(g, ce_intr); | 71 | gk20a_writel(g, ce_intr_status_r(inst_id), |
73 | 72 | ce_intr_status_nonblockpipe_pending_f()); | |
74 | gk20a_writel(g, ce_intr_status_r(inst_id), clear_intr); | 73 | ce_nonblockpipe_isr(g, ce_intr); |
74 | } | ||
75 | 75 | ||
76 | return; | 76 | return; |
77 | } | 77 | } |