summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/module.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/module.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c
index b107a721..0b5dfec8 100644
--- a/drivers/gpu/nvgpu/common/linux/module.c
+++ b/drivers/gpu/nvgpu/common/linux/module.c
@@ -88,15 +88,18 @@ int gk20a_busy(struct gk20a *g)
88 goto fail; 88 goto fail;
89 } 89 }
90 } else { 90 } else {
91 nvgpu_mutex_acquire(&g->poweron_lock);
91 if (!g->power_on) { 92 if (!g->power_on) {
92 ret = gk20a_gpu_is_virtual(dev) ? 93 ret = gk20a_gpu_is_virtual(dev) ?
93 vgpu_pm_finalize_poweron(dev) 94 vgpu_pm_finalize_poweron(dev)
94 : gk20a_pm_finalize_poweron(dev); 95 : gk20a_pm_finalize_poweron(dev);
95 if (ret) { 96 if (ret) {
96 atomic_dec(&g->usage_count); 97 atomic_dec(&g->usage_count);
98 nvgpu_mutex_release(&g->poweron_lock);
97 goto fail; 99 goto fail;
98 } 100 }
99 } 101 }
102 nvgpu_mutex_release(&g->poweron_lock);
100 } 103 }
101 104
102fail: 105fail: