From 9e9046f03cf3125067666dc652499a4b7f39d9c0 Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Tue, 14 Jan 2020 11:14:38 -0800 Subject: gpu: nvgpu: add struct nvgpu_sched_ctrl to gk20a Add struct nvgpu_sched_ctrl to struct gk20a Delete struct gk20a_sched_ctrl from struct nvgpu_os_linux Update sched_ctrl functions to use the nvgpu_sched_ctrl struct Bug 200576520 Change-Id: I35b13219e5ef0a8a03333dfd7d46e1d308aec541 Signed-off-by: Peter Daifuku Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2279152 Reviewed-by: Thomas Fleury Reviewed-by: Satish Arora Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/os/linux/ioctl_tsg.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'drivers/gpu/nvgpu/os/linux/ioctl_tsg.c') diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_tsg.c b/drivers/gpu/nvgpu/os/linux/ioctl_tsg.c index c5079bd6..a26559f5 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_tsg.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_tsg.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -58,8 +58,7 @@ static int gk20a_tsg_bind_channel_fd(struct tsg_gk20a *tsg, int ch_fd) static int gk20a_tsg_ioctl_bind_channel_ex(struct gk20a *g, struct tsg_gk20a *tsg, struct nvgpu_tsg_bind_channel_ex_args *arg) { - struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); - struct gk20a_sched_ctrl *sched = &l->sched_ctrl; + struct nvgpu_sched_ctrl *sched = &g->sched_ctrl; struct channel_gk20a *ch; struct gr_gk20a *gr = &g->gr; int err = 0; @@ -484,8 +483,7 @@ int nvgpu_ioctl_tsg_dev_release(struct inode *inode, struct file *filp) static int gk20a_tsg_ioctl_set_runlist_interleave(struct gk20a *g, struct tsg_gk20a *tsg, struct nvgpu_runlist_interleave_args *arg) { - struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); - struct gk20a_sched_ctrl *sched = &l->sched_ctrl; + struct nvgpu_sched_ctrl *sched = &g->sched_ctrl; u32 level = arg->level; int err; @@ -514,8 +512,7 @@ done: static int gk20a_tsg_ioctl_set_timeslice(struct gk20a *g, struct tsg_gk20a *tsg, struct nvgpu_timeslice_args *arg) { - struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); - struct gk20a_sched_ctrl *sched = &l->sched_ctrl; + struct nvgpu_sched_ctrl *sched = &g->sched_ctrl; int err; nvgpu_log(g, gpu_dbg_fn | gpu_dbg_sched, "tsgid=%u", tsg->tsgid); -- cgit v1.2.2