summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/intr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/intr.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/intr.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/intr.c b/drivers/gpu/nvgpu/common/linux/intr.c
index d1b6ef36..6b4b2dc9 100644
--- a/drivers/gpu/nvgpu/common/linux/intr.c
+++ b/drivers/gpu/nvgpu/common/linux/intr.c
@@ -15,6 +15,7 @@
15#include <linux/irqreturn.h> 15#include <linux/irqreturn.h>
16 16
17#include "gk20a/gk20a.h" 17#include "gk20a/gk20a.h"
18#include "gk20a/mc_gk20a.h"
18 19
19#include <nvgpu/atomic.h> 20#include <nvgpu/atomic.h>
20#include <nvgpu/unit.h> 21#include <nvgpu/unit.h>
@@ -138,17 +139,11 @@ void nvgpu_intr_nonstall_cb(struct work_struct *work)
138 struct nvgpu_os_linux *l = 139 struct nvgpu_os_linux *l =
139 container_of(work, struct nvgpu_os_linux, nonstall_fn_work); 140 container_of(work, struct nvgpu_os_linux, nonstall_fn_work);
140 struct gk20a *g = &l->g; 141 struct gk20a *g = &l->g;
141 u32 ops;
142 bool semaphore_wakeup, post_events;
143 142
144 do { 143 do {
145 ops = atomic_xchg(&l->nonstall_ops, 0); 144 u32 ops;
146
147 semaphore_wakeup = ops & gk20a_nonstall_ops_wakeup_semaphore;
148 post_events = ops & gk20a_nonstall_ops_post_events;
149
150 if (semaphore_wakeup)
151 gk20a_channel_semaphore_wakeup(g, post_events);
152 145
146 ops = atomic_xchg(&l->nonstall_ops, 0);
147 mc_gk20a_handle_intr_nonstall(g, ops);
153 } while (atomic_read(&l->nonstall_ops) != 0); 148 } while (atomic_read(&l->nonstall_ops) != 0);
154} 149}