diff options
author | Richard Zhao <rizhao@nvidia.com> | 2018-03-01 17:47:35 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-06 17:52:43 -0500 |
commit | c6b846d34c1a3a92a856eed33c5a5175885a273a (patch) | |
tree | 0b6f7ad4a4a4c8fe51e60ebcc5b7fd29565158ba /drivers/gpu/nvgpu/common | |
parent | f6cac2e0c4c57295886ea97833cebcd368de3788 (diff) |
gpu: nvgpu: add gops.semaphore_wakeup HAL
vserver handles semaphore differently from native, so it needs a
callback to differentiate from native. Also created common function
mc_gk20a_handle_intr_nonstall to handle all nonstall interrupts.
Jira VQRM-2982
Change-Id: I1b3821717a4005ca4bf2a4dac5dcd335872f48f1
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1656753
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/intr.c | 13 |
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 | } |