diff options
author | Sunny He <suhe@nvidia.com> | 2017-07-26 20:37:46 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-27 19:34:45 -0400 |
commit | f0593bb43f3379baffd7bb77b89c9af18842ceef (patch) | |
tree | 9d41059c5b1b68a1d12705ae78421ee375dd7cd3 /drivers/gpu/nvgpu/gk20a/pramin_gk20a.c | |
parent | 9d37d8b78c2dac7fa480493d1ab67b95290b87f1 (diff) |
gpu: nvgpu: Reorg pramin HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the
pramin sub-module of the gpu_ops struct.
Perform HAL function assignments in hal_gxxxx.c through the
population of a chip-specific copy of gpu_ops.
Jira NVGPU-74
Change-Id: I0c0aecfb8f5ea436ef353b874f5e36ff24ebd130
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1527421
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pramin_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pramin_gk20a.c | 11 |
1 files changed, 2 insertions, 9 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() */ |
28 | static u32 gk20a_pramin_enter(struct gk20a *g, struct nvgpu_mem *mem, | 28 | u32 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 | ||
59 | static void gk20a_pramin_exit(struct gk20a *g, struct nvgpu_mem *mem, | 59 | void 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 | |||
67 | void 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 | } | ||