summaryrefslogtreecommitdiff
path: root/drm/nouveau/include
diff options
context:
space:
mode:
authorKarol Herbst <karolherbst@gmail.com>2016-07-27 21:49:47 +0200
committerBen Skeggs <bskeggs@redhat.com>2016-11-04 17:17:03 +1000
commit747a0ffb93985b056924e84ae30328c105b99307 (patch)
treef28446a5bf73cd23878c1ef9fcc35ed7297b34f9 /drm/nouveau/include
parentd49adbcd9ea56ca83ad729e973bd9be59b36fb9e (diff)
downloadnouveau-747a0ffb93985b056924e84ae30328c105b99307.tar.gz
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>
Diffstat (limited to 'drm/nouveau/include')
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/iccsense.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/drm/nouveau/include/nvkm/subdev/bios/iccsense.h b/drm/nouveau/include/nvkm/subdev/bios/iccsense.h
index 9cb974772..e933d3eed 100644
--- a/drm/nouveau/include/nvkm/subdev/bios/iccsense.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/iccsense.h
@@ -1,10 +1,16 @@
#ifndef __NVBIOS_ICCSENSE_H__
#define __NVBIOS_ICCSENSE_H__
+struct pwr_rail_resistor_t {
+ u8 mohm;
+ bool enabled;
+};
+
struct pwr_rail_t {
u8 mode;
u8 extdev_id;
- u8 resistor_mohm;
- u8 rail;
+ u8 resistor_count;
+ struct pwr_rail_resistor_t resistors[3];
+ u16 config;
};
struct nvbios_iccsense {