diff options
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/ioctl_channel.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_channel.c b/drivers/gpu/nvgpu/os/linux/ioctl_channel.c index e9a24923..b48cfa99 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_channel.c | |||
@@ -1227,6 +1227,11 @@ long gk20a_channel_ioctl(struct file *filp, | |||
1227 | (u32)((struct nvgpu_set_timeout_args *)buf)->timeout; | 1227 | (u32)((struct nvgpu_set_timeout_args *)buf)->timeout; |
1228 | nvgpu_log(g, gpu_dbg_gpu_dbg, "setting timeout (%d ms) for chid %d", | 1228 | nvgpu_log(g, gpu_dbg_gpu_dbg, "setting timeout (%d ms) for chid %d", |
1229 | timeout, ch->chid); | 1229 | timeout, ch->chid); |
1230 | if (timeout < g->fifo_eng_timeout_us / 1000) { | ||
1231 | dump_stack(); | ||
1232 | err = -EINVAL; | ||
1233 | break; | ||
1234 | } | ||
1230 | ch->timeout_ms_max = timeout; | 1235 | ch->timeout_ms_max = timeout; |
1231 | gk20a_channel_trace_sched_param( | 1236 | gk20a_channel_trace_sched_param( |
1232 | trace_gk20a_channel_set_timeout, ch); | 1237 | trace_gk20a_channel_set_timeout, ch); |
@@ -1241,6 +1246,11 @@ long gk20a_channel_ioctl(struct file *filp, | |||
1241 | (1 << NVGPU_TIMEOUT_FLAG_DISABLE_DUMP)); | 1246 | (1 << NVGPU_TIMEOUT_FLAG_DISABLE_DUMP)); |
1242 | nvgpu_log(g, gpu_dbg_gpu_dbg, "setting timeout (%d ms) for chid %d", | 1247 | nvgpu_log(g, gpu_dbg_gpu_dbg, "setting timeout (%d ms) for chid %d", |
1243 | timeout, ch->chid); | 1248 | timeout, ch->chid); |
1249 | if (timeout < g->fifo_eng_timeout_us / 1000) { | ||
1250 | dump_stack(); | ||
1251 | err = -EINVAL; | ||
1252 | break; | ||
1253 | } | ||
1244 | ch->timeout_ms_max = timeout; | 1254 | ch->timeout_ms_max = timeout; |
1245 | ch->timeout_debug_dump = timeout_debug_dump; | 1255 | ch->timeout_debug_dump = timeout_debug_dump; |
1246 | gk20a_channel_trace_sched_param( | 1256 | gk20a_channel_trace_sched_param( |