summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_tsg.c14
-rw-r--r--drivers/gpu/nvgpu/common/linux/module.c6
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c6
3 files changed, 19 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c b/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c
index f4972f11..7eea636e 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c
@@ -249,12 +249,24 @@ free_ref:
249int nvgpu_ioctl_tsg_dev_open(struct inode *inode, struct file *filp) 249int nvgpu_ioctl_tsg_dev_open(struct inode *inode, struct file *filp)
250{ 250{
251 struct nvgpu_os_linux *l; 251 struct nvgpu_os_linux *l;
252 struct gk20a *g;
252 int ret; 253 int ret;
253 254
255 gk20a_dbg_fn("");
256
254 l = container_of(inode->i_cdev, 257 l = container_of(inode->i_cdev,
255 struct nvgpu_os_linux, tsg.cdev); 258 struct nvgpu_os_linux, tsg.cdev);
256 gk20a_dbg_fn(""); 259 g = &l->g;
260
261 ret = gk20a_busy(g);
262 if (ret) {
263 nvgpu_err(g, "failed to power on, %d", ret);
264 return ret;
265 }
266
257 ret = nvgpu_ioctl_tsg_open(&l->g, filp); 267 ret = nvgpu_ioctl_tsg_open(&l->g, filp);
268
269 gk20a_idle(g);
258 gk20a_dbg_fn("done"); 270 gk20a_dbg_fn("done");
259 return ret; 271 return ret;
260} 272}
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c
index b06f86ab..7706d826 100644
--- a/drivers/gpu/nvgpu/common/linux/module.c
+++ b/drivers/gpu/nvgpu/common/linux/module.c
@@ -237,6 +237,12 @@ int gk20a_pm_finalize_poweron(struct device *dev)
237 if (platform->has_cde) 237 if (platform->has_cde)
238 gk20a_init_cde_support(l); 238 gk20a_init_cde_support(l);
239 239
240 err = gk20a_sched_ctrl_init(g);
241 if (err) {
242 nvgpu_err(g, "failed to init sched control");
243 return err;
244 }
245
240done: 246done:
241 if (err) 247 if (err)
242 g->power_on = false; 248 g->power_on = false;
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index f2bb6dcf..a282110a 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -300,12 +300,6 @@ int gk20a_finalize_poweron(struct gk20a *g)
300 nvgpu_warn(g, "could not initialize ctxsw tracing"); 300 nvgpu_warn(g, "could not initialize ctxsw tracing");
301#endif 301#endif
302 302
303 err = gk20a_sched_ctrl_init(g);
304 if (err) {
305 nvgpu_err(g, "failed to init sched control");
306 goto done;
307 }
308
309 /* Restore the debug setting */ 303 /* Restore the debug setting */
310 g->ops.fb.set_debug_mode(g, g->mmu_debug_ctrl); 304 g->ops.fb.set_debug_mode(g, g->mmu_debug_ctrl);
311 305