summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2018-07-10 13:54:05 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-19 16:55:23 -0400
commita94dd24e262a7767684f051ee91b147d840bb8a0 (patch)
tree8422649577149ebfc0258e5aa91e8931821dbf4c /drivers/gpu
parentea1a1942a63d57160565cab6638eacb85b8634ae (diff)
gpu: nvgpu: gv11b: set preempt timeout
For pbdma/eng/runlist preempt polling use fifo_eng_timeout_us converted to ms. Bug 200426402 Change-Id: I2137bb9c5517d27c514ddd7ef0c601230a1ddb16 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1775442 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/nvgpu/gv100/fifo_gv100.c2
-rw-r--r--drivers/gpu/nvgpu/gv11b/fifo_gv11b.c13
-rw-r--r--drivers/gpu/nvgpu/gv11b/fifo_gv11b.h1
3 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gv100/fifo_gv100.c b/drivers/gpu/nvgpu/gv100/fifo_gv100.c
index 0227720d..f5e43ea7 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)
38 38
39u32 gv100_fifo_get_preempt_timeout(struct gk20a *g) 39u32 gv100_fifo_get_preempt_timeout(struct gk20a *g)
40{ 40{
41 return DEFAULT_FIFO_PREEMPT_TIMEOUT; 41 return g->fifo_eng_timeout_us / 1000 ;
42} 42}
43 43
44void gv100_apply_ctxsw_timeout_intr(struct gk20a *g) 44void 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 fcf05306..7e0bbf81 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)
387 387
388u32 gv11b_fifo_get_preempt_timeout(struct gk20a *g) 388u32 gv11b_fifo_get_preempt_timeout(struct gk20a *g)
389{ 389{
390 /* if timeouts are enabled, using 3000ms timeout 390 /* using gr_idle_timeout for polling pdma/eng/runlist
391 * for polling pdma/eng/runlist might kick in 391 * might kick in timeout handler in the cases where
392 * timeout handler in the cases where preempt 392 * preempt is stuck. Use fifo_eng_timeout converted to ms
393 * is stuck. Use 1000ms timeout for polling when 393 * for preempt polling */
394 * timeouts are enabled */ 394
395 return nvgpu_is_timeouts_enabled(g) ? PREEMPT_TIMEOUT_1000_MS : 395 return g->fifo_eng_timeout_us / 1000 ;
396 g->gr_idle_timeout_default;
397} 396}
398 397
399static int gv11b_fifo_poll_pbdma_chan_status(struct gk20a *g, u32 id, 398static 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 aee7aef2..ec89bc5b 100644
--- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h
+++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h
@@ -51,7 +51,6 @@
51#define CHANNEL_INFO_VEID0 0 51#define CHANNEL_INFO_VEID0 0
52 52
53#define MAX_PRE_SI_RETRIES 200000 /* 1G/500KHz * 100 */ 53#define MAX_PRE_SI_RETRIES 200000 /* 1G/500KHz * 100 */
54#define PREEMPT_TIMEOUT_1000_MS 1000
55 54
56struct gpu_ops; 55struct gpu_ops;
57 56