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/gm20b/hal_gm20b.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/gm20b/hal_gm20b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 1a11b11c..407a442a 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c | |||
@@ -17,6 +17,7 @@ | |||
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/fifo_gk20a.h" | 19 | #include "gk20a/fifo_gk20a.h" |
20 | #include "gk20a/therm_gk20a.h" | ||
20 | #include "gk20a/css_gr_gk20a.h" | 21 | #include "gk20a/css_gr_gk20a.h" |
21 | #include "gk20a/mc_gk20a.h" | 22 | #include "gk20a/mc_gk20a.h" |
22 | #include "gk20a/bus_gk20a.h" | 23 | #include "gk20a/bus_gk20a.h" |
@@ -272,6 +273,10 @@ static const struct gpu_ops gm20b_ops = { | |||
272 | .get_netlist_name = gr_gm20b_get_netlist_name, | 273 | .get_netlist_name = gr_gm20b_get_netlist_name, |
273 | .is_fw_defined = gr_gm20b_is_firmware_defined, | 274 | .is_fw_defined = gr_gm20b_is_firmware_defined, |
274 | }, | 275 | }, |
276 | .therm = { | ||
277 | .init_therm_setup_hw = gm20b_init_therm_setup_hw, | ||
278 | .elcg_init_idle_filters = gk20a_elcg_init_idle_filters, | ||
279 | }, | ||
275 | .mc = { | 280 | .mc = { |
276 | .intr_enable = mc_gk20a_intr_enable, | 281 | .intr_enable = mc_gk20a_intr_enable, |
277 | .intr_unit_config = mc_gk20a_intr_unit_config, | 282 | .intr_unit_config = mc_gk20a_intr_unit_config, |
@@ -344,6 +349,7 @@ int gm20b_init_hal(struct gk20a *g) | |||
344 | gops->clock_gating = gm20b_ops.clock_gating; | 349 | gops->clock_gating = gm20b_ops.clock_gating; |
345 | gops->fifo = gm20b_ops.fifo; | 350 | gops->fifo = gm20b_ops.fifo; |
346 | gops->gr_ctx = gm20b_ops.gr_ctx; | 351 | gops->gr_ctx = gm20b_ops.gr_ctx; |
352 | gops->therm = gm20b_ops.therm; | ||
347 | gops->mc = gm20b_ops.mc; | 353 | gops->mc = gm20b_ops.mc; |
348 | gops->dbg_session_ops = gm20b_ops.dbg_session_ops; | 354 | gops->dbg_session_ops = gm20b_ops.dbg_session_ops; |
349 | gops->debug = gm20b_ops.debug; | 355 | gops->debug = gm20b_ops.debug; |
@@ -399,7 +405,6 @@ int gm20b_init_hal(struct gk20a *g) | |||
399 | gm20b_init_pmu_ops(g); | 405 | gm20b_init_pmu_ops(g); |
400 | gm20b_init_clk_ops(gops); | 406 | gm20b_init_clk_ops(gops); |
401 | gm20b_init_regops(gops); | 407 | gm20b_init_regops(gops); |
402 | gm20b_init_therm_ops(gops); | ||
403 | 408 | ||
404 | g->name = "gm20b"; | 409 | g->name = "gm20b"; |
405 | 410 | ||