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

Karol Herbst karolherbst at gmail.com
Wed Nov 30 19:48:36 UTC 2016


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

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.

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

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        |  25 +++++
 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        | 125 +++++++++++++++++++++
 drm/nouveau/nvkm/subdev/iccsense/base.c            |  20 +++-
 6 files changed, 216 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.rc2



More information about the Nouveau mailing list