diff options
author | Lauri Peltonen <lpeltonen@nvidia.com> | 2014-06-11 05:56:31 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:10 -0400 |
commit | f575bc667649ff1a09aac8ecbe626fde8ea5f2f4 (patch) | |
tree | af8ef5bd572772e54a97ebfbdb7e693670468c59 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |
parent | ae22cda010d26419476939fa46abf9345c412eff (diff) |
gpu: nvgpu: Support semaphore sync when aborting jobs
When aborting jobs on channel error situations, we manually set
the channel syncpoint's min == max in gk20a_disable_channel_no_update.
Nvhost will notice this manual syncpoint increment, and will call back
to gk20a_channel_update, which will clean up the job.
With semaphore synchronization, we don't have anybody calling back to
gk20a_channel_update, so we need to call it ourselves. Release job
semaphores (the equivalent of set_min_eq_max) on
gk20a_disable_channel_no_update, and if any semaphores were released,
call gk20a_channel_update afterwards.
Because we are actually calling gk20a_channel_update in some situations,
gk20a_disable_channel_no_update is no longer an appropriate name for the
function. Rename it to gk20a_channel_abort.
Bug 1450122
Change-Id: I1267b099a5778041cbc8e91b7184844812145b93
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
Reviewed-on: http://git-master/r/422161
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 2d09a840..f246c73e 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -1043,7 +1043,7 @@ static bool gk20a_fifo_handle_mmu_fault(struct gk20a *g) | |||
1043 | if (ch->in_use) { | 1043 | if (ch->in_use) { |
1044 | /* disable the channel from hw and increment | 1044 | /* disable the channel from hw and increment |
1045 | * syncpoints */ | 1045 | * syncpoints */ |
1046 | gk20a_disable_channel_no_update(ch); | 1046 | gk20a_channel_abort(ch); |
1047 | 1047 | ||
1048 | /* remove the channel from runlist */ | 1048 | /* remove the channel from runlist */ |
1049 | clear_bit(ch->hw_chid, | 1049 | clear_bit(ch->hw_chid, |
@@ -1180,7 +1180,7 @@ void gk20a_fifo_recover_ch(struct gk20a *g, u32 hw_chid, bool verbose) | |||
1180 | struct channel_gk20a *ch = | 1180 | struct channel_gk20a *ch = |
1181 | g->fifo.channel + hw_chid; | 1181 | g->fifo.channel + hw_chid; |
1182 | 1182 | ||
1183 | gk20a_disable_channel_no_update(ch); | 1183 | gk20a_channel_abort(ch); |
1184 | for (i = 0; i < g->fifo.max_runlists; i++) | 1184 | for (i = 0; i < g->fifo.max_runlists; i++) |
1185 | gk20a_fifo_update_runlist(g, i, | 1185 | gk20a_fifo_update_runlist(g, i, |
1186 | hw_chid, false, false); | 1186 | hw_chid, false, false); |