summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-08-01 20:10:42 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-21 16:06:07 -0400
commit5f010177de985c901c33c914efe70a8498a5974f (patch)
tree1b1a2ac1ab71608a0754a7eb64222f5d198e793c /drivers/gpu/nvgpu/gp106
parentb50b379c192714d0d08c3f2d33e90c95cf795253 (diff)
gpu: nvgpu: Reorg pmu HAL initialization
Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the pmu 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: I8839ac99e87153637005e23b3013237f57275c54 Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1530982 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> 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/acr_gp106.c25
-rw-r--r--drivers/gpu/nvgpu/gp106/acr_gp106.h9
-rw-r--r--drivers/gpu/nvgpu/gp106/hal_gp106.c49
-rw-r--r--drivers/gpu/nvgpu/gp106/pmu_gp106.c64
-rw-r--r--drivers/gpu/nvgpu/gp106/pmu_gp106.h10
5 files changed, 77 insertions, 80 deletions
diff --git a/drivers/gpu/nvgpu/gp106/acr_gp106.c b/drivers/gpu/nvgpu/gp106/acr_gp106.c
index 929036a3..bd47f467 100644
--- a/drivers/gpu/nvgpu/gp106/acr_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/acr_gp106.c
@@ -56,9 +56,6 @@ typedef int (*get_ucode_details)(struct gk20a *g,
56/*Externs*/ 56/*Externs*/
57 57
58/*Forwards*/ 58/*Forwards*/
59static int gp106_bootstrap_hs_flcn(struct gk20a *g);
60
61static int gp106_prepare_ucode_blob(struct gk20a *g);
62 59
63/*Globals*/ 60/*Globals*/
64static get_ucode_details pmu_acr_supp_ucode_list[] = { 61static get_ucode_details pmu_acr_supp_ucode_list[] = {
@@ -67,7 +64,7 @@ static get_ucode_details pmu_acr_supp_ucode_list[] = {
67 gpccs_ucode_details, 64 gpccs_ucode_details,
68}; 65};
69 66
70static void gp106_wpr_info(struct gk20a *g, struct wpr_carveout_info *inf) 67void gp106_wpr_info(struct gk20a *g, struct wpr_carveout_info *inf)
71{ 68{
72 inf->nonwpr_base = g->mm.vidmem.bootstrap_base; 69 inf->nonwpr_base = g->mm.vidmem.bootstrap_base;
73 inf->wpr_base = inf->nonwpr_base + GP106_DGPU_WPR_OFFSET; 70 inf->wpr_base = inf->nonwpr_base + GP106_DGPU_WPR_OFFSET;
@@ -80,7 +77,7 @@ static void flcn64_set_dma(struct falc_u64 *dma_addr, u64 value)
80 dma_addr->hi |= u64_hi32(value); 77 dma_addr->hi |= u64_hi32(value);
81} 78}
82 79
83static int gp106_alloc_blob_space(struct gk20a *g, 80int gp106_alloc_blob_space(struct gk20a *g,
84 size_t size, struct nvgpu_mem *mem) 81 size_t size, struct nvgpu_mem *mem)
85{ 82{
86 struct wpr_carveout_info wpr_inf; 83 struct wpr_carveout_info wpr_inf;
@@ -105,20 +102,6 @@ static int gp106_alloc_blob_space(struct gk20a *g,
105 NVGPU_DMA_NO_KERNEL_MAPPING, wpr_inf.size, mem, 102 NVGPU_DMA_NO_KERNEL_MAPPING, wpr_inf.size, mem,
106 wpr_inf.nonwpr_base); 103 wpr_inf.nonwpr_base);
107} 104}
108
109void gp106_init_secure_pmu(struct gpu_ops *gops)
110{
111 gops->pmu.prepare_ucode = gp106_prepare_ucode_blob;
112 gops->pmu.pmu_setup_hw_and_bootstrap = gp106_bootstrap_hs_flcn;
113 gops->pmu.get_wpr = gp106_wpr_info;
114 gops->pmu.alloc_blob_space = gp106_alloc_blob_space;
115 gops->pmu.pmu_populate_loader_cfg = gp106_pmu_populate_loader_cfg;
116 gops->pmu.flcn_populate_bl_dmem_desc = gp106_flcn_populate_bl_dmem_desc;
117 gops->pmu.falcon_wait_for_halt = sec2_wait_for_halt;
118 gops->pmu.falcon_clear_halt_interrupt_status =
119 sec2_clear_halt_interrupt_status;
120 gops->pmu.init_falcon_setup_hw = init_sec2_setup_hw1;
121}
122/* TODO - check if any free blob res needed*/ 105/* TODO - check if any free blob res needed*/
123 106
124int pmu_ucode_details(struct gk20a *g, struct flcn_ucode_img_v1 *p_img) 107int pmu_ucode_details(struct gk20a *g, struct flcn_ucode_img_v1 *p_img)
@@ -373,7 +356,7 @@ rel_sig:
373 return err; 356 return err;
374} 357}
375 358
376static int gp106_prepare_ucode_blob(struct gk20a *g) 359int gp106_prepare_ucode_blob(struct gk20a *g)
377{ 360{
378 361
379 int err; 362 int err;
@@ -1040,7 +1023,7 @@ int lsf_gen_wpr_requirements(struct gk20a *g,
1040 1023
1041/*Loads ACR bin to FB mem and bootstraps PMU with bootloader code 1024/*Loads ACR bin to FB mem and bootstraps PMU with bootloader code
1042 * start and end are addresses of ucode blob in non-WPR region*/ 1025 * start and end are addresses of ucode blob in non-WPR region*/
1043static int gp106_bootstrap_hs_flcn(struct gk20a *g) 1026int gp106_bootstrap_hs_flcn(struct gk20a *g)
1044{ 1027{
1045 struct mm_gk20a *mm = &g->mm; 1028 struct mm_gk20a *mm = &g->mm;
1046 struct vm_gk20a *vm = mm->pmu.vm; 1029 struct vm_gk20a *vm = mm->pmu.vm;
diff --git a/drivers/gpu/nvgpu/gp106/acr_gp106.h b/drivers/gpu/nvgpu/gp106/acr_gp106.h
index fe8fbdb1..85448a81 100644
--- a/drivers/gpu/nvgpu/gp106/acr_gp106.h
+++ b/drivers/gpu/nvgpu/gp106/acr_gp106.h
@@ -19,7 +19,14 @@
19#define GP104_FECS_UCODE_SIG "gp104/fecs_sig.bin" 19#define GP104_FECS_UCODE_SIG "gp104/fecs_sig.bin"
20#define GP104_GPCCS_UCODE_SIG "gp104/gpccs_sig.bin" 20#define GP104_GPCCS_UCODE_SIG "gp104/gpccs_sig.bin"
21 21
22void gp106_init_secure_pmu(struct gpu_ops *gops); 22
23int gp106_bootstrap_hs_flcn(struct gk20a *g);
24int gp106_prepare_ucode_blob(struct gk20a *g);
25int gp106_alloc_blob_space(struct gk20a *g,
26 size_t size, struct nvgpu_mem *mem);
27
28void gp106_wpr_info(struct gk20a *g, struct wpr_carveout_info *inf);
29
23void lsfm_free_ucode_img_res(struct gk20a *g, 30void lsfm_free_ucode_img_res(struct gk20a *g,
24 struct flcn_ucode_img_v1 *p_img); 31 struct flcn_ucode_img_v1 *p_img);
25void lsfm_free_nonpmu_ucode_img_res(struct gk20a *g, 32void lsfm_free_nonpmu_ucode_img_res(struct gk20a *g,
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c
index 6a50be34..21d5fee3 100644
--- a/drivers/gpu/nvgpu/gp106/hal_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c
@@ -26,6 +26,7 @@
26#include "gk20a/regops_gk20a.h" 26#include "gk20a/regops_gk20a.h"
27#include "gk20a/mc_gk20a.h" 27#include "gk20a/mc_gk20a.h"
28#include "gk20a/fb_gk20a.h" 28#include "gk20a/fb_gk20a.h"
29#include "gk20a/pmu_gk20a.h"
29 30
30#include "gp10b/ltc_gp10b.h" 31#include "gp10b/ltc_gp10b.h"
31#include "gp10b/gr_gp10b.h" 32#include "gp10b/gr_gp10b.h"
@@ -38,6 +39,7 @@
38#include "gp10b/priv_ring_gp10b.h" 39#include "gp10b/priv_ring_gp10b.h"
39#include "gp10b/fifo_gp10b.h" 40#include "gp10b/fifo_gp10b.h"
40#include "gp10b/fb_gp10b.h" 41#include "gp10b/fb_gp10b.h"
42#include "gp10b/pmu_gp10b.h"
41 43
42#include "gp106/fifo_gp106.h" 44#include "gp106/fifo_gp106.h"
43#include "gp106/regops_gp106.h" 45#include "gp106/regops_gp106.h"
@@ -48,7 +50,10 @@
48#include "gm20b/mm_gm20b.h" 50#include "gm20b/mm_gm20b.h"
49#include "gm20b/pmu_gm20b.h" 51#include "gm20b/pmu_gm20b.h"
50#include "gm20b/fb_gm20b.h" 52#include "gm20b/fb_gm20b.h"
53#include "gm20b/acr_gm20b.h"
51 54
55#include "gp106/acr_gp106.h"
56#include "gp106/sec2_gp106.h"
52#include "gp106/clk_gp106.h" 57#include "gp106/clk_gp106.h"
53#include "gp106/clk_arb_gp106.h" 58#include "gp106/clk_arb_gp106.h"
54#include "gp106/mclk_gp106.h" 59#include "gp106/mclk_gp106.h"
@@ -77,6 +82,7 @@
77#include <nvgpu/hw/gp106/hw_ram_gp106.h> 82#include <nvgpu/hw/gp106/hw_ram_gp106.h>
78#include <nvgpu/hw/gp106/hw_top_gp106.h> 83#include <nvgpu/hw/gp106/hw_top_gp106.h>
79#include <nvgpu/hw/gp106/hw_pram_gp106.h> 84#include <nvgpu/hw/gp106/hw_pram_gp106.h>
85#include <nvgpu/hw/gp106/hw_pwr_gp106.h>
80 86
81 87
82static int gp106_get_litter_value(struct gk20a *g, int value) 88static int gp106_get_litter_value(struct gk20a *g, int value)
@@ -398,6 +404,45 @@ static const struct gpu_ops gp106_ops = {
398 .get_internal_sensor_limits = gp106_get_internal_sensor_limits, 404 .get_internal_sensor_limits = gp106_get_internal_sensor_limits,
399 .configure_therm_alert = gp106_configure_therm_alert, 405 .configure_therm_alert = gp106_configure_therm_alert,
400 }, 406 },
407 .pmu = {
408 .init_wpr_region = gm20b_pmu_init_acr,
409 .load_lsfalcon_ucode = gp106_load_falcon_ucode,
410 .is_lazy_bootstrap = gp106_is_lazy_bootstrap,
411 .is_priv_load = gp106_is_priv_load,
412 .prepare_ucode = gp106_prepare_ucode_blob,
413 .pmu_setup_hw_and_bootstrap = gp106_bootstrap_hs_flcn,
414 .get_wpr = gp106_wpr_info,
415 .alloc_blob_space = gp106_alloc_blob_space,
416 .pmu_populate_loader_cfg = gp106_pmu_populate_loader_cfg,
417 .flcn_populate_bl_dmem_desc = gp106_flcn_populate_bl_dmem_desc,
418 .falcon_wait_for_halt = sec2_wait_for_halt,
419 .falcon_clear_halt_interrupt_status =
420 sec2_clear_halt_interrupt_status,
421 .init_falcon_setup_hw = init_sec2_setup_hw1,
422 .pmu_queue_tail = gk20a_pmu_queue_tail,
423 .pmu_get_queue_head = pwr_pmu_queue_head_r,
424 .pmu_mutex_release = gk20a_pmu_mutex_release,
425 .is_pmu_supported = gp106_is_pmu_supported,
426 .pmu_pg_supported_engines_list = gp106_pmu_pg_engines_list,
427 .pmu_elpg_statistics = gp106_pmu_elpg_statistics,
428 .pmu_mutex_acquire = gk20a_pmu_mutex_acquire,
429 .pmu_is_lpwr_feature_supported =
430 gp106_pmu_is_lpwr_feature_supported,
431 .pmu_msgq_tail = gk20a_pmu_msgq_tail,
432 .pmu_pg_engines_feature_list = gp106_pmu_pg_feature_list,
433 .pmu_get_queue_head_size = pwr_pmu_queue_head__size_1_v,
434 .pmu_queue_head = gk20a_pmu_queue_head,
435 .pmu_pg_param_post_init = nvgpu_lpwr_post_init,
436 .pmu_get_queue_tail_size = pwr_pmu_queue_tail__size_1_v,
437 .pmu_pg_init_param = gp106_pg_param_init,
438 .reset_engine = gp106_pmu_engine_reset,
439 .pmu_lpwr_disable_pg = nvgpu_lpwr_disable_pg,
440 .write_dmatrfbase = gp10b_write_dmatrfbase,
441 .pmu_mutex_size = pwr_pmu_mutex__size_1_v,
442 .is_engine_in_reset = gp106_pmu_is_engine_in_reset,
443 .pmu_get_queue_tail = pwr_pmu_queue_tail_r,
444 .pmu_lpwr_enable_pg = nvgpu_lpwr_enable_pg,
445 },
401 .clk = { 446 .clk = {
402 .init_clk_support = gp106_init_clk_support, 447 .init_clk_support = gp106_init_clk_support,
403 .get_crystal_clk_hz = gp106_crystal_clk_hz, 448 .get_crystal_clk_hz = gp106_crystal_clk_hz,
@@ -532,6 +577,7 @@ int gp106_init_hal(struct gk20a *g)
532 gops->mm = gp106_ops.mm; 577 gops->mm = gp106_ops.mm;
533 gops->pramin = gp106_ops.pramin; 578 gops->pramin = gp106_ops.pramin;
534 gops->therm = gp106_ops.therm; 579 gops->therm = gp106_ops.therm;
580 gops->pmu = gp106_ops.pmu;
535 /* 581 /*
536 * clk must be assigned member by member 582 * clk must be assigned member by member
537 * since some clk ops are assigned during probe prior to HAL init 583 * since some clk ops are assigned during probe prior to HAL init
@@ -568,10 +614,11 @@ int gp106_init_hal(struct gk20a *g)
568 __nvgpu_set_enabled(g, NVGPU_SEC_PRIVSECURITY, true); 614 __nvgpu_set_enabled(g, NVGPU_SEC_PRIVSECURITY, true);
569 __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, true); 615 __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, true);
570 __nvgpu_set_enabled(g, NVGPU_PMU_PSTATE, true); 616 __nvgpu_set_enabled(g, NVGPU_PMU_PSTATE, true);
617 __nvgpu_set_enabled(g, NVGPU_PMU_FECS_BOOTSTRAP_DONE, false);
571 618
619 g->pmu_lsf_pmu_wpr_init_done = 0;
572 g->bootstrap_owner = LSF_FALCON_ID_SEC2; 620 g->bootstrap_owner = LSF_FALCON_ID_SEC2;
573 gp106_init_gr(g); 621 gp106_init_gr(g);
574 gp106_init_pmu_ops(g);
575 622
576 gp10b_init_uncompressed_kind_map(); 623 gp10b_init_uncompressed_kind_map();
577 gp10b_init_kind_attr(); 624 gp10b_init_kind_attr();
diff --git a/drivers/gpu/nvgpu/gp106/pmu_gp106.c b/drivers/gpu/nvgpu/gp106/pmu_gp106.c
index 3b75b488..998993c9 100644
--- a/drivers/gpu/nvgpu/gp106/pmu_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/pmu_gp106.c
@@ -32,7 +32,7 @@
32#include <nvgpu/hw/gp106/hw_mc_gp106.h> 32#include <nvgpu/hw/gp106/hw_mc_gp106.h>
33#include <nvgpu/hw/gp106/hw_pwr_gp106.h> 33#include <nvgpu/hw/gp106/hw_pwr_gp106.h>
34 34
35static bool gp106_is_pmu_supported(struct gk20a *g) 35bool gp106_is_pmu_supported(struct gk20a *g)
36{ 36{
37 return true; 37 return true;
38} 38}
@@ -69,7 +69,7 @@ int gp106_pmu_engine_reset(struct gk20a *g, bool do_reset)
69 return 0; 69 return 0;
70} 70}
71 71
72static u32 gp106_pmu_pg_feature_list(struct gk20a *g, u32 pg_engine_id) 72u32 gp106_pmu_pg_feature_list(struct gk20a *g, u32 pg_engine_id)
73{ 73{
74 if (pg_engine_id == PMU_PG_ELPG_ENGINE_ID_GRAPHICS) 74 if (pg_engine_id == PMU_PG_ELPG_ENGINE_ID_GRAPHICS)
75 return PMU_PG_FEATURE_GR_RPPG_ENABLED; 75 return PMU_PG_FEATURE_GR_RPPG_ENABLED;
@@ -80,7 +80,7 @@ static u32 gp106_pmu_pg_feature_list(struct gk20a *g, u32 pg_engine_id)
80 return 0; 80 return 0;
81} 81}
82 82
83static u32 gp106_pmu_pg_engines_list(struct gk20a *g) 83u32 gp106_pmu_pg_engines_list(struct gk20a *g)
84{ 84{
85 return BIT(PMU_PG_ELPG_ENGINE_ID_GRAPHICS) | 85 return BIT(PMU_PG_ELPG_ENGINE_ID_GRAPHICS) |
86 BIT(PMU_PG_ELPG_ENGINE_ID_MS); 86 BIT(PMU_PG_ELPG_ENGINE_ID_MS);
@@ -100,7 +100,7 @@ static void pmu_handle_param_msg(struct gk20a *g, struct pmu_msg *msg,
100 msg->msg.pg.msg_type); 100 msg->msg.pg.msg_type);
101} 101}
102 102
103static int gp106_pg_param_init(struct gk20a *g, u32 pg_engine_id) 103int gp106_pg_param_init(struct gk20a *g, u32 pg_engine_id)
104{ 104{
105 struct nvgpu_pmu *pmu = &g->pmu; 105 struct nvgpu_pmu *pmu = &g->pmu;
106 struct pmu_cmd cmd; 106 struct pmu_cmd cmd;
@@ -168,7 +168,7 @@ void gp106_pmu_elpg_statistics(struct gk20a *g, u32 pg_engine_id,
168 pg_stat_data->avg_exit_latency_us = stats.exit_latency_avg_us; 168 pg_stat_data->avg_exit_latency_us = stats.exit_latency_avg_us;
169} 169}
170 170
171static bool gp106_pmu_is_lpwr_feature_supported(struct gk20a *g, u32 feature_id) 171bool gp106_pmu_is_lpwr_feature_supported(struct gk20a *g, u32 feature_id)
172{ 172{
173 bool is_feature_supported = false; 173 bool is_feature_supported = false;
174 174
@@ -188,7 +188,7 @@ static bool gp106_pmu_is_lpwr_feature_supported(struct gk20a *g, u32 feature_id)
188 return is_feature_supported; 188 return is_feature_supported;
189} 189}
190 190
191static bool gp106_is_lazy_bootstrap(u32 falcon_id) 191bool gp106_is_lazy_bootstrap(u32 falcon_id)
192{ 192{
193 bool enable_status = false; 193 bool enable_status = false;
194 194
@@ -206,7 +206,7 @@ static bool gp106_is_lazy_bootstrap(u32 falcon_id)
206 return enable_status; 206 return enable_status;
207} 207}
208 208
209static bool gp106_is_priv_load(u32 falcon_id) 209bool gp106_is_priv_load(u32 falcon_id)
210{ 210{
211 bool enable_status = false; 211 bool enable_status = false;
212 212
@@ -258,7 +258,7 @@ static void gp106_pmu_load_multiple_falcons(struct gk20a *g, u32 falconidmask,
258 gk20a_dbg_fn("done"); 258 gk20a_dbg_fn("done");
259} 259}
260 260
261static int gp106_load_falcon_ucode(struct gk20a *g, u32 falconidmask) 261int gp106_load_falcon_ucode(struct gk20a *g, u32 falconidmask)
262{ 262{
263 u32 flags = PMU_ACR_CMD_BOOTSTRAP_FALCON_FLAGS_RESET_YES; 263 u32 flags = PMU_ACR_CMD_BOOTSTRAP_FALCON_FLAGS_RESET_YES;
264 264
@@ -289,51 +289,3 @@ static int gp106_load_falcon_ucode(struct gk20a *g, u32 falconidmask)
289 return -ETIMEDOUT; 289 return -ETIMEDOUT;
290 return 0; 290 return 0;
291} 291}
292
293void gp106_init_pmu_ops(struct gk20a *g)
294{
295 struct gpu_ops *gops = &g->ops;
296 gk20a_dbg_fn("");
297 if (nvgpu_is_enabled(g, NVGPU_SEC_PRIVSECURITY)) {
298 gp106_init_secure_pmu(gops);
299 gops->pmu.init_wpr_region = gm20b_pmu_init_acr;
300 gops->pmu.load_lsfalcon_ucode = gp106_load_falcon_ucode;
301 gops->pmu.is_lazy_bootstrap = gp106_is_lazy_bootstrap;
302 gops->pmu.is_priv_load = gp106_is_priv_load;
303 } else {
304 gk20a_init_pmu_ops(gops);
305 gops->pmu.pmu_setup_hw_and_bootstrap =
306 gm20b_init_nspmu_setup_hw1;
307 gops->pmu.load_lsfalcon_ucode = NULL;
308 gops->pmu.init_wpr_region = NULL;
309 }
310 gops->pmu.pmu_setup_elpg = NULL;
311 gops->pmu.pmu_get_queue_head = pwr_pmu_queue_head_r;
312 gops->pmu.pmu_get_queue_head_size = pwr_pmu_queue_head__size_1_v;
313 gops->pmu.pmu_get_queue_tail = pwr_pmu_queue_tail_r;
314 gops->pmu.pmu_get_queue_tail_size = pwr_pmu_queue_tail__size_1_v;
315 gops->pmu.pmu_queue_head = gk20a_pmu_queue_head;
316 gops->pmu.pmu_queue_tail = gk20a_pmu_queue_tail;
317 gops->pmu.pmu_msgq_tail = gk20a_pmu_msgq_tail;
318 gops->pmu.pmu_mutex_size = pwr_pmu_mutex__size_1_v;
319 gops->pmu.pmu_mutex_acquire = gk20a_pmu_mutex_acquire;
320 gops->pmu.pmu_mutex_release = gk20a_pmu_mutex_release;
321 g->pmu_lsf_pmu_wpr_init_done = 0;
322 __nvgpu_set_enabled(g, NVGPU_PMU_FECS_BOOTSTRAP_DONE, false);
323 gops->pmu.write_dmatrfbase = gp10b_write_dmatrfbase;
324 gops->pmu.pmu_elpg_statistics = gp106_pmu_elpg_statistics;
325 gops->pmu.pmu_pg_init_param = gp106_pg_param_init;
326 gops->pmu.pmu_pg_supported_engines_list = gp106_pmu_pg_engines_list;
327 gops->pmu.pmu_pg_engines_feature_list = gp106_pmu_pg_feature_list;
328 gops->pmu.pmu_is_lpwr_feature_supported =
329 gp106_pmu_is_lpwr_feature_supported;
330 gops->pmu.pmu_lpwr_enable_pg = nvgpu_lpwr_enable_pg;
331 gops->pmu.pmu_lpwr_disable_pg = nvgpu_lpwr_disable_pg;
332 gops->pmu.pmu_pg_param_post_init = nvgpu_lpwr_post_init;
333 gops->pmu.dump_secure_fuses = NULL;
334 gops->pmu.is_pmu_supported = gp106_is_pmu_supported;
335 gops->pmu.reset_engine = gp106_pmu_engine_reset;
336 gops->pmu.is_engine_in_reset = gp106_pmu_is_engine_in_reset;
337
338 gk20a_dbg_fn("done");
339}
diff --git a/drivers/gpu/nvgpu/gp106/pmu_gp106.h b/drivers/gpu/nvgpu/gp106/pmu_gp106.h
index 68a00bb5..1b59b2c4 100644
--- a/drivers/gpu/nvgpu/gp106/pmu_gp106.h
+++ b/drivers/gpu/nvgpu/gp106/pmu_gp106.h
@@ -19,7 +19,15 @@
19 19
20struct gk20a; 20struct gk20a;
21 21
22void gp106_init_pmu_ops(struct gk20a *g); 22bool gp106_is_pmu_supported(struct gk20a *g);
23u32 gp106_pmu_pg_feature_list(struct gk20a *g, u32 pg_engine_id);
24u32 gp106_pmu_pg_engines_list(struct gk20a *g);
25int gp106_pg_param_init(struct gk20a *g, u32 pg_engine_id);
26bool gp106_pmu_is_lpwr_feature_supported(struct gk20a *g, u32 feature_id);
27bool gp106_is_lazy_bootstrap(u32 falcon_id);
28bool gp106_is_priv_load(u32 falcon_id);
29int gp106_load_falcon_ucode(struct gk20a *g, u32 falconidmask);
30
23void gp106_pmu_elpg_statistics(struct gk20a *g, u32 pg_engine_id, 31void gp106_pmu_elpg_statistics(struct gk20a *g, u32 pg_engine_id,
24 struct pmu_pg_stats_data *pg_stat_data); 32 struct pmu_pg_stats_data *pg_stat_data);
25bool gp106_pmu_is_engine_in_reset(struct gk20a *g); 33bool gp106_pmu_is_engine_in_reset(struct gk20a *g);