From 1f71f475e25fe786ec76d76a986aac8afec51b01 Mon Sep 17 00:00:00 2001 From: David Nieto Date: Wed, 27 Dec 2017 14:28:29 -0800 Subject: DNI: gpu: nvgpu: Increase GV100 ctxsw timeouts During bringup and before nvlink is up GV100 on the DDPX platform operates with a very, very slow sysmem link. In order to get sysmem test to pass it is neccesary to significantly increase most timeouts by an order the magnitude. Bug 2040544 Change-Id: I26858afde4ae80c70f86b47cfff674b6b00b5bf8 Signed-off-by: David Nieto Reviewed-on: https://git-master.nvidia.com/r/1627417 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 14 +++++++++----- drivers/gpu/nvgpu/gk20a/gk20a.h | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 194d5e3c..b14b2a27 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -815,11 +815,15 @@ int gk20a_init_fifo_reset_enable_hw(struct gk20a *g) if (g->ops.fifo.apply_pb_timeout) g->ops.fifo.apply_pb_timeout(g); - timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US; - timeout = scale_ptimer(timeout, - ptimer_scalingfactor10x(g->ptimer_src_freq)); - timeout |= fifo_eng_timeout_detection_enabled_f(); - gk20a_writel(g, fifo_eng_timeout_r(), timeout); + if (g->ops.fifo.apply_ctxsw_timeout_intr) + g->ops.fifo.apply_ctxsw_timeout_intr(g); + else { + timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US; + timeout = scale_ptimer(timeout, + ptimer_scalingfactor10x(g->ptimer_src_freq)); + timeout |= fifo_eng_timeout_detection_enabled_f(); + gk20a_writel(g, fifo_eng_timeout_r(), timeout); + } /* clear and enable pbdma interrupt */ for (i = 0; i < host_num_pbdma; i++) { diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 9d51be59..d9a8396f 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -531,6 +531,7 @@ struct gpu_ops { void (*get_mmu_fault_info)(struct gk20a *g, u32 mmu_fault_id, struct mmu_fault_info *mmfault); void (*apply_pb_timeout)(struct gk20a *g); + void (*apply_ctxsw_timeout_intr)(struct gk20a *g); int (*wait_engine_idle)(struct gk20a *g); u32 (*get_num_fifos)(struct gk20a *g); u32 (*get_pbdma_signature)(struct gk20a *g); -- cgit v1.2.2