mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: deny any request less than engine timeout
Bug 2343124 JIRA NVGPU-1065 Change-Id: I43a436673117af8ac2490d075cea07532f01af0b Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1818164 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
5366778e8e
commit
4f01d6a9b9
@@ -1227,6 +1227,11 @@ long gk20a_channel_ioctl(struct file *filp,
|
||||
(u32)((struct nvgpu_set_timeout_args *)buf)->timeout;
|
||||
nvgpu_log(g, gpu_dbg_gpu_dbg, "setting timeout (%d ms) for chid %d",
|
||||
timeout, ch->chid);
|
||||
if (timeout < g->fifo_eng_timeout_us / 1000) {
|
||||
dump_stack();
|
||||
err = -EINVAL;
|
||||
break;
|
||||
}
|
||||
ch->timeout_ms_max = timeout;
|
||||
gk20a_channel_trace_sched_param(
|
||||
trace_gk20a_channel_set_timeout, ch);
|
||||
@@ -1241,6 +1246,11 @@ long gk20a_channel_ioctl(struct file *filp,
|
||||
(1 << NVGPU_TIMEOUT_FLAG_DISABLE_DUMP));
|
||||
nvgpu_log(g, gpu_dbg_gpu_dbg, "setting timeout (%d ms) for chid %d",
|
||||
timeout, ch->chid);
|
||||
if (timeout < g->fifo_eng_timeout_us / 1000) {
|
||||
dump_stack();
|
||||
err = -EINVAL;
|
||||
break;
|
||||
}
|
||||
ch->timeout_ms_max = timeout;
|
||||
ch->timeout_debug_dump = timeout_debug_dump;
|
||||
gk20a_channel_trace_sched_param(
|
||||
|
||||
Reference in New Issue
Block a user