gpu: nvgpu: re-order POWERGATE_ENABLE operations
Deepak Nibade [Wed, 9 Sep 2015 16:33:56 +0000 (21:33 +0530)]
re-order POWERGATE_ENABLE operations in opposite
order of POWERGATE_DISABLE

Bug 1679372

Change-Id: Ib72a0b80929e2dee2cf88a6d3d0f96d61c02307b
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/796459
(cherry picked from commit 7e2668f924a986d4bd7d1d2c383431a5e80d9968)
Reviewed-on: http://git-master/r/801977
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c

index 80ea1ff..6f0d044 100644 (file)
@@ -591,14 +591,14 @@ static int dbg_set_powergate(struct dbg_session_gk20a *dbg_s,
                    --g->dbg_powergating_disabled_refcount == 0) {
 
                        g->elcg_enabled = true;
-                       gr_gk20a_init_elcg_mode(g, ELCG_AUTO, ENGINE_GR_GK20A);
                        gr_gk20a_init_elcg_mode(g, ELCG_AUTO, ENGINE_CE2_GK20A);
+                       gr_gk20a_init_elcg_mode(g, ELCG_AUTO, ENGINE_GR_GK20A);
                        gr_gk20a_init_blcg_mode(g, BLCG_AUTO, ENGINE_GR_GK20A);
 
-                       g->ops.clock_gating.slcg_gr_load_gating_prod(g,
-                                       g->slcg_enabled);
                        g->ops.clock_gating.slcg_perf_load_gating_prod(g,
                                        g->slcg_enabled);
+                       g->ops.clock_gating.slcg_gr_load_gating_prod(g,
+                                       g->slcg_enabled);
 
                        gk20a_pmu_enable_elpg(g);