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

Karol Herbst karolherbst at gmail.com
Mon Oct 24 21:11:10 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.

Sadly it is optional and if that field isn't sad, things beome
complicated.

Anyhow, this is good enough for most cards and we can use it later for
capping the power consumption of the GPUs, but first, just export those
values through hwmon.

First design, will change stuff, want comments. Thanks.

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        |  20 ++++
 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        | 108 +++++++++++++++++++++
 drm/nouveau/nvkm/subdev/iccsense/base.c            |  13 ++-
 6 files changed, 188 insertions(+), 1 deletion(-)
 create mode 100644 drm/nouveau/include/nvkm/subdev/bios/power_budget.h
 create mode 100644 drm/nouveau/nvkm/subdev/bios/power_budget.c

-- 
2.10.0



More information about the Nouveau mailing list