summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Daifuku <pdaifuku@nvidia.com>2020-01-22 22:57:16 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2020-01-24 06:42:15 -0500
commit6e91ecaae77d769955e5e1f34ded90c064e9c245 (patch)
treeafbdcf669ee3ec8ff890b8227b466bcd66e8d21e
parentf0fca24ffb03c14647e03d611b901bf02426c37a (diff)
gpu: nvgpu: fix sched get_params for 0 timeslice
When the TSG is initialized, the timeslice is initially set to 0, which is a flag for using the default timeslice. The sched get_params ioctl was returning 0 in this case; instead, call gk20a_tsg_get_timeslice() to get the correct value. Bug 2818547 Change-Id: I29fde48240098074de12e9a9a3e347e4042a64e8 Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283962 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-by: Satish Arora <satisha@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
-rw-r--r--drivers/gpu/nvgpu/os/linux/sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/sched.c b/drivers/gpu/nvgpu/os/linux/sched.c
index 2719429c..15cbf1ec 100644
--- a/drivers/gpu/nvgpu/os/linux/sched.c
+++ b/drivers/gpu/nvgpu/os/linux/sched.c
@@ -205,7 +205,7 @@ static int gk20a_sched_dev_ioctl_get_params(struct gk20a *g,
205 205
206 arg->pid = tsg->tgid; /* kernel tgid corresponds to user pid */ 206 arg->pid = tsg->tgid; /* kernel tgid corresponds to user pid */
207 arg->runlist_interleave = tsg->interleave_level; 207 arg->runlist_interleave = tsg->interleave_level;
208 arg->timeslice = tsg->timeslice_us; 208 arg->timeslice = gk20a_tsg_get_timeslice(tsg);
209 209
210 arg->graphics_preempt_mode = 210 arg->graphics_preempt_mode =
211 tsg->gr_ctx.graphics_preempt_mode; 211 tsg->gr_ctx.graphics_preempt_mode;