summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gr_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gr_vgpu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
index a001b54e..e3dfb874 100644
--- a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
@@ -35,7 +35,7 @@ static void vgpu_gr_detect_sm_arch(struct gk20a *g)
35 priv->constants.sm_arch_warp_count; 35 priv->constants.sm_arch_warp_count;
36} 36}
37 37
38static int vgpu_gr_commit_inst(struct channel_gk20a *c, u64 gpu_va) 38int vgpu_gr_commit_inst(struct channel_gk20a *c, u64 gpu_va)
39{ 39{
40 struct tegra_vgpu_cmd_msg msg; 40 struct tegra_vgpu_cmd_msg msg;
41 struct tegra_vgpu_ch_ctx_params *p = &msg.params.ch_ctx; 41 struct tegra_vgpu_ch_ctx_params *p = &msg.params.ch_ctx;
@@ -422,6 +422,8 @@ static void vgpu_gr_free_channel_ctx(struct channel_gk20a *c)
422{ 422{
423 gk20a_dbg_fn(""); 423 gk20a_dbg_fn("");
424 424
425 if (c->g->ops.fifo.free_channel_ctx_header)
426 c->g->ops.fifo.free_channel_ctx_header(c);
425 vgpu_gr_unmap_global_ctx_buffers(c); 427 vgpu_gr_unmap_global_ctx_buffers(c);
426 vgpu_gr_free_channel_patch_ctx(c); 428 vgpu_gr_free_channel_patch_ctx(c);
427 vgpu_gr_free_channel_pm_ctx(c); 429 vgpu_gr_free_channel_pm_ctx(c);
@@ -551,7 +553,7 @@ static int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c,
551 } 553 }
552 554
553 /* commit gr ctx buffer */ 555 /* commit gr ctx buffer */
554 err = vgpu_gr_commit_inst(c, ch_ctx->gr_ctx->mem.gpu_va); 556 err = g->ops.gr.commit_inst(c, ch_ctx->gr_ctx->mem.gpu_va);
555 if (err) { 557 if (err) {
556 nvgpu_err(g, "fail to commit gr ctx buffer"); 558 nvgpu_err(g, "fail to commit gr ctx buffer");
557 goto out; 559 goto out;
@@ -1227,6 +1229,7 @@ void vgpu_init_gr_ops(struct gpu_ops *gops)
1227 gops->gr.clear_sm_error_state = vgpu_gr_clear_sm_error_state; 1229 gops->gr.clear_sm_error_state = vgpu_gr_clear_sm_error_state;
1228 gops->gr.suspend_contexts = vgpu_gr_suspend_contexts; 1230 gops->gr.suspend_contexts = vgpu_gr_suspend_contexts;
1229 gops->gr.resume_contexts = vgpu_gr_resume_contexts; 1231 gops->gr.resume_contexts = vgpu_gr_resume_contexts;
1232 gops->gr.commit_inst = vgpu_gr_commit_inst;
1230 gops->gr.dump_gr_regs = NULL; 1233 gops->gr.dump_gr_regs = NULL;
1231 gops->gr.set_boosted_ctx = NULL; 1234 gops->gr.set_boosted_ctx = NULL;
1232 gops->gr.update_boosted_ctx = NULL; 1235 gops->gr.update_boosted_ctx = NULL;