Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp31219imu; Tue, 15 Jan 2019 15:55:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN7+uDmL4lKkXvdvNPnpJa22gLqw5BuvWjh436Y3q0kbT2Z+NXFW/alooFpR/k2qv2loHLwb X-Received: by 2002:a17:902:784d:: with SMTP id e13mr6880898pln.188.1547596533978; Tue, 15 Jan 2019 15:55:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547596533; cv=none; d=google.com; s=arc-20160816; b=yIDvfS6Zs6mOvEXB6IX75gcSqrFqQ2jVJ+QYRPZpZgyU4dfosd4l4InGPYuE7iz5HQ SAGeNyT9GxcDzlOZuoP+kQDZutonc1hLQmmq3sYosT7Icq01AYTamNCLeyXuShSSp+cm hha1cs5LS4VOcQnhqP3naHotcQH+lKdee14brjbZ62Vq5Frl4Nvi+b9SG/jMOXw/wyBF AsNX9MgWShqnXuNOpYLAi7OQQ76wxt9nxvZbp45Nkz9HH01qxdE12dtb4w1Qr13l02QB VCRJKbG29Me/wTgg68F3t0iAEjCqJ05SEryISqWfMq60D//ORkAiWo+9LbaRSyUpWHyW CWBQ== 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=9v3dw4ogpcssNFa49t+I1NvX/Ohf+y3+17HYwdbclqc=; b=XNmO4xATQm9JRXkbFviFbFUFAhJISydFAm4Zq6MyYtIFUTvM210zMbwWMfXiFr9z20 GZRPewbClw68VgkqCx7CGFHeKE/3eqGAq0I4vtZEURJp9wiyZzPZRvL57HWbYxvEKxmU 0Zkqpuwo68ZFgzldyMLf/fFUqDzltbZDtOHmvQZmJpirXn46ipSpHRi7Dz9E9+jWmkBt rwn/Diaw7e48uBi00fjV3rneLGF3d0/TnJqh4wiobBDaDg3kcAV2jtaicBOl6hedNUeP KbYJJYV5o8KnYd17SHCful5Ir+1O2Iep5k1vsfR7xVPGpGfNBBCHbfiI/+zfXfTCmA5q xE7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ai6Fn0wn; 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 j21si4697289pfn.277.2019.01.15.15.54.52; Tue, 15 Jan 2019 15:55:33 -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=Ai6Fn0wn; 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 S1732099AbfAOQry (ORCPT + 99 others); Tue, 15 Jan 2019 11:47:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:34976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387746AbfAOQpP (ORCPT ); Tue, 15 Jan 2019 11:45:15 -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 9273920883; Tue, 15 Jan 2019 16:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547570715; bh=/FgYSkl3NEeP6q4XyKN3SGB15FIRGfwrtDSIN7gjrWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ai6Fn0wnXCVjFQzlqQssKC7Fyi6mmlFQ9HFWomO23XcWHP2ajn/DGAgmAmut8er1K k9KDyHh3osnjCDYlliywlWP64UyJ9UKmWtZTszFUOP3IMjpbW/i/1oS3Ntwvfk9+PE x+av4hx/XFHS2pDY8073bgvrISwVxROR+kaZI7ZY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lyude Paul , Harry Wentland , Jerry Zuo Subject: [PATCH 4.20 45/57] drm/amdgpu: Dont fail resume process if resuming atomic state fails Date: Tue, 15 Jan 2019 17:36:26 +0100 Message-Id: <20190115154913.479428526@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190115154910.734892368@linuxfoundation.org> References: <20190115154910.734892368@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 2d1af6a11cb9d88e0e3dd10258904c437fe1b315 upstream. This is an ugly one unfortunately. Currently, all DRM drivers supporting atomic modesetting will save the state that userspace had set before suspending, then attempt to restore that state on resume. This probably worked very well at one point, like many other things, until DP MST came into the picture. While it's easy to restore state on normal display connectors that were disconnected during suspend regardless of their state post-resume, this can't really be done with MST because of the fact that setting up a downstream sink requires performing sideband transactions between the source and the MST hub, sending out the ACT packets, etc. Because of this, there isn't really a guarantee that we can restore the atomic state we had before suspend once we've resumed. This sucks pretty bad, but so far I haven't run into any compositors that this actually causes serious issues with. Most compositors will notice the hotplug we send afterwards, and then reprobe state. Since nouveau and i915 also don't fail the suspend/resume process due to failing to restore the atomic state, let's make amdgpu match this behavior. Better to resume the GPU properly, then to stop the process half way because of a potentially unavoidable atomic commit failure. Eventually, we'll have a real fix for this problem on the DRM level. But we've got some more important low-hanging fruit to deal with first. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Jerry Zuo Cc: # v4.15+ Link: https://patchwork.freedesktop.org/patch/msgid/20190108211133.32564-3-lyude@redhat.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -830,7 +830,6 @@ static int dm_resume(void *handle) struct drm_plane_state *new_plane_state; struct dm_plane_state *dm_new_plane_state; enum dc_connection_type new_connection_type = dc_connection_none; - int ret; int i; /* power on hardware */ @@ -903,13 +902,13 @@ static int dm_resume(void *handle) } } - ret = drm_atomic_helper_resume(ddev, dm->cached_state); + drm_atomic_helper_resume(ddev, dm->cached_state); dm->cached_state = NULL; amdgpu_dm_irq_resume_late(adev); - return ret; + return 0; } static const struct amd_ip_funcs amdgpu_dm_funcs = {