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/gp10b/hal_gp10b.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gp10b') 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 = { .need_scatter_buffer = gp10b_need_scatter_buffer, .populate_scatter_buffer = gp10b_populate_scatter_buffer, }, + .falcon = { + .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, + }, .chip_init_gpu_characteristics = gp10b_init_gpu_characteristics, .get_litter_value = gp10b_get_litter_value, }; @@ -225,6 +228,7 @@ int gp10b_init_hal(struct gk20a *g) gops->ltc = gp10b_ops.ltc; gops->clock_gating = gp10b_ops.clock_gating; gops->cde = gp10b_ops.cde; + gops->falcon = gp10b_ops.falcon; /* Lone Functions */ gops->chip_init_gpu_characteristics = @@ -279,7 +283,6 @@ int gp10b_init_hal(struct gk20a *g) gp10b_init_ce(gops); gp10b_init_gr_ctx(gops); gp10b_init_mm(gops); - gk20a_falcon_init_hal(gops); gp10b_init_pmu_ops(gops); gk20a_init_debug_ops(gops); gk20a_init_dbg_session_ops(gops); -- cgit v1.2.2