summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2015-06-01 16:03:38 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:52:06 -0500
commitc25a2ac26e11057c1bef0da7b4a661247817140f (patch)
tree9494a58a3151796754520b9fa4e2d7697b605617 /drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
parent634acd7422afb9cec5a390471937dc964ba31025 (diff)
gpu: nvgpu: Disable channel when writing syncpt id
Kick channel off PBDMA before writing new sync point id to allowed sync points. Bug 1648297 Bug 1646477 Change-Id: I7c686d474c403fdd54bc64cff63b7d049feecb4d Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/750981
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/fifo_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/fifo_gp10b.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
index d62f7316..3a6c3c23 100644
--- a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
@@ -156,6 +156,13 @@ static int gp10b_fifo_resetup_ramfc(struct channel_gk20a *c)
156 gk20a_dbg_fn(""); 156 gk20a_dbg_fn("");
157 157
158 inst_ptr = c->inst_block.cpu_va; 158 inst_ptr = c->inst_block.cpu_va;
159
160 /* disable channel */
161 c->g->ops.fifo.disable_channel(c);
162
163 /* preempt the channel */
164 WARN_ON(c->g->ops.fifo.preempt_channel(c->g, c->hw_chid));
165
159 if (c->sync) { 166 if (c->sync) {
160 u32 v = pbdma_allowed_syncpoints_0_valid_f(1); 167 u32 v = pbdma_allowed_syncpoints_0_valid_f(1);
161 168
@@ -166,8 +173,15 @@ static int gp10b_fifo_resetup_ramfc(struct channel_gk20a *c)
166 v |= pbdma_allowed_syncpoints_0_index_f(syncpt_id); 173 v |= pbdma_allowed_syncpoints_0_index_f(syncpt_id);
167 174
168 gk20a_mem_wr32(inst_ptr, ram_fc_allowed_syncpoints_w(), v); 175 gk20a_mem_wr32(inst_ptr, ram_fc_allowed_syncpoints_w(), v);
176 } else {
177 gk20a_mem_wr32(inst_ptr, ram_fc_allowed_syncpoints_w(), 0);
169 } 178 }
170 179
180 /* enable channel */
181 gk20a_writel(c->g, ccsr_channel_r(c->hw_chid),
182 gk20a_readl(c->g, ccsr_channel_r(c->hw_chid)) |
183 ccsr_channel_enable_set_true_f());
184
171 gk20a_dbg_fn("done"); 185 gk20a_dbg_fn("done");
172 186
173 return 0; 187 return 0;