]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/nouveau/iccsense: Parse the resistors and config the right way
authorKarol Herbst <karolherbst@gmail.com>
Wed, 27 Jul 2016 19:49:47 +0000 (21:49 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 12 Oct 2016 07:29:02 +0000 (17:29 +1000)
commita8c119a4d0af1633eb37af87c61b632646894329
tree080d49f9e6086228a4ce8572fe68532a8e90dcd3
parent9936aeeaebce816ba428eedf4da4b1a8e92e77f9
drm/nouveau/iccsense: Parse the resistors and config the right way

Previously we parsed that table a bit wrong:
1. The entry layout depends on the sensor type used.
2. We have all resitors in one entry for the INA3221.
3. The config is already included in the vbios.

This commit addresses that issue and with that we should be able to read
out the right power consumption for every GPU with a INA209, INA219 and
INA3221.

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h
drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c
drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/priv.h