diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/sysfs.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/sysfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/sysfs.c b/drivers/gpu/nvgpu/common/linux/sysfs.c index b1e7d1ed..053c1a12 100644 --- a/drivers/gpu/nvgpu/common/linux/sysfs.c +++ b/drivers/gpu/nvgpu/common/linux/sysfs.c | |||
@@ -965,8 +965,10 @@ static ssize_t gfxp_wfi_timeout_count_store(struct device *dev, | |||
965 | if (kstrtoul(buf, 10, &val) < 0) | 965 | if (kstrtoul(buf, 10, &val) < 0) |
966 | return -EINVAL; | 966 | return -EINVAL; |
967 | 967 | ||
968 | if (val >= 100*1000*1000) /* 100ms @ 1Ghz */ | 968 | if (g->ops.gr.get_max_gfxp_wfi_timeout_count) { |
969 | return -EINVAL; | 969 | if (val >= g->ops.gr.get_max_gfxp_wfi_timeout_count(g)) |
970 | return -EINVAL; | ||
971 | } | ||
970 | 972 | ||
971 | gr->gfxp_wfi_timeout_count = val; | 973 | gr->gfxp_wfi_timeout_count = val; |
972 | 974 | ||