summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/linux/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/module.c')
-rw-r--r--drivers/gpu/nvgpu/os/linux/module.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c
index 18345ada..5627abfd 100644
--- a/drivers/gpu/nvgpu/os/linux/module.c
+++ b/drivers/gpu/nvgpu/os/linux/module.c
@@ -107,10 +107,7 @@ struct device_node *nvgpu_get_node(struct gk20a *g)
107 107
108void gk20a_busy_noresume(struct gk20a *g) 108void gk20a_busy_noresume(struct gk20a *g)
109{ 109{
110 int ret = pm_runtime_get_if_in_use(dev_from_gk20a(g)); 110 pm_runtime_get_noresume(dev_from_gk20a(g));
111
112 if (ret <= 0)
113 pm_runtime_get_noresume(dev_from_gk20a(g));
114} 111}
115 112
116/* 113/*
@@ -262,6 +259,17 @@ int nvgpu_finalize_poweron_linux(struct nvgpu_os_linux *l)
262 return 0; 259 return 0;
263} 260}
264 261
262bool gk20a_check_poweron(struct gk20a *g)
263{
264 bool ret;
265
266 nvgpu_mutex_acquire(&g->power_lock);
267 ret = g->power_on;
268 nvgpu_mutex_release(&g->power_lock);
269
270 return ret;
271}
272
265int gk20a_pm_finalize_poweron(struct device *dev) 273int gk20a_pm_finalize_poweron(struct device *dev)
266{ 274{
267 struct gk20a *g = get_gk20a(dev); 275 struct gk20a *g = get_gk20a(dev);