diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-05-31 08:39:08 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:16 -0500 |
commit | 85f579c6e57bdfcab18b01e6dba5854e5bc308ae (patch) | |
tree | 43048933b3e1fe5ac4e017d839c7d28239930f1f /drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |
parent | ba949fd8af16283e9712541ed69eaffcc35ed38c (diff) |
gpu: nvgpu: use correct APIs for disable and preempt
In gr_gp10b_set_preemption_mode() and in gp10b_fifo_resetup_ramfc(),
we call channel specific APIs to disable/preempt/enable channel
But we do not consider TSGs in this case
Hence use correct (below) APIs in above function which
will handle channel or TSG internally :
gk20a_disable_channel_tsg()
gk20a_fifo_preempt()
gk20a_enable_channel_tsg()
Bug 200205041
Change-Id: I2369e79b2af3b8a91699044106293865d5f8f260
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1157192
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index 205d2c97..5db65175 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |||
@@ -2061,18 +2061,21 @@ static int gr_gp10b_set_preemption_mode(struct channel_gk20a *ch, | |||
2061 | if (gk20a_mem_begin(g, mem)) | 2061 | if (gk20a_mem_begin(g, mem)) |
2062 | return -ENOMEM; | 2062 | return -ENOMEM; |
2063 | 2063 | ||
2064 | g->ops.fifo.disable_channel(ch); | 2064 | err = gk20a_disable_channel_tsg(g, ch); |
2065 | err = g->ops.fifo.preempt_channel(g, ch->hw_chid); | ||
2066 | if (err) | 2065 | if (err) |
2067 | goto unmap_ctx; | 2066 | goto unmap_ctx; |
2068 | 2067 | ||
2068 | err = gk20a_fifo_preempt(g, ch); | ||
2069 | if (err) | ||
2070 | goto enable_ch; | ||
2071 | |||
2069 | if (g->ops.gr.update_ctxsw_preemption_mode) { | 2072 | if (g->ops.gr.update_ctxsw_preemption_mode) { |
2070 | g->ops.gr.update_ctxsw_preemption_mode(ch->g, ch_ctx, mem); | 2073 | g->ops.gr.update_ctxsw_preemption_mode(ch->g, ch_ctx, mem); |
2071 | g->ops.gr.commit_global_cb_manager(g, ch, true); | 2074 | g->ops.gr.commit_global_cb_manager(g, ch, true); |
2072 | } | 2075 | } |
2073 | 2076 | ||
2074 | g->ops.fifo.enable_channel(ch); | 2077 | enable_ch: |
2075 | 2078 | gk20a_enable_channel_tsg(g, ch); | |
2076 | unmap_ctx: | 2079 | unmap_ctx: |
2077 | gk20a_mem_end(g, mem); | 2080 | gk20a_mem_end(g, mem); |
2078 | 2081 | ||