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/gp106/hal_gp106.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/gp106/hal_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 4a891a82..361a7b0f 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.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/ltc_gp10b.h" | 29 | #include "gp10b/ltc_gp10b.h" |
29 | #include "gp10b/gr_gp10b.h" | 30 | #include "gp10b/gr_gp10b.h" |
@@ -35,6 +36,7 @@ | |||
35 | #include "gp10b/cde_gp10b.h" | 36 | #include "gp10b/cde_gp10b.h" |
36 | #include "gp10b/priv_ring_gp10b.h" | 37 | #include "gp10b/priv_ring_gp10b.h" |
37 | #include "gp10b/fifo_gp10b.h" | 38 | #include "gp10b/fifo_gp10b.h" |
39 | #include "gp10b/fb_gp10b.h" | ||
38 | 40 | ||
39 | #include "gp106/fifo_gp106.h" | 41 | #include "gp106/fifo_gp106.h" |
40 | #include "gp106/regops_gp106.h" | 42 | #include "gp106/regops_gp106.h" |
@@ -43,6 +45,7 @@ | |||
43 | #include "gm20b/gr_gm20b.h" | 45 | #include "gm20b/gr_gm20b.h" |
44 | #include "gm20b/fifo_gm20b.h" | 46 | #include "gm20b/fifo_gm20b.h" |
45 | #include "gm20b/pmu_gm20b.h" | 47 | #include "gm20b/pmu_gm20b.h" |
48 | #include "gm20b/fb_gm20b.h" | ||
46 | 49 | ||
47 | #include "gp106/clk_gp106.h" | 50 | #include "gp106/clk_gp106.h" |
48 | #include "gp106/clk_arb_gp106.h" | 51 | #include "gp106/clk_arb_gp106.h" |
@@ -210,6 +213,21 @@ static const struct gpu_ops gp106_ops = { | |||
210 | .isr_stall = gp10b_ce_isr, | 213 | .isr_stall = gp10b_ce_isr, |
211 | .isr_nonstall = gp10b_ce_nonstall_isr, | 214 | .isr_nonstall = gp10b_ce_nonstall_isr, |
212 | }, | 215 | }, |
216 | .fb = { | ||
217 | .reset = gp106_fb_reset, | ||
218 | .init_hw = gk20a_fb_init_hw, | ||
219 | .init_fs_state = NULL, | ||
220 | .set_mmu_page_size = gm20b_fb_set_mmu_page_size, | ||
221 | .set_use_full_comp_tag_line = | ||
222 | gm20b_fb_set_use_full_comp_tag_line, | ||
223 | .compression_page_size = gp10b_fb_compression_page_size, | ||
224 | .compressible_page_size = gp10b_fb_compressible_page_size, | ||
225 | .vpr_info_fetch = gm20b_fb_vpr_info_fetch, | ||
226 | .dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info, | ||
227 | .is_debug_mode_enabled = gm20b_fb_debug_mode_enabled, | ||
228 | .set_debug_mode = gm20b_fb_set_debug_mode, | ||
229 | .tlb_invalidate = gk20a_fb_tlb_invalidate, | ||
230 | }, | ||
213 | .clock_gating = { | 231 | .clock_gating = { |
214 | .slcg_bus_load_gating_prod = | 232 | .slcg_bus_load_gating_prod = |
215 | gp106_slcg_bus_load_gating_prod, | 233 | gp106_slcg_bus_load_gating_prod, |
@@ -479,6 +497,7 @@ int gp106_init_hal(struct gk20a *g) | |||
479 | 497 | ||
480 | gops->ltc = gp106_ops.ltc; | 498 | gops->ltc = gp106_ops.ltc; |
481 | gops->ce2 = gp106_ops.ce2; | 499 | gops->ce2 = gp106_ops.ce2; |
500 | gops->fb = gp106_ops.fb; | ||
482 | gops->clock_gating = gp106_ops.clock_gating; | 501 | gops->clock_gating = gp106_ops.clock_gating; |
483 | gops->fifo = gp106_ops.fifo; | 502 | gops->fifo = gp106_ops.fifo; |
484 | gops->gr_ctx = gp106_ops.gr_ctx; | 503 | gops->gr_ctx = gp106_ops.gr_ctx; |
@@ -524,10 +543,12 @@ int gp106_init_hal(struct gk20a *g) | |||
524 | 543 | ||
525 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; | 544 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; |
526 | gp106_init_gr(g); | 545 | gp106_init_gr(g); |
527 | gp106_init_fb(gops); | ||
528 | gp106_init_mm(gops); | 546 | gp106_init_mm(gops); |
529 | gp106_init_pmu_ops(g); | 547 | gp106_init_pmu_ops(g); |
530 | 548 | ||
549 | gp10b_init_uncompressed_kind_map(); | ||
550 | gp10b_init_kind_attr(); | ||
551 | |||
531 | g->name = "gp10x"; | 552 | g->name = "gp10x"; |
532 | 553 | ||
533 | c->twod_class = FERMI_TWOD_A; | 554 | c->twod_class = FERMI_TWOD_A; |