diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/pci.c | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 14 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/fifo_gv100.c | 14 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/fifo_gv100.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/hal_gv100.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | 2 |
7 files changed, 31 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c index 928d8354..23604633 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c | |||
@@ -340,7 +340,10 @@ static struct gk20a_platform nvgpu_pci_device[] = { | |||
340 | .is_railgated = nvgpu_pci_tegra_is_railgated, | 340 | .is_railgated = nvgpu_pci_tegra_is_railgated, |
341 | .clk_round_rate = nvgpu_pci_clk_round_rate, | 341 | .clk_round_rate = nvgpu_pci_clk_round_rate, |
342 | 342 | ||
343 | .ch_wdt_timeout_ms = 7000, | 343 | /* |
344 | * WAR: PCIE X1 is very slow, set to very high value till nvlink is up | ||
345 | */ | ||
346 | .ch_wdt_timeout_ms = 30000, | ||
344 | 347 | ||
345 | .honors_aperture = true, | 348 | .honors_aperture = true, |
346 | .vbios_min_version = 0x1, | 349 | .vbios_min_version = 0x1, |
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) | |||
815 | if (g->ops.fifo.apply_pb_timeout) | 815 | if (g->ops.fifo.apply_pb_timeout) |
816 | g->ops.fifo.apply_pb_timeout(g); | 816 | g->ops.fifo.apply_pb_timeout(g); |
817 | 817 | ||
818 | timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US; | 818 | if (g->ops.fifo.apply_ctxsw_timeout_intr) |
819 | timeout = scale_ptimer(timeout, | 819 | g->ops.fifo.apply_ctxsw_timeout_intr(g); |
820 | ptimer_scalingfactor10x(g->ptimer_src_freq)); | 820 | else { |
821 | timeout |= fifo_eng_timeout_detection_enabled_f(); | 821 | timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US; |
822 | gk20a_writel(g, fifo_eng_timeout_r(), timeout); | 822 | timeout = scale_ptimer(timeout, |
823 | ptimer_scalingfactor10x(g->ptimer_src_freq)); | ||
824 | timeout |= fifo_eng_timeout_detection_enabled_f(); | ||
825 | gk20a_writel(g, fifo_eng_timeout_r(), timeout); | ||
826 | } | ||
823 | 827 | ||
824 | /* clear and enable pbdma interrupt */ | 828 | /* clear and enable pbdma interrupt */ |
825 | for (i = 0; i < host_num_pbdma; i++) { | 829 | 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 { | |||
531 | void (*get_mmu_fault_info)(struct gk20a *g, u32 mmu_fault_id, | 531 | void (*get_mmu_fault_info)(struct gk20a *g, u32 mmu_fault_id, |
532 | struct mmu_fault_info *mmfault); | 532 | struct mmu_fault_info *mmfault); |
533 | void (*apply_pb_timeout)(struct gk20a *g); | 533 | void (*apply_pb_timeout)(struct gk20a *g); |
534 | void (*apply_ctxsw_timeout_intr)(struct gk20a *g); | ||
534 | int (*wait_engine_idle)(struct gk20a *g); | 535 | int (*wait_engine_idle)(struct gk20a *g); |
535 | u32 (*get_num_fifos)(struct gk20a *g); | 536 | u32 (*get_num_fifos)(struct gk20a *g); |
536 | u32 (*get_pbdma_signature)(struct gk20a *g); | 537 | u32 (*get_pbdma_signature)(struct gk20a *g); |
diff --git a/drivers/gpu/nvgpu/gv100/fifo_gv100.c b/drivers/gpu/nvgpu/gv100/fifo_gv100.c index 79862f6b..0227720d 100644 --- a/drivers/gpu/nvgpu/gv100/fifo_gv100.c +++ b/drivers/gpu/nvgpu/gv100/fifo_gv100.c | |||
@@ -22,9 +22,12 @@ | |||
22 | * DEALINGS IN THE SOFTWARE. | 22 | * DEALINGS IN THE SOFTWARE. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "gk20a/gk20a.h" | ||
25 | #include "fifo_gv100.h" | 26 | #include "fifo_gv100.h" |
27 | #include <nvgpu/timers.h> | ||
26 | 28 | ||
27 | #include <nvgpu/hw/gv100/hw_ccsr_gv100.h> | 29 | #include <nvgpu/hw/gv100/hw_ccsr_gv100.h> |
30 | #include <nvgpu/hw/gk20a/hw_fifo_gk20a.h> | ||
28 | 31 | ||
29 | #define DEFAULT_FIFO_PREEMPT_TIMEOUT 0x3FFFFFUL | 32 | #define DEFAULT_FIFO_PREEMPT_TIMEOUT 0x3FFFFFUL |
30 | 33 | ||
@@ -38,3 +41,14 @@ u32 gv100_fifo_get_preempt_timeout(struct gk20a *g) | |||
38 | return DEFAULT_FIFO_PREEMPT_TIMEOUT; | 41 | return DEFAULT_FIFO_PREEMPT_TIMEOUT; |
39 | } | 42 | } |
40 | 43 | ||
44 | void gv100_apply_ctxsw_timeout_intr(struct gk20a *g) | ||
45 | { | ||
46 | u32 timeout; | ||
47 | |||
48 | timeout = g->ch_wdt_timeout_ms*1000; | ||
49 | timeout = scale_ptimer(timeout, | ||
50 | ptimer_scalingfactor10x(g->ptimer_src_freq)); | ||
51 | timeout |= fifo_eng_timeout_detection_enabled_f(); | ||
52 | gk20a_writel(g, fifo_eng_timeout_r(), timeout); | ||
53 | } | ||
54 | |||
diff --git a/drivers/gpu/nvgpu/gv100/fifo_gv100.h b/drivers/gpu/nvgpu/gv100/fifo_gv100.h index af6ad030..0af3fcce 100644 --- a/drivers/gpu/nvgpu/gv100/fifo_gv100.h +++ b/drivers/gpu/nvgpu/gv100/fifo_gv100.h | |||
@@ -30,4 +30,5 @@ struct gk20a; | |||
30 | 30 | ||
31 | u32 gv100_fifo_get_num_fifos(struct gk20a *g); | 31 | u32 gv100_fifo_get_num_fifos(struct gk20a *g); |
32 | u32 gv100_fifo_get_preempt_timeout(struct gk20a *g); | 32 | u32 gv100_fifo_get_preempt_timeout(struct gk20a *g); |
33 | void gv100_apply_ctxsw_timeout_intr(struct gk20a *g); | ||
33 | #endif | 34 | #endif |
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index d2136466..a03ae03e 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -509,6 +509,7 @@ static const struct gpu_ops gv100_ops = { | |||
509 | .free_channel_ctx_header = gv11b_free_subctx_header, | 509 | .free_channel_ctx_header = gv11b_free_subctx_header, |
510 | .preempt_ch_tsg = gv11b_fifo_preempt_ch_tsg, | 510 | .preempt_ch_tsg = gv11b_fifo_preempt_ch_tsg, |
511 | .handle_ctxsw_timeout = gv11b_fifo_handle_ctxsw_timeout, | 511 | .handle_ctxsw_timeout = gv11b_fifo_handle_ctxsw_timeout, |
512 | .apply_ctxsw_timeout_intr = gv100_apply_ctxsw_timeout_intr, | ||
512 | }, | 513 | }, |
513 | .gr_ctx = { | 514 | .gr_ctx = { |
514 | .get_netlist_name = gr_gv100_get_netlist_name, | 515 | .get_netlist_name = gr_gv100_get_netlist_name, |
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c index d90c622d..4fd90c0d 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | |||
@@ -1287,7 +1287,7 @@ static const char *const gv11b_sched_error_str[] = { | |||
1287 | "rl_ack_extra", | 1287 | "rl_ack_extra", |
1288 | "rl_rdat_timeout", | 1288 | "rl_rdat_timeout", |
1289 | "rl_rdat_extra", | 1289 | "rl_rdat_extra", |
1290 | "xxx-a", | 1290 | "eng_ctxsw_timeout", |
1291 | "xxx-b", | 1291 | "xxx-b", |
1292 | "rl_req_timeout", | 1292 | "rl_req_timeout", |
1293 | "new_runlist", | 1293 | "new_runlist", |