diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/power_features/pg')
-rw-r--r-- | drivers/gpu/nvgpu/common/power_features/pg/pg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/power_features/pg/pg.c b/drivers/gpu/nvgpu/common/power_features/pg/pg.c index fa31f4e3..394c0824 100644 --- a/drivers/gpu/nvgpu/common/power_features/pg/pg.c +++ b/drivers/gpu/nvgpu/common/power_features/pg/pg.c | |||
@@ -46,6 +46,8 @@ int nvgpu_pg_elpg_enable(struct gk20a *g) | |||
46 | return 0; | 46 | return 0; |
47 | } | 47 | } |
48 | 48 | ||
49 | gk20a_gr_wait_initialized(g); | ||
50 | |||
49 | nvgpu_mutex_acquire(&g->cg_pg_lock); | 51 | nvgpu_mutex_acquire(&g->cg_pg_lock); |
50 | if (g->elpg_enabled) { | 52 | if (g->elpg_enabled) { |
51 | err = nvgpu_pmu_pg_global_enable(g, true); | 53 | err = nvgpu_pmu_pg_global_enable(g, true); |
@@ -64,6 +66,8 @@ int nvgpu_pg_elpg_disable(struct gk20a *g) | |||
64 | return 0; | 66 | return 0; |
65 | } | 67 | } |
66 | 68 | ||
69 | gk20a_gr_wait_initialized(g); | ||
70 | |||
67 | nvgpu_mutex_acquire(&g->cg_pg_lock); | 71 | nvgpu_mutex_acquire(&g->cg_pg_lock); |
68 | if (g->elpg_enabled) { | 72 | if (g->elpg_enabled) { |
69 | err = nvgpu_pmu_pg_global_enable(g, false); | 73 | err = nvgpu_pmu_pg_global_enable(g, false); |
@@ -83,6 +87,8 @@ int nvgpu_pg_elpg_set_elpg_enabled(struct gk20a *g, bool enable) | |||
83 | return 0; | 87 | return 0; |
84 | } | 88 | } |
85 | 89 | ||
90 | gk20a_gr_wait_initialized(g); | ||
91 | |||
86 | nvgpu_mutex_acquire(&g->cg_pg_lock); | 92 | nvgpu_mutex_acquire(&g->cg_pg_lock); |
87 | if (enable) { | 93 | if (enable) { |
88 | if (!g->elpg_enabled) { | 94 | if (!g->elpg_enabled) { |