summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2016-09-07 13:24:28 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-10-17 17:38:50 -0400
commit718af968f056cb1bdf5b57e1ce9957720d6053a4 (patch)
tree29978e231f4135e9cc6739e23a9e3add3dfd2c6b /drivers/gpu/nvgpu/gk20a/mm_gk20a.c
parent2b593224dfbd93a34a31d5cd7654332f49d00d61 (diff)
gpu: nvgpu: Fix wmb() order in pramin access
wmb() should come after the writes to ensure that the writes have completed before progressing. Bug 1811382 Change-Id: I98fba317b1760240c0b5de531accf398fe69c9b3 Signed-off-by: Alex Waterman <alexw@nvidia.com> (cherry picked from commit 1b1201b9c109061590e6e25260d7230ae2c89888) Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1225251 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index ff9bb5e2..0c1c6d8f 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -229,17 +229,17 @@ static inline void pramin_access_batch_wr_n(struct gk20a *g, u32 start,
229{ 229{
230 u32 r = start, *src_u32 = *arg; 230 u32 r = start, *src_u32 = *arg;
231 231
232 while (words--) {
233 writel_relaxed(*src_u32++, g->regs + r);
234 r += sizeof(u32);
235 }
236
232 /* 237 /*
233 * Barrier moved here from gk20a_writel in the loop. The writes don't 238 * Barrier moved here from gk20a_writel in the loop. The writes don't
234 * have to be ordered. 239 * have to be ordered.
235 */ 240 */
236 wmb(); 241 wmb();
237 242
238 while (words--) {
239 writel_relaxed(*src_u32++, g->regs + r);
240 r += sizeof(u32);
241 }
242
243 *arg = src_u32; 243 *arg = src_u32;
244} 244}
245 245
@@ -248,16 +248,16 @@ static inline void pramin_access_batch_set(struct gk20a *g, u32 start,
248{ 248{
249 u32 r = start, repeat = **arg; 249 u32 r = start, repeat = **arg;
250 250
251 while (words--) {
252 writel_relaxed(repeat, g->regs + r);
253 r += sizeof(u32);
254 }
255
251 /* 256 /*
252 * Barrier moved here from gk20a_writel in the loop. The writes don't 257 * Barrier moved here from gk20a_writel in the loop. The writes don't
253 * have to be ordered. 258 * have to be ordered.
254 */ 259 */
255 wmb(); 260 wmb();
256
257 while (words--) {
258 writel_relaxed(repeat, g->regs + r);
259 r += sizeof(u32);
260 }
261} 261}
262 262
263u32 gk20a_mem_rd32(struct gk20a *g, struct mem_desc *mem, u32 w) 263u32 gk20a_mem_rd32(struct gk20a *g, struct mem_desc *mem, u32 w)