diff options
author | Sunny He <suhe@nvidia.com> | 2017-07-26 13:45:38 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-27 19:34:44 -0400 |
commit | afa29933e45b2c3054db67065a0a68606bbc1f52 (patch) | |
tree | f3f4d122365ecc82ce6abb98b7ce59c6a92e3b90 /drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |
parent | 3c556c5e9573ffa69bfe64ed1401ed4a9141acb3 (diff) |
gpu: nvgpu: gv11b: Reorg gr_ctx HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the
gr_ctx 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: Icc6b0f968f2e3209de190d445c878a4b20bfcf4a
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1527418
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/hal_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index e585e9b1..f5191da7 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -282,6 +282,10 @@ static const struct gpu_ops gv11b_ops = { | |||
282 | .preempt_ch_tsg = gv11b_fifo_preempt_ch_tsg, | 282 | .preempt_ch_tsg = gv11b_fifo_preempt_ch_tsg, |
283 | .handle_ctxsw_timeout = gv11b_fifo_handle_ctxsw_timeout, | 283 | .handle_ctxsw_timeout = gv11b_fifo_handle_ctxsw_timeout, |
284 | }, | 284 | }, |
285 | .gr_ctx = { | ||
286 | .get_netlist_name = gr_gv11b_get_netlist_name, | ||
287 | .is_fw_defined = gr_gv11b_is_firmware_defined, | ||
288 | }, | ||
285 | .mc = { | 289 | .mc = { |
286 | .intr_enable = mc_gv11b_intr_enable, | 290 | .intr_enable = mc_gv11b_intr_enable, |
287 | .intr_unit_config = mc_gp10b_intr_unit_config, | 291 | .intr_unit_config = mc_gp10b_intr_unit_config, |
@@ -349,6 +353,7 @@ int gv11b_init_hal(struct gk20a *g) | |||
349 | gops->ce2 = gv11b_ops.ce2; | 353 | gops->ce2 = gv11b_ops.ce2; |
350 | gops->clock_gating = gv11b_ops.clock_gating; | 354 | gops->clock_gating = gv11b_ops.clock_gating; |
351 | gops->fifo = gv11b_ops.fifo; | 355 | gops->fifo = gv11b_ops.fifo; |
356 | gops->gr_ctx = gv11b_ops.gr_ctx; | ||
352 | gops->mc = gv11b_ops.mc; | 357 | gops->mc = gv11b_ops.mc; |
353 | gops->debug = gv11b_ops.debug; | 358 | gops->debug = gv11b_ops.debug; |
354 | gops->dbg_session_ops = gv11b_ops.dbg_session_ops; | 359 | gops->dbg_session_ops = gv11b_ops.dbg_session_ops; |
@@ -365,13 +370,13 @@ int gv11b_init_hal(struct gk20a *g) | |||
365 | gops->get_litter_value = gv11b_ops.get_litter_value; | 370 | gops->get_litter_value = gv11b_ops.get_litter_value; |
366 | 371 | ||
367 | /* boot in non-secure modes for time beeing */ | 372 | /* boot in non-secure modes for time beeing */ |
373 | __nvgpu_set_enabled(g, NVGPU_GR_USE_DMA_FOR_FW_BOOTSTRAP, false); | ||
368 | __nvgpu_set_enabled(g, NVGPU_SEC_PRIVSECURITY, false); | 374 | __nvgpu_set_enabled(g, NVGPU_SEC_PRIVSECURITY, false); |
369 | __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, false); | 375 | __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, false); |
370 | 376 | ||
371 | gv11b_init_gr(g); | 377 | gv11b_init_gr(g); |
372 | gv11b_init_fecs_trace_ops(gops); | 378 | gv11b_init_fecs_trace_ops(gops); |
373 | gv11b_init_fb(gops); | 379 | gv11b_init_fb(gops); |
374 | gv11b_init_gr_ctx(gops); | ||
375 | gv11b_init_mm(gops); | 380 | gv11b_init_mm(gops); |
376 | gv11b_init_pmu_ops(g); | 381 | gv11b_init_pmu_ops(g); |
377 | gv11b_init_regops(gops); | 382 | gv11b_init_regops(gops); |