search for: extdev_id

Displaying 15 results from an estimated 15 matches for "extdev_id".

2016 Jul 27
0
[PATCH] nvkm/iccsense: Parse the resistors and config the right way
...3d3e 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 { diff --git a/drm/nouveau/nvkm/subdev/bios/iccsense.c b/drm/nouveau/nvkm/subdev/bios/iccsense.c index 0843280..aafd5e1 100644 --- a/drm/nouveau/nvkm/subdev/bi...
2016 Feb 20
0
[PATCH v4 2/6] nvbios/iccsense: add parsing of the SENSE table
...ubdev/bios/iccsense.h b/drm/nouveau/include/nvkm/subdev/bios/iccsense.h new file mode 100644 index 0000000..9cb9747 --- /dev/null +++ b/drm/nouveau/include/nvkm/subdev/bios/iccsense.h @@ -0,0 +1,16 @@ +#ifndef __NVBIOS_ICCSENSE_H__ +#define __NVBIOS_ICCSENSE_H__ +struct pwr_rail_t { + u8 mode; + u8 extdev_id; + u8 resistor_mohm; + u8 rail; +}; + +struct nvbios_iccsense { + int nr_entry; + struct pwr_rail_t *rail; +}; + +int nvbios_iccsense_parse(struct nvkm_bios *, struct nvbios_iccsense *); +#endif diff --git a/drm/nouveau/nvkm/subdev/bios/Kbuild b/drm/nouveau/nvkm/subdev/bios/Kbuild index 64730d5..db...
2016 Mar 25
0
[PATCH 3/4] iccsense: split sensor into own struct
...t pwr_rail_t *r = &stbl.rail[i]; - struct nvbios_extdev_func extdev; struct nvkm_iccsense_rail *rail; - struct nvkm_i2c_bus *i2c_bus; - u8 addr; + struct nvkm_iccsense_sensor *sensor; if (!r->mode || r->resistor_mohm == 0) continue; - if (nvbios_extdev_parse(bios, r->extdev_id, &extdev)) - continue; - - if (extdev.type == 0xff) - continue; - - if (extdev.bus) - i2c_bus = nvkm_i2c_bus_find(i2c, NVKM_I2C_BUS_SEC); - else - i2c_bus = nvkm_i2c_bus_find(i2c, NVKM_I2C_BUS_PRI); - if (!i2c_bus) + sensor = nvkm_iccsense_get_sensor(iccsense, r->extdev_id); +...
2016 Mar 25
7
[PATCH 0/4] Configure Power Sensors
The power sensors can be configured to sample the readout values over time. Nvidia does this too, so nouveau should probably do that too. Karol Herbst (4): iccsense: remove read function iccsense: convert to linked list iccsense: split sensor into own struct iccsense: configure sensors like nvidia does drm/nouveau/include/nvkm/subdev/iccsense.h | 6 +- drm/nouveau/nouveau_hwmon.c
2017 Apr 23
0
[PATCH] bios/iccsense: rails for power sensors have a mask of 0xf8 for version 0x10
...10 @@ nvbios_iccsense_parse(struct nvkm_bios *bios, struct nvbios_iccsense *iccsense) switch(ver) { case 0x10: - rail->mode = nvbios_rd08(bios, entry + 0x1); + if (nvbios_rd08(bios, entry + 0x1) & 0xf8 == 0xf8) + rail->mode = 1; + else + rail->mode = 0; rail->extdev_id = nvbios_rd08(bios, entry + 0x2); res_start = 0x3; break; -- 2.12.2
2017 Apr 23
0
[PATCH v2] bios/iccsense: rails for power sensors have a mask of 0xf8 for version 0x10
...10 @@ nvbios_iccsense_parse(struct nvkm_bios *bios, struct nvbios_iccsense *iccsense) switch(ver) { case 0x10: - rail->mode = nvbios_rd08(bios, entry + 0x1); + if (nvbios_rd08(bios, entry + 0x1) & 0xf8 == 0xf8) + rail->mode = 1; + else + rail->mode = 0; rail->extdev_id = nvbios_rd08(bios, entry + 0x2); res_start = 0x3; break; -- 2.12.2
2017 Apr 23
0
[PATCH v3] bios/iccsense: rails for power sensors have a mask of 0xf8 for version 0x10
...@@ nvbios_iccsense_parse(struct nvkm_bios *bios, struct nvbios_iccsense *iccsense) switch(ver) { case 0x10: - rail->mode = nvbios_rd08(bios, entry + 0x1); + if ((nvbios_rd08(bios, entry + 0x1) & 0xf8) == 0xf8) + rail->mode = 1; + else + rail->mode = 0; rail->extdev_id = nvbios_rd08(bios, entry + 0x2); res_start = 0x3; break; -- 2.12.2
2016 Feb 17
0
[PATCH 1/2] power sensor support
...ubdev/bios/iccsense.h b/drm/nouveau/include/nvkm/subdev/bios/iccsense.h new file mode 100644 index 0000000..9cb9747 --- /dev/null +++ b/drm/nouveau/include/nvkm/subdev/bios/iccsense.h @@ -0,0 +1,16 @@ +#ifndef __NVBIOS_ICCSENSE_H__ +#define __NVBIOS_ICCSENSE_H__ +struct pwr_rail_t { + u8 mode; + u8 extdev_id; + u8 resistor_mohm; + u8 rail; +}; + +struct nvbios_iccsense { + int nr_entry; + struct pwr_rail_t *rail; +}; + +int nvbios_iccsense_parse(struct nvkm_bios *, struct nvbios_iccsense *); +#endif diff --git a/drm/nouveau/include/nvkm/subdev/i2c.h b/drm/nouveau/include/nvkm/subdev/i2c.h index 6b6224d...
2016 Mar 28
4
[PATCH v2 0/4] Configure Power Sensors
The power sensors can be configured to sample the readout values over time. Nvidia does this too, so nouveau should probably do that too. v2: use list_del and rework an error message Karol Herbst (4): iccsense: remove read function iccsense: convert to linked list iccsense: split sensor into own struct iccsense: configure sensors like nvidia does
2016 Feb 17
3
[PATCH 0/2] Support for INA3221 power sensor
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
2016 Feb 20
4
[PATCH v3 0/4] Suppor for various power sensors on GF100+
This is a complete rework from the first version I sent out. Now the implementation is more centered around the power_rails we find in the SENSE table instead of extdev centered. This makes the implementation a lot easier and straightforward. I've added support for the INA219, INA209 and INA3221 sensors found on multiple Fermi and Kepler cards. The power consumption is also exported via
2016 Feb 19
4
[PATCH v2 0/4] Suppor for various power sensors on GF100+
This is a complete rework from the last version I sent out. Now the implementation is more centered around the power_rails we find in the SENSE table instead of extdev centered. This makes the implementation a lot easier and straightforward. I've added support for the INA219, INA209 and INA3221 sensors found on multiple Fermi and Kepler cards, but only the INA3221 bits are tested so far.
2016 Feb 20
12
[PATCH v4 0/6] Suppor for various power sensors on GF100+
This is a complete rework from the first version I sent out. Now the implementation is more centered around the power_rails we find in the SENSE table instead of extdev centered. This makes the implementation a lot easier and straightforward. I've added support for the INA219, INA209 and INA3221 sensors found on multiple Fermi and Kepler cards. The power consumption is also exported via
2016 Feb 24
7
[PATCH v5 0/6] Suppor for various power sensors on GF100+
This is a complete rework from the first version I sent out. Now the implementation is more centered around the power_rails we find in the SENSE table instead of extdev centered. This makes the implementation a lot easier and straightforward. I've added support for the INA219, INA209 and INA3221 sensors found on multiple Fermi and Kepler cards. The power consumption is also exported via
2016 Feb 20
0
[PATCH v4 3/6] iccsense: implement for ina209, ina219 and ina3221
...;rails) + return -ENOMEM; + + for (i = 0; i < stbl.nr_entry; ++i) { + struct pwr_rail_t *r = &stbl.rail[i]; + struct nvbios_extdev_func extdev; + struct nvkm_iccsense_rail *rail; + struct nvkm_i2c_bus *i2c_bus; + + if (!r->mode) + continue; + + if (nvbios_extdev_parse(bios, r->extdev_id, &extdev)) + continue; + + if (extdev.bus) + i2c_bus = nvkm_i2c_bus_find(i2c, NVKM_I2C_BUS_SEC); + else + i2c_bus = nvkm_i2c_bus_find(i2c, NVKM_I2C_BUS_PRI); + if (!i2c_bus) + continue; + + rail = &iccsense->rails[iccsense->rail_count]; + switch (extdev.type) { + case NV...