gpu: nvgpu: gv11b: gfxp wfi timeout

For gv11b, configured gfx preemption wfi timeout in usec.
Set timeout unit as usec in gr_gv11b_init_preemption_state.
Used default timeout as 1msec and this timeout value can
be modified through sysfs node:
/sys/devices/gpu.0/gfxp_wfi_timeout_count

For gp10b:
gfxp_wfi_timeout_count is in syclk cycles

For gv11b:
gfxp_wfi_timeout_count is in usec

Bug 2003668

Change-Id: I68d52ce996a83df90b8b3a8164debb07e5cb370f
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1599658
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
seshendra Gadagottu
2017-11-15 14:35:43 -08:00
committed by mobile promotions
parent dda9d80a85
commit 7a4cb4a6ab
12 changed files with 100 additions and 6 deletions

View File

@@ -965,8 +965,10 @@ static ssize_t gfxp_wfi_timeout_count_store(struct device *dev,
if (kstrtoul(buf, 10, &val) < 0)
return -EINVAL;
if (val >= 100*1000*1000) /* 100ms @ 1Ghz */
return -EINVAL;
if (g->ops.gr.get_max_gfxp_wfi_timeout_count) {
if (val >= g->ops.gr.get_max_gfxp_wfi_timeout_count(g))
return -EINVAL;
}
gr->gfxp_wfi_timeout_count = val;