summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2017-10-19 13:12:24 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-23 01:15:22 -0400
commit6114553413297dbcae637bc50ef2ff2a6c0858d1 (patch)
treea32a295e5d13018fecff56f57684f3db51b1e532 /drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
parent2904e3ac0081d4e898378f6ba667658c85547368 (diff)
gpu: nvgpu: gv100: fix timeout handling
GV100 has a larger vidmem size and a slower sideband to sysmem so timeouts need to be adjusted to avoid false positives. JIRA: NVGPUGV100-36 Change-Id: I3cbc19aa1158c89bc48ae1fa6ec4bc755cd9389d Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1582092 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/fifo_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fifo_gv11b.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
index 7bb3d654..4a03e6d9 100644
--- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
@@ -372,6 +372,11 @@ u32 gv11b_fifo_intr_0_error_mask(struct gk20a *g)
372 return intr_0_error_mask; 372 return intr_0_error_mask;
373} 373}
374 374
375u32 gv11b_fifo_get_preempt_timeout(struct gk20a *g)
376{
377 return gk20a_get_gr_idle_timeout(g);
378}
379
375static int gv11b_fifo_poll_pbdma_chan_status(struct gk20a *g, u32 id, 380static int gv11b_fifo_poll_pbdma_chan_status(struct gk20a *g, u32 id,
376 u32 pbdma_id, unsigned int timeout_rc_type) 381 u32 pbdma_id, unsigned int timeout_rc_type)
377{ 382{
@@ -405,7 +410,7 @@ static int gv11b_fifo_poll_pbdma_chan_status(struct gk20a *g, u32 id,
405 gk20a_writel(g, pbdma_intr_1_r(pbdma_id), pbdma_intr_1); 410 gk20a_writel(g, pbdma_intr_1_r(pbdma_id), pbdma_intr_1);
406 } 411 }
407 412
408 nvgpu_timeout_init(g, &timeout, gk20a_get_gr_idle_timeout(g), 413 nvgpu_timeout_init(g, &timeout, g->ops.fifo.get_preempt_timeout(g),
409 NVGPU_TIMER_CPU_TIMER); 414 NVGPU_TIMER_CPU_TIMER);
410 415
411 /* Verify that ch/tsg is no longer on the pbdma */ 416 /* Verify that ch/tsg is no longer on the pbdma */
@@ -465,7 +470,7 @@ static int gv11b_fifo_poll_eng_ctx_status(struct gk20a *g, u32 id,
465 u32 ctx_stat; 470 u32 ctx_stat;
466 int ret = -EBUSY; 471 int ret = -EBUSY;
467 472
468 nvgpu_timeout_init(g, &timeout, gk20a_get_gr_idle_timeout(g), 473 nvgpu_timeout_init(g, &timeout, g->ops.fifo.get_preempt_timeout(g),
469 NVGPU_TIMER_CPU_TIMER); 474 NVGPU_TIMER_CPU_TIMER);
470 475
471 /* Check if ch/tsg has saved off the engine or if ctxsw is hung */ 476 /* Check if ch/tsg has saved off the engine or if ctxsw is hung */
@@ -686,7 +691,7 @@ static int gv11b_fifo_poll_runlist_preempt_pending(struct gk20a *g,
686 u32 delay = GR_IDLE_CHECK_DEFAULT; 691 u32 delay = GR_IDLE_CHECK_DEFAULT;
687 int ret = -EBUSY; 692 int ret = -EBUSY;
688 693
689 nvgpu_timeout_init(g, &timeout, gk20a_get_gr_idle_timeout(g), 694 nvgpu_timeout_init(g, &timeout, g->ops.fifo.get_preempt_timeout(g),
690 NVGPU_TIMER_CPU_TIMER); 695 NVGPU_TIMER_CPU_TIMER);
691 do { 696 do {
692 if (!((gk20a_readl(g, fifo_runlist_preempt_r())) & 697 if (!((gk20a_readl(g, fifo_runlist_preempt_r())) &