[Nouveau] [PATCH v4 0/3] Expose power budget cap via hwmon

Karol Herbst karolherbst at gmail.com
Mon Jan 23 22:10:10 UTC 2017


There is an optinal header field in the power budget table we can use to
read out the power cap of the GPU.

The meaning of this header field was confirmed with nvidia-smi -q:

The rows "Min Power Limit", "Power Limit" and "Max Power Limit" are set
to the "min", "avg" and "max" values from the referenced power budget
entry respectively.

We should have this in the kernel before actually using it to catch errors
and see how reliable this is, but as it seems it works on all GPUs as
expected on Kepler und Maxwells with the power cap field set in the vbios.

This series keeps things really simple for now until we figure out more
about the power budget table and are able to parse the power cap for vbios
without that field set.

v3: big rework of the actual vbios parsing to prevent memory leakage and
    silly memory handling
v4: little reworks

Karol Herbst (3):
  nvbios/power_budget: Add basic power budget parsing
  subdev/iccsense: Parse max and crit power level
  hwmon: expose power_max and power_crit

 .../include/nvkm/subdev/bios/power_budget.h        |  26 +++++
 drm/nouveau/include/nvkm/subdev/iccsense.h         |   3 +
 drm/nouveau/nouveau_hwmon.c                        |  44 +++++++
 drm/nouveau/nvkm/subdev/bios/Kbuild                |   1 +
 drm/nouveau/nvkm/subdev/bios/power_budget.c        | 126 +++++++++++++++++++++
 drm/nouveau/nvkm/subdev/iccsense/base.c            |  20 +++-
 6 files changed, 218 insertions(+), 2 deletions(-)
 create mode 100644 drm/nouveau/include/nvkm/subdev/bios/power_budget.h
 create mode 100644 drm/nouveau/nvkm/subdev/bios/power_budget.c

-- 
2.11.0



More information about the Nouveau mailing list