Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7075543ybi; Thu, 13 Jun 2019 09:09:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrgxbQ2lEX2uMuDfO7rJUoxdj7xUZcWj9im6NHyYXr8hxqpcdZQ6bGxRjP67YiSSD/vUSf X-Received: by 2002:a17:902:4222:: with SMTP id g31mr10103289pld.41.1560442161750; Thu, 13 Jun 2019 09:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560442161; cv=none; d=google.com; s=arc-20160816; b=sKIW443l/g6KXdNbamPgezkXbfgZIvEC7iOR8aMJZaF1ZCGqCDvqXD6nay7DVEVXTx 3xf8P5Doz64StyTnSN7TKw/UmZF8/9HTtt6KWMGvDm/EPpYAq+9TyC555jnETpcm0Wdv gy7IBu0q9fgzHNaqmcEYuLIPAkLtTKOg7qHYZZZmIhB/oE+wJmcEAj0AH9JSqcXQfDx/ lGHSoKmIkykSJwihqM72OmSMjpbcvikdc+GZUazgfvGD/Tkry9VhgsGG/6LUY0X239Lm wf0fA1w7ZIc/wlMfvkR8sxMQiO2IPhxf2qvdhwKgU4TnlAaJEDjw2k16wigmCSnnsQAd UDRQ== 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=44GSdMqhpVjeBYBV5Ymwb9E0cUeY7NWUfXZ3RIV9nRY=; b=K99a33VL5LXt4mXriDfFzIeJffyOPXiR9uvHypd56NP6G74WeGWhRUbH7s7VMQ7JHb TWUs5NQzpIVbR/4An/2BF+9CthNx1p3kr5VFCzbXZYzZBRAWowxaSLjrbtlOxxKNfTYg aEJ2weaG1Bm+FQjuh6Vjnt6gJRUOi/b32bECHyErkto6jgGz2B5lxVfFwhsyNSer2yjD D6yWKsTa6Veq19X3jCU47ZunyZZcCt70JHrMMyx8MsbeRKP+MGvUrSX+XQwqvFeQrmhr FCdOTyC5vdlxoJL8F1ktLENldl+HWVy+P0NVlDY2PjtrBWeh96vt+Y1SdJQ9Jlt4w6wh cJvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xpsuPSHT; 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 z5si84894pgv.280.2019.06.13.09.09.06; Thu, 13 Jun 2019 09:09:21 -0700 (PDT) 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=xpsuPSHT; 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 S2388382AbfFMQHR (ORCPT + 99 others); Thu, 13 Jun 2019 12:07:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:34340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731306AbfFMIpj (ORCPT ); Thu, 13 Jun 2019 04:45:39 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 65C0A21743; Thu, 13 Jun 2019 08:45:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560415538; bh=MwDJ6yHKjBfG64uMwyxXIftvLVqGvedoBER/Rnl76Rc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xpsuPSHTXKlLEpxxUIODav9r/1Kow4+NS6cFMGEuWZLj3wmR3Iqz+KF226Ecbr359 g/mLIKvQzEJtQYQztpdm/+jZV5+Q8tdMArwGD2X7IDxkp9vpEZ5aAaKiBxVLOzayM4 RSPO0LsJo+sT9ISMtxzWiiBvyzkJd04mzVCLsklY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lyude Paul , Ben Skeggs , Sasha Levin Subject: [PATCH 5.1 036/155] drm/nouveau/kms/gv100-: fix spurious window immediate interlocks Date: Thu, 13 Jun 2019 10:32:28 +0200 Message-Id: <20190613075655.095326181@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190613075652.691765927@linuxfoundation.org> References: <20190613075652.691765927@linuxfoundation.org> User-Agent: quilt/0.66 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 [ Upstream commit d2434e4d942c32cadcbdbcd32c58f35098f3b604 ] Cursor position updates were accidentally causing us to attempt to interlock window with window immediate, and without a matching window immediate update, NVDisplay could hang forever in some circumstances. Fixes suspend/resume on (at least) Quadro RTX4000 (TU104). Reported-by: Lyude Paul Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/dispnv50/disp.h | 1 + drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c | 1 + drivers/gpu/drm/nouveau/dispnv50/wndw.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.h b/drivers/gpu/drm/nouveau/dispnv50/disp.h index 2216c58620c2..7c41b0599d1a 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.h +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.h @@ -41,6 +41,7 @@ struct nv50_disp_interlock { NV50_DISP_INTERLOCK__SIZE } type; u32 data; + u32 wimm; }; void corec37d_ntfy_init(struct nouveau_bo *, u32); diff --git a/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c b/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c index 9103b8494279..f7dbd965e4e7 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c +++ b/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c @@ -75,6 +75,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm, return ret; } + wndw->interlock.wimm = wndw->interlock.data; wndw->immd = func; return 0; } diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c index b95181027b31..471a39a077e5 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c +++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c @@ -149,7 +149,7 @@ nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock, if (asyw->set.point) { if (asyw->set.point = false, asyw->set.mask) interlock[wndw->interlock.type] |= wndw->interlock.data; - interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.data; + interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.wimm; wndw->immd->point(wndw, asyw); wndw->immd->update(wndw, interlock); -- 2.20.1