diff options
author | Sunny He <suhe@nvidia.com> | 2017-06-28 20:56:44 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-13 03:09:07 -0400 |
commit | ecf67ebbf69a9ab6481b1517b8920f7ac5828bb5 (patch) | |
tree | 87f9577885854817d46b0e7103933012040eb359 /drivers/gpu/nvgpu/gp10b | |
parent | 90d388ebf8d2f9f9d08f6a5c0f638aa8339c1f24 (diff) |
gpu: nvgpu: 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: Ib1aaaa248b079bb591ccfada3382b689452de0e9
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1514012
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 8609605b..d004cf3d 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -212,6 +212,9 @@ static const struct gpu_ops gp10b_ops = { | |||
212 | .need_scatter_buffer = gp10b_need_scatter_buffer, | 212 | .need_scatter_buffer = gp10b_need_scatter_buffer, |
213 | .populate_scatter_buffer = gp10b_populate_scatter_buffer, | 213 | .populate_scatter_buffer = gp10b_populate_scatter_buffer, |
214 | }, | 214 | }, |
215 | .falcon = { | ||
216 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, | ||
217 | }, | ||
215 | .chip_init_gpu_characteristics = gp10b_init_gpu_characteristics, | 218 | .chip_init_gpu_characteristics = gp10b_init_gpu_characteristics, |
216 | .get_litter_value = gp10b_get_litter_value, | 219 | .get_litter_value = gp10b_get_litter_value, |
217 | }; | 220 | }; |
@@ -225,6 +228,7 @@ int gp10b_init_hal(struct gk20a *g) | |||
225 | gops->ltc = gp10b_ops.ltc; | 228 | gops->ltc = gp10b_ops.ltc; |
226 | gops->clock_gating = gp10b_ops.clock_gating; | 229 | gops->clock_gating = gp10b_ops.clock_gating; |
227 | gops->cde = gp10b_ops.cde; | 230 | gops->cde = gp10b_ops.cde; |
231 | gops->falcon = gp10b_ops.falcon; | ||
228 | 232 | ||
229 | /* Lone Functions */ | 233 | /* Lone Functions */ |
230 | gops->chip_init_gpu_characteristics = | 234 | gops->chip_init_gpu_characteristics = |
@@ -279,7 +283,6 @@ int gp10b_init_hal(struct gk20a *g) | |||
279 | gp10b_init_ce(gops); | 283 | gp10b_init_ce(gops); |
280 | gp10b_init_gr_ctx(gops); | 284 | gp10b_init_gr_ctx(gops); |
281 | gp10b_init_mm(gops); | 285 | gp10b_init_mm(gops); |
282 | gk20a_falcon_init_hal(gops); | ||
283 | gp10b_init_pmu_ops(gops); | 286 | gp10b_init_pmu_ops(gops); |
284 | gk20a_init_debug_ops(gops); | 287 | gk20a_init_debug_ops(gops); |
285 | gk20a_init_dbg_session_ops(gops); | 288 | gk20a_init_dbg_session_ops(gops); |