summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/pramin_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pramin_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/pramin_gk20a.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pramin_gk20a.c b/drivers/gpu/nvgpu/gk20a/pramin_gk20a.c
index 9d19e9e5..8a34a63c 100644
--- a/drivers/gpu/nvgpu/gk20a/pramin_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/pramin_gk20a.c
@@ -26,9 +26,9 @@
26 26
27/* WARNING: returns pramin_window_lock taken, complement with pramin_exit() */ 27/* WARNING: returns pramin_window_lock taken, complement with pramin_exit() */
28u32 gk20a_pramin_enter(struct gk20a *g, struct nvgpu_mem *mem, 28u32 gk20a_pramin_enter(struct gk20a *g, struct nvgpu_mem *mem,
29 struct page_alloc_chunk *chunk, u32 w) 29 struct nvgpu_mem_sgl *sgl, u32 w)
30{ 30{
31 u64 bufbase = chunk->base; 31 u64 bufbase = nvgpu_mem_sgl_phys(sgl);
32 u64 addr = bufbase + w * sizeof(u32); 32 u64 addr = bufbase + w * sizeof(u32);
33 u32 hi = (u32)((addr & ~(u64)0xfffff) 33 u32 hi = (u32)((addr & ~(u64)0xfffff)
34 >> bus_bar0_window_target_bar0_window_base_shift_v()); 34 >> bus_bar0_window_target_bar0_window_base_shift_v());
@@ -40,8 +40,9 @@ u32 gk20a_pramin_enter(struct gk20a *g, struct nvgpu_mem *mem,
40 40
41 gk20a_dbg(gpu_dbg_mem, 41 gk20a_dbg(gpu_dbg_mem,
42 "0x%08x:%08x begin for %p,%p at [%llx,%llx] (sz %llx)", 42 "0x%08x:%08x begin for %p,%p at [%llx,%llx] (sz %llx)",
43 hi, lo, mem, chunk, bufbase, 43 hi, lo, mem, sgl, bufbase,
44 bufbase + chunk->length, chunk->length); 44 bufbase + nvgpu_mem_sgl_phys(sgl),
45 nvgpu_mem_sgl_length(sgl));
45 46
46 WARN_ON(!bufbase); 47 WARN_ON(!bufbase);
47 48
@@ -57,9 +58,9 @@ u32 gk20a_pramin_enter(struct gk20a *g, struct nvgpu_mem *mem,
57} 58}
58 59
59void gk20a_pramin_exit(struct gk20a *g, struct nvgpu_mem *mem, 60void gk20a_pramin_exit(struct gk20a *g, struct nvgpu_mem *mem,
60 struct page_alloc_chunk *chunk) 61 struct nvgpu_mem_sgl *sgl)
61{ 62{
62 gk20a_dbg(gpu_dbg_mem, "end for %p,%p", mem, chunk); 63 gk20a_dbg(gpu_dbg_mem, "end for %p,%p", mem, sgl);
63 64
64 nvgpu_spinlock_release(&g->mm.pramin_window_lock); 65 nvgpu_spinlock_release(&g->mm.pramin_window_lock);
65} 66}