summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorThomas Fleury <tfleury@nvidia.com>2016-06-21 13:38:30 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-06-28 13:00:10 -0400
commitb30990ea6db564e885d5aee7a1a5ea87a1e5e8ee (patch)
treefec2728f0ca811960ed7be07c9f15093bc0b0f68 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parentd150daf75e968d7878908e05767a4442d5f304bc (diff)
gpu: nvgpu: set preempt state in golden ctx init
Some parameters like gfxp_wfi_timeout are context switched. Once context has been initialized with default values (sw_ctx_load), we need to ensure that preemption state is properly set before saving golden ctx image. Bug 1593548 Jira VFND-1894 Change-Id: Ib1ba03f4ca1606302b1cf1f0738d3610a162a5c6 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1168662 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 638f47f5..4a3d58cb 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -1571,6 +1571,9 @@ static int gr_gk20a_init_golden_ctx_image(struct gk20a *g,
1571 gk20a_writel(g, sw_ctx_load->l[i].addr, 1571 gk20a_writel(g, sw_ctx_load->l[i].addr,
1572 sw_ctx_load->l[i].value); 1572 sw_ctx_load->l[i].value);
1573 1573
1574 if (g->ops.gr.init_preemption_state)
1575 g->ops.gr.init_preemption_state(g);
1576
1574 g->ops.clock_gating.blcg_gr_load_gating_prod(g, g->blcg_enabled); 1577 g->ops.clock_gating.blcg_gr_load_gating_prod(g, g->blcg_enabled);
1575 1578
1576 err = gr_gk20a_wait_idle(g, end_jiffies, GR_IDLE_CHECK_DEFAULT); 1579 err = gr_gk20a_wait_idle(g, end_jiffies, GR_IDLE_CHECK_DEFAULT);