diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 6f0d7375..34b62ac4 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -1574,7 +1574,7 @@ static void gk20a_channel_timeout_stop(struct channel_gk20a *ch) | |||
1574 | mutex_unlock(&ch->timeout.lock); | 1574 | mutex_unlock(&ch->timeout.lock); |
1575 | } | 1575 | } |
1576 | 1576 | ||
1577 | void gk20a_channel_timeout_stop_all_channels(struct gk20a *g) | 1577 | void gk20a_channel_timeout_restart_all_channels(struct gk20a *g) |
1578 | { | 1578 | { |
1579 | u32 chid; | 1579 | u32 chid; |
1580 | struct fifo_gk20a *f = &g->fifo; | 1580 | struct fifo_gk20a *f = &g->fifo; |
@@ -1583,7 +1583,20 @@ void gk20a_channel_timeout_stop_all_channels(struct gk20a *g) | |||
1583 | struct channel_gk20a *ch = &f->channel[chid]; | 1583 | struct channel_gk20a *ch = &f->channel[chid]; |
1584 | 1584 | ||
1585 | if (gk20a_channel_get(ch)) { | 1585 | if (gk20a_channel_get(ch)) { |
1586 | gk20a_channel_timeout_stop(ch); | 1586 | mutex_lock(&ch->timeout.lock); |
1587 | if (!ch->timeout.initialized) { | ||
1588 | mutex_unlock(&ch->timeout.lock); | ||
1589 | gk20a_channel_put(ch); | ||
1590 | continue; | ||
1591 | } | ||
1592 | mutex_unlock(&ch->timeout.lock); | ||
1593 | |||
1594 | cancel_delayed_work_sync(&ch->timeout.wq); | ||
1595 | if (!ch->has_timedout) | ||
1596 | schedule_delayed_work(&ch->timeout.wq, | ||
1597 | msecs_to_jiffies( | ||
1598 | gk20a_get_channel_watchdog_timeout(ch))); | ||
1599 | |||
1587 | gk20a_channel_put(ch); | 1600 | gk20a_channel_put(ch); |
1588 | } | 1601 | } |
1589 | } | 1602 | } |