summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu
diff options
context:
space:
mode:
authorThomas Fleury <tfleury@nvidia.com>2017-01-09 13:54:36 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-01-16 15:15:23 -0500
commitf6a634ff24194ee83579f90ab399a08d91df233a (patch)
tree56e87309729a5e926ef2fd30bb8ede2abbd23da7 /drivers/gpu/nvgpu/vgpu
parentbb5a9e1c6cfbe69b8a984439a092db7a1a75a405 (diff)
gpu: nvgpu: use HAL to set TSG timeslice
Setting timeslice for virtualized case was not effective, because both ioctls NVGPU_TSG_IOCTL_SET_TIMESLICE and NVGPU_SCHED_IOCTL_TSG_SET_TIMESLICE were calling the native function to set TSG timeslice. - Fixed wrapper function to call HAL - Defined HAL function for "native" set TSG timeslice - Also, properly update timeout_us in TSG context, in virtualized case. This change also moves the min/max bounds checking for tsg timeslice into the native function implementation. There is no sysfs node for these parameters for vgpu, as RM server is ultimately responsible for this check. Bug 200263575 Change-Id: Ibceab9427561ad58ec28abfff0c96ca8f592bdb9 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1283180 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu')
-rw-r--r--drivers/gpu/nvgpu/vgpu/tsg_vgpu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c b/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c
index 9daf9e6d..e668d1ed 100644
--- a/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -114,6 +114,8 @@ static int vgpu_tsg_set_timeslice(struct tsg_gk20a *tsg, u32 timeslice)
114 err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); 114 err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg));
115 err = err ? err : msg.ret; 115 err = err ? err : msg.ret;
116 WARN_ON(err); 116 WARN_ON(err);
117 if (!err)
118 tsg->timeslice_us = timeslice;
117 119
118 return err; 120 return err;
119} 121}