Skip to content

Commit e4311ee

Browse files
author
Ben Skeggs
committed
drm/nouveau/therm: remove ineffective workarounds for alarm bugs
These were ineffective due to touching the list without the alarm lock, but should no longer be required. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org
1 parent 330bdf6 commit e4311ee

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ nvkm_therm_update(struct nvkm_therm *therm, int mode)
146146
poll = false;
147147
}
148148

149-
if (list_empty(&therm->alarm.head) && poll)
149+
if (poll)
150150
nvkm_timer_alarm(tmr, 1000000000ULL, &therm->alarm);
151151
spin_unlock_irqrestore(&therm->lock, flags);
152152

drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ nvkm_fan_update(struct nvkm_fan *fan, bool immediate, int target)
8383
spin_unlock_irqrestore(&fan->lock, flags);
8484

8585
/* schedule next fan update, if not at target speed already */
86-
if (list_empty(&fan->alarm.head) && target != duty) {
86+
if (target != duty) {
8787
u16 bump_period = fan->bios.bump_period;
8888
u16 slow_down_period = fan->bios.slow_down_period;
8989
u64 delay;

drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ nvkm_fantog_update(struct nvkm_fantog *fan, int percent)
5353
duty = !nvkm_gpio_get(gpio, 0, DCB_GPIO_FAN, 0xff);
5454
nvkm_gpio_set(gpio, 0, DCB_GPIO_FAN, 0xff, duty);
5555

56-
if (list_empty(&fan->alarm.head) && percent != (duty * 100)) {
56+
if (percent != (duty * 100)) {
5757
u64 next_change = (percent * fan->period_us) / 100;
5858
if (!duty)
5959
next_change = fan->period_us - next_change;

drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)
185185
spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags);
186186

187187
/* schedule the next poll in one second */
188-
if (therm->func->temp_get(therm) >= 0 && list_empty(&alarm->head))
188+
if (therm->func->temp_get(therm) >= 0)
189189
nvkm_timer_alarm(tmr, 1000000000ULL, alarm);
190190
}
191191

0 commit comments

Comments
 (0)