summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b
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
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')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fifo_gv11b.c11
-rw-r--r--drivers/gpu/nvgpu/gv11b/fifo_gv11b.h2
-rw-r--r--drivers/gpu/nvgpu/gv11b/hal_gv11b.c1
3 files changed, 10 insertions, 4 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())) &
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h
index f622aba8..fc1ddf83 100644
--- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h
+++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h
@@ -113,5 +113,5 @@ u32 gv11b_fifo_get_syncpt_incr_cmd_size(bool wfi_cmd);
113int gv11b_init_fifo_setup_hw(struct gk20a *g); 113int gv11b_init_fifo_setup_hw(struct gk20a *g);
114 114
115void gv11b_fifo_tsg_verify_status_faulted(struct channel_gk20a *ch); 115void gv11b_fifo_tsg_verify_status_faulted(struct channel_gk20a *ch);
116 116u32 gv11b_fifo_get_preempt_timeout(struct gk20a *g);
117#endif 117#endif
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
index 729727c9..5b10b7d2 100644
--- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
@@ -438,6 +438,7 @@ static const struct gpu_ops gv11b_ops = {
438 gr_gv11b_pg_gr_load_gating_prod, 438 gr_gv11b_pg_gr_load_gating_prod,
439 }, 439 },
440 .fifo = { 440 .fifo = {
441 .get_preempt_timeout = gv11b_fifo_get_preempt_timeout,
441 .init_fifo_setup_hw = gv11b_init_fifo_setup_hw, 442 .init_fifo_setup_hw = gv11b_init_fifo_setup_hw,
442 .bind_channel = channel_gm20b_bind, 443 .bind_channel = channel_gm20b_bind,
443 .unbind_channel = channel_gv11b_unbind, 444 .unbind_channel = channel_gv11b_unbind,