diff --git a/drivers/gpu/nvgpu/common/init/nvgpu_init.c b/drivers/gpu/nvgpu/common/init/nvgpu_init.c index 29bfe113f..1502e7eaf 100644 --- a/drivers/gpu/nvgpu/common/init/nvgpu_init.c +++ b/drivers/gpu/nvgpu/common/init/nvgpu_init.c @@ -107,11 +107,6 @@ int gk20a_prepare_poweroff(struct gk20a *g) if (g->ops.clk.suspend_clk_support != NULL) { ret |= g->ops.clk.suspend_clk_support(g); } - - if (nvgpu_is_enabled(g, NVGPU_PMU_PSTATE)) { - gk20a_deinit_pstate_support(g); - } - gk20a_mask_interrupts(g); g->power_on = false; diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c index 940ba1b43..37c918444 100644 --- a/drivers/gpu/nvgpu/os/linux/module.c +++ b/drivers/gpu/nvgpu/os/linux/module.c @@ -733,6 +733,10 @@ void gk20a_remove_support(struct gk20a *g) if (g->pmu.remove_support) g->pmu.remove_support(&g->pmu); + if (nvgpu_is_enabled(g, NVGPU_PMU_PSTATE)) { + gk20a_deinit_pstate_support(g); + } + if (g->sec2.remove_support != NULL) { g->sec2.remove_support(&g->sec2); }