From: Greg Kroah-Hartman Date: Wed, 28 Nov 2018 11:17:51 +0000 (+0100) Subject: drop broken 4.14 drm patch X-Git-Tag: v4.19.6~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4b7bc717da333a00abca0a9faa9ab897d1dfba7;p=thirdparty%2Fkernel%2Fstable-queue.git drop broken 4.14 drm patch --- diff --git a/queue-4.14/drm-i915-disable-lp3-watermarks-on-all-snb-machines.patch b/queue-4.14/drm-i915-disable-lp3-watermarks-on-all-snb-machines.patch deleted file mode 100644 index 6f2c9da069e..00000000000 --- a/queue-4.14/drm-i915-disable-lp3-watermarks-on-all-snb-machines.patch +++ /dev/null @@ -1,137 +0,0 @@ -From 21556350ade3cb5d7afecc8b3544e56431d21695 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= -Date: Wed, 14 Nov 2018 19:34:40 +0200 -Subject: drm/i915: Disable LP3 watermarks on all SNB machines -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Ville Syrjälä - -commit 21556350ade3cb5d7afecc8b3544e56431d21695 upstream. - -I have a Thinkpad X220 Tablet in my hands that is losing vblank -interrupts whenever LP3 watermarks are used. - -If I nudge the latency value written to the WM3 register just -by one in either direction the problem disappears. That to me -suggests that the punit will not enter the corrsponding -powersave mode (MPLL shutdown IIRC) unless the latency value -in the register matches exactly what we read from SSKPD. Ie. -it's not really a latency value but rather just a cookie -by which the punit can identify the desired power saving state. -On HSW/BDW this was changed such that we actually just write -the WM level number into those bits, which makes much more -sense given the observed behaviour. - -We could try to handle this by disallowing LP3 watermarks -only when vblank interrupts are enabled but we'd first have -to prove that only vblank interrupts are affected, which -seems unlikely. Also we can't grab the wm mutex from the -vblank enable/disable hooks because those are called with -various spinlocks held. Thus we'd have to redesigne the -watermark locking. So to play it safe and keep the code -simple we simply disable LP3 watermarks on all SNB machines. - -To do that we simply zero out the latency values for -watermark level 3, and we adjust the watermark computation -to check for that. The behaviour now matches that of the -g4x/vlv/skl wm code in the presence of a zeroed latency -value. - -v2: s/USHRT_MAX/U32_MAX/ for consistency with the types (Chris) - -Cc: stable@vger.kernel.org -Cc: Chris Wilson -Acked-by: Chris Wilson -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101269 -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103713 -Signed-off-by: Ville Syrjälä -Link: https://patchwork.freedesktop.org/patch/msgid/20181114173440.6730-1-ville.syrjala@linux.intel.com -(cherry picked from commit 03981c6ebec4fc7056b9b45f847393aeac90d060) -Signed-off-by: Joonas Lahtinen -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/gpu/drm/i915/intel_pm.c | 41 +++++++++++++++++++++++++++++++++++++++- - 1 file changed, 40 insertions(+), 1 deletion(-) - ---- a/drivers/gpu/drm/i915/intel_pm.c -+++ b/drivers/gpu/drm/i915/intel_pm.c -@@ -2500,6 +2500,9 @@ static uint32_t ilk_compute_spr_wm(const - uint32_t method1, method2; - int cpp; - -+ if (mem_value == 0) -+ return U32_MAX; -+ - if (!intel_wm_plane_visible(cstate, pstate)) - return 0; - -@@ -2523,6 +2526,9 @@ static uint32_t ilk_compute_cur_wm(const - { - int cpp; - -+ if (mem_value == 0) -+ return U32_MAX; -+ - if (!intel_wm_plane_visible(cstate, pstate)) - return 0; - -@@ -2540,6 +2546,9 @@ static uint32_t ilk_compute_fbc_wm(const - { - int cpp; - -+ if (mem_value == 0) -+ return U32_MAX; -+ - if (!intel_wm_plane_visible(cstate, pstate)) - return 0; - -@@ -2981,6 +2990,34 @@ static void snb_wm_latency_quirk(struct - intel_print_wm_latency(dev_priv, "Cursor", dev_priv->wm.cur_latency); - } - -+static void snb_wm_lp3_irq_quirk(struct drm_i915_private *dev_priv) -+{ -+ /* -+ * On some SNB machines (Thinkpad X220 Tablet at least) -+ * LP3 usage can cause vblank interrupts to be lost. -+ * The DEIIR bit will go high but it looks like the CPU -+ * never gets interrupted. -+ * -+ * It's not clear whether other interrupt source could -+ * be affected or if this is somehow limited to vblank -+ * interrupts only. To play it safe we disable LP3 -+ * watermarks entirely. -+ */ -+ if (dev_priv->wm.pri_latency[3] == 0 && -+ dev_priv->wm.spr_latency[3] == 0 && -+ dev_priv->wm.cur_latency[3] == 0) -+ return; -+ -+ dev_priv->wm.pri_latency[3] = 0; -+ dev_priv->wm.spr_latency[3] = 0; -+ dev_priv->wm.cur_latency[3] = 0; -+ -+ DRM_DEBUG_KMS("LP3 watermarks disabled due to potential for lost interrupts\n"); -+ intel_print_wm_latency(dev_priv, "Primary", dev_priv->wm.pri_latency); -+ intel_print_wm_latency(dev_priv, "Sprite", dev_priv->wm.spr_latency); -+ intel_print_wm_latency(dev_priv, "Cursor", dev_priv->wm.cur_latency); -+} -+ - static void ilk_setup_wm_latency(struct drm_i915_private *dev_priv) - { - intel_read_wm_latency(dev_priv, dev_priv->wm.pri_latency); -@@ -2997,8 +3034,10 @@ static void ilk_setup_wm_latency(struct - intel_print_wm_latency(dev_priv, "Sprite", dev_priv->wm.spr_latency); - intel_print_wm_latency(dev_priv, "Cursor", dev_priv->wm.cur_latency); - -- if (IS_GEN6(dev_priv)) -+ if (IS_GEN6(dev_priv)) { - snb_wm_latency_quirk(dev_priv); -+ snb_wm_lp3_irq_quirk(dev_priv); -+ } - } - - static void skl_setup_wm_latency(struct drm_i915_private *dev_priv) diff --git a/queue-4.14/series b/queue-4.14/series index b47dde703ae..6a230767794 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -28,7 +28,6 @@ llc-do-not-use-sk_eat_skb.patch mm-don-t-warn-about-large-allocations-for-slab.patch mm-memory.c-recheck-page-table-entry-with-page-table-lock-held.patch tcp-do-not-release-socket-ownership-in-tcp_close.patch -drm-i915-disable-lp3-watermarks-on-all-snb-machines.patch drm-ast-change-resolution-may-cause-screen-blurred.patch drm-ast-fixed-cursor-may-disappear-sometimes.patch drm-ast-remove-existing-framebuffers-before-loading-driver.patch