Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp986705imu; Fri, 11 Jan 2019 12:45:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN7VgNy8Txs5XEDNeTyaF4GW0G1Nc4Rkv9sA837EbuVKJi4pM9JavmBdsgxJ37P81oj4mA2F X-Received: by 2002:a17:902:820f:: with SMTP id x15mr15455417pln.224.1547239554092; Fri, 11 Jan 2019 12:45:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547239554; cv=none; d=google.com; s=arc-20160816; b=Dr5DY26qEqYQqoR0zIrkQeasEFR6RcfTQk1xU9xd5FKSJsCOcb/nw3j6L3vgfRzwLu hc0CuFxYeJr/imjJsX9gGzoO/hDWdzCHW/5RfQ3gQzTTjPkyCDMLoXiAspjdVGdiKsOp 1ONHsP5iUBrRwnzIdhuyaE/0/N44VJOdQB37N7tzxmxR/Aj7YnQFsrFLE9dBIr/u/C55 4JfMt1dsVITO5OOl5rq68nKlflIzY6Q3yo19n68V8Cj0ZFMKxTAoW5AveDfsk394Owzc iXolD6OoB7S6GsyVFYB3e54pq/IoI8LDsvlkDhCHVEoLSq3WFuO9RPM5Kw3P8wR1LdY3 LGEw== 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=0RpvtY1IXks4TcWsoIUGLwRDZeMMqEe2eItP83YLvRw=; b=ApPSe65vNkF6X2jZohjd3pjs4fTzH9h963ZsuCWe3XKYZIoD+6JYJnODOt94uLGFX6 VALhf63/M/ejVtY6eucYUUX7R5g1174165ua0blC4d+CZIwsALr1/h/Ak74jhx/dAY7G XeXYChA8iCwsIRF3zfMUJRhbrIgfh/GBj/hoRE7sqC5p11u64SVjYK9G+J1LGvmwTqfD MItsVjcZUcHTiMlN9lYJfk6uAYxuQ92Nj7G9DCxznnWApgR+SxwvEXIILMklnk9nTTox ApAvjXoVaMeZ8A6M9pZ4rvgYgXo/kS4My8uECcVy/kK1dC23zNUx7mJJTxrrKIpZMrcy aoig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zJ2d3WeS; 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 j191si2766265pgd.31.2019.01.11.12.45.38; Fri, 11 Jan 2019 12:45:54 -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=zJ2d3WeS; 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 S2404574AbfAKOoP (ORCPT + 99 others); Fri, 11 Jan 2019 09:44:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:37130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404563AbfAKOoM (ORCPT ); Fri, 11 Jan 2019 09:44:12 -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 E69A520872; Fri, 11 Jan 2019 14:44:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547217851; bh=wuTBWD5JbgWVURhR6Ne/e2HC1A8jRCMIci7r/TjY0FY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zJ2d3WeSDpGAzkDU9izpVTWixkNrRECTZB8XbozicLzryuX1Vdf5fTo12ikTn/oSa MwKNNVgjaqUx3Uu0lwTOji5OJ6G0XeWIkRwn2iDRS5091sXzgUw/GN2oTh7NQohOMZ 8E/pX8OGoSZEqyuaxhef/Cvb4A/kjkuBZPC5omlM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lyude Paul , Ben Skeggs Subject: [PATCH 4.20 63/65] drm/nouveau/drm/nouveau: Check rc from drm_dp_mst_topology_mgr_resume() Date: Fri, 11 Jan 2019 15:15:49 +0100 Message-Id: <20190111131104.402491566@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111131055.331350141@linuxfoundation.org> References: <20190111131055.331350141@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.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lyude Paul commit b89fdf7ae8500feae1100d8b283176a44d31d698 upstream. We need to actually make sure we check this on resume since otherwise we won't know whether or not the topology is still there once we've resumed, which will cause us to still think the topology is connected even after it's been removed if the removal happens mid-suspend. Signed-off-by: Lyude Paul Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs Signed-off-by: Ben Skeggs Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -1262,8 +1262,16 @@ nv50_mstm_fini(struct nv50_mstm *mstm) static void nv50_mstm_init(struct nv50_mstm *mstm) { - if (mstm && mstm->mgr.mst_state) - drm_dp_mst_topology_mgr_resume(&mstm->mgr); + int ret; + + if (!mstm || !mstm->mgr.mst_state) + return; + + ret = drm_dp_mst_topology_mgr_resume(&mstm->mgr); + if (ret == -1) { + drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, false); + drm_kms_helper_hotplug_event(mstm->mgr.dev); + } } static void