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 _______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau