From 952606b3b98f2994009288d6f628d4a8e70556bb Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 30 Oct 2017 13:29:14 -0700 Subject: gpu: nvgpu: Initialize Linux sched in Linux code Initialize Linux scheduling extensions from Linux code. This removes a dependency between common and Linux code. JIRA NVGPU-259 Change-Id: Ibd882f82479eaac05ecc8cf743dd4a89bd7386f2 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1588663 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/ioctl_tsg.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_tsg.c') 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: int nvgpu_ioctl_tsg_dev_open(struct inode *inode, struct file *filp) { struct nvgpu_os_linux *l; + struct gk20a *g; int ret; + gk20a_dbg_fn(""); + l = container_of(inode->i_cdev, struct nvgpu_os_linux, tsg.cdev); - gk20a_dbg_fn(""); + g = &l->g; + + ret = gk20a_busy(g); + if (ret) { + nvgpu_err(g, "failed to power on, %d", ret); + return ret; + } + ret = nvgpu_ioctl_tsg_open(&l->g, filp); + + gk20a_idle(g); gk20a_dbg_fn("done"); return ret; } -- cgit v1.2.2