summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-09-26 09:38:19 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-04 06:37:17 -0400
commit33f475d6d871a0edfa7e02da9ba1706bfb362192 (patch)
tree68a1135137377d10b530e7401c8910275c153fe4 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
parent3cd0603c4218ee33eb1e5a36322b25d369ed487b (diff)
gpu: nvgpu: kill TSG if channel has NEXT set while closing
Currently if channel has NEXT bit set while closing the channel we just print an error and continue channel unbind sequence from TSG But since channel with NEXT set is active killing it can potentially corrupt the TSG context and cause unpredictable errors on remaining channels/TSG Hence fix this by killing whole TSG context if channel being closed has NEXT bit set if gk20a_fifo_tsg_unbind_channel() API returns error, kill the TSG otherwise continue with channel unbind sequence Bug 200327095 Change-Id: I2abf1a3db8ba6f105b6ca86e78006c7b2a7726cc Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1568566 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index 8e78b95e..9eb2204d 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -1918,9 +1918,11 @@ int gk20a_fifo_tsg_unbind_channel_verify_status(struct channel_gk20a *ch)
1918 if (g->ops.fifo.tsg_verify_status_faulted) 1918 if (g->ops.fifo.tsg_verify_status_faulted)
1919 g->ops.fifo.tsg_verify_status_faulted(ch); 1919 g->ops.fifo.tsg_verify_status_faulted(ch);
1920 1920
1921 if (gk20a_fifo_channel_status_is_next(g, ch->chid)) 1921 if (gk20a_fifo_channel_status_is_next(g, ch->chid)) {
1922 nvgpu_err(g, "Channel %d to be removed from TSG has NEXT set!", 1922 nvgpu_err(g, "Channel %d to be removed from TSG %d has NEXT set!",
1923 ch->chid); 1923 ch->chid, ch->tsgid);
1924 return -EINVAL;
1925 }
1924 1926
1925 return 0; 1927 return 0;
1926} 1928}