summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-07-26 20:37:46 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-27 19:34:45 -0400
commitf0593bb43f3379baffd7bb77b89c9af18842ceef (patch)
tree9d41059c5b1b68a1d12705ae78421ee375dd7cd3 /drivers/gpu/nvgpu/gp10b/hal_gp10b.c
parent9d37d8b78c2dac7fa480493d1ab67b95290b87f1 (diff)
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 <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1527421 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit 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.c8
1 files changed, 7 insertions, 1 deletions
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 @@
61#include <nvgpu/hw/gp10b/hw_fifo_gp10b.h> 61#include <nvgpu/hw/gp10b/hw_fifo_gp10b.h>
62#include <nvgpu/hw/gp10b/hw_ram_gp10b.h> 62#include <nvgpu/hw/gp10b/hw_ram_gp10b.h>
63#include <nvgpu/hw/gp10b/hw_top_gp10b.h> 63#include <nvgpu/hw/gp10b/hw_top_gp10b.h>
64#include <nvgpu/hw/gp10b/hw_pram_gp10b.h>
64 65
65static int gp10b_get_litter_value(struct gk20a *g, int value) 66static int gp10b_get_litter_value(struct gk20a *g, int value)
66{ 67{
@@ -303,6 +304,11 @@ static const struct gpu_ops gp10b_ops = {
303 .max_entries = gk20a_gr_max_entries, 304 .max_entries = gk20a_gr_max_entries,
304 }, 305 },
305#endif /* CONFIG_GK20A_CTXSW_TRACE */ 306#endif /* CONFIG_GK20A_CTXSW_TRACE */
307 .pramin = {
308 .enter = gk20a_pramin_enter,
309 .exit = gk20a_pramin_exit,
310 .data032_r = pram_data032_r,
311 },
306 .mc = { 312 .mc = {
307 .intr_enable = mc_gp10b_intr_enable, 313 .intr_enable = mc_gp10b_intr_enable,
308 .intr_unit_config = mc_gp10b_intr_unit_config, 314 .intr_unit_config = mc_gp10b_intr_unit_config,
@@ -378,6 +384,7 @@ int gp10b_init_hal(struct gk20a *g)
378 gops->fifo = gp10b_ops.fifo; 384 gops->fifo = gp10b_ops.fifo;
379 gops->gr_ctx = gp10b_ops.gr_ctx; 385 gops->gr_ctx = gp10b_ops.gr_ctx;
380 gops->fecs_trace = gp10b_ops.fecs_trace; 386 gops->fecs_trace = gp10b_ops.fecs_trace;
387 gops->pramin = gp10b_ops.pramin;
381 gops->mc = gp10b_ops.mc; 388 gops->mc = gp10b_ops.mc;
382 gops->debug = gp10b_ops.debug; 389 gops->debug = gp10b_ops.debug;
383 gops->dbg_session_ops = gp10b_ops.dbg_session_ops; 390 gops->dbg_session_ops = gp10b_ops.dbg_session_ops;
@@ -442,7 +449,6 @@ int gp10b_init_hal(struct gk20a *g)
442 gp10b_init_pmu_ops(g); 449 gp10b_init_pmu_ops(g);
443 gp10b_init_regops(gops); 450 gp10b_init_regops(gops);
444 gp10b_init_therm_ops(gops); 451 gp10b_init_therm_ops(gops);
445 gk20a_init_pramin_ops(gops);
446 452
447 g->name = "gp10b"; 453 g->name = "gp10b";
448 454