diff options
author | Sunny He <suhe@nvidia.com> | 2017-07-28 21:36:52 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-02 17:43:25 -0400 |
commit | a15e110a9b790f55a5c6e257cfbf7f7235f5a334 (patch) | |
tree | 199209146e3e67927c13e2ece240de40f973e1ea /drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |
parent | 43ae97000be786e4118d431637f05b1462e296c4 (diff) |
gpu: nvgpu: Reorg regops HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the
regops 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: I7e2ccf158a8e7efa453a3326e86146660f18926f
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1530135
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Tested-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/hal_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index a2aacd2e..e2479530 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -313,6 +313,29 @@ static const struct gpu_ops gp10b_ops = { | |||
313 | .init_therm_setup_hw = gp10b_init_therm_setup_hw, | 313 | .init_therm_setup_hw = gp10b_init_therm_setup_hw, |
314 | .elcg_init_idle_filters = gp10b_elcg_init_idle_filters, | 314 | .elcg_init_idle_filters = gp10b_elcg_init_idle_filters, |
315 | }, | 315 | }, |
316 | .regops = { | ||
317 | .get_global_whitelist_ranges = | ||
318 | gp10b_get_global_whitelist_ranges, | ||
319 | .get_global_whitelist_ranges_count = | ||
320 | gp10b_get_global_whitelist_ranges_count, | ||
321 | .get_context_whitelist_ranges = | ||
322 | gp10b_get_context_whitelist_ranges, | ||
323 | .get_context_whitelist_ranges_count = | ||
324 | gp10b_get_context_whitelist_ranges_count, | ||
325 | .get_runcontrol_whitelist = gp10b_get_runcontrol_whitelist, | ||
326 | .get_runcontrol_whitelist_count = | ||
327 | gp10b_get_runcontrol_whitelist_count, | ||
328 | .get_runcontrol_whitelist_ranges = | ||
329 | gp10b_get_runcontrol_whitelist_ranges, | ||
330 | .get_runcontrol_whitelist_ranges_count = | ||
331 | gp10b_get_runcontrol_whitelist_ranges_count, | ||
332 | .get_qctl_whitelist = gp10b_get_qctl_whitelist, | ||
333 | .get_qctl_whitelist_count = gp10b_get_qctl_whitelist_count, | ||
334 | .get_qctl_whitelist_ranges = gp10b_get_qctl_whitelist_ranges, | ||
335 | .get_qctl_whitelist_ranges_count = | ||
336 | gp10b_get_qctl_whitelist_ranges_count, | ||
337 | .apply_smpc_war = gp10b_apply_smpc_war, | ||
338 | }, | ||
316 | .mc = { | 339 | .mc = { |
317 | .intr_enable = mc_gp10b_intr_enable, | 340 | .intr_enable = mc_gp10b_intr_enable, |
318 | .intr_unit_config = mc_gp10b_intr_unit_config, | 341 | .intr_unit_config = mc_gp10b_intr_unit_config, |
@@ -390,6 +413,7 @@ int gp10b_init_hal(struct gk20a *g) | |||
390 | gops->fecs_trace = gp10b_ops.fecs_trace; | 413 | gops->fecs_trace = gp10b_ops.fecs_trace; |
391 | gops->pramin = gp10b_ops.pramin; | 414 | gops->pramin = gp10b_ops.pramin; |
392 | gops->therm = gp10b_ops.therm; | 415 | gops->therm = gp10b_ops.therm; |
416 | gops->regops = gp10b_ops.regops; | ||
393 | gops->mc = gp10b_ops.mc; | 417 | gops->mc = gp10b_ops.mc; |
394 | gops->debug = gp10b_ops.debug; | 418 | gops->debug = gp10b_ops.debug; |
395 | gops->dbg_session_ops = gp10b_ops.dbg_session_ops; | 419 | gops->dbg_session_ops = gp10b_ops.dbg_session_ops; |
@@ -452,7 +476,6 @@ int gp10b_init_hal(struct gk20a *g) | |||
452 | gp10b_init_fb(gops); | 476 | gp10b_init_fb(gops); |
453 | gp10b_init_mm(gops); | 477 | gp10b_init_mm(gops); |
454 | gp10b_init_pmu_ops(g); | 478 | gp10b_init_pmu_ops(g); |
455 | gp10b_init_regops(gops); | ||
456 | 479 | ||
457 | g->name = "gp10b"; | 480 | g->name = "gp10b"; |
458 | 481 | ||