Displaying 20 results from an estimated 23 matches for "nvbios_iccsense_parse".
2016 Oct 24
0
[PATCH 2/3] subdev/iccsense: Parse max and crit power level
...t;
static bool
@@ -216,10 +217,20 @@ nvkm_iccsense_oneinit(struct nvkm_subdev *subdev)
{
struct nvkm_iccsense *iccsense = nvkm_iccsense(subdev);
struct nvkm_bios *bios = subdev->device->bios;
+ struct nvbios_power_budget budget;
struct nvbios_iccsense stbl;
int i;
- if (!bios || nvbios_iccsense_parse(bios, &stbl) || !stbl.nr_entry)
+ if (!bios)
+ return 0;
+
+ if (!nvbios_power_budget_parse(bios, &budget) && budget.nr_entry &&
+ budget.cap_entry != 0xff) {
+ iccsense->power_w_max = budget.entries[budget.cap_entry].avg_w;
+ iccsense->power_w_crit = budget.en...
2016 Feb 20
0
[PATCH v4 2/6] nvbios/iccsense: add parsing of the SENSE table
...l
+++ 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..dbcb0ef 100644
--- a/drm/nouveau/nvkm/subdev/bios/Kbuild
+++ b/drm/nouveau/nvkm/subdev/bios/Kbuild
@@ -10,6 +10,7 @@ nvkm-y += nvkm/subdev/bio...
2016 Sep 21
8
[PATCH 0/5] GPU-DRM-nouveau: Fine-tuning for five function implementations
From: Markus Elfring <elfring at users.sourceforge.net>
Date: Wed, 21 Sep 2016 09:09:09 +0200
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (5):
Use kmalloc_array() in nvbios_iccsense_parse()
Use kmalloc_array() in gt215_link_train()
Delete unnecessary braces
Adjust a kzalloc() call in gt215_ram_new()
Add space after an "if"
drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c | 4 +++-
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c | 21 +++++++++------------...
2016 Mar 25
0
[PATCH 3/4] iccsense: split sensor into own struct
...}
+
static int
nvkm_iccsense_oneinit(struct nvkm_subdev *subdev)
{
struct nvkm_iccsense *iccsense = nvkm_iccsense(subdev);
struct nvkm_bios *bios = subdev->device->bios;
- struct nvkm_i2c *i2c = subdev->device->i2c;
struct nvbios_iccsense stbl;
int i;
- if (!i2c || !bios || nvbios_iccsense_parse(bios, &stbl)
- || !stbl.nr_entry)
+ if (!bios || nvbios_iccsense_parse(bios, &stbl) || !stbl.nr_entry)
return 0;
iccsense->data_valid = true;
for (i = 0; i < stbl.nr_entry; ++i) {
struct pwr_rail_t *r = &stbl.rail[i];
- struct nvbios_extdev_func extdev;
struct...
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 Jan 23
3
[PATCH v4 0/3] Expose power budget cap via hwmon
There is an optinal header field in the power budget table we can use to
read out the power cap of the GPU.
The meaning of this header field was confirmed with nvidia-smi -q:
The rows "Min Power Limit", "Power Limit" and "Max Power Limit" are set
to the "min", "avg" and "max" values from the referenced power budget
entry respectively.
2017 Apr 23
0
[PATCH] bios/iccsense: rails for power sensors have a mask of 0xf8 for version 0x10
....c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drm/nouveau/nvkm/subdev/bios/iccsense.c b/drm/nouveau/nvkm/subdev/bios/iccsense.c
index 3953d118..43d304ce 100644
--- a/drm/nouveau/nvkm/subdev/bios/iccsense.c
+++ b/drm/nouveau/nvkm/subdev/bios/iccsense.c
@@ -87,7 +87,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(bio...
2017 Apr 23
0
[PATCH v2] bios/iccsense: rails for power sensors have a mask of 0xf8 for version 0x10
....c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drm/nouveau/nvkm/subdev/bios/iccsense.c b/drm/nouveau/nvkm/subdev/bios/iccsense.c
index 3953d118..43d304ce 100644
--- a/drm/nouveau/nvkm/subdev/bios/iccsense.c
+++ b/drm/nouveau/nvkm/subdev/bios/iccsense.c
@@ -87,7 +87,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(bio...
2017 Apr 23
0
[PATCH v3] bios/iccsense: rails for power sensors have a mask of 0xf8 for version 0x10
....c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drm/nouveau/nvkm/subdev/bios/iccsense.c b/drm/nouveau/nvkm/subdev/bios/iccsense.c
index 3953d118..23caef8d 100644
--- a/drm/nouveau/nvkm/subdev/bios/iccsense.c
+++ b/drm/nouveau/nvkm/subdev/bios/iccsense.c
@@ -87,7 +87,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(b...
2020 Oct 19
0
[PATCH] drm/nouveau: fix memory leak in iccsense/base.c
...jiffies 4294898424 (age 810.828s)
hex dump (first 32 bytes):
02 01 00 00 00 00 00 00 00 00 10 00 02 04 00 00 ................
00 00 00 00 00 00 a0 86 00 00 00 00 00 00 00 00 ................
backtrace:
[<000000007c0d0ac3>] __kmalloc+0x337/0x500
[<00000000551bfaeb>] nvbios_iccsense_parse+0xf7/0x280 [nouveau]
[<00000000e3e8968b>] nvkm_iccsense_oneinit+0x6c/0x4e0 [nouveau]
[<00000000287e7701>] nvkm_subdev_init+0x58/0xd0 [nouveau]
[<0000000008e4793e>] nvkm_device_init+0x118/0x1a0 [nouveau]
[<000000008cd3afa3>] nvkm_udevice_init+0x48/0x60 [nouvea...
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 Nov 12
4
[PATCH 0/3] Expose power budget cap via hwmon
There is an optinal header field in the power budget table we can use to
read out the power cap of the GPU.
We should have this in the kernel before actually using it to catch errors
and see how reliable this is, but as it seems it works on all GPUs as
expected on Kepler und Maxwells with the power cap field set in the vbios.
This series keeps things really simple for now until we figure out
2016 Nov 30
4
[PATCH v3 0/3] Expose power budget cap via hwmon
There is an optinal header field in the power budget table we can use to
read out the power cap of the GPU.
We should have this in the kernel before actually using it to catch errors
and see how reliable this is, but as it seems it works on all GPUs as
expected on Kepler und Maxwells with the power cap field set in the vbios.
This series keeps things really simple for now until we figure out
2019 May 17
4
drm/nouveau/core/memory: kmemleak 684 new suspected memory leaks
Hello,
5.1.0-next-20190517
I'm looking at quite a lot of kmemleak reports coming from
drm/nouveau/core/memory, all of which are:
unreferenced object 0xffff8deec27c4ac0 (size 16):
comm "Web Content", pid 5309, jiffies 4309675011 (age 68.076s)
hex dump (first 16 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
2016 Oct 24
7
RFC [PATCH 0/3] Expose power budget cap via hwmon
There is an optinal header field in the power budget table we can use to
read out the power cap of the GPU.
Sadly it is optional and if that field isn't sad, things beome
complicated.
Anyhow, this is good enough for most cards and we can use it later for
capping the power consumption of the GPUs, but first, just export those
values through hwmon.
First design, will change stuff, want
2016 Feb 17
0
[PATCH 1/2] power sensor support
...l
+++ 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..d4aa542 100644
--- a/drm/nouveau/include/nvkm/subdev/i2c.h
+++ b/drm/nouveau/include/nvkm/subdev/i2c.h
@@ -108,6 +108,22 @@ nvkm_rdi2cr(st...
2016 Jul 27
0
[PATCH] nvkm/iccsense: Parse the resistors and config the right way
...44
--- a/drm/nouveau/nvkm/subdev/bios/iccsense.c
+++ b/drm/nouveau/nvkm/subdev/bios/iccsense.c
@@ -23,6 +23,7 @@
*/
#include <subdev/bios.h>
#include <subdev/bios/bit.h>
+#include <subdev/bios/extdev.h>
#include <subdev/bios/iccsense.h>
static u16
@@ -77,23 +78,47 @@ nvbios_iccsense_parse(struct nvkm_bios *bios, struct nvbios_iccsense *iccsense)
return -ENOMEM;
for (i = 0; i < cnt; ++i) {
+ struct nvbios_extdev_func extdev;
struct pwr_rail_t *rail = &iccsense->rail[i];
+ u8 res_start = 0;
+ int r;
+
entry = table + hdr + i * len;
switch(ver) {
case...
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
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 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