From 40e5f7a6dfce05f7f1988d94070d7e85a1ba9529 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 2 Oct 2014 13:48:16 -0700 Subject: [PATCH] 3.10-stable patches added patches: drm-ast-ast2000-cannot-be-detected-correctly.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 --- ...ast2000-cannot-be-detected-correctly.patch | 31 ++++++++ ...__init-annotation-from-dmi-callbacks.patch | 78 +++++++++++++++++++ ...blank-before-enabling-the-tv-encoder.patch | 57 ++++++++++++++ ...-infinite-spin-waiting-for-fifo-idle.patch | 35 +++++++++ queue-3.10/series | 4 + 5 files changed, 205 insertions(+) create mode 100644 queue-3.10/drm-ast-ast2000-cannot-be-detected-correctly.patch create mode 100644 queue-3.10/drm-i915-remove-bogus-__init-annotation-from-dmi-callbacks.patch create mode 100644 queue-3.10/drm-i915-wait-for-vblank-before-enabling-the-tv-encoder.patch create mode 100644 queue-3.10/drm-vmwgfx-fix-a-potential-infinite-spin-waiting-for-fifo-idle.patch diff --git a/queue-3.10/drm-ast-ast2000-cannot-be-detected-correctly.patch b/queue-3.10/drm-ast-ast2000-cannot-be-detected-correctly.patch new file mode 100644 index 00000000000..7e6dcc179c7 --- /dev/null +++ b/queue-3.10/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.10/drm-i915-remove-bogus-__init-annotation-from-dmi-callbacks.patch b/queue-3.10/drm-i915-remove-bogus-__init-annotation-from-dmi-callbacks.patch new file mode 100644 index 00000000000..78d670fe2a0 --- /dev/null +++ b/queue-3.10/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 +@@ -657,7 +657,7 @@ init_vbt_defaults(struct drm_i915_privat + DRM_DEBUG_KMS("Set default to SSC at %dMHz\n", dev_priv->lvds_ssc_freq); + } + +-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 +@@ -702,7 +702,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 +@@ -694,7 +694,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.10/drm-i915-wait-for-vblank-before-enabling-the-tv-encoder.patch b/queue-3.10/drm-i915-wait-for-vblank-before-enabling-the-tv-encoder.patch new file mode 100644 index 00000000000..804e553ef38 --- /dev/null +++ b/queue-3.10/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 +@@ -856,6 +856,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.10/drm-vmwgfx-fix-a-potential-infinite-spin-waiting-for-fifo-idle.patch b/queue-3.10/drm-vmwgfx-fix-a-potential-infinite-spin-waiting-for-fifo-idle.patch new file mode 100644 index 00000000000..4a2c32de246 --- /dev/null +++ b/queue-3.10/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 +@@ -163,8 +163,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.10/series b/queue-3.10/series index d5329d375a8..5a00031742c 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -26,3 +26,7 @@ cfq-iosched-fix-wrong-children_weight-calculation.patch 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 +drm-i915-remove-bogus-__init-annotation-from-dmi-callbacks.patch +drm-i915-wait-for-vblank-before-enabling-the-tv-encoder.patch +drm-ast-ast2000-cannot-be-detected-correctly.patch +drm-vmwgfx-fix-a-potential-infinite-spin-waiting-for-fifo-idle.patch -- 2.47.3