diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv100')
-rw-r--r-- | drivers/gpu/nvgpu/gv100/hal_gv100.c | 51 |
1 files changed, 49 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 74bc48fb..bd13ec08 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -32,19 +32,23 @@ | |||
32 | #include "gk20a/regops_gk20a.h" | 32 | #include "gk20a/regops_gk20a.h" |
33 | #include "gk20a/fb_gk20a.h" | 33 | #include "gk20a/fb_gk20a.h" |
34 | #include "gk20a/mm_gk20a.h" | 34 | #include "gk20a/mm_gk20a.h" |
35 | #include "gk20a/pmu_gk20a.h" | ||
35 | 36 | ||
36 | #include "gm20b/ltc_gm20b.h" | 37 | #include "gm20b/ltc_gm20b.h" |
37 | #include "gm20b/gr_gm20b.h" | 38 | #include "gm20b/gr_gm20b.h" |
38 | #include "gm20b/fifo_gm20b.h" | 39 | #include "gm20b/fifo_gm20b.h" |
39 | #include "gm20b/fb_gm20b.h" | 40 | #include "gm20b/fb_gm20b.h" |
40 | #include "gm20b/mm_gm20b.h" | 41 | #include "gm20b/mm_gm20b.h" |
42 | #include "gm20b/pmu_gm20b.h" | ||
43 | #include "gm20b/acr_gm20b.h" | ||
41 | 44 | ||
42 | #include "gp10b/fb_gp10b.h" | 45 | #include "gp10b/fb_gp10b.h" |
43 | 46 | ||
44 | #include "gp106/clk_gp106.h" | 47 | #include "gp106/clk_gp106.h" |
45 | #include "gp106/clk_arb_gp106.h" | 48 | #include "gp106/clk_arb_gp106.h" |
46 | #include "gp106/pmu_gp106.h" | 49 | #include "gp106/pmu_gp106.h" |
47 | 50 | #include "gp106/acr_gp106.h" | |
51 | #include "gp106/sec2_gp106.h" | ||
48 | #include "gm206/bios_gm206.h" | 52 | #include "gm206/bios_gm206.h" |
49 | #include "gp106/therm_gp106.h" | 53 | #include "gp106/therm_gp106.h" |
50 | #include "gp106/xve_gp106.h" | 54 | #include "gp106/xve_gp106.h" |
@@ -58,6 +62,7 @@ | |||
58 | #include "gp10b/fifo_gp10b.h" | 62 | #include "gp10b/fifo_gp10b.h" |
59 | #include "gp10b/fecs_trace_gp10b.h" | 63 | #include "gp10b/fecs_trace_gp10b.h" |
60 | #include "gp10b/mm_gp10b.h" | 64 | #include "gp10b/mm_gp10b.h" |
65 | #include "gp10b/pmu_gp10b.h" | ||
61 | 66 | ||
62 | #include "gv11b/hal_gv11b.h" | 67 | #include "gv11b/hal_gv11b.h" |
63 | #include "gv11b/gr_gv11b.h" | 68 | #include "gv11b/gr_gv11b.h" |
@@ -87,6 +92,7 @@ | |||
87 | #include <nvgpu/hw/gv100/hw_ram_gv100.h> | 92 | #include <nvgpu/hw/gv100/hw_ram_gv100.h> |
88 | #include <nvgpu/hw/gv100/hw_top_gv100.h> | 93 | #include <nvgpu/hw/gv100/hw_top_gv100.h> |
89 | #include <nvgpu/hw/gv100/hw_pram_gv100.h> | 94 | #include <nvgpu/hw/gv100/hw_pram_gv100.h> |
95 | #include <nvgpu/hw/gv100/hw_pwr_gv100.h> | ||
90 | 96 | ||
91 | static int gv100_get_litter_value(struct gk20a *g, int value) | 97 | static int gv100_get_litter_value(struct gk20a *g, int value) |
92 | { | 98 | { |
@@ -345,6 +351,45 @@ static const struct gpu_ops gv100_ops = { | |||
345 | .exit = gk20a_pramin_exit, | 351 | .exit = gk20a_pramin_exit, |
346 | .data032_r = pram_data032_r, | 352 | .data032_r = pram_data032_r, |
347 | }, | 353 | }, |
354 | .pmu = { | ||
355 | .init_wpr_region = gm20b_pmu_init_acr, | ||
356 | .load_lsfalcon_ucode = gp106_load_falcon_ucode, | ||
357 | .is_lazy_bootstrap = gp106_is_lazy_bootstrap, | ||
358 | .is_priv_load = gp106_is_priv_load, | ||
359 | .prepare_ucode = gp106_prepare_ucode_blob, | ||
360 | .pmu_setup_hw_and_bootstrap = gp106_bootstrap_hs_flcn, | ||
361 | .get_wpr = gp106_wpr_info, | ||
362 | .alloc_blob_space = gp106_alloc_blob_space, | ||
363 | .pmu_populate_loader_cfg = gp106_pmu_populate_loader_cfg, | ||
364 | .flcn_populate_bl_dmem_desc = gp106_flcn_populate_bl_dmem_desc, | ||
365 | .falcon_wait_for_halt = sec2_wait_for_halt, | ||
366 | .falcon_clear_halt_interrupt_status = | ||
367 | sec2_clear_halt_interrupt_status, | ||
368 | .init_falcon_setup_hw = init_sec2_setup_hw1, | ||
369 | .pmu_queue_tail = gk20a_pmu_queue_tail, | ||
370 | .pmu_get_queue_head = pwr_pmu_queue_head_r, | ||
371 | .pmu_mutex_release = gk20a_pmu_mutex_release, | ||
372 | .is_pmu_supported = gp106_is_pmu_supported, | ||
373 | .pmu_pg_supported_engines_list = gp106_pmu_pg_engines_list, | ||
374 | .pmu_elpg_statistics = gp106_pmu_elpg_statistics, | ||
375 | .pmu_mutex_acquire = gk20a_pmu_mutex_acquire, | ||
376 | .pmu_is_lpwr_feature_supported = | ||
377 | gp106_pmu_is_lpwr_feature_supported, | ||
378 | .pmu_msgq_tail = gk20a_pmu_msgq_tail, | ||
379 | .pmu_pg_engines_feature_list = gp106_pmu_pg_feature_list, | ||
380 | .pmu_get_queue_head_size = pwr_pmu_queue_head__size_1_v, | ||
381 | .pmu_queue_head = gk20a_pmu_queue_head, | ||
382 | .pmu_pg_param_post_init = nvgpu_lpwr_post_init, | ||
383 | .pmu_get_queue_tail_size = pwr_pmu_queue_tail__size_1_v, | ||
384 | .pmu_pg_init_param = gp106_pg_param_init, | ||
385 | .reset_engine = gp106_pmu_engine_reset, | ||
386 | .pmu_lpwr_disable_pg = nvgpu_lpwr_disable_pg, | ||
387 | .write_dmatrfbase = gp10b_write_dmatrfbase, | ||
388 | .pmu_mutex_size = pwr_pmu_mutex__size_1_v, | ||
389 | .is_engine_in_reset = gp106_pmu_is_engine_in_reset, | ||
390 | .pmu_get_queue_tail = pwr_pmu_queue_tail_r, | ||
391 | .pmu_lpwr_enable_pg = nvgpu_lpwr_enable_pg, | ||
392 | }, | ||
348 | .clk = { | 393 | .clk = { |
349 | .init_clk_support = gp106_init_clk_support, | 394 | .init_clk_support = gp106_init_clk_support, |
350 | .get_crystal_clk_hz = gp106_crystal_clk_hz, | 395 | .get_crystal_clk_hz = gp106_crystal_clk_hz, |
@@ -444,6 +489,7 @@ int gv100_init_hal(struct gk20a *g) | |||
444 | gops->fecs_trace = gv100_ops.fecs_trace; | 489 | gops->fecs_trace = gv100_ops.fecs_trace; |
445 | gops->pramin = gv100_ops.pramin; | 490 | gops->pramin = gv100_ops.pramin; |
446 | gops->therm = gv100_ops.therm; | 491 | gops->therm = gv100_ops.therm; |
492 | gops->pmu = gv100_ops.pmu; | ||
447 | gops->mc = gv100_ops.mc; | 493 | gops->mc = gv100_ops.mc; |
448 | gops->debug = gv100_ops.debug; | 494 | gops->debug = gv100_ops.debug; |
449 | gops->dbg_session_ops = gv100_ops.dbg_session_ops; | 495 | gops->dbg_session_ops = gv100_ops.dbg_session_ops; |
@@ -470,13 +516,14 @@ int gv100_init_hal(struct gk20a *g) | |||
470 | __nvgpu_set_enabled(g, NVGPU_GR_USE_DMA_FOR_FW_BOOTSTRAP, true); | 516 | __nvgpu_set_enabled(g, NVGPU_GR_USE_DMA_FOR_FW_BOOTSTRAP, true); |
471 | __nvgpu_set_enabled(g, NVGPU_SEC_PRIVSECURITY, true); | 517 | __nvgpu_set_enabled(g, NVGPU_SEC_PRIVSECURITY, true); |
472 | __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, true); | 518 | __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, true); |
519 | __nvgpu_set_enabled(g, NVGPU_PMU_FECS_BOOTSTRAP_DONE, false); | ||
473 | /* for now */ | 520 | /* for now */ |
474 | __nvgpu_set_enabled(g, NVGPU_PMU_PSTATE, false); | 521 | __nvgpu_set_enabled(g, NVGPU_PMU_PSTATE, false); |
475 | 522 | ||
523 | g->pmu_lsf_pmu_wpr_init_done = 0; | ||
476 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; | 524 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; |
477 | 525 | ||
478 | gv11b_init_gr(g); | 526 | gv11b_init_gr(g); |
479 | gp106_init_pmu_ops(g); | ||
480 | 527 | ||
481 | gv11b_init_uncompressed_kind_map(); | 528 | gv11b_init_uncompressed_kind_map(); |
482 | gv11b_init_kind_attr(); | 529 | gv11b_init_kind_attr(); |