]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/nouveau/therm: remove ineffective workarounds for alarm bugs
authorBen Skeggs <bskeggs@redhat.com>
Thu, 11 May 2017 07:33:39 +0000 (17:33 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 11 May 2017 22:32:58 +0000 (08:32 +1000)
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
drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c
drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c
drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c

index df949fa7d05d3a5dc188686c0c1eb10673514ff1..be691a7b972f38362009a39b5ff50d029531ba05 100644 (file)
@@ -146,7 +146,7 @@ nvkm_therm_update(struct nvkm_therm *therm, int mode)
                poll = false;
        }
 
-       if (list_empty(&therm->alarm.head) && poll)
+       if (poll)
                nvkm_timer_alarm(tmr, 1000000000ULL, &therm->alarm);
        spin_unlock_irqrestore(&therm->lock, flags);
 
index 91198d79393acb1c8c1a64715417bbfbceb07c26..e2feccec25f59a9717131f7eeb31b827415ff3c7 100644 (file)
@@ -83,7 +83,7 @@ nvkm_fan_update(struct nvkm_fan *fan, bool immediate, int target)
        spin_unlock_irqrestore(&fan->lock, flags);
 
        /* schedule next fan update, if not at target speed already */
-       if (list_empty(&fan->alarm.head) && target != duty) {
+       if (target != duty) {
                u16 bump_period = fan->bios.bump_period;
                u16 slow_down_period = fan->bios.slow_down_period;
                u64 delay;
index 59701b7a659752859fbca72171ba85454b0c673f..ff9fbe7950e5c6c9cef7336d2d88fc94bebe5771 100644 (file)
@@ -53,7 +53,7 @@ nvkm_fantog_update(struct nvkm_fantog *fan, int percent)
        duty = !nvkm_gpio_get(gpio, 0, DCB_GPIO_FAN, 0xff);
        nvkm_gpio_set(gpio, 0, DCB_GPIO_FAN, 0xff, duty);
 
-       if (list_empty(&fan->alarm.head) && percent != (duty * 100)) {
+       if (percent != (duty * 100)) {
                u64 next_change = (percent * fan->period_us) / 100;
                if (!duty)
                        next_change = fan->period_us - next_change;
index b9703c02d8ca7e6facca69c77bab9becf2a561f8..9a79e91fdfdc6dda7812455144044da8cc2d64f4 100644 (file)
@@ -185,7 +185,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 && list_empty(&alarm->head))
+       if (therm->func->temp_get(therm) >= 0)
                nvkm_timer_alarm(tmr, 1000000000ULL, alarm);
 }