summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-10-10 03:33:23 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-13 16:42:58 -0400
commit6de92de60b284266922ea151e1818d237cb5ac3e (patch)
tree843de21580f396a8a643130d7a8a63a5ce6e20c2 /drivers
parente02d14e7542aed80c8f37c12a1d5df127146fbd3 (diff)
gpu: nvgpu: fix channel status verify sequence
While unbindin a channel from TSG, we first disable all the channels, then examine the status of channel being removed in gk20a_fifo_tsg_unbind_channel_verify_status(), and if this API fails we re-enable all the channel and kill whole TSG And in gk20a_fifo_tsg_unbind_channel_verify_status() we first check ctx_reload and fault status and then check NEXT status If channel has NEXT set we bail out But since we have already changed the TSG ctx_reload status re-enabling all channels in TSG might cause issues Hence fix this by correcting sequence so that we first ensure that NEXT is not set on channel and then only alter the status Bug 200327095 Change-Id: I4f0786bc507fad5462d4cdd8d0ca91ea611ee3b5 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1575905 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index 848e5123..6544a652 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -1912,18 +1912,18 @@ int gk20a_fifo_tsg_unbind_channel_verify_status(struct channel_gk20a *ch)
1912{ 1912{
1913 struct gk20a *g = ch->g; 1913 struct gk20a *g = ch->g;
1914 1914
1915 if (g->ops.fifo.tsg_verify_status_ctx_reload)
1916 g->ops.fifo.tsg_verify_status_ctx_reload(ch);
1917
1918 if (g->ops.fifo.tsg_verify_status_faulted)
1919 g->ops.fifo.tsg_verify_status_faulted(ch);
1920
1921 if (gk20a_fifo_channel_status_is_next(g, ch->chid)) { 1915 if (gk20a_fifo_channel_status_is_next(g, ch->chid)) {
1922 nvgpu_err(g, "Channel %d to be removed from TSG %d has NEXT set!", 1916 nvgpu_err(g, "Channel %d to be removed from TSG %d has NEXT set!",
1923 ch->chid, ch->tsgid); 1917 ch->chid, ch->tsgid);
1924 return -EINVAL; 1918 return -EINVAL;
1925 } 1919 }
1926 1920
1921 if (g->ops.fifo.tsg_verify_status_ctx_reload)
1922 g->ops.fifo.tsg_verify_status_ctx_reload(ch);
1923
1924 if (g->ops.fifo.tsg_verify_status_faulted)
1925 g->ops.fifo.tsg_verify_status_faulted(ch);
1926
1927 return 0; 1927 return 0;
1928} 1928}
1929 1929