[Nouveau] [PATCH 0/2] Support for INA3221 power sensor

Karol Herbst nouveau at karolherbst.de
Wed Feb 17 16:04:42 UTC 2016


The INA3221 is usually found on mid and high end kepler+ gpus

Marins Patch implements the new iccsense subdev and all needed bits for the
INA3221 power sensor.

My Patch implements the hwmon power1 interface to expose the current power
consumption through hwmon (and can be read out via sysfs or the sensors tool)

Please test these patches for Fermi+ GPUs, that nothing gets messed up and
works as expected. There shouldn't be an entry for hwmon when there is no
usable power sensor. And if you have a INA3221 (EXTDEV table in the vbios) then
it should export the power consumption. If not, please report to either of us.

Thanks

Karol Herbst (1):
  hwmon: add power consumption

Martin Peres (1):
  power sensor support

 drm/nouveau/include/nvif/device.h               |   1 +
 drm/nouveau/include/nvkm/core/device.h          |  83 +++++++-------
 drm/nouveau/include/nvkm/subdev/bios/extdev.h   |   4 +
 drm/nouveau/include/nvkm/subdev/bios/iccsense.h |  16 +++
 drm/nouveau/include/nvkm/subdev/i2c.h           |  31 +++++
 drm/nouveau/include/nvkm/subdev/iccsense.h      |  17 +++
 drm/nouveau/nouveau_hwmon.c                     |  30 +++++
 drm/nouveau/nvkm/core/subdev.c                  |  83 +++++++-------
 drm/nouveau/nvkm/engine/device/base.c           | 143 +++++++++++++----------
 drm/nouveau/nvkm/engine/device/priv.h           |   1 +
 drm/nouveau/nvkm/subdev/Kbuild                  |   1 +
 drm/nouveau/nvkm/subdev/bios/Kbuild             |   1 +
 drm/nouveau/nvkm/subdev/bios/iccsense.c         |  95 ++++++++++++++++
 drm/nouveau/nvkm/subdev/iccsense/Kbuild         |   3 +
 drm/nouveau/nvkm/subdev/iccsense/base.c         |  37 ++++++
 drm/nouveau/nvkm/subdev/iccsense/gf100.c        |  40 +++++++
 drm/nouveau/nvkm/subdev/iccsense/ina3221.c      | 144 ++++++++++++++++++++++++
 drm/nouveau/nvkm/subdev/iccsense/priv.h         |  22 ++++
 18 files changed, 610 insertions(+), 142 deletions(-)
 create mode 100644 drm/nouveau/include/nvkm/subdev/bios/iccsense.h
 create mode 100644 drm/nouveau/include/nvkm/subdev/iccsense.h
 create mode 100644 drm/nouveau/nvkm/subdev/bios/iccsense.c
 create mode 100644 drm/nouveau/nvkm/subdev/iccsense/Kbuild
 create mode 100644 drm/nouveau/nvkm/subdev/iccsense/base.c
 create mode 100644 drm/nouveau/nvkm/subdev/iccsense/gf100.c
 create mode 100644 drm/nouveau/nvkm/subdev/iccsense/ina3221.c
 create mode 100644 drm/nouveau/nvkm/subdev/iccsense/priv.h

-- 
2.7.1



More information about the Nouveau mailing list