diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c index 13d498a7d..abea39b62 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c @@ -381,7 +381,13 @@ u32 gv11b_fifo_intr_0_error_mask(struct gk20a *g) u32 gv11b_fifo_get_preempt_timeout(struct gk20a *g) { - return gk20a_get_gr_idle_timeout(g); + /* if timeouts are enabled, using 3000ms timeout + * for polling pdma/eng/runlist might kick in + * timeout handler in the cases where preempt + * is stuck. Use 1000ms timeout for polling when + * timeouts are enabled */ + return nvgpu_is_timeouts_enabled(g) ? PREEMPT_TIMEOUT_1000_MS : + g->gr_idle_timeout_default; } static int gv11b_fifo_poll_pbdma_chan_status(struct gk20a *g, u32 id, diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h index 5ff16453f..66efdd3b3 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h @@ -51,6 +51,7 @@ #define CHANNEL_INFO_VEID0 0 #define MAX_PRE_SI_RETRIES 200000 /* 1G/500KHz * 100 */ +#define PREEMPT_TIMEOUT_1000_MS 1000 struct gpu_ops;