diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index f8382afe..17efe5ca 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -953,15 +953,23 @@ bool gk20a_fifo_set_ctx_mmu_error_tsg(struct gk20a *g, | |||
953 | return ret; | 953 | return ret; |
954 | } | 954 | } |
955 | 955 | ||
956 | void gk20a_fifo_abort_tsg(struct gk20a *g, u32 tsgid) | 956 | void gk20a_fifo_abort_tsg(struct gk20a *g, u32 tsgid, bool preempt) |
957 | { | 957 | { |
958 | struct tsg_gk20a *tsg = &g->fifo.tsg[tsgid]; | 958 | struct tsg_gk20a *tsg = &g->fifo.tsg[tsgid]; |
959 | struct channel_gk20a *ch; | 959 | struct channel_gk20a *ch; |
960 | 960 | ||
961 | gk20a_dbg_fn(""); | ||
962 | |||
963 | gk20a_disable_tsg(tsg); | ||
964 | |||
965 | if (preempt) | ||
966 | g->ops.fifo.preempt_tsg(g, tsgid); | ||
967 | |||
961 | mutex_lock(&tsg->ch_list_lock); | 968 | mutex_lock(&tsg->ch_list_lock); |
962 | list_for_each_entry(ch, &tsg->ch_list, ch_entry) { | 969 | list_for_each_entry(ch, &tsg->ch_list, ch_entry) { |
963 | if (gk20a_channel_get(ch)) { | 970 | if (gk20a_channel_get(ch)) { |
964 | gk20a_channel_abort(ch, false); | 971 | ch->has_timedout = true; |
972 | gk20a_channel_abort_clean_up(ch); | ||
965 | gk20a_channel_put(ch); | 973 | gk20a_channel_put(ch); |
966 | } | 974 | } |
967 | } | 975 | } |
@@ -1129,7 +1137,7 @@ static bool gk20a_fifo_handle_mmu_fault( | |||
1129 | verbose = | 1137 | verbose = |
1130 | gk20a_fifo_set_ctx_mmu_error_tsg(g, tsg); | 1138 | gk20a_fifo_set_ctx_mmu_error_tsg(g, tsg); |
1131 | 1139 | ||
1132 | gk20a_fifo_abort_tsg(g, tsg->tsgid); | 1140 | gk20a_fifo_abort_tsg(g, tsg->tsgid, false); |
1133 | 1141 | ||
1134 | /* put back the ref taken early above */ | 1142 | /* put back the ref taken early above */ |
1135 | if (referenced_channel) | 1143 | if (referenced_channel) |
@@ -1324,7 +1332,7 @@ void gk20a_fifo_recover_tsg(struct gk20a *g, u32 tsgid, bool verbose) | |||
1324 | if (gk20a_fifo_set_ctx_mmu_error_tsg(g, tsg)) | 1332 | if (gk20a_fifo_set_ctx_mmu_error_tsg(g, tsg)) |
1325 | gk20a_debug_dump(g->dev); | 1333 | gk20a_debug_dump(g->dev); |
1326 | 1334 | ||
1327 | gk20a_fifo_abort_tsg(g, tsgid); | 1335 | gk20a_fifo_abort_tsg(g, tsgid, false); |
1328 | } | 1336 | } |
1329 | 1337 | ||
1330 | gr_gk20a_enable_ctxsw(g); | 1338 | gr_gk20a_enable_ctxsw(g); |