diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 7459c57f8..8f72522f8 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -207,6 +207,13 @@ int gp106_init_gpu_characteristics(struct gk20a *g) NVGPU_GPU_FLAGS_SUPPORT_DEVICE_EVENTS | NVGPU_GPU_FLAGS_SUPPORT_SET_THERM_ALERT_LIMIT; + /* WAR for missing INA3221 on HW2.5 RevA */ + if (g->power_sensor_missing) { + gpu->flags &= ~(NVGPU_GPU_FLAGS_SUPPORT_GET_VOLTAGE | + NVGPU_GPU_FLAGS_SUPPORT_GET_CURRENT | + NVGPU_GPU_FLAGS_SUPPORT_GET_POWER); + } + return 0; } diff --git a/drivers/gpu/nvgpu/pmgr/pmgrpmu.c b/drivers/gpu/nvgpu/pmgr/pmgrpmu.c index 95225961f..d09becd6c 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) } } + /* WAR for missing INA3221 on HW2.5 RevA */ + if (g->power_sensor_missing) { + nvgpu_warn(g, "no power device found, skipping power policy"); + goto exit; + } + if (!(BOARDOBJGRP_IS_EMPTY( &g->pmgr_pmu.pmgr_policyobjs.pwr_policies.super)) || !(BOARDOBJGRP_IS_EMPTY( diff --git a/drivers/gpu/nvgpu/pmgr/pwrdev.c b/drivers/gpu/nvgpu/pmgr/pwrdev.c index e32dfc40f..063565921 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) /* Override the Interfaces */ pboardobjgrp->pmudatainstget = _pwr_device_pmudata_instget; + /* WAR for missing INA3221 on HW2.5 RevA */ + if (g->power_sensor_missing) { + gk20a_warn(dev_from_gk20a(g), + "no power sensor, monitoring disabled"); + goto done; + } + status = devinit_get_pwr_device_table(g, ppwrdeviceobjs); if (status) goto done;