diff options
author | Sunny He <suhe@nvidia.com> | 2017-07-31 17:40:46 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-14 18:55:19 -0400 |
commit | 4bb0896912440d126ae47da350b448f37dabc63d (patch) | |
tree | 517e88d61e849a75755d0e5c0de675a5f432f852 /drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |
parent | de232ceb4b3bfa88650d1eed764357ba4a598076 (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: I3fdbf6059ef664caf8d33797a8a5f3f8eb6485bf
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1537748
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/hal_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 7c38b611..14b7a541 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -29,9 +29,11 @@ | |||
29 | #include "gk20a/bus_gk20a.h" | 29 | #include "gk20a/bus_gk20a.h" |
30 | #include "gk20a/flcn_gk20a.h" | 30 | #include "gk20a/flcn_gk20a.h" |
31 | #include "gk20a/regops_gk20a.h" | 31 | #include "gk20a/regops_gk20a.h" |
32 | #include "gk20a/fb_gk20a.h" | ||
32 | 33 | ||
33 | #include "gm20b/ltc_gm20b.h" | 34 | #include "gm20b/ltc_gm20b.h" |
34 | #include "gm20b/gr_gm20b.h" | 35 | #include "gm20b/gr_gm20b.h" |
36 | #include "gm20b/fb_gm20b.h" | ||
35 | #include "gm20b/fifo_gm20b.h" | 37 | #include "gm20b/fifo_gm20b.h" |
36 | 38 | ||
37 | #include "gp10b/ltc_gp10b.h" | 39 | #include "gp10b/ltc_gp10b.h" |
@@ -41,6 +43,7 @@ | |||
41 | #include "gp10b/priv_ring_gp10b.h" | 43 | #include "gp10b/priv_ring_gp10b.h" |
42 | #include "gp10b/fifo_gp10b.h" | 44 | #include "gp10b/fifo_gp10b.h" |
43 | #include "gp10b/fecs_trace_gp10b.h" | 45 | #include "gp10b/fecs_trace_gp10b.h" |
46 | #include "gp10b/fb_gp10b.h" | ||
44 | 47 | ||
45 | #include "hal_gv11b.h" | 48 | #include "hal_gv11b.h" |
46 | #include "gr_gv11b.h" | 49 | #include "gr_gv11b.h" |
@@ -178,6 +181,23 @@ static const struct gpu_ops gv11b_ops = { | |||
178 | .isr_nonstall = gp10b_ce_nonstall_isr, | 181 | .isr_nonstall = gp10b_ce_nonstall_isr, |
179 | .get_num_pce = gv11b_ce_get_num_pce, | 182 | .get_num_pce = gv11b_ce_get_num_pce, |
180 | }, | 183 | }, |
184 | .fb = { | ||
185 | .reset = gv11b_fb_reset, | ||
186 | .init_hw = gk20a_fb_init_hw, | ||
187 | .init_fs_state = gv11b_fb_init_fs_state, | ||
188 | .init_cbc = gv11b_fb_init_cbc, | ||
189 | .set_mmu_page_size = gm20b_fb_set_mmu_page_size, | ||
190 | .set_use_full_comp_tag_line = | ||
191 | gm20b_fb_set_use_full_comp_tag_line, | ||
192 | .compression_page_size = gp10b_fb_compression_page_size, | ||
193 | .compressible_page_size = gp10b_fb_compressible_page_size, | ||
194 | .vpr_info_fetch = gm20b_fb_vpr_info_fetch, | ||
195 | .dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info, | ||
196 | .is_debug_mode_enabled = gm20b_fb_debug_mode_enabled, | ||
197 | .set_debug_mode = gm20b_fb_set_debug_mode, | ||
198 | .tlb_invalidate = gk20a_fb_tlb_invalidate, | ||
199 | .hub_isr = gv11b_fb_hub_isr, | ||
200 | }, | ||
181 | .clock_gating = { | 201 | .clock_gating = { |
182 | .slcg_bus_load_gating_prod = | 202 | .slcg_bus_load_gating_prod = |
183 | gv11b_slcg_bus_load_gating_prod, | 203 | gv11b_slcg_bus_load_gating_prod, |
@@ -408,6 +428,7 @@ int gv11b_init_hal(struct gk20a *g) | |||
408 | 428 | ||
409 | gops->ltc = gv11b_ops.ltc; | 429 | gops->ltc = gv11b_ops.ltc; |
410 | gops->ce2 = gv11b_ops.ce2; | 430 | gops->ce2 = gv11b_ops.ce2; |
431 | gops->fb = gv11b_ops.fb; | ||
411 | gops->clock_gating = gv11b_ops.clock_gating; | 432 | gops->clock_gating = gv11b_ops.clock_gating; |
412 | gops->fifo = gv11b_ops.fifo; | 433 | gops->fifo = gv11b_ops.fifo; |
413 | gops->gr_ctx = gv11b_ops.gr_ctx; | 434 | gops->gr_ctx = gv11b_ops.gr_ctx; |
@@ -435,10 +456,12 @@ int gv11b_init_hal(struct gk20a *g) | |||
435 | __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, false); | 456 | __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, false); |
436 | 457 | ||
437 | gv11b_init_gr(g); | 458 | gv11b_init_gr(g); |
438 | gv11b_init_fb(gops); | ||
439 | gv11b_init_mm(gops); | 459 | gv11b_init_mm(gops); |
440 | gv11b_init_pmu_ops(g); | 460 | gv11b_init_pmu_ops(g); |
441 | 461 | ||
462 | gv11b_init_uncompressed_kind_map(); | ||
463 | gv11b_init_kind_attr(); | ||
464 | |||
442 | g->name = "gv11b"; | 465 | g->name = "gv11b"; |
443 | 466 | ||
444 | c->twod_class = FERMI_TWOD_A; | 467 | c->twod_class = FERMI_TWOD_A; |