aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/4690-drm-amd-display-Fix-BUG_ON-during-CRTC-atomic-check-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/4690-drm-amd-display-Fix-BUG_ON-during-CRTC-atomic-check-.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/4690-drm-amd-display-Fix-BUG_ON-during-CRTC-atomic-check-.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/4690-drm-amd-display-Fix-BUG_ON-during-CRTC-atomic-check-.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/4690-drm-amd-display-Fix-BUG_ON-during-CRTC-atomic-check-.patch
new file mode 100644
index 00000000..30e39e7a
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/4690-drm-amd-display-Fix-BUG_ON-during-CRTC-atomic-check-.patch
@@ -0,0 +1,59 @@
+From d4a93ea98ebb07a999f566769682a9647b18ff59 Mon Sep 17 00:00:00 2001
+From: "Leo (Sunpeng) Li" <sunpeng.li@amd.com>
+Date: Tue, 29 May 2018 09:51:51 -0400
+Subject: [PATCH 4690/5725] drm/amd/display: Fix BUG_ON during CRTC atomic
+ check update
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For cases where the CRTC is inactive (DPMS off), where a modeset is not
+required, yet the CRTC is still in the atomic state, we should not
+attempt to update anything on it.
+
+Previously, we were relying on the modereset_required() helper to check
+the above condition. However, the function returns false immediately if
+a modeset is not required, ignoring the CRTC's enable/active state
+flags. The correct way to filter is by looking at these flags instead.
+
+Fixes: e277adc5a06c "drm/amd/display: Hookup color management functions"
+Bugzilla: https://bugs.freedesktop.org/106194
+
+Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Tested-by: Michel Dänzer <michel.daenzer@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 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 3448aa0..8fbe483 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -5091,15 +5091,16 @@ static int dm_update_crtcs_state(struct amdgpu_display_manager *dm,
+ * We want to do dc stream updates that do not require a
+ * full modeset below.
+ */
+- if (!enable || !aconnector || modereset_required(new_crtc_state))
++ if (!(enable && aconnector && new_crtc_state->enable &&
++ new_crtc_state->active))
+ continue;
+ /*
+ * Given above conditions, the dc state cannot be NULL because:
+- * 1. We're attempting to enable a CRTC. Which has a...
+- * 2. Valid connector attached, and
+- * 3. User does not want to reset it (disable or mark inactive,
+- * which can happen on a CRTC that's already disabled).
+- * => It currently exists.
++ * 1. We're in the process of enabling CRTCs (just been added
++ * to the dc context, or already is on the context)
++ * 2. Has a valid connector attached, and
++ * 3. Is currently active and enabled.
++ * => The dc stream state currently exists.
+ */
+ BUG_ON(dm_new_crtc_state->stream == NULL);
+
+--
+2.7.4
+