summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2015-12-28 08:06:11 -0500
committerSachin Nikam <snikam@nvidia.com>2016-01-13 02:01:21 -0500
commite8ebe36a2558d8a71e292986e2f286e94ed7da0a (patch)
tree578e76510e3bbd74a2ecb57c96d8d93f8d0f9002 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parent997f92566a9bfb4903490e79355f032597c92775 (diff)
gpu: nvgpu: API to push fecs sideband methods
Add new API gr_gk20a_submit_fecs_sideband_method_op() to support pushing fecs sideband methods Bug 200156699 Change-Id: Ibacd7d03e05b3b67416aa2148a741ffc6e2215c9 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/927135 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 152d3f5e..55262a8f 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -535,6 +535,32 @@ int gr_gk20a_submit_fecs_method_op(struct gk20a *g,
535 return ret; 535 return ret;
536} 536}
537 537
538/* Sideband mailbox writes are done a bit differently */
539int gr_gk20a_submit_fecs_sideband_method_op(struct gk20a *g,
540 struct fecs_method_op_gk20a op)
541{
542 struct gr_gk20a *gr = &g->gr;
543 int ret;
544
545 mutex_lock(&gr->fecs_mutex);
546
547 gk20a_writel(g, gr_fecs_ctxsw_mailbox_clear_r(op.mailbox.id),
548 gr_fecs_ctxsw_mailbox_clear_value_f(op.mailbox.clr));
549
550 gk20a_writel(g, gr_fecs_method_data_r(), op.method.data);
551 gk20a_writel(g, gr_fecs_method_push_r(),
552 gr_fecs_method_push_adr_f(op.method.addr));
553
554 ret = gr_gk20a_ctx_wait_ucode(g, op.mailbox.id, op.mailbox.ret,
555 op.cond.ok, op.mailbox.ok,
556 op.cond.fail, op.mailbox.fail,
557 false);
558
559 mutex_unlock(&gr->fecs_mutex);
560
561 return ret;
562}
563
538static int gr_gk20a_ctrl_ctxsw(struct gk20a *g, u32 fecs_method, u32 *ret) 564static int gr_gk20a_ctrl_ctxsw(struct gk20a *g, u32 fecs_method, u32 *ret)
539{ 565{
540 return gr_gk20a_submit_fecs_method_op(g, 566 return gr_gk20a_submit_fecs_method_op(g,