diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-05-11 03:33:39 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-25 09:44:36 -0400 |
commit | e8ee630591963610dd1b5ed9fdfb730c791bd52b (patch) | |
tree | 2cba427a970347190454057dbd4e3c7192440346 /drivers/gpu/drm | |
parent | d1f006efde1fa224a52a93a0d21eb389bdea851d (diff) |
drm/nouveau/therm: remove ineffective workarounds for alarm bugs
commit e4311ee51d1e2676001b2d8fcefd92bdd79aad85 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm')
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c index 8894fee30cbc..cbacbb673e54 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | |||
@@ -130,7 +130,7 @@ nvkm_therm_update(struct nvkm_therm *therm, int mode) | |||
130 | poll = false; | 130 | poll = false; |
131 | } | 131 | } |
132 | 132 | ||
133 | if (list_empty(&therm->alarm.head) && poll) | 133 | if (poll) |
134 | nvkm_timer_alarm(tmr, 1000000000ULL, &therm->alarm); | 134 | nvkm_timer_alarm(tmr, 1000000000ULL, &therm->alarm); |
135 | spin_unlock_irqrestore(&therm->lock, flags); | 135 | spin_unlock_irqrestore(&therm->lock, flags); |
136 | 136 | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c index 91198d79393a..e2feccec25f5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c | |||
@@ -83,7 +83,7 @@ nvkm_fan_update(struct nvkm_fan *fan, bool immediate, int target) | |||
83 | spin_unlock_irqrestore(&fan->lock, flags); | 83 | spin_unlock_irqrestore(&fan->lock, flags); |
84 | 84 | ||
85 | /* schedule next fan update, if not at target speed already */ | 85 | /* schedule next fan update, if not at target speed already */ |
86 | if (list_empty(&fan->alarm.head) && target != duty) { | 86 | if (target != duty) { |
87 | u16 bump_period = fan->bios.bump_period; | 87 | u16 bump_period = fan->bios.bump_period; |
88 | u16 slow_down_period = fan->bios.slow_down_period; | 88 | u16 slow_down_period = fan->bios.slow_down_period; |
89 | u64 delay; | 89 | u64 delay; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c index 59701b7a6597..ff9fbe7950e5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c | |||
@@ -53,7 +53,7 @@ nvkm_fantog_update(struct nvkm_fantog *fan, int percent) | |||
53 | duty = !nvkm_gpio_get(gpio, 0, DCB_GPIO_FAN, 0xff); | 53 | duty = !nvkm_gpio_get(gpio, 0, DCB_GPIO_FAN, 0xff); |
54 | nvkm_gpio_set(gpio, 0, DCB_GPIO_FAN, 0xff, duty); | 54 | nvkm_gpio_set(gpio, 0, DCB_GPIO_FAN, 0xff, duty); |
55 | 55 | ||
56 | if (list_empty(&fan->alarm.head) && percent != (duty * 100)) { | 56 | if (percent != (duty * 100)) { |
57 | u64 next_change = (percent * fan->period_us) / 100; | 57 | u64 next_change = (percent * fan->period_us) / 100; |
58 | if (!duty) | 58 | if (!duty) |
59 | next_change = fan->period_us - next_change; | 59 | next_change = fan->period_us - next_change; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c index b9703c02d8ca..9a79e91fdfdc 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c | |||
@@ -185,7 +185,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm) | |||
185 | spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); | 185 | spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags); |
186 | 186 | ||
187 | /* schedule the next poll in one second */ | 187 | /* 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) |
189 | nvkm_timer_alarm(tmr, 1000000000ULL, alarm); | 189 | nvkm_timer_alarm(tmr, 1000000000ULL, alarm); |
190 | } | 190 | } |
191 | 191 | ||