summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/pramin_gk20a.c11
-rw-r--r--drivers/gpu/nvgpu/gk20a/pramin_gk20a.h10
2 files changed, 9 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pramin_gk20a.c b/drivers/gpu/nvgpu/gk20a/pramin_gk20a.c
index a7e8e615..9d19e9e5 100644
--- a/drivers/gpu/nvgpu/gk20a/pramin_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/pramin_gk20a.c
@@ -25,7 +25,7 @@
25#include <nvgpu/hw/gk20a/hw_pram_gk20a.h> 25#include <nvgpu/hw/gk20a/hw_pram_gk20a.h>
26 26
27/* WARNING: returns pramin_window_lock taken, complement with pramin_exit() */ 27/* WARNING: returns pramin_window_lock taken, complement with pramin_exit() */
28static u32 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 page_alloc_chunk *chunk, u32 w)
30{ 30{
31 u64 bufbase = chunk->base; 31 u64 bufbase = chunk->base;
@@ -56,17 +56,10 @@ static u32 gk20a_pramin_enter(struct gk20a *g, struct nvgpu_mem *mem,
56 return lo; 56 return lo;
57} 57}
58 58
59static void gk20a_pramin_exit(struct gk20a *g, struct nvgpu_mem *mem, 59void gk20a_pramin_exit(struct gk20a *g, struct nvgpu_mem *mem,
60 struct page_alloc_chunk *chunk) 60 struct page_alloc_chunk *chunk)
61{ 61{
62 gk20a_dbg(gpu_dbg_mem, "end for %p,%p", mem, chunk); 62 gk20a_dbg(gpu_dbg_mem, "end for %p,%p", mem, chunk);
63 63
64 nvgpu_spinlock_release(&g->mm.pramin_window_lock); 64 nvgpu_spinlock_release(&g->mm.pramin_window_lock);
65} 65}
66
67void gk20a_init_pramin_ops(struct gpu_ops *gops)
68{
69 gops->pramin.enter = gk20a_pramin_enter;
70 gops->pramin.exit = gk20a_pramin_exit;
71 gops->pramin.data032_r = pram_data032_r;
72}
diff --git a/drivers/gpu/nvgpu/gk20a/pramin_gk20a.h b/drivers/gpu/nvgpu/gk20a/pramin_gk20a.h
index 93d1cc75..1a1ac871 100644
--- a/drivers/gpu/nvgpu/gk20a/pramin_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/pramin_gk20a.h
@@ -17,8 +17,12 @@
17#ifndef __PRAMIN_GK20A_H__ 17#ifndef __PRAMIN_GK20A_H__
18#define __PRAMIN_GK20A_H__ 18#define __PRAMIN_GK20A_H__
19 19
20struct gpu_ops; 20struct gk20a;
21 21struct nvgpu_mem;
22void gk20a_init_pramin_ops(struct gpu_ops *ops); 22struct page_alloc_chunk;
23 23
24u32 gk20a_pramin_enter(struct gk20a *g, struct nvgpu_mem *mem,
25 struct page_alloc_chunk *chunk, u32 w);
26void gk20a_pramin_exit(struct gk20a *g, struct nvgpu_mem *mem,
27 struct page_alloc_chunk *chunk);
24#endif 28#endif