diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2018-05-24 16:00:14 -0400 |
---|---|---|
committer | Tejal Kudav <tkudav@nvidia.com> | 2018-06-14 09:44:07 -0400 |
commit | dbb8792baf2142626728abf909fb201144b9b56a (patch) | |
tree | 6ca5edfeb3f757bef86aaf6d6ebbf12b2c2aa748 /drivers/gpu/nvgpu/common/pramin.c | |
parent | ed65f1f26e2d0ca4a491215297b61d25b0c1493b (diff) |
gpu: nvgpu: Move setting of BAR0_WINDOW to bus
Move setting of BAR0_WINDOW to bus HAL. Also moves the usage of spinlock to
common code so that pramin_gk20a.[ch] can be deleted.
JIRA NVGPU-588
Change-Id: I3ceabc56016711b2c93f31fedf07daa778a4873a
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1730890
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/pramin.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/pramin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/pramin.c b/drivers/gpu/nvgpu/common/pramin.c index ed961965..4c6a4a0d 100644 --- a/drivers/gpu/nvgpu/common/pramin.c +++ b/drivers/gpu/nvgpu/common/pramin.c | |||
@@ -61,7 +61,8 @@ void nvgpu_pramin_access_batched(struct gk20a *g, struct nvgpu_mem *mem, | |||
61 | while (size) { | 61 | while (size) { |
62 | u32 sgl_len = (u32)nvgpu_sgt_get_length(sgt, sgl); | 62 | u32 sgl_len = (u32)nvgpu_sgt_get_length(sgt, sgl); |
63 | 63 | ||
64 | byteoff = g->ops.pramin.enter(g, mem, sgt, sgl, | 64 | nvgpu_spinlock_acquire(&g->mm.pramin_window_lock); |
65 | byteoff = g->ops.bus.set_bar0_window(g, mem, sgt, sgl, | ||
65 | offset / sizeof(u32)); | 66 | offset / sizeof(u32)); |
66 | start_reg = g->ops.pramin.data032_r(byteoff / sizeof(u32)); | 67 | start_reg = g->ops.pramin.data032_r(byteoff / sizeof(u32)); |
67 | until_end = SZ_1M - (byteoff & (SZ_1M - 1)); | 68 | until_end = SZ_1M - (byteoff & (SZ_1M - 1)); |
@@ -72,7 +73,8 @@ void nvgpu_pramin_access_batched(struct gk20a *g, struct nvgpu_mem *mem, | |||
72 | 73 | ||
73 | /* read back to synchronize accesses */ | 74 | /* read back to synchronize accesses */ |
74 | gk20a_readl(g, start_reg); | 75 | gk20a_readl(g, start_reg); |
75 | g->ops.pramin.exit(g, mem, sgl); | 76 | |
77 | nvgpu_spinlock_release(&g->mm.pramin_window_lock); | ||
76 | 78 | ||
77 | size -= n; | 79 | size -= n; |
78 | 80 | ||