diff options
author | Sunny He <suhe@nvidia.com> | 2017-07-26 21:08:00 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-27 19:34:45 -0400 |
commit | f391f53c089ec12fcc501c491430380b668e3cbf (patch) | |
tree | cc7dde1ab600dedb48c1b712094c16ceafaf5cdc /drivers/gpu/nvgpu/gp106/hal_gp106.c | |
parent | f0593bb43f3379baffd7bb77b89c9af18842ceef (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/gp106/hal_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index f9368621..8077c5e1 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -343,6 +343,16 @@ static const struct gpu_ops gp106_ops = { | |||
343 | .exit = gk20a_pramin_exit, | 343 | .exit = gk20a_pramin_exit, |
344 | .data032_r = pram_data032_r, | 344 | .data032_r = pram_data032_r, |
345 | }, | 345 | }, |
346 | .therm = { | ||
347 | #ifdef CONFIG_DEBUG_FS | ||
348 | .therm_debugfs_init = gp106_therm_debugfs_init, | ||
349 | #endif /* CONFIG_DEBUG_FS */ | ||
350 | .elcg_init_idle_filters = gp106_elcg_init_idle_filters, | ||
351 | .get_internal_sensor_curr_temp = | ||
352 | gp106_get_internal_sensor_curr_temp, | ||
353 | .get_internal_sensor_limits = gp106_get_internal_sensor_limits, | ||
354 | .configure_therm_alert = gp106_configure_therm_alert, | ||
355 | }, | ||
346 | .mc = { | 356 | .mc = { |
347 | .intr_enable = mc_gp10b_intr_enable, | 357 | .intr_enable = mc_gp10b_intr_enable, |
348 | .intr_unit_config = mc_gp10b_intr_unit_config, | 358 | .intr_unit_config = mc_gp10b_intr_unit_config, |
@@ -436,6 +446,7 @@ int gp106_init_hal(struct gk20a *g) | |||
436 | gops->gr_ctx = gp106_ops.gr_ctx; | 446 | gops->gr_ctx = gp106_ops.gr_ctx; |
437 | gops->fecs_trace = gp106_ops.fecs_trace; | 447 | gops->fecs_trace = gp106_ops.fecs_trace; |
438 | gops->pramin = gp106_ops.pramin; | 448 | gops->pramin = gp106_ops.pramin; |
449 | gops->therm = gp106_ops.therm; | ||
439 | gops->mc = gp106_ops.mc; | 450 | gops->mc = gp106_ops.mc; |
440 | gops->debug = gp106_ops.debug; | 451 | gops->debug = gp106_ops.debug; |
441 | gops->dbg_session_ops = gp106_ops.dbg_session_ops; | 452 | gops->dbg_session_ops = gp106_ops.dbg_session_ops; |
@@ -467,7 +478,6 @@ int gp106_init_hal(struct gk20a *g) | |||
467 | gp106_init_clk_ops(gops); | 478 | gp106_init_clk_ops(gops); |
468 | gp106_init_clk_arb_ops(gops); | 479 | gp106_init_clk_arb_ops(gops); |
469 | gp106_init_regops(gops); | 480 | gp106_init_regops(gops); |
470 | gp106_init_therm_ops(gops); | ||
471 | 481 | ||
472 | g->name = "gp10x"; | 482 | g->name = "gp10x"; |
473 | 483 | ||