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/gp106/hal_gp106.c | |
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/gp106/hal_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 555a2192..29b52e44 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -259,6 +259,9 @@ static const struct gpu_ops gp106_ops = { | |||
259 | .enable_shadow_rom = xve_enable_shadow_rom_gp106, | 259 | .enable_shadow_rom = xve_enable_shadow_rom_gp106, |
260 | .disable_shadow_rom = xve_disable_shadow_rom_gp106, | 260 | .disable_shadow_rom = xve_disable_shadow_rom_gp106, |
261 | }, | 261 | }, |
262 | .falcon = { | ||
263 | .falcon_hal_sw_init = gp106_falcon_hal_sw_init, | ||
264 | }, | ||
262 | .get_litter_value = gp106_get_litter_value, | 265 | .get_litter_value = gp106_get_litter_value, |
263 | .chip_init_gpu_characteristics = gp106_init_gpu_characteristics, | 266 | .chip_init_gpu_characteristics = gp106_init_gpu_characteristics, |
264 | .bios_init = gm206_bios_init, | 267 | .bios_init = gm206_bios_init, |
@@ -275,6 +278,7 @@ int gp106_init_hal(struct gk20a *g) | |||
275 | gops->clock_gating = gp106_ops.clock_gating; | 278 | gops->clock_gating = gp106_ops.clock_gating; |
276 | gops->cde = gp106_ops.cde; | 279 | gops->cde = gp106_ops.cde; |
277 | gops->xve = gp106_ops.xve; | 280 | gops->xve = gp106_ops.xve; |
281 | gops->falcon = gp106_ops.falcon; | ||
278 | 282 | ||
279 | /* Lone functions */ | 283 | /* Lone functions */ |
280 | gops->get_litter_value = gp106_ops.get_litter_value; | 284 | gops->get_litter_value = gp106_ops.get_litter_value; |
@@ -295,7 +299,6 @@ int gp106_init_hal(struct gk20a *g) | |||
295 | gp10b_init_ce(gops); | 299 | gp10b_init_ce(gops); |
296 | gp106_init_gr_ctx(gops); | 300 | gp106_init_gr_ctx(gops); |
297 | gp106_init_mm(gops); | 301 | gp106_init_mm(gops); |
298 | gp106_falcon_init_hal(gops); | ||
299 | gp106_init_pmu_ops(gops); | 302 | gp106_init_pmu_ops(gops); |
300 | gk20a_init_debug_ops(gops); | 303 | gk20a_init_debug_ops(gops); |
301 | gk20a_init_dbg_session_ops(gops); | 304 | gk20a_init_dbg_session_ops(gops); |