diff options
author | Sunny He <suhe@nvidia.com> | 2017-06-28 20:57:39 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-13 03:09:08 -0400 |
commit | aade61eff9962b4671802b0d88523e6ccccde6b0 (patch) | |
tree | 57070b7f57f0bb1cb00b6b6a61ca18eb905e1c00 | |
parent | df022d27ddf2f66bff04170bb454fa26db8d51b1 (diff) |
gpu: nvgpu: gv11b: Reorg falcon HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the
falcon 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: If980fcd2605a445bd623a5fcca8262826ce289c4
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1514013
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 98350e4b..0a508ddf 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -200,6 +200,10 @@ static const struct gpu_ops gv11b_ops = { | |||
200 | .pg_gr_load_gating_prod = | 200 | .pg_gr_load_gating_prod = |
201 | gr_gv11b_pg_gr_load_gating_prod, | 201 | gr_gv11b_pg_gr_load_gating_prod, |
202 | }, | 202 | }, |
203 | |||
204 | .falcon = { | ||
205 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, | ||
206 | }, | ||
203 | .chip_init_gpu_characteristics = gv11b_init_gpu_characteristics, | 207 | .chip_init_gpu_characteristics = gv11b_init_gpu_characteristics, |
204 | .get_litter_value = gv11b_get_litter_value, | 208 | .get_litter_value = gv11b_get_litter_value, |
205 | }; | 209 | }; |
@@ -211,6 +215,7 @@ int gv11b_init_hal(struct gk20a *g) | |||
211 | 215 | ||
212 | gops->ltc = gv11b_ops.ltc; | 216 | gops->ltc = gv11b_ops.ltc; |
213 | gops->clock_gating = gv11b_ops.clock_gating; | 217 | gops->clock_gating = gv11b_ops.clock_gating; |
218 | gops->falcon = gv11b_ops.falcon; | ||
214 | 219 | ||
215 | /* Lone functions */ | 220 | /* Lone functions */ |
216 | gops->chip_init_gpu_characteristics = | 221 | gops->chip_init_gpu_characteristics = |
@@ -231,7 +236,6 @@ int gv11b_init_hal(struct gk20a *g) | |||
231 | gv11b_init_ce(gops); | 236 | gv11b_init_ce(gops); |
232 | gv11b_init_gr_ctx(gops); | 237 | gv11b_init_gr_ctx(gops); |
233 | gv11b_init_mm(gops); | 238 | gv11b_init_mm(gops); |
234 | gk20a_falcon_init_hal(gops); | ||
235 | gv11b_init_pmu_ops(gops); | 239 | gv11b_init_pmu_ops(gops); |
236 | gk20a_init_debug_ops(gops); | 240 | gk20a_init_debug_ops(gops); |
237 | gk20a_init_dbg_session_ops(gops); | 241 | gk20a_init_dbg_session_ops(gops); |