mirror of
https://github.com/torvalds/linux.git
synced 2026-04-20 15:53:59 -04:00
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>
23 lines
392 B
C
23 lines
392 B
C
#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_count;
|
|
struct pwr_rail_resistor_t resistors[3];
|
|
u16 config;
|
|
};
|
|
|
|
struct nvbios_iccsense {
|
|
int nr_entry;
|
|
struct pwr_rail_t *rail;
|
|
};
|
|
|
|
int nvbios_iccsense_parse(struct nvkm_bios *, struct nvbios_iccsense *);
|
|
#endif
|