diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-10-30 16:29:14 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-02 12:26:00 -0400 |
commit | 952606b3b98f2994009288d6f628d4a8e70556bb (patch) | |
tree | 0e174497c0078f127e112cf61e75b3167956e5dd /drivers/gpu/nvgpu/common/linux/ioctl_tsg.c | |
parent | e1120727e7c854d093a21752c426c8597b16825d (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1588663
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_tsg.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_tsg.c | 14 |
1 files changed, 13 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 | } |