summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h2
-rw-r--r--drivers/gpu/nvgpu/gk20a/mc_gk20a.c11
-rw-r--r--drivers/gpu/nvgpu/gk20a/mc_gk20a.h1
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
1102struct nvgpu_bios_ucode { 1104struct 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
244void 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);
40u32 gk20a_mc_boot_0(struct gk20a *g, u32 *arch, u32 *impl, u32 *rev); 40u32 gk20a_mc_boot_0(struct gk20a *g, u32 *arch, u32 *impl, u32 *rev);
41bool mc_gk20a_is_intr1_pending(struct gk20a *g, 41bool 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);
43void mc_gk20a_handle_intr_nonstall(struct gk20a *g, u32 ops);
43#endif 44#endif