summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 08e8b79f..ed48253f 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -274,12 +274,23 @@ int gk20a_finalize_poweron(struct gk20a *g)
274 } 274 }
275 } 275 }
276 276
277 nvgpu_mutex_acquire(&g->tpc_pg_lock);
278
279 if (g->can_tpc_powergate) {
280 if (g->ops.gr.powergate_tpc != NULL) {
281 g->ops.gr.powergate_tpc(g);
282 }
283 }
284
277 err = gk20a_init_gr_support(g); 285 err = gk20a_init_gr_support(g);
278 if (err) { 286 if (err) {
279 nvgpu_err(g, "failed to init gk20a gr"); 287 nvgpu_err(g, "failed to init gk20a gr");
288 nvgpu_mutex_release(&g->tpc_pg_lock);
280 goto done; 289 goto done;
281 } 290 }
282 291
292 nvgpu_mutex_release(&g->tpc_pg_lock);
293
283 if (nvgpu_is_enabled(g, NVGPU_PMU_PSTATE)) { 294 if (nvgpu_is_enabled(g, NVGPU_PMU_PSTATE)) {
284 err = gk20a_init_pstate_pmu_support(g); 295 err = gk20a_init_pstate_pmu_support(g);
285 if (err) { 296 if (err) {