summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2016-09-07 13:26:28 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-09-20 17:56:45 -0400
commit9b7b5c3affdac7babeee111a2493baa90aace806 (patch)
treeccaf630fa557d5b35daead1ca04b6a70b3460aed /drivers
parent2889093618a41a04d1a21af75a3d40834a6b1c47 (diff)
gpu: nvgpu: Fix ordering of wmb() in gk20a_writel()
Putting the wmb() before the write only ensures that any previous writes are done. But this doesn't really do anything for the writel_relaxed(). The point of the wmb() here is to ensure that the write performed by the writel_relaxed() is actually done before proceeding. Bug 1811382 Change-Id: I7250ea074b8548c899acfd34d816de466cf53b6f Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1216434 (cherry picked from commit c9aa02dc61138615d971902fe58dc6a113cdf00a) Reviewed-on: http://git-master/r/1223457 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 83d388a7..72170362 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -1028,8 +1028,8 @@ int gk20a_restore_registers(struct gk20a *g);
1028static inline void gk20a_writel(struct gk20a *g, u32 r, u32 v) 1028static inline void gk20a_writel(struct gk20a *g, u32 r, u32 v)
1029{ 1029{
1030 gk20a_dbg(gpu_dbg_reg, " r=0x%x v=0x%x", r, v); 1030 gk20a_dbg(gpu_dbg_reg, " r=0x%x v=0x%x", r, v);
1031 wmb();
1032 writel_relaxed(v, g->regs + r); 1031 writel_relaxed(v, g->regs + r);
1032 wmb();
1033} 1033}
1034static inline u32 gk20a_readl(struct gk20a *g, u32 r) 1034static inline u32 gk20a_readl(struct gk20a *g, u32 r)
1035{ 1035{