diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2015-10-12 08:39:43 -0400 |
---|---|---|
committer | Ishan Mittal <imittal@nvidia.com> | 2015-10-20 02:52:50 -0400 |
commit | 0269339256dee0a8fcd2d6aa1180780039f22fab (patch) | |
tree | 190fe62ff3ef4716a6d69259c0c5ca2394301022 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | da8ff40e55c498f2ca24d446d45cda9d4d83bbcf (diff) |
gpu: nvgpu: restart timer instead of cancel
In gk20a_fifo_handle_sched_error(), we currently cancel
the timeout on all the channels
But this could cause us to miss one of stuck channel
hence, instead of cancelling, restart the timeout of channel
on which it is already active
Bug 200133289
Change-Id: I40e7e0e5394911fc110ab6fde39592b885dfaf7d
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/816133
Reviewed-by: Ishan Mittal <imittal@nvidia.com>
Tested-by: Ishan Mittal <imittal@nvidia.com>
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 | } |