diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2017-11-08 18:59:31 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-09 22:19:03 -0500 |
commit | d99b72974d06d4b3bc577bae8dc721b7b8f3cde9 (patch) | |
tree | 40d0284ff00e03e24120f20dae40599dbcf1dbc3 | |
parent | 96cb31ea105c155b0067a09924b0c734f95b4d1a (diff) |
gpu: nvgpu: gv11b: clear channel status
After unbinding channel, following fields in
channel status needs to be cleared manually:
ccsr_channel_enable_clr_true
ccsr_channel_pbdma_faulted_reset
ccsr_channel_eng_faulted_reset
Unbinding channel expected to clear all other
channel status fields.
Bug 1972365
Change-Id: Ibfd84df2f41adc2eb437a026acde3f3d618d7758
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1594671
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c index 4c3b1186..a3cb9292 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | |||
@@ -260,9 +260,20 @@ void gv11b_userd_gp_put(struct gk20a *g, struct channel_gk20a *c) | |||
260 | 260 | ||
261 | void channel_gv11b_unbind(struct channel_gk20a *ch) | 261 | void channel_gv11b_unbind(struct channel_gk20a *ch) |
262 | { | 262 | { |
263 | struct gk20a *g = ch->g; | ||
264 | |||
263 | gk20a_dbg_fn(""); | 265 | gk20a_dbg_fn(""); |
264 | 266 | ||
265 | gk20a_fifo_channel_unbind(ch); | 267 | if (nvgpu_atomic_cmpxchg(&ch->bound, true, false)) { |
268 | gk20a_writel(g, ccsr_channel_inst_r(ch->chid), | ||
269 | ccsr_channel_inst_ptr_f(0) | | ||
270 | ccsr_channel_inst_bind_false_f()); | ||
271 | |||
272 | gk20a_writel(g, ccsr_channel_r(ch->chid), | ||
273 | ccsr_channel_enable_clr_true_f() | | ||
274 | ccsr_channel_pbdma_faulted_reset_f() | | ||
275 | ccsr_channel_eng_faulted_reset_f()); | ||
276 | } | ||
266 | } | 277 | } |
267 | 278 | ||
268 | u32 gv11b_fifo_get_num_fifos(struct gk20a *g) | 279 | u32 gv11b_fifo_get_num_fifos(struct gk20a *g) |