From 3cd0603c4218ee33eb1e5a36322b25d369ed487b Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 3 Oct 2017 00:51:07 -0700 Subject: gpu: nvgpu: verify channel status while closing per-platform We right now call gk20a_fifo_tsg_unbind_channel_verify_status() to verify channel status while unbinding a channel from TSG while closing Add support to do this verification per-platform and keep this disabled for vgpu platforms Bug 200327095 Change-Id: I19fab41c74d10d528d22bd9b3982a4ed73c3b4ca Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1572368 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 7fc773f8..8e78b95e 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -1908,7 +1908,7 @@ int gk20a_fifo_force_reset_ch(struct channel_gk20a *ch, return 0; } -static int gk20a_fifo_tsg_unbind_channel_verify_status(struct channel_gk20a *ch) +int gk20a_fifo_tsg_unbind_channel_verify_status(struct channel_gk20a *ch) { struct gk20a *g = ch->g; @@ -1939,9 +1939,11 @@ int gk20a_fifo_tsg_unbind_channel(struct channel_gk20a *ch) if (err) goto fail_enable_tsg; - err = gk20a_fifo_tsg_unbind_channel_verify_status(ch); - if (err) - goto fail_enable_tsg; + if (g->ops.fifo.tsg_verify_channel_status) { + err = g->ops.fifo.tsg_verify_channel_status(ch); + if (err) + goto fail_enable_tsg; + } /* Channel should be seen as TSG channel while updating runlist */ err = channel_gk20a_update_runlist(ch, false); -- cgit v1.2.2