diff options
author | Sunny He <suhe@nvidia.com> | 2017-07-31 17:43:11 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-14 18:55:13 -0400 |
commit | ee60394abc9a52182892ab54554d3e9c841080bf (patch) | |
tree | 34b5255d40578252989ad40fddb30424c53fcfe9 /drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |
parent | d5a5fb3563121a4904be9185914c563070ffd021 (diff) |
gpu: nvgpu: Reorg fb HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the
fb 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: I593d00ffccc40a3721e792ef7ca259583852eb28
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1537746
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/hal_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 197c4fad..b0871155 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "gk20a/flcn_gk20a.h" | 24 | #include "gk20a/flcn_gk20a.h" |
25 | #include "gk20a/regops_gk20a.h" | 25 | #include "gk20a/regops_gk20a.h" |
26 | #include "gk20a/mc_gk20a.h" | 26 | #include "gk20a/mc_gk20a.h" |
27 | #include "gk20a/fb_gk20a.h" | ||
27 | 28 | ||
28 | #include "gp10b/gr_gp10b.h" | 29 | #include "gp10b/gr_gp10b.h" |
29 | #include "gp10b/fecs_trace_gp10b.h" | 30 | #include "gp10b/fecs_trace_gp10b.h" |
@@ -47,6 +48,7 @@ | |||
47 | #include "gm20b/pmu_gm20b.h" | 48 | #include "gm20b/pmu_gm20b.h" |
48 | #include "gm20b/clk_gm20b.h" | 49 | #include "gm20b/clk_gm20b.h" |
49 | #include "gm20b/fifo_gm20b.h" | 50 | #include "gm20b/fifo_gm20b.h" |
51 | #include "gm20b/fb_gm20b.h" | ||
50 | 52 | ||
51 | #include "gp10b.h" | 53 | #include "gp10b.h" |
52 | #include "hal_gp10b.h" | 54 | #include "hal_gp10b.h" |
@@ -170,6 +172,21 @@ static const struct gpu_ops gp10b_ops = { | |||
170 | .isr_stall = gp10b_ce_isr, | 172 | .isr_stall = gp10b_ce_isr, |
171 | .isr_nonstall = gp10b_ce_nonstall_isr, | 173 | .isr_nonstall = gp10b_ce_nonstall_isr, |
172 | }, | 174 | }, |
175 | .fb = { | ||
176 | .reset = fb_gk20a_reset, | ||
177 | .init_hw = gk20a_fb_init_hw, | ||
178 | .init_fs_state = fb_gm20b_init_fs_state, | ||
179 | .set_mmu_page_size = gm20b_fb_set_mmu_page_size, | ||
180 | .set_use_full_comp_tag_line = | ||
181 | gm20b_fb_set_use_full_comp_tag_line, | ||
182 | .compression_page_size = gp10b_fb_compression_page_size, | ||
183 | .compressible_page_size = gp10b_fb_compressible_page_size, | ||
184 | .vpr_info_fetch = gm20b_fb_vpr_info_fetch, | ||
185 | .dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info, | ||
186 | .is_debug_mode_enabled = gm20b_fb_debug_mode_enabled, | ||
187 | .set_debug_mode = gm20b_fb_set_debug_mode, | ||
188 | .tlb_invalidate = gk20a_fb_tlb_invalidate, | ||
189 | }, | ||
173 | .clock_gating = { | 190 | .clock_gating = { |
174 | .slcg_bus_load_gating_prod = | 191 | .slcg_bus_load_gating_prod = |
175 | gp10b_slcg_bus_load_gating_prod, | 192 | gp10b_slcg_bus_load_gating_prod, |
@@ -405,6 +422,7 @@ int gp10b_init_hal(struct gk20a *g) | |||
405 | 422 | ||
406 | gops->ltc = gp10b_ops.ltc; | 423 | gops->ltc = gp10b_ops.ltc; |
407 | gops->ce2 = gp10b_ops.ce2; | 424 | gops->ce2 = gp10b_ops.ce2; |
425 | gops->fb = gp10b_ops.fb; | ||
408 | gops->clock_gating = gp10b_ops.clock_gating; | 426 | gops->clock_gating = gp10b_ops.clock_gating; |
409 | gops->fifo = gp10b_ops.fifo; | 427 | gops->fifo = gp10b_ops.fifo; |
410 | gops->gr_ctx = gp10b_ops.gr_ctx; | 428 | gops->gr_ctx = gp10b_ops.gr_ctx; |
@@ -471,10 +489,12 @@ int gp10b_init_hal(struct gk20a *g) | |||
471 | 489 | ||
472 | g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; | 490 | g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; |
473 | gp10b_init_gr(g); | 491 | gp10b_init_gr(g); |
474 | gp10b_init_fb(gops); | ||
475 | gp10b_init_mm(gops); | 492 | gp10b_init_mm(gops); |
476 | gp10b_init_pmu_ops(g); | 493 | gp10b_init_pmu_ops(g); |
477 | 494 | ||
495 | gp10b_init_uncompressed_kind_map(); | ||
496 | gp10b_init_kind_attr(); | ||
497 | |||
478 | g->name = "gp10b"; | 498 | g->name = "gp10b"; |
479 | 499 | ||
480 | c->twod_class = FERMI_TWOD_A; | 500 | c->twod_class = FERMI_TWOD_A; |