diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 4e0e2bd1..997856aa 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -817,7 +817,7 @@ int gk20a_init_fifo_reset_enable_hw(struct gk20a *g) | |||
817 | if (g->ops.fifo.apply_ctxsw_timeout_intr) | 817 | if (g->ops.fifo.apply_ctxsw_timeout_intr) |
818 | g->ops.fifo.apply_ctxsw_timeout_intr(g); | 818 | g->ops.fifo.apply_ctxsw_timeout_intr(g); |
819 | else { | 819 | else { |
820 | timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US; | 820 | timeout = g->fifo_eng_timeout_us; |
821 | timeout = scale_ptimer(timeout, | 821 | timeout = scale_ptimer(timeout, |
822 | ptimer_scalingfactor10x(g->ptimer_src_freq)); | 822 | ptimer_scalingfactor10x(g->ptimer_src_freq)); |
823 | timeout |= fifo_eng_timeout_detection_enabled_f(); | 823 | timeout |= fifo_eng_timeout_detection_enabled_f(); |
@@ -2169,15 +2169,16 @@ bool gk20a_fifo_check_ch_ctxsw_timeout(struct channel_gk20a *ch, | |||
2169 | { | 2169 | { |
2170 | bool recover = false; | 2170 | bool recover = false; |
2171 | bool progress = false; | 2171 | bool progress = false; |
2172 | struct gk20a *g = ch->g; | ||
2172 | 2173 | ||
2173 | if (gk20a_channel_get(ch)) { | 2174 | if (gk20a_channel_get(ch)) { |
2174 | recover = gk20a_channel_update_and_check_timeout(ch, | 2175 | recover = gk20a_channel_update_and_check_timeout(ch, |
2175 | GRFIFO_TIMEOUT_CHECK_PERIOD_US / 1000, | 2176 | g->fifo_eng_timeout_us / 1000, |
2176 | &progress); | 2177 | &progress); |
2177 | *verbose = ch->timeout_debug_dump; | 2178 | *verbose = ch->timeout_debug_dump; |
2178 | *ms = ch->timeout_accumulated_ms; | 2179 | *ms = ch->timeout_accumulated_ms; |
2179 | if (recover) | 2180 | if (recover) |
2180 | ch->g->ops.fifo.set_error_notifier(ch, | 2181 | g->ops.fifo.set_error_notifier(ch, |
2181 | NVGPU_ERR_NOTIFIER_FIFO_ERROR_IDLE_TIMEOUT); | 2182 | NVGPU_ERR_NOTIFIER_FIFO_ERROR_IDLE_TIMEOUT); |
2182 | 2183 | ||
2183 | gk20a_channel_put(ch); | 2184 | gk20a_channel_put(ch); |
@@ -2194,7 +2195,7 @@ bool gk20a_fifo_check_tsg_ctxsw_timeout(struct tsg_gk20a *tsg, | |||
2194 | struct gk20a *g = tsg->g; | 2195 | struct gk20a *g = tsg->g; |
2195 | 2196 | ||
2196 | *verbose = false; | 2197 | *verbose = false; |
2197 | *ms = GRFIFO_TIMEOUT_CHECK_PERIOD_US / 1000; | 2198 | *ms = g->fifo_eng_timeout_us / 1000; |
2198 | 2199 | ||
2199 | nvgpu_rwsem_down_read(&tsg->ch_list_lock); | 2200 | nvgpu_rwsem_down_read(&tsg->ch_list_lock); |
2200 | 2201 | ||
@@ -2220,7 +2221,7 @@ bool gk20a_fifo_check_tsg_ctxsw_timeout(struct tsg_gk20a *tsg, | |||
2220 | nvgpu_log_info(g, "progress on tsg=%d ch=%d", | 2221 | nvgpu_log_info(g, "progress on tsg=%d ch=%d", |
2221 | tsg->tsgid, ch->chid); | 2222 | tsg->tsgid, ch->chid); |
2222 | gk20a_channel_put(ch); | 2223 | gk20a_channel_put(ch); |
2223 | *ms = GRFIFO_TIMEOUT_CHECK_PERIOD_US / 1000; | 2224 | *ms = g->fifo_eng_timeout_us / 1000; |
2224 | nvgpu_list_for_each_entry(ch, &tsg->ch_list, | 2225 | nvgpu_list_for_each_entry(ch, &tsg->ch_list, |
2225 | channel_gk20a, ch_entry) { | 2226 | channel_gk20a, ch_entry) { |
2226 | if (gk20a_channel_get(ch)) { | 2227 | if (gk20a_channel_get(ch)) { |