diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-06-01 04:53:58 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-06-01 16:04:02 -0400 |
commit | 8b05c705fb1cfd3d4f9196f1eadedf0c0b4eff69 (patch) | |
tree | f652a9c3454780c8237bf5abb80e78788ed895bf /drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |
parent | 31fa6773ef124a4e779e0972e87d4fb681217f19 (diff) |
gpu: nvgpu: fix TSG abort sequence
In gk20a_fifo_abort_tsg(), we loop through channels of
TSG and call gk20a_channel_abort() for each channel
This is incorrect since we disable and preempt each
channel separately, whereas we should disable all channels
at once and use TSG specific API to preempt TSG
Fix this with below sequence :
- gk20a_disable_tsg() to disable all channels
- preempt tsg if required
- for each channel in TSG
- set has_timedout flag
- call gk20a_channel_abort_clean_up() to clean up channel state
Also, separate out common gk20a_channel_abort_clean_up() API
which can be called from both channel and TSG abort routines
In gk20a_channel_abort(), call gk20a_fifo_abort_tsg() if the
channel is part of TSG
Add new argument "preempt" to gk20a_fifo_abort_tsg() and
preempt TSG if flag is set
Bug 200205041
Change-Id: I4eff5394d26fbb53996f2d30b35140b75450f338
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1157190
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index b1355f92..29a13d24 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |||
@@ -212,6 +212,7 @@ bool gk20a_channel_update_and_check_timeout(struct channel_gk20a *ch, | |||
212 | u32 timeout_delta_ms); | 212 | u32 timeout_delta_ms); |
213 | void gk20a_disable_channel(struct channel_gk20a *ch); | 213 | void gk20a_disable_channel(struct channel_gk20a *ch); |
214 | void gk20a_channel_abort(struct channel_gk20a *ch, bool channel_preempt); | 214 | void gk20a_channel_abort(struct channel_gk20a *ch, bool channel_preempt); |
215 | void gk20a_channel_abort_clean_up(struct channel_gk20a *ch); | ||
215 | int gk20a_channel_finish(struct channel_gk20a *ch, unsigned long timeout); | 216 | int gk20a_channel_finish(struct channel_gk20a *ch, unsigned long timeout); |
216 | void gk20a_set_error_notifier(struct channel_gk20a *ch, __u32 error); | 217 | void gk20a_set_error_notifier(struct channel_gk20a *ch, __u32 error); |
217 | void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events); | 218 | void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events); |