summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-07-26 21:08:00 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-27 19:34:45 -0400
commitf391f53c089ec12fcc501c491430380b668e3cbf (patch)
treecc7dde1ab600dedb48c1b712094c16ceafaf5cdc /drivers/gpu/nvgpu/gp10b/hal_gp10b.c
parentf0593bb43f3379baffd7bb77b89c9af18842ceef (diff)
gpu: nvgpu: Reorg therm HAL initialization
Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the therm 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: Ic9d03304d3dcde0365cbf22af2dbe1e7eb0e04bb Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1527422 Reviewed-by: Automatic_Commit_Validation_User 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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
index 3a44f1ef..a2aacd2e 100644
--- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
@@ -309,6 +309,10 @@ static const struct gpu_ops gp10b_ops = {
309 .exit = gk20a_pramin_exit, 309 .exit = gk20a_pramin_exit,
310 .data032_r = pram_data032_r, 310 .data032_r = pram_data032_r,
311 }, 311 },
312 .therm = {
313 .init_therm_setup_hw = gp10b_init_therm_setup_hw,
314 .elcg_init_idle_filters = gp10b_elcg_init_idle_filters,
315 },
312 .mc = { 316 .mc = {
313 .intr_enable = mc_gp10b_intr_enable, 317 .intr_enable = mc_gp10b_intr_enable,
314 .intr_unit_config = mc_gp10b_intr_unit_config, 318 .intr_unit_config = mc_gp10b_intr_unit_config,
@@ -385,6 +389,7 @@ int gp10b_init_hal(struct gk20a *g)
385 gops->gr_ctx = gp10b_ops.gr_ctx; 389 gops->gr_ctx = gp10b_ops.gr_ctx;
386 gops->fecs_trace = gp10b_ops.fecs_trace; 390 gops->fecs_trace = gp10b_ops.fecs_trace;
387 gops->pramin = gp10b_ops.pramin; 391 gops->pramin = gp10b_ops.pramin;
392 gops->therm = gp10b_ops.therm;
388 gops->mc = gp10b_ops.mc; 393 gops->mc = gp10b_ops.mc;
389 gops->debug = gp10b_ops.debug; 394 gops->debug = gp10b_ops.debug;
390 gops->dbg_session_ops = gp10b_ops.dbg_session_ops; 395 gops->dbg_session_ops = gp10b_ops.dbg_session_ops;
@@ -448,7 +453,6 @@ int gp10b_init_hal(struct gk20a *g)
448 gp10b_init_mm(gops); 453 gp10b_init_mm(gops);
449 gp10b_init_pmu_ops(g); 454 gp10b_init_pmu_ops(g);
450 gp10b_init_regops(gops); 455 gp10b_init_regops(gops);
451 gp10b_init_therm_ops(gops);
452 456
453 g->name = "gp10b"; 457 g->name = "gp10b";
454 458