summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106
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/gp106
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/gp106')
-rw-r--r--drivers/gpu/nvgpu/gp106/hal_gp106.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c
index dd162109..f9368621 100644
--- a/drivers/gpu/nvgpu/gp106/hal_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c
@@ -70,6 +70,7 @@
70#include <nvgpu/hw/gp106/hw_fifo_gp106.h> 70#include <nvgpu/hw/gp106/hw_fifo_gp106.h>
71#include <nvgpu/hw/gp106/hw_ram_gp106.h> 71#include <nvgpu/hw/gp106/hw_ram_gp106.h>
72#include <nvgpu/hw/gp106/hw_top_gp106.h> 72#include <nvgpu/hw/gp106/hw_top_gp106.h>
73#include <nvgpu/hw/gp106/hw_pram_gp106.h>
73 74
74static int gp106_get_litter_value(struct gk20a *g, int value) 75static int gp106_get_litter_value(struct gk20a *g, int value)
75{ 76{
@@ -337,6 +338,11 @@ static const struct gpu_ops gp106_ops = {
337 .max_entries = gk20a_gr_max_entries, 338 .max_entries = gk20a_gr_max_entries,
338 }, 339 },
339#endif /* CONFIG_GK20A_CTXSW_TRACE */ 340#endif /* CONFIG_GK20A_CTXSW_TRACE */
341 .pramin = {
342 .enter = gk20a_pramin_enter,
343 .exit = gk20a_pramin_exit,
344 .data032_r = pram_data032_r,
345 },
340 .mc = { 346 .mc = {
341 .intr_enable = mc_gp10b_intr_enable, 347 .intr_enable = mc_gp10b_intr_enable,
342 .intr_unit_config = mc_gp10b_intr_unit_config, 348 .intr_unit_config = mc_gp10b_intr_unit_config,
@@ -429,6 +435,7 @@ int gp106_init_hal(struct gk20a *g)
429 gops->fifo = gp106_ops.fifo; 435 gops->fifo = gp106_ops.fifo;
430 gops->gr_ctx = gp106_ops.gr_ctx; 436 gops->gr_ctx = gp106_ops.gr_ctx;
431 gops->fecs_trace = gp106_ops.fecs_trace; 437 gops->fecs_trace = gp106_ops.fecs_trace;
438 gops->pramin = gp106_ops.pramin;
432 gops->mc = gp106_ops.mc; 439 gops->mc = gp106_ops.mc;
433 gops->debug = gp106_ops.debug; 440 gops->debug = gp106_ops.debug;
434 gops->dbg_session_ops = gp106_ops.dbg_session_ops; 441 gops->dbg_session_ops = gp106_ops.dbg_session_ops;
@@ -460,7 +467,6 @@ int gp106_init_hal(struct gk20a *g)
460 gp106_init_clk_ops(gops); 467 gp106_init_clk_ops(gops);
461 gp106_init_clk_arb_ops(gops); 468 gp106_init_clk_arb_ops(gops);
462 gp106_init_regops(gops); 469 gp106_init_regops(gops);
463 gk20a_init_pramin_ops(gops);
464 gp106_init_therm_ops(gops); 470 gp106_init_therm_ops(gops);
465 471
466 g->name = "gp10x"; 472 g->name = "gp10x";