From f0593bb43f3379baffd7bb77b89c9af18842ceef Mon Sep 17 00:00:00 2001 From: Sunny He Date: Wed, 26 Jul 2017 17:37:46 -0700 Subject: gpu: nvgpu: Reorg pramin HAL initialization Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the pramin 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: I0c0aecfb8f5ea436ef353b874f5e36ff24ebd130 Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1527421 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 8 +++++++- 1 file changed, 7 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 1574ac56..3a44f1ef 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -61,6 +61,7 @@ #include #include #include +#include static int gp10b_get_litter_value(struct gk20a *g, int value) { @@ -303,6 +304,11 @@ static const struct gpu_ops gp10b_ops = { .max_entries = gk20a_gr_max_entries, }, #endif /* CONFIG_GK20A_CTXSW_TRACE */ + .pramin = { + .enter = gk20a_pramin_enter, + .exit = gk20a_pramin_exit, + .data032_r = pram_data032_r, + }, .mc = { .intr_enable = mc_gp10b_intr_enable, .intr_unit_config = mc_gp10b_intr_unit_config, @@ -378,6 +384,7 @@ int gp10b_init_hal(struct gk20a *g) gops->fifo = gp10b_ops.fifo; gops->gr_ctx = gp10b_ops.gr_ctx; gops->fecs_trace = gp10b_ops.fecs_trace; + gops->pramin = gp10b_ops.pramin; gops->mc = gp10b_ops.mc; gops->debug = gp10b_ops.debug; gops->dbg_session_ops = gp10b_ops.dbg_session_ops; @@ -442,7 +449,6 @@ int gp10b_init_hal(struct gk20a *g) gp10b_init_pmu_ops(g); gp10b_init_regops(gops); gp10b_init_therm_ops(gops); - gk20a_init_pramin_ops(gops); g->name = "gp10b"; -- cgit v1.2.2