summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmgr
diff options
context:
space:
mode:
authorThomas Fleury <tfleury@nvidia.com>2017-04-10 16:37:40 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-18 15:44:21 -0400
commit0a6b585dbfc5233b83dcc162fc73e2a80dcc18a5 (patch)
tree22cc9a17307eac52bcf920312a055141b012aab4 /drivers/gpu/nvgpu/pmgr
parent90a249b598824b115ff3678cf192d1caa96efa59 (diff)
gpu: nvgpu: skip power device programming if missing
Monitoring INA3221 is currently missing on some customer designs. If power device is missing, skip programming of power device and power policy in PMU. Also clear related features in GPU characterictics (get voltage, current and power features are not supported). Bug 1903258 Change-Id: Ibd9d89e5833afb350c52b76527c54923055aee5e Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1459919 (cherry picked from commit e7e21c451843bddb8e8ac9e3db3b1d4b4a4c272c) Reviewed-on: http://git-master/r/1463105 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/pmgr')
-rw-r--r--drivers/gpu/nvgpu/pmgr/pmgrpmu.c6
-rw-r--r--drivers/gpu/nvgpu/pmgr/pwrdev.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pmgrpmu.c b/drivers/gpu/nvgpu/pmgr/pmgrpmu.c
index 95225961..d09becd6 100644
--- a/drivers/gpu/nvgpu/pmgr/pmgrpmu.c
+++ b/drivers/gpu/nvgpu/pmgr/pmgrpmu.c
@@ -488,6 +488,12 @@ u32 pmgr_send_pmgr_tables_to_pmu(struct gk20a *g)
488 } 488 }
489 } 489 }
490 490
491 /* WAR for missing INA3221 on HW2.5 RevA */
492 if (g->power_sensor_missing) {
493 nvgpu_warn(g, "no power device found, skipping power policy");
494 goto exit;
495 }
496
491 if (!(BOARDOBJGRP_IS_EMPTY( 497 if (!(BOARDOBJGRP_IS_EMPTY(
492 &g->pmgr_pmu.pmgr_policyobjs.pwr_policies.super)) || 498 &g->pmgr_pmu.pmgr_policyobjs.pwr_policies.super)) ||
493 !(BOARDOBJGRP_IS_EMPTY( 499 !(BOARDOBJGRP_IS_EMPTY(
diff --git a/drivers/gpu/nvgpu/pmgr/pwrdev.c b/drivers/gpu/nvgpu/pmgr/pwrdev.c
index e32dfc40..06356592 100644
--- a/drivers/gpu/nvgpu/pmgr/pwrdev.c
+++ b/drivers/gpu/nvgpu/pmgr/pwrdev.c
@@ -297,6 +297,13 @@ u32 pmgr_device_sw_setup(struct gk20a *g)
297 /* Override the Interfaces */ 297 /* Override the Interfaces */
298 pboardobjgrp->pmudatainstget = _pwr_device_pmudata_instget; 298 pboardobjgrp->pmudatainstget = _pwr_device_pmudata_instget;
299 299
300 /* WAR for missing INA3221 on HW2.5 RevA */
301 if (g->power_sensor_missing) {
302 gk20a_warn(dev_from_gk20a(g),
303 "no power sensor, monitoring disabled");
304 goto done;
305 }
306
300 status = devinit_get_pwr_device_table(g, ppwrdeviceobjs); 307 status = devinit_get_pwr_device_table(g, ppwrdeviceobjs);
301 if (status) 308 if (status)
302 goto done; 309 goto done;