From aade61eff9962b4671802b0d88523e6ccccde6b0 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Wed, 28 Jun 2017 17:57:39 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1514013 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gv11b') 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 = { .pg_gr_load_gating_prod = gr_gv11b_pg_gr_load_gating_prod, }, + + .falcon = { + .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, + }, .chip_init_gpu_characteristics = gv11b_init_gpu_characteristics, .get_litter_value = gv11b_get_litter_value, }; @@ -211,6 +215,7 @@ int gv11b_init_hal(struct gk20a *g) gops->ltc = gv11b_ops.ltc; gops->clock_gating = gv11b_ops.clock_gating; + gops->falcon = gv11b_ops.falcon; /* Lone functions */ gops->chip_init_gpu_characteristics = @@ -231,7 +236,6 @@ int gv11b_init_hal(struct gk20a *g) gv11b_init_ce(gops); gv11b_init_gr_ctx(gops); gv11b_init_mm(gops); - gk20a_falcon_init_hal(gops); gv11b_init_pmu_ops(gops); gk20a_init_debug_ops(gops); gk20a_init_dbg_session_ops(gops); -- cgit v1.2.2