mutex_unlock(&ch->timeout.lock);
}
+void gk20a_channel_timeout_stop_all_channels(struct gk20a *g)
+{
+ u32 chid;
+ struct fifo_gk20a *f = &g->fifo;
+
+ for (chid = 0; chid < f->num_channels; chid++) {
+ struct channel_gk20a *ch = &f->channel[chid];
+
+ if (gk20a_channel_get(ch)) {
+ gk20a_channel_timeout_stop(ch);
+ gk20a_channel_put(ch);
+ }
+ }
+}
+
static void gk20a_channel_timeout_handler(struct work_struct *work)
{
struct channel_gk20a_job *job;
int channel_gk20a_setup_ramfc(struct channel_gk20a *c,
u64 gpfifo_base, u32 gpfifo_entries);
void channel_gk20a_enable(struct channel_gk20a *ch);
+void gk20a_channel_timeout_stop_all_channels(struct gk20a *g);
#endif /* CHANNEL_GK20A_H */
struct channel_gk20a *ch = &f->channel[id];
if (is_tsg) {
+ gk20a_channel_timeout_stop_all_channels(g);
gk20a_fifo_recover(g, BIT(engine_id), id, true, true);
ret = true;
goto err;
"fifo sched ctxsw timeout error:"
"engine = %u, ch = %d", engine_id, id);
gk20a_gr_debug_dump(g->dev);
+ /*
+ * Cancel all channels' timeout since SCHED error might
+ * trigger multiple watchdogs at a time
+ */
+ gk20a_channel_timeout_stop_all_channels(g);
gk20a_fifo_recover(g, BIT(engine_id), id, false,
ch->timeout_debug_dump);
ret = true;