summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/hal_gp106.c
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-06-27 18:09:05 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-27 19:34:37 -0400
commit9907b97985c47003a179c4357274b737cc0699ee (patch)
tree2b40019669007c9bbbdcad29b5f57b27f13df84f /drivers/gpu/nvgpu/gp106/hal_gp106.c
parent1552e3fb09741309ea2d5cc4433e247bae7265e1 (diff)
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 <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1509632 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/hal_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/hal_gp106.c6
1 files changed, 5 insertions, 1 deletions
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 = {
203 .sync_debugfs = gp10b_ltc_sync_debugfs, 203 .sync_debugfs = gp10b_ltc_sync_debugfs,
204#endif 204#endif
205 }, 205 },
206 .ce2 = {
207 .isr_stall = gp10b_ce_isr,
208 .isr_nonstall = gp10b_ce_nonstall_isr,
209 },
206 .clock_gating = { 210 .clock_gating = {
207 .slcg_bus_load_gating_prod = 211 .slcg_bus_load_gating_prod =
208 gp106_slcg_bus_load_gating_prod, 212 gp106_slcg_bus_load_gating_prod,
@@ -396,6 +400,7 @@ int gp106_init_hal(struct gk20a *g)
396 gk20a_dbg_fn(""); 400 gk20a_dbg_fn("");
397 401
398 gops->ltc = gp106_ops.ltc; 402 gops->ltc = gp106_ops.ltc;
403 gops->ce2 = gp106_ops.ce2;
399 gops->clock_gating = gp106_ops.clock_gating; 404 gops->clock_gating = gp106_ops.clock_gating;
400 gops->fifo = gp106_ops.fifo; 405 gops->fifo = gp106_ops.fifo;
401 gops->mc = gp106_ops.mc; 406 gops->mc = gp106_ops.mc;
@@ -424,7 +429,6 @@ int gp106_init_hal(struct gk20a *g)
424 gp106_init_gr(g); 429 gp106_init_gr(g);
425 gp10b_init_fecs_trace_ops(gops); 430 gp10b_init_fecs_trace_ops(gops);
426 gp106_init_fb(gops); 431 gp106_init_fb(gops);
427 gp10b_init_ce(gops);
428 gp106_init_gr_ctx(gops); 432 gp106_init_gr_ctx(gops);
429 gp106_init_mm(gops); 433 gp106_init_mm(gops);
430 gp106_init_pmu_ops(g); 434 gp106_init_pmu_ops(g);