Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2473842imj; Mon, 18 Feb 2019 06:38:37 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia7HHOG5FmgW/brw94XSMq/xfSUTFmxn6o409tVzwlGcBeC4d7yevBlWFujSS58r0XKy2lO X-Received: by 2002:a65:424c:: with SMTP id d12mr19233566pgq.126.1550500717868; Mon, 18 Feb 2019 06:38:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550500717; cv=none; d=google.com; s=arc-20160816; b=Lx132QGNqyTieuU+gi3nXZWTxXA81VoO0Vc1yrexV0oKUqgcnuEx0ZRom09Ewnlo6P RG2jCtmnvrT9RoCHVMUrASpoL/Tw6HQNZXOPDaO3MNaXZd5KK8bcFA8z4+Z+MSdljdJT 0LYS2q9nyUdhJBU1ebZzZjaKCHNP4vg9QimpmIba2iDneyEo6mc10Wv6ZCtugy1DC+jF m3VH+j+53TGdSuzRPg3DqUlaQHS2OwpLwSxWFQFse1m8HfbdXiT+1c2cdzfNjptnIPJ3 di8PH4KsZrc3nfkVChudr+x/C8dlw1bLZeSNmkLoTlAl5BgfRml5VAlgnoH8jmZ/s6dR C4sg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wfTbDPLlALQUPNN11Q50gQcHFV8EA/LayNq8BhtjzhA=; b=XA/ZOT/PYDJqf0Q/O3/l3AqHpa6qVvKOv3nDA+e7ZurrKO7uBnT41wBGmV4IFX92wZ rNPqXad7ttyJye8mgBZgWX76P6Z3vH9z4z5XJ5RQPan6Dlv9nBaLTHDicSC6XRhX8/gi aNiQ1m6VUl8ZtIQEQMeZWudrPGUYLS5hvF8aAXJmFmecSG8rR3Z5fYqej0r4oxZ4gWkV hllGYx8rMlTp3jB67CqdQwStrJuuWL51Xduyj+HvfYvKWi3QO3M/wLr9dYpvdUgUZzYf Y83sr80vw64Mb5gtwToWe//EfFW2YSIDsGYrpRtQlhImRMefSaJPNP63p1OSsBrtVqm2 6ONQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VQebmxnf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y13si10387939pgf.524.2019.02.18.06.38.22; Mon, 18 Feb 2019 06:38:37 -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=VQebmxnf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389218AbfBROgv (ORCPT + 99 others); Mon, 18 Feb 2019 09:36:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:35862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733028AbfBRNzr (ORCPT ); Mon, 18 Feb 2019 08:55:47 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 266C321901; Mon, 18 Feb 2019 13:55:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550498145; bh=EUy1HFNattFaUXrd6BSkGWYyUkNJQEheNnsdUYqfAb4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VQebmxnf7VwiWsIxPA4XV2hmreSi3yQYG6u2QT2JVu/i9wHqgcV1mgpuToGRxIFJH i0pm2chxkpAJhcU+lO5oTTZ5+KSkgQ31mP4TJC6alJeLbMP3Hmc6HdK7C9U4vf4Fwi uctLQJ6eQRExSB+XrqzM0nfIUj2P+qNBQ1jXU/jo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ilia Mirkin , Ben Skeggs , Sasha Levin Subject: [PATCH 4.14 38/62] drm/nouveau/falcon: avoid touching registers if engine is off Date: Mon, 18 Feb 2019 14:43:44 +0100 Message-Id: <20190218133509.173666949@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218133505.801423074@linuxfoundation.org> References: <20190218133505.801423074@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit a5176a4cb85bb6213daadf691097cf411da35df2 ] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108980 Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/nvkm/engine/falcon.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c b/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c index 2e7b4e2105ef..62cb376e2c01 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -107,8 +108,10 @@ nvkm_falcon_fini(struct nvkm_engine *engine, bool suspend) } } - nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000); - nvkm_wr32(device, base + 0x014, 0xffffffff); + if (nvkm_mc_enabled(device, engine->subdev.index)) { + nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000); + nvkm_wr32(device, base + 0x014, 0xffffffff); + } return 0; } -- 2.19.1