diff options
author | Sunny He <suhe@nvidia.com> | 2017-07-26 21:09:07 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-27 19:34:46 -0400 |
commit | f457e808f0d1097cec02a022eb42c77a075ef881 (patch) | |
tree | fa8b1f3b67cf5e6c102cb1cf30f3a738ed9d7e68 /drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |
parent | 8aa0370005a81a7e26ae7c86585626d3261aa4d3 (diff) |
gpu: nvgpu: gv11b: 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: Ic297792c4d47ffbe64cc0bd95a659a6b7f383743
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1527423
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/hal_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 04712409..f6121f94 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "gm20b/fifo_gm20b.h" | 35 | #include "gm20b/fifo_gm20b.h" |
36 | 36 | ||
37 | #include "gp10b/ltc_gp10b.h" | 37 | #include "gp10b/ltc_gp10b.h" |
38 | #include "gp10b/therm_gp10b.h" | ||
38 | #include "gp10b/mc_gp10b.h" | 39 | #include "gp10b/mc_gp10b.h" |
39 | #include "gp10b/ce_gp10b.h" | 40 | #include "gp10b/ce_gp10b.h" |
40 | #include "gp10b/priv_ring_gp10b.h" | 41 | #include "gp10b/priv_ring_gp10b.h" |
@@ -50,7 +51,6 @@ | |||
50 | #include "gr_ctx_gv11b.h" | 51 | #include "gr_ctx_gv11b.h" |
51 | #include "mm_gv11b.h" | 52 | #include "mm_gv11b.h" |
52 | #include "pmu_gv11b.h" | 53 | #include "pmu_gv11b.h" |
53 | #include "therm_gv11b.h" | ||
54 | #include "fb_gv11b.h" | 54 | #include "fb_gv11b.h" |
55 | #include "fifo_gv11b.h" | 55 | #include "fifo_gv11b.h" |
56 | #include "gv11b_gating_reglist.h" | 56 | #include "gv11b_gating_reglist.h" |
@@ -306,6 +306,10 @@ static const struct gpu_ops gv11b_ops = { | |||
306 | .max_entries = gk20a_gr_max_entries, | 306 | .max_entries = gk20a_gr_max_entries, |
307 | }, | 307 | }, |
308 | #endif /* CONFIG_GK20A_CTXSW_TRACE */ | 308 | #endif /* CONFIG_GK20A_CTXSW_TRACE */ |
309 | .therm = { | ||
310 | .init_therm_setup_hw = gp10b_init_therm_setup_hw, | ||
311 | .elcg_init_idle_filters = gp10b_elcg_init_idle_filters, | ||
312 | }, | ||
309 | .mc = { | 313 | .mc = { |
310 | .intr_enable = mc_gv11b_intr_enable, | 314 | .intr_enable = mc_gv11b_intr_enable, |
311 | .intr_unit_config = mc_gp10b_intr_unit_config, | 315 | .intr_unit_config = mc_gp10b_intr_unit_config, |
@@ -375,6 +379,7 @@ int gv11b_init_hal(struct gk20a *g) | |||
375 | gops->fifo = gv11b_ops.fifo; | 379 | gops->fifo = gv11b_ops.fifo; |
376 | gops->gr_ctx = gv11b_ops.gr_ctx; | 380 | gops->gr_ctx = gv11b_ops.gr_ctx; |
377 | gops->fecs_trace = gv11b_ops.fecs_trace; | 381 | gops->fecs_trace = gv11b_ops.fecs_trace; |
382 | gops->therm = gv11b_ops.therm; | ||
378 | gops->mc = gv11b_ops.mc; | 383 | gops->mc = gv11b_ops.mc; |
379 | gops->debug = gv11b_ops.debug; | 384 | gops->debug = gv11b_ops.debug; |
380 | gops->dbg_session_ops = gv11b_ops.dbg_session_ops; | 385 | gops->dbg_session_ops = gv11b_ops.dbg_session_ops; |
@@ -400,7 +405,6 @@ int gv11b_init_hal(struct gk20a *g) | |||
400 | gv11b_init_mm(gops); | 405 | gv11b_init_mm(gops); |
401 | gv11b_init_pmu_ops(g); | 406 | gv11b_init_pmu_ops(g); |
402 | gv11b_init_regops(gops); | 407 | gv11b_init_regops(gops); |
403 | gv11b_init_therm_ops(gops); | ||
404 | 408 | ||
405 | g->name = "gv11b"; | 409 | g->name = "gv11b"; |
406 | 410 | ||