From: Greg Kroah-Hartman Date: Thu, 2 Oct 2014 20:48:21 +0000 (-0700) Subject: 3.14-stable patches X-Git-Tag: v3.16.4~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=733bdb17436efa11a37527a00a6ecbf95f3863e9;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: drm-ast-ast2000-cannot-be-detected-correctly.patch drm-i915-fix-eio-wedged-handling-in-gem-fault-handler.patch drm-i915-remove-bogus-__init-annotation-from-dmi-callbacks.patch drm-i915-wait-for-vblank-before-enabling-the-tv-encoder.patch drm-vmwgfx-fix-a-potential-infinite-spin-waiting-for-fifo-idle.patch imx-drm-ipuv3-plane-fix-ipu_plane_dpms.patch --- diff --git a/queue-3.14/drm-ast-ast2000-cannot-be-detected-correctly.patch b/queue-3.14/drm-ast-ast2000-cannot-be-detected-correctly.patch new file mode 100644 index 00000000000..7e6dcc179c7 --- /dev/null +++ b/queue-3.14/drm-ast-ast2000-cannot-be-detected-correctly.patch @@ -0,0 +1,31 @@ +From 83502a5d34386f7c6973bc70e1c423f55f5a2e3a Mon Sep 17 00:00:00 2001 +From: "Y.C. Chen" +Date: Wed, 10 Sep 2014 12:07:54 +0800 +Subject: drm/ast: AST2000 cannot be detected correctly + +From: "Y.C. Chen" + +commit 83502a5d34386f7c6973bc70e1c423f55f5a2e3a upstream. + +Type error and cause AST2000 cannot be detected correctly + +Signed-off-by: Y.C. Chen +Reviewed-by: Egbert Eich +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/ast/ast_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/ast/ast_main.c ++++ b/drivers/gpu/drm/ast/ast_main.c +@@ -100,7 +100,7 @@ static int ast_detect_chip(struct drm_de + } + ast->vga2_clone = false; + } else { +- ast->chip = 2000; ++ ast->chip = AST2000; + DRM_INFO("AST 2000 detected\n"); + } + } diff --git a/queue-3.14/drm-i915-fix-eio-wedged-handling-in-gem-fault-handler.patch b/queue-3.14/drm-i915-fix-eio-wedged-handling-in-gem-fault-handler.patch new file mode 100644 index 00000000000..5316afa5894 --- /dev/null +++ b/queue-3.14/drm-i915-fix-eio-wedged-handling-in-gem-fault-handler.patch @@ -0,0 +1,61 @@ +From 2232f0315c6688f5ff6b2067ea88d97542034873 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Thu, 4 Sep 2014 09:36:18 +0200 +Subject: drm/i915: Fix EIO/wedged handling in gem fault handler + +From: Daniel Vetter + +commit 2232f0315c6688f5ff6b2067ea88d97542034873 upstream. + +In + +commit 1f83fee08d625f8d0130f9fe5ef7b17c2e022f3c +Author: Daniel Vetter +Date: Thu Nov 15 17:17:22 2012 +0100 + + drm/i915: clear up wedged transitions + +I've accidentally inverted the EIO/wedged handling in the fault +handler: We want to return the EIO as a SIGBUS only if it's not +because of the gpu having died, to prevent userspace from unduly +dying. + +In my defence the comment right above is completely misleading, so fix +both. + +v2: Drop the WARN_ON, it's not actually a bug to e.g. receive an -EIO +when swap-in fails. + +v3: Don't remove too much ... oops. + +Reported-by: Chris Wilson +Cc: Chris Wilson +Signed-off-by: Daniel Vetter +Reviewed-by: Chris Wilson +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_gem.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -1426,10 +1426,13 @@ unlock: + out: + switch (ret) { + case -EIO: +- /* If this -EIO is due to a gpu hang, give the reset code a +- * chance to clean up the mess. Otherwise return the proper +- * SIGBUS. */ +- if (i915_terminally_wedged(&dev_priv->gpu_error)) { ++ /* ++ * We eat errors when the gpu is terminally wedged to avoid ++ * userspace unduly crashing (gl has no provisions for mmaps to ++ * fail). But any other -EIO isn't ours (e.g. swap in failure) ++ * and so needs to be reported. ++ */ ++ if (!i915_terminally_wedged(&dev_priv->gpu_error)) { + ret = VM_FAULT_SIGBUS; + break; + } diff --git a/queue-3.14/drm-i915-remove-bogus-__init-annotation-from-dmi-callbacks.patch b/queue-3.14/drm-i915-remove-bogus-__init-annotation-from-dmi-callbacks.patch new file mode 100644 index 00000000000..be06235df8f --- /dev/null +++ b/queue-3.14/drm-i915-remove-bogus-__init-annotation-from-dmi-callbacks.patch @@ -0,0 +1,78 @@ +From bbe1c2740d3a25aa1dbe5d842d2ff09cddcdde0a Mon Sep 17 00:00:00 2001 +From: Mathias Krause +Date: Wed, 27 Aug 2014 18:41:19 +0200 +Subject: drm/i915: Remove bogus __init annotation from DMI callbacks + +From: Mathias Krause + +commit bbe1c2740d3a25aa1dbe5d842d2ff09cddcdde0a upstream. + +The __init annotations for the DMI callback functions are wrong as this +code can be called even after the module has been initialized, e.g. like +this: + + # echo 1 > /sys/bus/pci/devices/0000:00:02.0/remove + # modprobe i915 + # echo 1 > /sys/bus/pci/rescan + +The first command will remove the PCI device from the kernel's device +list so the second command won't see it right away. But as it registers +a PCI driver it'll see it on the third command. If the system happens to +match one of the DMI table entries we'll try to call a function in long +released memory and generate an Oops, at best. + +Fix this by removing the bogus annotation. + +Modpost should have caught that one but it ignores section reference +mismatches from the .rodata section. :/ + +Fixes: 25e341cfc33d ("drm/i915: quirk away broken OpRegion VBT") +Fixes: 8ca4013d702d ("CHROMIUM: i915: Add DMI override to skip CRT...") +Fixes: 425d244c8670 ("drm/i915: ignore LVDS on intel graphics systems...") +Signed-off-by: Mathias Krause +Cc: Daniel Vetter +Cc: Duncan Laurie +Cc: Jarod Wilson +Cc: Rusty Russell # Can modpost be fixed? +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_bios.c | 2 +- + drivers/gpu/drm/i915/intel_crt.c | 2 +- + drivers/gpu/drm/i915/intel_lvds.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_bios.c ++++ b/drivers/gpu/drm/i915/intel_bios.c +@@ -839,7 +839,7 @@ init_vbt_defaults(struct drm_i915_privat + } + } + +-static int __init intel_no_opregion_vbt_callback(const struct dmi_system_id *id) ++static int intel_no_opregion_vbt_callback(const struct dmi_system_id *id) + { + DRM_DEBUG_KMS("Falling back to manually reading VBT from " + "VBIOS ROM for %s\n", +--- a/drivers/gpu/drm/i915/intel_crt.c ++++ b/drivers/gpu/drm/i915/intel_crt.c +@@ -750,7 +750,7 @@ static const struct drm_encoder_funcs in + .destroy = intel_encoder_destroy, + }; + +-static int __init intel_no_crt_dmi_callback(const struct dmi_system_id *id) ++static int intel_no_crt_dmi_callback(const struct dmi_system_id *id) + { + DRM_INFO("Skipping CRT initialization for %s\n", id->ident); + return 1; +--- a/drivers/gpu/drm/i915/intel_lvds.c ++++ b/drivers/gpu/drm/i915/intel_lvds.c +@@ -544,7 +544,7 @@ static const struct drm_encoder_funcs in + .destroy = intel_encoder_destroy, + }; + +-static int __init intel_no_lvds_dmi_callback(const struct dmi_system_id *id) ++static int intel_no_lvds_dmi_callback(const struct dmi_system_id *id) + { + DRM_INFO("Skipping LVDS initialization for %s\n", id->ident); + return 1; diff --git a/queue-3.14/drm-i915-wait-for-vblank-before-enabling-the-tv-encoder.patch b/queue-3.14/drm-i915-wait-for-vblank-before-enabling-the-tv-encoder.patch new file mode 100644 index 00000000000..7e7ea1e3c26 --- /dev/null +++ b/queue-3.14/drm-i915-wait-for-vblank-before-enabling-the-tv-encoder.patch @@ -0,0 +1,57 @@ +From 7a98948f3b536ca9a077e84966ddc0e9f53726df Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= +Date: Mon, 8 Sep 2014 17:43:01 +0300 +Subject: drm/i915: Wait for vblank before enabling the TV encoder +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= + +commit 7a98948f3b536ca9a077e84966ddc0e9f53726df upstream. + +The vblank waits in intel_tv_detect_type() are timing out for some +reason. This is a regression caused removing seemingly useless vblank +waits from the modeset seqeuence in: + + commit 56ef52cad5e37fca89638e4bad598a994ecc3d9f + Author: Ville Syrjälä + Date: Thu May 8 19:23:15 2014 +0300 + + drm/i915: Kill vblank waits after pipe enable on gmch platforms + +So it turns out they weren't all entirely useless. Apparently the pipe +has to go through one full frame before we enable the TV port. Add a +vblank wait to intel_enable_tv() to make sure that happens. + +Another approach was attempted by placing the vblank wait just after +enabling the port. The theory behind that attempt was that we need to +let the port stay enabled for one full frame before disabling it again +during load detection. But that didn't work, and we definitely must +have the vblank wait before enabling the port. + +Cc: Alan Bartlett +Tested-by: Alan Bartlett +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79311 +Signed-off-by: Ville Syrjälä +Reviewed-by: Daniel Vetter +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_tv.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_tv.c ++++ b/drivers/gpu/drm/i915/intel_tv.c +@@ -854,6 +854,10 @@ intel_enable_tv(struct intel_encoder *en + struct drm_device *dev = encoder->base.dev; + struct drm_i915_private *dev_priv = dev->dev_private; + ++ /* Prevents vblank waits from timing out in intel_tv_detect_type() */ ++ intel_wait_for_vblank(encoder->base.dev, ++ to_intel_crtc(encoder->base.crtc)->pipe); ++ + I915_WRITE(TV_CTL, I915_READ(TV_CTL) | TV_ENC_ENABLE); + } + diff --git a/queue-3.14/drm-vmwgfx-fix-a-potential-infinite-spin-waiting-for-fifo-idle.patch b/queue-3.14/drm-vmwgfx-fix-a-potential-infinite-spin-waiting-for-fifo-idle.patch new file mode 100644 index 00000000000..f09fef682d9 --- /dev/null +++ b/queue-3.14/drm-vmwgfx-fix-a-potential-infinite-spin-waiting-for-fifo-idle.patch @@ -0,0 +1,35 @@ +From f01ea0c3d9db536c64d47922716d8b3b8f21d850 Mon Sep 17 00:00:00 2001 +From: Thomas Hellstrom +Date: Thu, 28 Aug 2014 11:53:23 +0200 +Subject: drm/vmwgfx: Fix a potential infinite spin waiting for fifo idle + +From: Thomas Hellstrom + +commit f01ea0c3d9db536c64d47922716d8b3b8f21d850 upstream. + +The code waiting for fifo idle was incorrect and could possibly spin +forever under certain circumstances. + +Signed-off-by: Thomas Hellstrom +Reported-by: Mark Sheldon +Reviewed-by: Jakob Bornecrantz +Reivewed-by: Mark Sheldon +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c +@@ -180,8 +180,9 @@ void vmw_fifo_release(struct vmw_private + + mutex_lock(&dev_priv->hw_mutex); + ++ vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC); + while (vmw_read(dev_priv, SVGA_REG_BUSY) != 0) +- vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC); ++ ; + + dev_priv->last_read_seqno = ioread32(fifo_mem + SVGA_FIFO_FENCE); + diff --git a/queue-3.14/imx-drm-ipuv3-plane-fix-ipu_plane_dpms.patch b/queue-3.14/imx-drm-ipuv3-plane-fix-ipu_plane_dpms.patch new file mode 100644 index 00000000000..86194f38c45 --- /dev/null +++ b/queue-3.14/imx-drm-ipuv3-plane-fix-ipu_plane_dpms.patch @@ -0,0 +1,65 @@ +From 3a44a2058747d71385eb69691c7f977cb58cc293 Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Mon, 1 Sep 2014 18:07:33 +0100 +Subject: imx-drm: ipuv3-plane: fix ipu_plane_dpms() + +From: Russell King + +commit 3a44a2058747d71385eb69691c7f977cb58cc293 upstream. + +When unbinding imx-drm, the following oops was observed: + +Unable to handle kernel NULL pointer dereference at virtual address 00000004 +pgd = e995c000 +[00000004] *pgd=4fea5831 +Internal error: Oops: 817 [#1] SMP ARM +Modules linked in: bnep rfcomm bluetooth nfsd exportfs hid_cypress brcmfmac brcmutil snd_soc_fsl_ssi snd_soc_fsl_spdif imx_pcm_fiq imx_pcm_dma snd_soc_sgtl5000 imx_sdma imx2_wdt imx_ldb(C) imx_thermal snd_soc_imx_sgtl5000 snd_soc_imx_spdif snd_soc_imx_audmux +CPU: 1 PID: 779 Comm: bash Tainted: G C 3.16.0-rc2+ #1230 +task: ea9eb180 ti: ea378000 task.ti: ea378000 +PC is at ipu_dp_put+0x10/0x18 +LR is at ipu_plane_dpms+0x60/0x8c +pc : [] lr : [] psr: 200f0013 +sp : ea379d80 ip : ea379d90 fp : ea379d8c +r10: 00100100 r9 : 00000000 r8 : 00200200 +r7 : e9ba0264 r6 : e9ba01f8 r5 : 00000000 r4 : ea34b800 +r3 : 00000000 r2 : 00000000 r1 : 0000009b r0 : 00000000 +Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user +Control: 10c53c7d Table: 3995c04a DAC: 00000015 +Process bash (pid: 779, stack limit = 0xea378240) +Stack: (0xea379d80 to 0xea37a000) +... +Backtrace: +[] (ipu_dp_put) from [] (ipu_plane_dpms+0x60/0x8c) +[] (ipu_plane_dpms) from [] (ipu_disable_plane+0x2c/0x60) +[] (ipu_disable_plane) from [] (ipu_plane_destroy+0x28/0x60) +[] (ipu_plane_destroy) from [] (drm_mode_config_cleanup+0x1b8/0x250) +[] (drm_mode_config_cleanup) from [] (imx_drm_driver_unload+0x44/0x4c) +[] (imx_drm_driver_unload) from [] (drm_dev_unregister+0x2c/0xa0) +[] (drm_dev_unregister) from [] (drm_put_dev+0x30/0x6c) +[] (drm_put_dev) from [] (imx_drm_unbind+0x14/0x18) +[] (imx_drm_unbind) from [] (component_master_del+0xbc/0xd8) +... +Code: e1a0c00d e92dd800 e24cb004 e3a03000 (e5c03004) + +This is caused by a missing check in ipu_plane_dpms for a NULL pointer. + +Fixes: b8d181e408af ("staging: drm/imx: add drm plane support") +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/imx-drm/ipuv3-plane.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/staging/imx-drm/ipuv3-plane.c ++++ b/drivers/staging/imx-drm/ipuv3-plane.c +@@ -277,7 +277,8 @@ static void ipu_plane_dpms(struct ipu_pl + + ipu_idmac_put(ipu_plane->ipu_ch); + ipu_dmfc_put(ipu_plane->dmfc); +- ipu_dp_put(ipu_plane->dp); ++ if (ipu_plane->dp) ++ ipu_dp_put(ipu_plane->dp); + } + } + diff --git a/queue-3.14/series b/queue-3.14/series index 8d219227fe4..8ab6c4b1704 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -48,3 +48,9 @@ hid-picolcd-sanity-check-report-size-in-raw_event-callback.patch hid-magicmouse-sanity-check-report-size-in-raw_event-callback.patch hid-logitech-dj-prevent-false-errors-to-be-shown.patch xattr-fix-check-for-simultaneous-glibc-header-inclusion.patch +drm-i915-remove-bogus-__init-annotation-from-dmi-callbacks.patch +drm-i915-fix-eio-wedged-handling-in-gem-fault-handler.patch +drm-i915-wait-for-vblank-before-enabling-the-tv-encoder.patch +drm-ast-ast2000-cannot-be-detected-correctly.patch +imx-drm-ipuv3-plane-fix-ipu_plane_dpms.patch +drm-vmwgfx-fix-a-potential-infinite-spin-waiting-for-fifo-idle.patch