From ecf67ebbf69a9ab6481b1517b8920f7ac5828bb5 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Wed, 28 Jun 2017 17:56:44 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1514012 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gp106/hal_gp106.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gp106/hal_gp106.c') 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 = { .enable_shadow_rom = xve_enable_shadow_rom_gp106, .disable_shadow_rom = xve_disable_shadow_rom_gp106, }, + .falcon = { + .falcon_hal_sw_init = gp106_falcon_hal_sw_init, + }, .get_litter_value = gp106_get_litter_value, .chip_init_gpu_characteristics = gp106_init_gpu_characteristics, .bios_init = gm206_bios_init, @@ -275,6 +278,7 @@ int gp106_init_hal(struct gk20a *g) gops->clock_gating = gp106_ops.clock_gating; gops->cde = gp106_ops.cde; gops->xve = gp106_ops.xve; + gops->falcon = gp106_ops.falcon; /* Lone functions */ gops->get_litter_value = gp106_ops.get_litter_value; @@ -295,7 +299,6 @@ int gp106_init_hal(struct gk20a *g) gp10b_init_ce(gops); gp106_init_gr_ctx(gops); gp106_init_mm(gops); - gp106_falcon_init_hal(gops); gp106_init_pmu_ops(gops); gk20a_init_debug_ops(gops); gk20a_init_dbg_session_ops(gops); -- cgit v1.2.2