From c5f03db98a20eb4e8b83fd350d293aab6986beff Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Fri, 16 Mar 2018 11:11:27 -0700 Subject: gpu: nvgpu: add gops.fifo.ch_abort_clean_up Channel abort clean up is only needed by native and vgpu driver but not RM server. RM server expects guest will clean up itself. RM server should not set the callback. Jira VQRM-3058 Change-Id: I11b49b6f2d51c871e31de16955d487dca82609cb Signed-off-by: Richard Zhao Reviewed-on: https://git-master.nvidia.com/r/1679705 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 6a7afad7..f069b193 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -1432,7 +1432,8 @@ void gk20a_fifo_abort_tsg(struct gk20a *g, u32 tsgid, bool preempt) nvgpu_list_for_each_entry(ch, &tsg->ch_list, channel_gk20a, ch_entry) { if (gk20a_channel_get(ch)) { ch->has_timedout = true; - gk20a_channel_abort_clean_up(ch); + if (ch->g->ops.fifo.ch_abort_clean_up) + ch->g->ops.fifo.ch_abort_clean_up(ch); gk20a_channel_put(ch); } } @@ -2016,7 +2017,8 @@ int gk20a_fifo_tsg_unbind_channel(struct channel_gk20a *ch) if (!tsg_timedout) g->ops.fifo.enable_tsg(tsg); - gk20a_channel_abort_clean_up(ch); + if (ch->g->ops.fifo.ch_abort_clean_up) + ch->g->ops.fifo.ch_abort_clean_up(ch); return 0; -- cgit v1.2.2