gpu: nvgpu: Add new api for setting longer timeslice on dbg node

Add new ioctl api for setting longer timeslice and get timeslice
inside 'dbg' dev node.
Update ioctl gpu_get_characteristic to pass the max timeslice value
Add debugfs to access and change the max timeslice value

Bug 1842244

Change-Id: I7e80f59162cf5d90496f9752fc128f5fa8dcc7d2
Signed-off-by: Mayur Poojary <mpoojary@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2471569
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Mayur Poojary
2021-01-17 21:16:51 -08:00
committed by mobile promotions
parent 0335fa69ec
commit 6277d57936
26 changed files with 226 additions and 11 deletions

View File

@@ -457,6 +457,7 @@ static long gk20a_ctrl_ioctl_gpu_characteristics(
gpu.ctxsw_ioctl_nr_last = NVGPU_CTXSW_IOCTL_LAST;
gpu.prof_ioctl_nr_last = NVGPU_PROFILER_IOCTL_LAST;
gpu.gpu_va_bit_count = 40;
gpu.max_dbg_tsg_timeslice = g->tsg_dbg_timeslice_max_us;
strlcpy(gpu.chipname, g->name, sizeof(gpu.chipname));
gpu.max_fbps_count = nvgpu_fbp_get_max_fbps_count(g->fbp);