summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-07-31 17:43:11 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-14 18:55:13 -0400
commitee60394abc9a52182892ab54554d3e9c841080bf (patch)
tree34b5255d40578252989ad40fddb30424c53fcfe9 /drivers/gpu/nvgpu/gm20b/hal_gm20b.c
parentd5a5fb3563121a4904be9185914c563070ffd021 (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/gm20b/hal_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/hal_gm20b.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
index 7861e438..a540de64 100644
--- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
@@ -16,6 +16,7 @@
16#include "gk20a/gk20a.h" 16#include "gk20a/gk20a.h"
17#include "gk20a/ce2_gk20a.h" 17#include "gk20a/ce2_gk20a.h"
18#include "gk20a/dbg_gpu_gk20a.h" 18#include "gk20a/dbg_gpu_gk20a.h"
19#include "gk20a/fb_gk20a.h"
19#include "gk20a/fifo_gk20a.h" 20#include "gk20a/fifo_gk20a.h"
20#include "gk20a/therm_gk20a.h" 21#include "gk20a/therm_gk20a.h"
21#include "gk20a/css_gr_gk20a.h" 22#include "gk20a/css_gr_gk20a.h"
@@ -161,6 +162,21 @@ static const struct gpu_ops gm20b_ops = {
161 .isr_stall = gk20a_ce2_isr, 162 .isr_stall = gk20a_ce2_isr,
162 .isr_nonstall = gk20a_ce2_nonstall_isr, 163 .isr_nonstall = gk20a_ce2_nonstall_isr,
163 }, 164 },
165 .fb = {
166 .reset = fb_gk20a_reset,
167 .init_hw = gk20a_fb_init_hw,
168 .init_fs_state = fb_gm20b_init_fs_state,
169 .set_mmu_page_size = gm20b_fb_set_mmu_page_size,
170 .set_use_full_comp_tag_line =
171 gm20b_fb_set_use_full_comp_tag_line,
172 .compression_page_size = gm20b_fb_compression_page_size,
173 .compressible_page_size = gm20b_fb_compressible_page_size,
174 .vpr_info_fetch = gm20b_fb_vpr_info_fetch,
175 .dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info,
176 .is_debug_mode_enabled = gm20b_fb_debug_mode_enabled,
177 .set_debug_mode = gm20b_fb_set_debug_mode,
178 .tlb_invalidate = gk20a_fb_tlb_invalidate,
179 },
164 .clock_gating = { 180 .clock_gating = {
165 .slcg_bus_load_gating_prod = 181 .slcg_bus_load_gating_prod =
166 gm20b_slcg_bus_load_gating_prod, 182 gm20b_slcg_bus_load_gating_prod,
@@ -378,6 +394,7 @@ int gm20b_init_hal(struct gk20a *g)
378 394
379 gops->ltc = gm20b_ops.ltc; 395 gops->ltc = gm20b_ops.ltc;
380 gops->ce2 = gm20b_ops.ce2; 396 gops->ce2 = gm20b_ops.ce2;
397 gops->fb = gm20b_ops.fb;
381 gops->clock_gating = gm20b_ops.clock_gating; 398 gops->clock_gating = gm20b_ops.clock_gating;
382 gops->fifo = gm20b_ops.fifo; 399 gops->fifo = gm20b_ops.fifo;
383 gops->gr_ctx = gm20b_ops.gr_ctx; 400 gops->gr_ctx = gm20b_ops.gr_ctx;
@@ -445,10 +462,12 @@ int gm20b_init_hal(struct gk20a *g)
445#endif 462#endif
446 g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; 463 g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT;
447 gm20b_init_gr(g); 464 gm20b_init_gr(g);
448 gm20b_init_fb(gops);
449 gm20b_init_mm(gops); 465 gm20b_init_mm(gops);
450 gm20b_init_pmu_ops(g); 466 gm20b_init_pmu_ops(g);
451 467
468 gm20b_init_uncompressed_kind_map();
469 gm20b_init_kind_attr();
470
452 g->name = "gm20b"; 471 g->name = "gm20b";
453 472
454 c->twod_class = FERMI_TWOD_A; 473 c->twod_class = FERMI_TWOD_A;