summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
diff options
context:
space:
mode:
authorVijayakumar <vsubbu@nvidia.com>2014-06-27 05:20:31 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:10:19 -0400
commit88c6d2fb21ad2f3f1be09c2014560aa22b27ba98 (patch)
tree9fdc0a988ca5697b1b97884e49d21a10762eb24d /drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
parente0d7e42e8cc33cdb85543faadb2080fdee9a07ff (diff)
gpu:nvgpu:fix powergate disabling order
ELPG has to disabled before we write to clock gating registers If ELPG is engaged during clock gating register write it will cause error in ELPG engine Bug 200013495 Bug 200014542 Change-Id: I57d1c59fc9311686829d898faddc90149df4cb46 Signed-off-by: Vijayakumar <vsubbu@nvidia.com> Reviewed-on: http://git-master/r/432117 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Supriya Sharatkumar <ssharatkumar@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Mitch Luban <mluban@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
index 7a1140f9..8cb1d0a5 100644
--- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
@@ -576,6 +576,8 @@ static int dbg_set_powergate(struct dbg_session_gk20a *dbg_s,
576 if (err) 576 if (err)
577 return -EPERM; 577 return -EPERM;
578 578
579 /*do elpg disable before clock gating */
580 gk20a_pmu_disable_elpg(g);
579 g->ops.clock_gating.slcg_gr_load_gating_prod(g, 581 g->ops.clock_gating.slcg_gr_load_gating_prod(g,
580 false); 582 false);
581 g->ops.clock_gating.slcg_perf_load_gating_prod(g, 583 g->ops.clock_gating.slcg_perf_load_gating_prod(g,
@@ -586,7 +588,6 @@ static int dbg_set_powergate(struct dbg_session_gk20a *dbg_s,
586 gr_gk20a_init_elcg_mode(g, ELCG_RUN, ENGINE_GR_GK20A); 588 gr_gk20a_init_elcg_mode(g, ELCG_RUN, ENGINE_GR_GK20A);
587 gr_gk20a_init_elcg_mode(g, ELCG_RUN, ENGINE_CE2_GK20A); 589 gr_gk20a_init_elcg_mode(g, ELCG_RUN, ENGINE_CE2_GK20A);
588 590
589 gk20a_pmu_disable_elpg(g);
590 } 591 }
591 592
592 dbg_s->is_pg_disabled = true; 593 dbg_s->is_pg_disabled = true;