search for: alarm_program_lock

Displaying 20 results from an estimated 20 matches for "alarm_program_lock".

2014 Mar 13
1
[PATCH] 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. Reported-by: Marcin Slusarz <marcin.slusarz at gmail.com> Signed-off-by: Martin Peres <martin.peres at free.fr> --- nvkm/subdev/therm/fan.c | 19 +...
2014 Jul 14
0
[PATCH] drm/nouveau/therm: fix a potential deadlock in the therm monitoring code
...temp.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c @@ -192,11 +192,11 @@ alarm_timer_callback(struct nouveau_alarm *alarm) nouveau_therm_threshold_hyst_polling(therm, &sensor->thrs_shutdown, NOUVEAU_THERM_THRS_SHUTDOWN); + spin_unlock_irqrestore(&priv->sensor.alarm_program_lock, flags); + /* schedule the next poll in one second */ if (therm->temp_get(therm) >= 0 && list_empty(&alarm->head)) - ptimer->alarm(ptimer, 1000 * 1000 * 1000, alarm); - - spin_unlock_irqrestore(&priv->sensor.alarm_program_lock, flags); + ptimer->alarm(ptimer,...
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: Marcin Slusarz <marcin.slusarz at gmail.com> Tested-by: Timoth?e Ravier <tim at s...
2014 Mar 13
2
nouveau_fan_update: possible circular locking dependency detected
...4] ldconfig/22297 is trying to acquire lock: > [ 326.168507] (&(&priv->fan->lock)->rlock){-.-...}, at: [<ffffffffa00d5363>] nouveau_fan_update+0xeb/0x252 [nouveau] > [ 326.168551] > but task is already holding lock: > [ 326.168555] (&(&priv->sensor.alarm_program_lock)->rlock){-.-...}, at: [<ffffffffa00d6a8a>] alarm_timer_callback+0xf1/0x179 [nouveau] > [ 326.168587] > which lock already depends on the new lock. > > [ 326.168592] > the existing dependency chain (in reverse order) is: > [ 326.168596] > -> #1 (&(&priv-&g...
2017 Nov 22
2
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...166,6 +172,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) > struct nvbios_therm_sensor *sensor = &therm->bios_sensor; > struct nvkm_timer *tmr = therm->subdev.device->timer; > unsigned long flags; > + int val; > > spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags); > > @@ -185,7 +192,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) > spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); > > /* schedule the next poll in one second */ > - if (therm->func->temp_get(therm) >= 0) > + if (!therm-&...
2013 Sep 08
3
[PATCH 1/2] drm/nouveau/therm: ack any pending IRQ at init
.../drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c index 42ba633..1d15c52 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c @@ -126,7 +126,7 @@ nv84_therm_intr(struct nouveau_subdev *subdev) spin_lock_irqsave(&priv->sensor.alarm_program_lock, flags); - intr = nv_rd32(therm, 0x20100); + intr = nv_rd32(therm, 0x20100) & 0x3ff; /* THRS_4: downclock */ if (intr & 0x002) { @@ -209,6 +209,19 @@ nv84_therm_ctor(struct nouveau_object *parent, return nouveau_therm_preinit(&priv->base.base); } +int +nv84_therm_fini(st...
2017 Oct 08
1
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...166,6 +172,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) > struct nvbios_therm_sensor *sensor = &therm->bios_sensor; > struct nvkm_timer *tmr = therm->subdev.device->timer; > unsigned long flags; > + int val; > > spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags); > > @@ -185,7 +192,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) > spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); > > /* schedule the next poll in one second */ > - if (therm->func->temp_get(therm) >= 0) > + if (therm-&g...
2017 Sep 15
0
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...tate(therm, thrs_name); @@ -166,6 +172,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) struct nvbios_therm_sensor *sensor = &therm->bios_sensor; struct nvkm_timer *tmr = therm->subdev.device->timer; unsigned long flags; + int val; spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags); @@ -185,7 +192,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); /* schedule the next poll in one second */ - if (therm->func->temp_get(therm) >= 0) + if (therm->func->temp_get(therm, &val...
2017 Nov 22
1
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...;>> struct nvbios_therm_sensor *sensor = &therm->bios_sensor; >>> struct nvkm_timer *tmr = therm->subdev.device->timer; >>> unsigned long flags; >>> + int val; >>> >>> spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags); >>> >>> @@ -185,7 +192,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) >>> spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); >>> >>> /* schedule the next poll in one second */ >>> - if (therm-&...
2017 Nov 17
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...tate(therm, thrs_name); @@ -166,6 +172,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) struct nvbios_therm_sensor *sensor = &therm->bios_sensor; struct nvkm_timer *tmr = therm->subdev.device->timer; unsigned long flags; + int val; spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags); @@ -185,7 +192,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); /* schedule the next poll in one second */ - if (therm->func->temp_get(therm) >= 0) + if (!therm->func->temp_get(therm, &va...
2017 Nov 22
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...t nvkm_alarm *alarm) >> struct nvbios_therm_sensor *sensor = &therm->bios_sensor; >> struct nvkm_timer *tmr = therm->subdev.device->timer; >> unsigned long flags; >> + int val; >> >> spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags); >> >> @@ -185,7 +192,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) >> spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); >> >> /* schedule the next poll in one second */ >> - if (therm->func->temp_get(the...
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 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...= therm->func->temp_get(therm); + int temp; + + WARN_ON(nvkm_therm_temp_get(therm, &temp) < 0); prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name); @@ -185,7 +189,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); /* schedule the next poll in one second */ - if (therm->func->temp_get(therm) >= 0) + if (nvkm_therm_temp_get(therm, NULL) >= 0) nvkm_timer_alarm(tmr, 1000000000ULL, alarm); } @@ -229,7 +233,7 @@ nvkm_therm_sensor_preinit(struct nvkm_therm *therm) { const char *sen...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...N_ON(nvkm_therm_temp_get(therm, &temp) < 0); > > > > prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name); > > > > @@ -185,7 +189,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) > > spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); > > > > /* schedule the next poll in one second */ > > - if (therm->func->temp_get(therm) >= 0) > > + if (nvkm_therm_temp_get(therm, NULL) >= 0) > > nvkm_timer_alarm(tmr, 1000000000ULL, alarm); > > } >...
2020 Sep 16
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...; > + > + WARN_ON(nvkm_therm_temp_get(therm, &temp) < 0); > > prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name); > > @@ -185,7 +189,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) > spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); > > /* schedule the next poll in one second */ > - if (therm->func->temp_get(therm) >= 0) > + if (nvkm_therm_temp_get(therm, NULL) >= 0) > nvkm_timer_alarm(tmr, 1000000000ULL, alarm); > } > > @@ -229,7 +233,7 @@ nvkm_...
2020 Sep 17
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...therm, &temp) < 0); > > > > > > prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name); > > > > > > @@ -185,7 +189,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) > > > spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); > > > > > > /* schedule the next poll in one second */ > > > - if (therm->func->temp_get(therm) >= 0) > > > + if (nvkm_therm_temp_get(therm, NULL) >= 0) > > > nvkm_timer_alarm(tmr, 1000000000ULL, a...
2013 Aug 12
5
[PATCH 0/5] Thermal management fixes
From: Martin Peres <martin.peres at labri.fr> This patchset is mostly about fixing fdo bug #66177, reported by Dash Four. This bug is about fan/temp management not working after a suspend/resume cycle. Fan/therm management relies on ptimer's alarm feature to call periodically multiple callbacks that poll the temperature and update the fan speed if needed. The problem is that there is
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
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