From 9907b97985c47003a179c4357274b737cc0699ee Mon Sep 17 00:00:00 2001 From: Sunny He Date: Tue, 27 Jun 2017 15:09:05 -0700 Subject: gpu: nvgpu: Reorg ce2 HAL initialization Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the ce2 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: I7dfd5e8dcd4d6f3623d1b795b6b2e15ff356a13a Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1509632 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp106/hal_gp106.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gp106') diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 49c4b358..227b22e6 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -203,6 +203,10 @@ static const struct gpu_ops gp106_ops = { .sync_debugfs = gp10b_ltc_sync_debugfs, #endif }, + .ce2 = { + .isr_stall = gp10b_ce_isr, + .isr_nonstall = gp10b_ce_nonstall_isr, + }, .clock_gating = { .slcg_bus_load_gating_prod = gp106_slcg_bus_load_gating_prod, @@ -396,6 +400,7 @@ int gp106_init_hal(struct gk20a *g) gk20a_dbg_fn(""); gops->ltc = gp106_ops.ltc; + gops->ce2 = gp106_ops.ce2; gops->clock_gating = gp106_ops.clock_gating; gops->fifo = gp106_ops.fifo; gops->mc = gp106_ops.mc; @@ -424,7 +429,6 @@ int gp106_init_hal(struct gk20a *g) gp106_init_gr(g); gp10b_init_fecs_trace_ops(gops); gp106_init_fb(gops); - gp10b_init_ce(gops); gp106_init_gr_ctx(gops); gp106_init_mm(gops); gp106_init_pmu_ops(g); -- cgit v1.2.2