Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-01-18 07:53:27 +0100
committerJiri Slaby <jslaby@suse.cz>2019-01-18 07:53:40 +0100
commiteb716db3eaa06bf55fa4abfbdafb3fc970bbb399 (patch)
treed7aee90589abeb2d25ab5484c1e1e1ffa66c43d8
parent3786f972b1c439c2cf40671fa922abdee14afb0d (diff)
drm/amdgpu: Don't fail resume process if resuming atomic state
fails (bnc#1012628).
-rw-r--r--patches.kernel.org/4.20.3-045-drm-amdgpu-Don-t-fail-resume-process-if-resumi.patch77
-rw-r--r--series.conf1
2 files changed, 78 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.3-045-drm-amdgpu-Don-t-fail-resume-process-if-resumi.patch b/patches.kernel.org/4.20.3-045-drm-amdgpu-Don-t-fail-resume-process-if-resumi.patch
new file mode 100644
index 0000000000..90d5f36ff2
--- /dev/null
+++ b/patches.kernel.org/4.20.3-045-drm-amdgpu-Don-t-fail-resume-process-if-resumi.patch
@@ -0,0 +1,77 @@
+From: Lyude Paul <lyude@redhat.com>
+Date: Tue, 8 Jan 2019 16:11:28 -0500
+Subject: [PATCH] drm/amdgpu: Don't fail resume process if resuming atomic
+ state fails
+References: bnc#1012628
+Patch-mainline: 4.20.3
+Git-commit: 2d1af6a11cb9d88e0e3dd10258904c437fe1b315
+
+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 <lyude@redhat.com>
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Cc: Jerry Zuo <Jerry.Zuo@amd.com>
+Cc: <stable@vger.kernel.org> # v4.15+
+Link: https://patchwork.freedesktop.org/patch/msgid/20190108211133.32564-3-lyude@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+index 6677f5e6c79b..3118ae0e7a87 100644
+--- 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 = {
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index e7146fce0c..a6790beaac 100644
--- a/series.conf
+++ b/series.conf
@@ -282,6 +282,7 @@
patches.kernel.org/4.20.3-042-drm-fb-helper-Partially-bring-back-workaround-.patch
patches.kernel.org/4.20.3-043-drm-i915-Unwind-failure-on-pinning-the-gen7-pp.patch
patches.kernel.org/4.20.3-044-drm-amdgpu-Don-t-ignore-rc-from-drm_dp_mst_top.patch
+ patches.kernel.org/4.20.3-045-drm-amdgpu-Don-t-fail-resume-process-if-resumi.patch
########################################################
# Build fixes that apply to the vanilla kernel too.