summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.c
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2017-10-30 17:15:51 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-18 22:54:33 -0400
commit982fcfa737be54fd0ab16792faf97a2741e34907 (patch)
tree6c45741a08156d43d2ea09a4136c104609989e42 /drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.c
parentac687c95d383c3fb0165e6535893510409559a8e (diff)
gpu: nvgpu: Add timeouts_disabled_refcount for enabling timeout
-timeouts will be enabled only when timeouts_disabled_refcount will reach 0 -timeouts_enabled debugfs will change from u32 type to file type to avoid race enabling/disabling timeout from debugfs and ioctl -unify setting timeouts_enabled from debugfs and ioctl Bug 1982434 Change-Id: I54bab778f1ae533872146dfb8d80deafd2a685c7 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1588690 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.c b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.c
index 5d3598b5..c5572603 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.c
@@ -424,7 +424,8 @@ int vgpu_probe(struct platform_device *pdev)
424 dma_set_max_seg_size(dev, UINT_MAX); 424 dma_set_max_seg_size(dev, UINT_MAX);
425 425
426 gk20a->gr_idle_timeout_default = NVGPU_DEFAULT_GR_IDLE_TIMEOUT; 426 gk20a->gr_idle_timeout_default = NVGPU_DEFAULT_GR_IDLE_TIMEOUT;
427 gk20a->timeouts_enabled = true; 427 gk20a->timeouts_disabled_by_user = false;
428 nvgpu_atomic_set(&gk20a->timeouts_disabled_refcount, 0);
428 429
429 vgpu_create_sysfs(dev); 430 vgpu_create_sysfs(dev);
430 gk20a_init_gr(gk20a); 431 gk20a_init_gr(gk20a);