diff --git a/drivers/gpu/nvgpu/gv100/fifo_gv100.c b/drivers/gpu/nvgpu/gv100/fifo_gv100.c index 0227720de..f5e43ea7e 100644 --- a/drivers/gpu/nvgpu/gv100/fifo_gv100.c +++ b/drivers/gpu/nvgpu/gv100/fifo_gv100.c @@ -38,7 +38,7 @@ u32 gv100_fifo_get_num_fifos(struct gk20a *g) u32 gv100_fifo_get_preempt_timeout(struct gk20a *g) { - return DEFAULT_FIFO_PREEMPT_TIMEOUT; + return g->fifo_eng_timeout_us / 1000 ; } void gv100_apply_ctxsw_timeout_intr(struct gk20a *g) diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c index fcf05306b..7e0bbf81a 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c @@ -387,13 +387,12 @@ u32 gv11b_fifo_intr_0_error_mask(struct gk20a *g) u32 gv11b_fifo_get_preempt_timeout(struct gk20a *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; + /* using gr_idle_timeout for polling pdma/eng/runlist + * might kick in timeout handler in the cases where + * preempt is stuck. Use fifo_eng_timeout converted to ms + * for preempt polling */ + + return g->fifo_eng_timeout_us / 1000 ; } 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 aee7aef29..ec89bc5b7 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h @@ -51,7 +51,6 @@ #define CHANNEL_INFO_VEID0 0 #define MAX_PRE_SI_RETRIES 200000 /* 1G/500KHz * 100 */ -#define PREEMPT_TIMEOUT_1000_MS 1000 struct gpu_ops;