search for: nvkm_iccsense_oneinit

Displaying 20 results from an estimated 21 matches for "nvkm_iccsense_oneinit".

2020 Oct 14
2
[PATCH RFC] drm/nouveau: fix memory leak in nvkm_iccsense_oneinit
...ail_t is allocated as an array in function nvios_iccsense_parse, and stored to a struct member of local variable. However, the array is not freed when the local variable becomes invalid, and the reference is not passed on, leading to a memory leak. Fix this by freeing struct pw_rail_t when exiting nvkm_iccsense_oneinit. Signed-off-by: Keita Suzuki <keitasuzuki.park at sslab.ics.keio.ac.jp> --- drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i...
2020 Oct 15
0
[PATCH RFC] drm/nouveau: fix memory leak in nvkm_iccsense_oneinit
...array in function nvios_iccsense_parse, > and stored to a struct member of local variable. However, the array is not > freed when the local variable becomes invalid, and the reference is not > passed on, leading to a memory leak. > > Fix this by freeing struct pw_rail_t when exiting nvkm_iccsense_oneinit. > > Signed-off-by: Keita Suzuki <keitasuzuki.park at sslab.ics.keio.ac.jp> > --- > drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c b/driv...
2018 Oct 18
0
kmemleak in nvkm_iccsense_oneinit
Hi I got a kmemleak and it is pointing to nvkm_iccsense_oneinit(). Please refer to the below kmemleak message. # uname -a Linux climb 4.19.0-rc1+ #4 SMP Thu Sep 20 11:48:55 KST 2018 x86_64 x86_64 x86_64 GNU/Linux # HW LG Notebook. (Model Name:lg15n54) # kmemleak mesage unreferenced object 0xffff8801e9c58388 (size 96): comm "systemd-udevd", pid 13...
2018 Oct 18
0
kmemleak in nvkm_iccsense_oneinit
## I forgot the write email without checking the enable text mode. So, send email again. Sorry for send E-mail twice. Hi I got a kmemleak and it is pointing to nvkm_iccsense_oneinit(). Please refer to the below kmemleak message. # uname -a Linux climb 4.19.0-rc1+ #4 SMP Thu Sep 20 11:48:55 KST 2018 x86_64 x86_64 x86_64 GNU/Linux # HW LG Notebook. (Model Name:lg15n54) # kmemleak mesage unreferenced object 0xffff8801e9c58388 (size 96): comm "systemd-udevd", pid 13...
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
2020 Oct 19
0
[PATCH] drm/nouveau: fix memory leak in iccsense/base.c
...0 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 [nouveau] [<000000007e047aee>] nvkm_object_init+0x43/0x110 [nouveau]...
2016 Mar 25
0
[PATCH 2/4] iccsense: convert to linked list
...*subdev) { struct nvkm_iccsense *iccsense = nvkm_iccsense(subdev); + struct nvkm_iccsense_rail *rail, *tmp; - if (iccsense->rails) - kfree(iccsense->rails); + list_for_each_entry_safe(rail, tmp, &iccsense->rails, head) + kfree(rail); return iccsense; } @@ -145,11 +142,6 @@ nvkm_iccsense_oneinit(struct nvkm_subdev *subdev) || !stbl.nr_entry) return 0; - iccsense->rails = kmalloc(sizeof(*iccsense->rails) * stbl.nr_entry, - GFP_KERNEL); - if (!iccsense->rails) - return -ENOMEM; - iccsense->data_valid = true; for (i = 0; i < stbl.nr_ent...
2016 Jun 02
2
[PATCH] drm/nouveau/iccsense: fix memory leak on default sensor->type case
...insertion(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c index 323c79a..79b0eb5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c @@ -305,6 +305,7 @@ nvkm_iccsense_oneinit(struct nvkm_subdev *subdev) rail->read = nvkm_iccsense_ina3221_read; break; default: + kfree(rail); continue; } -- 2.8.1
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 Mar 25
0
[PATCH 4/4] iccsense: configure sensors like nvidia does
...209: + case NVBIOS_EXTDEV_INA219: + nvkm_iccsense_ina2x9_config(iccsense, sensor); + break; + case NVBIOS_EXTDEV_INA3221: + nvkm_iccsense_ina3221_config(iccsense, sensor); + break; + default: + break; + } +} + int nvkm_iccsense_read_all(struct nvkm_iccsense *iccsense) { @@ -257,8 +314,19 @@ nvkm_iccsense_oneinit(struct nvkm_subdev *subdev) return 0; } +static int +nvkm_iccsense_init(struct nvkm_subdev *subdev) +{ + struct nvkm_iccsense *iccsense = nvkm_iccsense(subdev); + struct nvkm_iccsense_sensor *sensor; + list_for_each_entry(sensor, &iccsense->sensors, head) + nvkm_iccsense_sensor_config(...
2016 Jun 12
1
[PATCH] drm/nouveau/iccsense: fix memory leak
...eletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c index 323c79a..756ff07 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c @@ -290,21 +290,28 @@ nvkm_iccsense_oneinit(struct nvkm_subdev *subdev) switch (sensor->type) { case NVBIOS_EXTDEV_INA209: - if (r->rail != 0) + if (r->rail != 0) { + kfree(rail); continue; + } rail->read = nvkm_iccsense_ina209_read; break; case NVBIOS_EXTDEV_INA219: - if (r->rail != 0) + i...
2016 Jun 03
0
[PATCH] drm/nouveau/iccsense: fix memory leak on default sensor->type case
...--git a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c > index 323c79a..79b0eb5 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c > @@ -305,6 +305,7 @@ nvkm_iccsense_oneinit(struct nvkm_subdev *subdev) > rail->read = nvkm_iccsense_ina3221_read; > break; > default: > + kfree(rail); > continue; > } > > -- > 2.8.1 >...
2016 Oct 24
0
[PATCH 2/3] subdev/iccsense: Parse max and crit power level
...nse/base.c +++ b/drm/nouveau/nvkm/subdev/iccsense/base.c @@ -26,6 +26,7 @@ #include <subdev/bios.h> #include <subdev/bios/extdev.h> #include <subdev/bios/iccsense.h> +#include <subdev/bios/power_budget.h> #include <subdev/i2c.h> 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) + i...
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 Mar 25
0
[PATCH 3/4] iccsense: split sensor into own struct
...ensor* +nvkm_iccsense_get_sensor(struct nvkm_iccsense *iccsense, u8 id) +{ + struct nvkm_iccsense_sensor *sensor; + list_for_each_entry(sensor, &iccsense->sensors, head) { + if (sensor->id == id) + return sensor; + } + return nvkm_iccsense_create_sensor(iccsense, id); +} + 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)...
2016 Jul 27
0
[PATCH] nvkm/iccsense: Parse the resistors and config the right way
...ce->i2c; @@ -245,7 +196,7 @@ nvkm_iccsense_create_sensor(struct nvkm_iccsense *iccsense, u8 id) sensor->type = extdev.type; sensor->i2c = &i2c_bus->i2c; sensor->addr = addr; - sensor->rail_mask = 0x0; + sensor->config = 0x0; return sensor; } @@ -273,48 +224,56 @@ nvkm_iccsense_oneinit(struct nvkm_subdev *subdev) iccsense->data_valid = true; for (i = 0; i < stbl.nr_entry; ++i) { - struct pwr_rail_t *r = &stbl.rail[i]; - struct nvkm_iccsense_rail *rail; + struct pwr_rail_t *pwr_rail = &stbl.rail[i]; struct nvkm_iccsense_sensor *sensor; - int (*read)(stru...
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.
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
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