diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_tsg.c | 14 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 6 |
2 files changed, 19 insertions, 1 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: | |||
249 | int nvgpu_ioctl_tsg_dev_open(struct inode *inode, struct file *filp) | 249 | int 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 | |||
240 | done: | 246 | done: |
241 | if (err) | 247 | if (err) |
242 | g->power_on = false; | 248 | g->power_on = false; |