Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp921133imj; Sat, 9 Feb 2019 10:50:07 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia+m2pF/+ep+tafPTt59wBLKqI9XEPGr8gOYdvxOJaS785fdxgJY6bsCsRv4NkXscT5pere X-Received: by 2002:a63:e655:: with SMTP id p21mr11442540pgj.70.1549738207212; Sat, 09 Feb 2019 10:50:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549738207; cv=none; d=google.com; s=arc-20160816; b=NSPlciuTzMC3zkNh3TTGlIIQiu2B1NtLeVXpJwa6ogTBEXuo3AbRUug82sa5tDwErG gJDNK4uxmRfxbK3OPg8tlYvsQuEeWe0NopQIFkVvIO/fOmQNmBDUhP4Zfsh1NMibowFU G1QxocB/qshM3d/aHrOoH3+KmXL5VbgMqPUzkdG7/vZ/35NV2scPRge4RadJqscW3bu1 huDbC8Nk8zZkYrWz1GWb/snRzjEcL4bnHF/ZsU/u3RYFyPJJImhGXtOee4QSK8l/vBhT iC6RJQ2Yqcj9DTdbcAxx7gkP+IgAWTthomopO+BYhVWNKEyK6RoAn/yQC1lByaJLuDtc QSaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tEeu01/GnUUqNNY0SlWJkt66v4PJAhsPFurUJxp8FX8=; b=qAJpC/vD8LpUJ0rSrBqr2w+dTCx/O2+6rqjvnUHM5OuQMdW/mSSoae4jHj6126TI/i RPRIE+LPsA3ui03/MwAmQ62jt6yJdQpLOuTSLP8Rd/iNWqj/BDDNTfS7aBOMHc2OuBm1 RXKtenAQ90oFKDQ+PIgwZTFFGHSZErtNbEjOGPJ7cW3UIs+oMOjmnguc7hoklLD1E9PS EMKDQovjzEdt0QTQjxrAmf+9bsmpQOfm7BLGElbQ6ag9jEoN1L0QkEz11w8BfMbNWHx6 v4/zLnXRfKlNSGEj6nESkwV+26MT6Uc7rFTsYUzzA9D7jp0LG/lMZ3mFlcLHPQnOEjg0 yBsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Gmoidy/s"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z13si4368692pgf.294.2019.02.09.10.49.51; Sat, 09 Feb 2019 10:50:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Gmoidy/s"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727772AbfBISsg (ORCPT + 99 others); Sat, 9 Feb 2019 13:48:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:33346 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727648AbfBISs2 (ORCPT ); Sat, 9 Feb 2019 13:48:28 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8779021919; Sat, 9 Feb 2019 18:48:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549738107; bh=Qd1fahdPosSnEjFOXf+YPh97rzaC+Gmq1JYOnuqchKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gmoidy/sAomMwNbNdl9mvKVp2ABT2YalcnB2lbt4X8Huyka/U7kwfSzgwEmDqie4/ WVjwnAXQ2B2gLRmCgtVh2+luIUOR1YtCeUzGIy9gtYIY6e/Gft7grRD1HtJULAWuYG 5V6K5Pta+mIajiVoBoa9kvEvFMJe/8+It6usUP5M= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Takashi Iwai , Ben Skeggs , Sasha Levin , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Subject: [PATCH AUTOSEL 4.20 36/42] drm/nouveau: Don't disable polling in fallback mode Date: Sat, 9 Feb 2019 13:47:28 -0500 Message-Id: <20190209184734.125935-36-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190209184734.125935-1-sashal@kernel.org> References: <20190209184734.125935-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai [ 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 Signed-off-by: Takashi Iwai Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c index 3695cde669f8..07914e36939e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c @@ -132,11 +132,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; -- 2.19.1