]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
drm/nouveau: Don't disable polling in fallback mode
authorTakashi Iwai <tiwai@suse.de>
Wed, 12 Sep 2018 10:58:43 +0000 (12:58 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
BugLink: https://bugs.launchpad.net/bugs/1837813
[ Upstream commit 118780066e30c34de3d9349710b51780bfa0ba83 ]

When a fan is controlled via linear fallback without cstate, we
shouldn't stop polling.  Otherwise it won't be adjusted again and
keeps running at an initial crazy pace.

Fixes: 800efb4c2857 ("drm/nouveau/drm/therm/fan: add a fallback if no fan control is specified in the vbios")
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1103356
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107447
Reported-by: Thomas Blume <thomas.blume@suse.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c

index f27fc6d0d4c65fe3bc2e11c07c6bb0a5fc611aa4..7168fb4e12600678ed05484aa4a0f1750e8315bc 100644 (file)
@@ -131,11 +131,12 @@ nvkm_therm_update(struct nvkm_therm *therm, int mode)
                        duty = nvkm_therm_update_linear(therm);
                        break;
                case NVBIOS_THERM_FAN_OTHER:
-                       if (therm->cstate)
+                       if (therm->cstate) {
                                duty = therm->cstate;
-                       else
+                               poll = false;
+                       } else {
                                duty = nvkm_therm_update_linear_fallback(therm);
-                       poll = false;
+                       }
                        break;
                }
                immd = false;