diff options
author | Karol Herbst <karolherbst@gmail.com> | 2016-07-27 22:49:47 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-10-12 10:29:02 +0300 |
commit | a8c119a4d0af1633eb37af87c61b632646894329 (patch) | |
tree | 080d49f9e6086228a4ce8572fe68532a8e90dcd3 /drivers/gpu/drm/nouveau/include/nvkm/subdev | |
parent | 9936aeeaebce816ba428eedf4da4b1a8e92e77f9 (diff) | |
download | linux-a8c119a4d0af1633eb37af87c61b632646894329.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/nouveau/include/nvkm/subdev')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h index 9cb97477248b..e933d3eede70 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h +++ b/drivers/gpu/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 { |