From 858a204362a385f076b057b6196fd89f7edb839b Mon Sep 17 00:00:00 2001 From: Sunny He Date: Fri, 30 Jun 2017 10:31:31 -0700 Subject: gpu: nvgpu: Reorg cde HAL initialization Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the cde 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: I9343ce4985eb941a2610f5f11e8f01269ab68481 Signed-off-by: Sunny He Reviewed-on: https://git-master/r/1511673 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gp10b/hal_gp10b.c') diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 98ff55cc..8609605b 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -207,6 +207,11 @@ static const struct gpu_ops gp10b_ops = { .pg_gr_load_gating_prod = gr_gp10b_pg_gr_load_gating_prod, }, + .cde = { + .get_program_numbers = gp10b_cde_get_program_numbers, + .need_scatter_buffer = gp10b_need_scatter_buffer, + .populate_scatter_buffer = gp10b_populate_scatter_buffer, + }, .chip_init_gpu_characteristics = gp10b_init_gpu_characteristics, .get_litter_value = gp10b_get_litter_value, }; @@ -219,6 +224,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; /* Lone Functions */ gops->chip_init_gpu_characteristics = @@ -278,7 +284,6 @@ int gp10b_init_hal(struct gk20a *g) gk20a_init_debug_ops(gops); gk20a_init_dbg_session_ops(gops); gp10b_init_regops(gops); - gp10b_init_cde_ops(gops); gp10b_init_therm_ops(gops); gk20a_init_tsg_ops(gops); gk20a_init_pramin_ops(gops); -- cgit v1.2.2