From 7fd3a90536107ec20e81008d5bcfb4e018cb4807 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 11 Dec 2012 10:34:31 -0800 Subject: [PATCH] 3.4-stable patches added patches: asoc-dmaengine-correct-makefile-when-sound-is-built-as-module.patch drm-i915-do-not-default-to-18-bpp-for-edp-if-missing-from-vbt.patch drm-i915-do-not-ignore-edp-bpc-settings-from-vbt.patch workqueue-convert-bug_on-s-in-__queue_delayed_work-to-warn_on_once-s.patch --- ...kefile-when-sound-is-built-as-module.patch | 35 +++++++++ ...o-18-bpp-for-edp-if-missing-from-vbt.patch | 78 +++++++++++++++++++ ...not-ignore-edp-bpc-settings-from-vbt.patch | 52 +++++++++++++ queue-3.4/series | 4 + ...queue_delayed_work-to-warn_on_once-s.patch | 47 +++++++++++ 5 files changed, 216 insertions(+) create mode 100644 queue-3.4/asoc-dmaengine-correct-makefile-when-sound-is-built-as-module.patch create mode 100644 queue-3.4/drm-i915-do-not-default-to-18-bpp-for-edp-if-missing-from-vbt.patch create mode 100644 queue-3.4/drm-i915-do-not-ignore-edp-bpc-settings-from-vbt.patch create mode 100644 queue-3.4/workqueue-convert-bug_on-s-in-__queue_delayed_work-to-warn_on_once-s.patch diff --git a/queue-3.4/asoc-dmaengine-correct-makefile-when-sound-is-built-as-module.patch b/queue-3.4/asoc-dmaengine-correct-makefile-when-sound-is-built-as-module.patch new file mode 100644 index 00000000000..49cedece6e2 --- /dev/null +++ b/queue-3.4/asoc-dmaengine-correct-makefile-when-sound-is-built-as-module.patch @@ -0,0 +1,35 @@ +From 961a7aeafab477f63d9eef26afde9cbb8badcd0f Mon Sep 17 00:00:00 2001 +From: Peter Ujfalusi +Date: Mon, 1 Oct 2012 12:29:26 +0300 +Subject: ASoC: dmaengine: Correct Makefile when sound is built as module + +From: Peter Ujfalusi + +commit 961a7aeafab477f63d9eef26afde9cbb8badcd0f upstream. + +soc-dmaengine-pcm library need to be part of the snd-soc-core in order to +be able to compile ASoC as modules when dmaengine is enabled on the platform. + +Signed-off-by: Peter Ujfalusi +Signed-off-by: Mark Brown +Cc: Florian Fainelli +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/Makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/sound/soc/Makefile ++++ b/sound/soc/Makefile +@@ -1,8 +1,9 @@ + snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o + snd-soc-core-objs += soc-pcm.o soc-io.o + +-snd-soc-dmaengine-pcm-objs := soc-dmaengine-pcm.o +-obj-$(CONFIG_SND_SOC_DMAENGINE_PCM) += snd-soc-dmaengine-pcm.o ++ifneq ($(CONFIG_SND_SOC_DMAENGINE_PCM),) ++snd-soc-core-objs += soc-dmaengine-pcm.o ++endif + + obj-$(CONFIG_SND_SOC) += snd-soc-core.o + obj-$(CONFIG_SND_SOC) += codecs/ diff --git a/queue-3.4/drm-i915-do-not-default-to-18-bpp-for-edp-if-missing-from-vbt.patch b/queue-3.4/drm-i915-do-not-default-to-18-bpp-for-edp-if-missing-from-vbt.patch new file mode 100644 index 00000000000..aa0e2f4c197 --- /dev/null +++ b/queue-3.4/drm-i915-do-not-default-to-18-bpp-for-edp-if-missing-from-vbt.patch @@ -0,0 +1,78 @@ +From 9a30a61f3516871c5c638fd7c025fbaa11ddf7fe Mon Sep 17 00:00:00 2001 +From: Jani Nikula +Date: Mon, 12 Nov 2012 14:33:45 +0200 +Subject: drm/i915: do not default to 18 bpp for eDP if missing from VBT + +From: Jani Nikula + +commit 9a30a61f3516871c5c638fd7c025fbaa11ddf7fe upstream. + +commit 500a8cc466a24e2fbc4c86ef9c6467ae2ffdeb0c +Author: Zhenyu Wang +Date: Wed Jan 13 11:19:52 2010 +0800 + + drm/i915: parse eDP panel color depth from VBT block + +originally introduced parsing bpp for eDP from VBT, with a default of 18 +bpp if the eDP BIOS data block is not present. Turns out that default seems +to break the Macbook Pro with retina display, as noted in + +commit 4344b813f105a19f793f1fd93ad775b784648b95 +Author: Daniel Vetter +Date: Fri Aug 10 11:10:20 2012 +0200 + + drm/i915: ignore eDP bpc settings from vbt + +Since we can't ignore bpc settings from VBT completely after all, get rid +of the default. Do not clamp eDP to 18 bpp by default if the eDP BDB is +missing from VBT. + +Signed-off-by: Jani Nikula +Tested-by: Henrik Rydberg +[danvet: paste in the updated commit message from irc.] +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_bios.c | 11 ++--------- + drivers/gpu/drm/i915/intel_display.c | 2 +- + 2 files changed, 3 insertions(+), 10 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_bios.c ++++ b/drivers/gpu/drm/i915/intel_bios.c +@@ -459,12 +459,8 @@ parse_edp(struct drm_i915_private *dev_p + + edp = find_section(bdb, BDB_EDP); + if (!edp) { +- if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp.support) { +- DRM_DEBUG_KMS("No eDP BDB found but eDP panel " +- "supported, assume %dbpp panel color " +- "depth.\n", +- dev_priv->edp.bpp); +- } ++ if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp.support) ++ DRM_DEBUG_KMS("No eDP BDB found but eDP panel supported.\n"); + return; + } + +@@ -617,9 +613,6 @@ init_vbt_defaults(struct drm_i915_privat + dev_priv->lvds_use_ssc = 1; + dev_priv->lvds_ssc_freq = intel_bios_ssc_frequency(dev, 1); + DRM_DEBUG_KMS("Set default to SSC at %dMHz\n", dev_priv->lvds_ssc_freq); +- +- /* eDP data */ +- dev_priv->edp.bpp = 18; + } + + static int __init intel_no_opregion_vbt_callback(const struct dmi_system_id *id) +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -5000,7 +5000,7 @@ static bool intel_choose_pipe_bpp_dither + /* Use VBT settings if we have an eDP panel */ + unsigned int edp_bpc = dev_priv->edp.bpp / 3; + +- if (edp_bpc < display_bpc) { ++ if (edp_bpc && edp_bpc < display_bpc) { + DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n", display_bpc, edp_bpc); + display_bpc = edp_bpc; + } diff --git a/queue-3.4/drm-i915-do-not-ignore-edp-bpc-settings-from-vbt.patch b/queue-3.4/drm-i915-do-not-ignore-edp-bpc-settings-from-vbt.patch new file mode 100644 index 00000000000..1be7063ca67 --- /dev/null +++ b/queue-3.4/drm-i915-do-not-ignore-edp-bpc-settings-from-vbt.patch @@ -0,0 +1,52 @@ +From 2f4f649a69a9eb51f6e98130e19dd90a260a4145 Mon Sep 17 00:00:00 2001 +From: Jani Nikula +Date: Mon, 12 Nov 2012 14:33:44 +0200 +Subject: drm/i915: do not ignore eDP bpc settings from vbt + +From: Jani Nikula + +commit 2f4f649a69a9eb51f6e98130e19dd90a260a4145 upstream. + +There are laptops out there that need the eDP bpc from VBT. This is +effectively a revert of + +commit 4344b813f105a19f793f1fd93ad775b784648b95 +Author: Daniel Vetter +Date: Fri Aug 10 11:10:20 2012 +0200 + + drm/i915: ignore eDP bpc settings from vbt + +but putting the VBT check after the EDID check to see them both in dmesg if +this clamps more than the EDID. We have enough history with bpc clamping to +warrant the extra debug info. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47641 +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56401 +Signed-off-by: Jani Nikula +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_display.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -4996,6 +4996,17 @@ static bool intel_choose_pipe_bpp_dither + } + } + ++ if (intel_encoder->type == INTEL_OUTPUT_EDP) { ++ /* Use VBT settings if we have an eDP panel */ ++ unsigned int edp_bpc = dev_priv->edp.bpp / 3; ++ ++ if (edp_bpc < display_bpc) { ++ DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n", display_bpc, edp_bpc); ++ display_bpc = edp_bpc; ++ } ++ continue; ++ } ++ + /* + * HDMI is either 12 or 8, so if the display lets 10bpc sneak + * through, clamp it down. (Note: >12bpc will be caught below.) diff --git a/queue-3.4/series b/queue-3.4/series index e801151af36..149c3460feb 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -2,3 +2,7 @@ tmpfs-fix-shared-mempolicy-leak.patch revert-misapplied-mmc-sh-mmcif-avoid-oops-on-spurious-interrupts.patch mmc-sh-mmcif-avoid-oops-on-spurious-interrupts-second-try.patch arm-7566-1-vfp-fix-save-and-restore-when-running-on-pre-vfpv3-and-config_vfpv3-set.patch +asoc-dmaengine-correct-makefile-when-sound-is-built-as-module.patch +workqueue-convert-bug_on-s-in-__queue_delayed_work-to-warn_on_once-s.patch +drm-i915-do-not-ignore-edp-bpc-settings-from-vbt.patch +drm-i915-do-not-default-to-18-bpp-for-edp-if-missing-from-vbt.patch diff --git a/queue-3.4/workqueue-convert-bug_on-s-in-__queue_delayed_work-to-warn_on_once-s.patch b/queue-3.4/workqueue-convert-bug_on-s-in-__queue_delayed_work-to-warn_on_once-s.patch new file mode 100644 index 00000000000..abc5f2cfd7e --- /dev/null +++ b/queue-3.4/workqueue-convert-bug_on-s-in-__queue_delayed_work-to-warn_on_once-s.patch @@ -0,0 +1,47 @@ +From fc4b514f2727f74a4587c31db87e0e93465518c3 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Tue, 4 Dec 2012 07:40:39 -0800 +Subject: workqueue: convert BUG_ON()s in __queue_delayed_work() to WARN_ON_ONCE()s + +From: Tejun Heo + +commit fc4b514f2727f74a4587c31db87e0e93465518c3 upstream. + +8852aac25e ("workqueue: mod_delayed_work_on() shouldn't queue timer on +0 delay") unexpectedly uncovered a very nasty abuse of delayed_work in +megaraid - it allocated work_struct, casted it to delayed_work and +then pass that into queue_delayed_work(). + +Previously, this was okay because 0 @delay short-circuited to +queue_work() before doing anything with delayed_work. 8852aac25e +moved 0 @delay test into __queue_delayed_work() after sanity check on +delayed_work making megaraid trigger BUG_ON(). + +Although megaraid is already fixed by c1d390d8e6 ("megaraid: fix +BUG_ON() from incorrect use of delayed work"), this patch converts +BUG_ON()s in __queue_delayed_work() to WARN_ON_ONCE()s so that such +abusers, if there are more, trigger warning but don't crash the +machine. + +Signed-off-by: Tejun Heo +Cc: Xiaotian Feng +Signed-off-by: Shuah Khan +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/workqueue.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/kernel/workqueue.c ++++ b/kernel/workqueue.c +@@ -1141,8 +1141,8 @@ int queue_delayed_work_on(int cpu, struc + if (!test_and_set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work))) { + unsigned int lcpu; + +- BUG_ON(timer_pending(timer)); +- BUG_ON(!list_empty(&work->entry)); ++ WARN_ON_ONCE(timer_pending(timer)); ++ WARN_ON_ONCE(!list_empty(&work->entry)); + + timer_stats_timer_set_start_info(&dwork->timer); + -- 2.47.3