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/gk20a | |
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/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mc_gk20a.c | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mc_gk20a.h | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 06739eee..178c1200 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -1097,6 +1097,8 @@ struct gpu_ops { | |||
1097 | int (*shutdown)(struct gk20a *g); | 1097 | int (*shutdown)(struct gk20a *g); |
1098 | int (*early_init)(struct gk20a *g); | 1098 | int (*early_init)(struct gk20a *g); |
1099 | } nvlink; | 1099 | } nvlink; |
1100 | |||
1101 | void (*semaphore_wakeup)(struct gk20a *g, bool post_events); | ||
1100 | }; | 1102 | }; |
1101 | 1103 | ||
1102 | struct nvgpu_bios_ucode { | 1104 | struct nvgpu_bios_ucode { |
diff --git a/drivers/gpu/nvgpu/gk20a/mc_gk20a.c b/drivers/gpu/nvgpu/gk20a/mc_gk20a.c index b99fbdb0..e6d81a87 100644 --- a/drivers/gpu/nvgpu/gk20a/mc_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mc_gk20a.c | |||
@@ -240,3 +240,14 @@ bool mc_gk20a_is_intr1_pending(struct gk20a *g, | |||
240 | 240 | ||
241 | return is_pending; | 241 | return is_pending; |
242 | } | 242 | } |
243 | |||
244 | void mc_gk20a_handle_intr_nonstall(struct gk20a *g, u32 ops) | ||
245 | { | ||
246 | bool semaphore_wakeup, post_events; | ||
247 | |||
248 | semaphore_wakeup = ops & gk20a_nonstall_ops_wakeup_semaphore; | ||
249 | post_events = ops & gk20a_nonstall_ops_post_events; | ||
250 | |||
251 | if (semaphore_wakeup) | ||
252 | g->ops.semaphore_wakeup(g, post_events); | ||
253 | } | ||
diff --git a/drivers/gpu/nvgpu/gk20a/mc_gk20a.h b/drivers/gpu/nvgpu/gk20a/mc_gk20a.h index 1bddab28..870a1d3f 100644 --- a/drivers/gpu/nvgpu/gk20a/mc_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mc_gk20a.h | |||
@@ -40,4 +40,5 @@ void gk20a_mc_reset(struct gk20a *g, u32 units); | |||
40 | u32 gk20a_mc_boot_0(struct gk20a *g, u32 *arch, u32 *impl, u32 *rev); | 40 | u32 gk20a_mc_boot_0(struct gk20a *g, u32 *arch, u32 *impl, u32 *rev); |
41 | bool mc_gk20a_is_intr1_pending(struct gk20a *g, | 41 | bool mc_gk20a_is_intr1_pending(struct gk20a *g, |
42 | enum nvgpu_unit unit, u32 mc_intr_1); | 42 | enum nvgpu_unit unit, u32 mc_intr_1); |
43 | void mc_gk20a_handle_intr_nonstall(struct gk20a *g, u32 ops); | ||
43 | #endif | 44 | #endif |