search for: cur_trip

Displaying 19 results from an estimated 19 matches for "cur_trip".

2024 Mar 23
0
[PATCH] therm.c: Adding an array index check before accessing an element.
...drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c index 5babc5a7c7d5..78387053f214 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c @@ -180,6 +180,8 @@ nvbios_therm_fan_parse(struct nvkm_bios *bios, struct nvbios_therm_fan *fan) cur_trip->fan_duty = duty_lut[(value & 0xf000) >> 12]; break; case 0x25: + if (fan->nr_fan_trip == 0) + fan->nr_fan_trip++; cur_trip = &fan->trip[fan->nr_fan_trip - 1]; cur_trip->fan_duty = value; break; -- 2.30.2
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...herm->func->temp_get) - return therm->func->temp_get(therm); + return therm->func->temp_get(therm, temp); return -ENODEV; } @@ -40,9 +45,11 @@ nvkm_therm_update_trip(struct nvkm_therm *therm) struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, *cur_trip = NULL, *last_trip = therm->last_trip; - u8 temp = therm->func->temp_get(therm); + int temp; u16 duty, i; + WARN_ON(nvkm_therm_temp_get(therm, &temp) < 0); + /* look for the trip point corresponding to the current temperature */ cur_trip = NULL; for (i = 0; i...
2014 Mar 24
4
[PATCH 1/4] pm/fan: drop the fan lock in fan_update() before rescheduling
From: Martin Peres <martin.peres at labri.fr> This should fix a deadlock that has been reported to us where fan_update() would hold the fan lock and try to grab the alarm_program_lock to reschedule an update. On an other CPU, the alarm_program_lock would have been taken before calling fan_update(), leading to a deadlock. We should Cc: <stable at vger.kernel.org> # 3.9+ Reported-by:
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...c->temp_get(therm, temp); > > return -ENODEV; > > } > > > > @@ -40,9 +45,11 @@ nvkm_therm_update_trip(struct nvkm_therm *therm) > > struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, > > *cur_trip = NULL, > > *last_trip = therm->last_trip; > > - u8 temp = therm->func->temp_get(therm); > > + int temp; > > u16 duty, i; > > > > + WARN_ON(nvkm_therm_temp_get(therm, &temp) < 0); &...
2013 Aug 30
5
[PATCH 1/2] drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5)
...m/nouveau/core/subdev/bios/therm.c b/drivers/gpu/drm/nouveau/core/subdev/bios/therm.c index 22a2057..22ac6db 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/therm.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/therm.c @@ -184,7 +184,8 @@ nvbios_therm_fan_parse(struct nouveau_bios *bios, cur_trip->fan_duty = value; break; case 0x26: - fan->pwm_freq = value; + if (!fan->pwm_freq) + fan->pwm_freq = value; break; case 0x3b: fan->bump_period = value; -- 1.8.4
2017 Nov 22
2
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...et(therm); > + return therm->func->temp_get(therm, val); > return -ENODEV; > } > > static int > nvkm_therm_update_trip(struct nvkm_therm *therm) > { > + int temp, ret; > struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, > *cur_trip = NULL, > *last_trip = therm->last_trip; > - u8 temp = therm->func->temp_get(therm); > u16 duty, i; > > + ret = therm->func->temp_get(therm, &temp); > + if (ret < 0) > + return ret; > + > /* look for the trip point corresponding t...
2017 Oct 08
1
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...et(therm); > + return therm->func->temp_get(therm, val); > return -ENODEV; > } > > static int > nvkm_therm_update_trip(struct nvkm_therm *therm) > { > + int temp, ret; > struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, > *cur_trip = NULL, > *last_trip = therm->last_trip; > - u8 temp = therm->func->temp_get(therm); > u16 duty, i; > > + ret = therm->func->temp_get(therm, &temp); > + if (ret < 0) > + return ret; > + > /* look for the trip point corresponding t...
2017 Sep 15
0
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...->temp_get) - return therm->func->temp_get(therm); + return therm->func->temp_get(therm, val); return -ENODEV; } static int nvkm_therm_update_trip(struct nvkm_therm *therm) { + int temp, ret; struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, *cur_trip = NULL, *last_trip = therm->last_trip; - u8 temp = therm->func->temp_get(therm); u16 duty, i; + ret = therm->func->temp_get(therm, &temp); + if (ret < 0) + return ret; + /* look for the trip point corresponding to the current temperature */ cur_trip = NUL...
2017 Nov 22
1
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...gt;> } >>> >>> static int >>> nvkm_therm_update_trip(struct nvkm_therm *therm) >>> { >>> + int temp, ret; >>> struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, >>> *cur_trip = NULL, >>> *last_trip = therm->last_trip; >>> - u8 temp = therm->func->temp_get(therm); >>> u16 duty, i; >>> >>> + ret = therm->func->temp_get(therm, &temp); >>> + if (r...
2013 Sep 04
0
[PATCH 1/2] drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5)
...gpu/drm/nouveau/core/subdev/bios/therm.c > index 22a2057..22ac6db 100644 > --- a/drivers/gpu/drm/nouveau/core/subdev/bios/therm.c > +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/therm.c > @@ -184,7 +184,8 @@ nvbios_therm_fan_parse(struct nouveau_bios *bios, > cur_trip->fan_duty = value; > break; > case 0x26: > - fan->pwm_freq = value; > + if (!fan->pwm_freq) > + fan->pwm_freq = value; > break; &gt...
2020 Sep 16
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...return therm->func->temp_get(therm, temp); > return -ENODEV; > } > > @@ -40,9 +45,11 @@ nvkm_therm_update_trip(struct nvkm_therm *therm) > struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, > *cur_trip = NULL, > *last_trip = therm->last_trip; > - u8 temp = therm->func->temp_get(therm); > + int temp; > u16 duty, i; > > + WARN_ON(nvkm_therm_temp_get(therm, &temp) < 0); > + I think adding WARN_ONs...
2017 Nov 17
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...->temp_get) - return therm->func->temp_get(therm); + return therm->func->temp_get(therm, val); return -ENODEV; } static int nvkm_therm_update_trip(struct nvkm_therm *therm) { + int temp, ret; struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, *cur_trip = NULL, *last_trip = therm->last_trip; - u8 temp = therm->func->temp_get(therm); u16 duty, i; + ret = therm->func->temp_get(therm, &temp); + if (ret < 0) + return ret; + /* look for the trip point corresponding to the current temperature */ cur_trip = NUL...
2020 Sep 17
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...gt; > > return -ENODEV; > > > } > > > > > > @@ -40,9 +45,11 @@ nvkm_therm_update_trip(struct nvkm_therm *therm) > > > struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, > > > *cur_trip = NULL, > > > *last_trip = therm->last_trip; > > > - u8 temp = therm->func->temp_get(therm); > > > + int temp; > > > u16 duty, i; > > > > > > + WARN_ON(nvkm_therm_temp_ge...
2017 Nov 22
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...> return -ENODEV; >> } >> >> static int >> nvkm_therm_update_trip(struct nvkm_therm *therm) >> { >> + int temp, ret; >> struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, >> *cur_trip = NULL, >> *last_trip = therm->last_trip; >> - u8 temp = therm->func->temp_get(therm); >> u16 duty, i; >> >> + ret = therm->func->temp_get(therm, &temp); >> + if (ret < 0) >> +...
2017 Sep 02
3
[PATCH 0/3] Several hwmon fixes
We should simply return errors while the GPU is turned off, because the sensors aren't accessable and setting any kind of value doesn't make any sense. Fixes sensors values reported by "sensors" Before: nouveau-pci-0100 Adapter: PCI adapter GPU core: +0.60 V (min = +0.60 V, max = +1.20 V) temp1: -0.0°C (high = +95.0°C, hyst = +3.0°C) (crit
2020 Aug 12
6
[PATCH] drm/nouveau: Add fine-grain temperature reporting
Commit d32656373857 ("drm/nouveau/therm/gp100: initial implementation of new gp1xx temperature sensor") added support for reading finer-grain temperatures, but continued to report temperatures in 1 degree Celsius increments via nvkm_therm_temp_get(). Rather than altering nvkm_therm_temp_get() to report finer-grain temperatures, which would be inconvenient for other users of the
2017 Nov 17
35
[PATCH 00/32] Updated State of my clk patches
Last update here: https://lists.freedesktop.org/archives/nouveau/2017-September/028848.html Basically big cleanup, reordering, simplifications and some renaming to make the code easier to read and to review. I also moved some bugfixes to the front so they can be merged prior the other patches. There was also a bug related to the therm daemon triggering a pstate change leading to PMU lockups,
2017 Sep 15
42
[RFC PATCH 00/29] Current State of my clk patches
Just wanted to post updated versions of my last series/patches. Reviews welcomed. It would be also nice if we agree on features I should focus upstreaming, so that this work can be better splitted or reordered. Sadly most of my patches depend on the rather big clk subdev rework and I think those patches shows best, why I think this rework is actually needed and makes things much easier to add
2017 Jul 21
15
[RFC PATCH 00/13] Thermal throttling
Adds Nouveau controlled thermal throttling for Kepler+ GPUs. With this I feel safe enough to add support for Maxwell2 reclocking later on (still hidden behind a switch, but we can be fairly sure to not overheat hardware if a user isn't carefull enough) Contains all patches from my clk update series, but I thought it makes sense to include those in this series as well for completness. Please