summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmgr/pwrpolicy.c
diff options
context:
space:
mode:
authorThomas Fleury <tfleury@nvidia.com>2017-01-19 19:05:08 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-01-31 19:23:13 -0500
commit9132bb52a6ac6a4845007b755feeb3a074069e72 (patch)
tree60bf2d23399c2bc8c6d327044cf9c1cb3eeab9e0 /drivers/gpu/nvgpu/pmgr/pwrpolicy.c
parent95a3eb454ca2f1b1b1a5677fe024eacae79bc0ed (diff)
gpu: nvgpu: add flag for over power monitoring
On PG418, we hard code SW threshold table for over power monitoring. On PG419, there is a dedicated INA for over power monitoring. It is programmed in VBIOS devinit. Added a platform flag to indicate if devinit has already taken care of programming. Jira DNVGPU-206 Change-Id: I28e70ac5621b692864a24e0eadb6d24b9957c0af Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1291813 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/pmgr/pwrpolicy.c')
-rw-r--r--drivers/gpu/nvgpu/pmgr/pwrpolicy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c
index 1e7e19a3..2b0be8d8 100644
--- a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c
+++ b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c
@@ -508,6 +508,7 @@ static inline void devinit_unpack_pwr_policy_entry(
508static u32 devinit_get_pwr_policy_table(struct gk20a *g, 508static u32 devinit_get_pwr_policy_table(struct gk20a *g,
509 struct pmgr_pwr_policy *ppwrpolicyobjs) 509 struct pmgr_pwr_policy *ppwrpolicyobjs)
510{ 510{
511 struct gk20a_platform *platform = gk20a_get_platform(g->dev);
511 u32 status = 0; 512 u32 status = 0;
512 u8 *ptr = NULL; 513 u8 *ptr = NULL;
513 struct boardobj *boardobj; 514 struct boardobj *boardobj;
@@ -518,7 +519,6 @@ static u32 devinit_get_pwr_policy_table(struct gk20a *g,
518 u16 pwr_policy_size; 519 u16 pwr_policy_size;
519 bool integral_control = false; 520 bool integral_control = false;
520 u32 hw_threshold_policy_index = 0; 521 u32 hw_threshold_policy_index = 0;
521 u32 sw_threshold_policy_index = 0;
522 union pwr_policy_data_union pwr_policy_data; 522 union pwr_policy_data_union pwr_policy_data;
523 523
524 gk20a_dbg_info(""); 524 gk20a_dbg_info("");
@@ -684,7 +684,7 @@ static u32 devinit_get_pwr_policy_table(struct gk20a *g,
684 ++obj_index; 684 ++obj_index;
685 } 685 }
686 686
687 if (!sw_threshold_policy_index) { 687 if (platform->hardcode_sw_threshold) {
688 status = _pwr_policy_construct_WAR_SW_Threshold_policy(g, 688 status = _pwr_policy_construct_WAR_SW_Threshold_policy(g,
689 ppwrpolicyobjs, 689 ppwrpolicyobjs,
690 &pwr_policy_data, 690 &pwr_policy_data,