Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-07-19 16:10:06 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-07-19 16:10:06 +0200
commit15980849ec18d7897a44cb69b06cb42260a6044f (patch)
tree1a5c7d025ce58a7b733b3b1e10333202805b07b3
parenta378127c532678fcab8cfa74c3bb0d233e73e4a8 (diff)
parent2cedb40cbb1a441baf677d7ad8cf42f0195af616 (diff)
Merge branch 'users/tiwai/SLE15-SP1/for-next' into SLE15-SP1
Pull alsa and drm fixes from Takashi Iwai
-rw-r--r--patches.drivers/ALSA-hda-Don-t-resume-forcibly-i915-HDMI-DP-codec.patch100
-rw-r--r--patches.drivers/ALSA-hda-hdmi-Fix-i915-reverse-port-pin-mapping.patch72
-rw-r--r--patches.drivers/ALSA-hda-hdmi-Remove-duplicated-define.patch34
-rw-r--r--patches.drm/drm-vc4-fix-fb-references-in-async-update.patch41
-rw-r--r--patches.kabi/hda-relaxed_resume-flag-kabi-fix.patch28
-rw-r--r--series.conf5
6 files changed, 280 insertions, 0 deletions
diff --git a/patches.drivers/ALSA-hda-Don-t-resume-forcibly-i915-HDMI-DP-codec.patch b/patches.drivers/ALSA-hda-Don-t-resume-forcibly-i915-HDMI-DP-codec.patch
new file mode 100644
index 0000000000..5e4031af3c
--- /dev/null
+++ b/patches.drivers/ALSA-hda-Don-t-resume-forcibly-i915-HDMI-DP-codec.patch
@@ -0,0 +1,100 @@
+From 4914da2fb0c89205790503f20dfdde854f3afdd8 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 16 Jul 2019 08:56:51 +0200
+Subject: [PATCH] ALSA: hda - Don't resume forcibly i915 HDMI/DP codec
+Git-commit: 4914da2fb0c89205790503f20dfdde854f3afdd8
+Patch-mainline: v5.3-rc1
+References: bsc#1111666
+
+We apply the codec resume forcibly at system resume callback for
+updating and syncing the jack detection state that may have changed
+during sleeping. This is, however, superfluous for the codec like
+Intel HDMI/DP, where the jack detection is managed via the audio
+component notification; i.e. the jack state change shall be reported
+sooner or later from the graphics side at mode change.
+
+This patch changes the codec resume callback to avoid the forcible
+resume conditionally with a new flag, codec->relaxed_resume, for
+reducing the resume time. The flag is set in the codec probe.
+
+Although this doesn't fix the entire bug mentioned in the bugzilla
+entry below, it's still a good optimization and some improvements are
+seen.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201901
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ include/sound/hda_codec.h | 2 ++
+ sound/pci/hda/hda_codec.c | 8 ++++++--
+ sound/pci/hda/patch_hdmi.c | 6 +++++-
+ 3 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h
+index 8f46ff3449d5..871993696c5f 100644
+--- a/include/sound/hda_codec.h
++++ b/include/sound/hda_codec.h
+@@ -252,6 +252,8 @@ struct hda_codec {
+ unsigned int auto_runtime_pm:1; /* enable automatic codec runtime pm */
+ unsigned int force_pin_prefix:1; /* Add location prefix */
+ unsigned int link_down_at_suspend:1; /* link down at runtime suspend */
++ unsigned int relaxed_resume:1; /* don't resume forcibly for jack */
++
+ #ifdef CONFIG_PM
+ unsigned long power_on_acct;
+ unsigned long power_off_acct;
+diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
+index 5346631df1ec..e30e86ca6b72 100644
+--- a/sound/pci/hda/hda_codec.c
++++ b/sound/pci/hda/hda_codec.c
+@@ -2941,15 +2941,19 @@ static int hda_codec_runtime_resume(struct device *dev)
+ #ifdef CONFIG_PM_SLEEP
+ static int hda_codec_force_resume(struct device *dev)
+ {
++ struct hda_codec *codec = dev_to_hda_codec(dev);
++ bool forced_resume = !codec->relaxed_resume;
+ int ret;
+
+ /* The get/put pair below enforces the runtime resume even if the
+ * device hasn't been used at suspend time. This trick is needed to
+ * update the jack state change during the sleep.
+ */
+- pm_runtime_get_noresume(dev);
++ if (forced_resume)
++ pm_runtime_get_noresume(dev);
+ ret = pm_runtime_force_resume(dev);
+- pm_runtime_put(dev);
++ if (forced_resume)
++ pm_runtime_put(dev);
+ return ret;
+ }
+
+diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
+index 0b2a26e2c5f1..bea7b0961080 100644
+--- a/sound/pci/hda/patch_hdmi.c
++++ b/sound/pci/hda/patch_hdmi.c
+@@ -2292,8 +2292,10 @@ static void generic_hdmi_free(struct hda_codec *codec)
+ struct hdmi_spec *spec = codec->spec;
+ int pin_idx, pcm_idx;
+
+- if (codec_has_acomp(codec))
++ if (codec_has_acomp(codec)) {
+ snd_hdac_acomp_register_notifier(&codec->bus->core, NULL);
++ codec->relaxed_resume = 0;
++ }
+
+ for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) {
+ struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);
+@@ -2579,6 +2581,8 @@ static void register_i915_notifier(struct hda_codec *codec)
+ spec->drm_audio_ops.pin_eld_notify = intel_pin_eld_notify;
+ snd_hdac_acomp_register_notifier(&codec->bus->core,
+ &spec->drm_audio_ops);
++ /* no need for forcible resume for jack check thanks to notifier */
++ codec->relaxed_resume = 1;
+ }
+
+ /* setup_stream ops override for HSW+ */
+--
+2.16.4
+
diff --git a/patches.drivers/ALSA-hda-hdmi-Fix-i915-reverse-port-pin-mapping.patch b/patches.drivers/ALSA-hda-hdmi-Fix-i915-reverse-port-pin-mapping.patch
new file mode 100644
index 0000000000..54a94cf485
--- /dev/null
+++ b/patches.drivers/ALSA-hda-hdmi-Fix-i915-reverse-port-pin-mapping.patch
@@ -0,0 +1,72 @@
+From 3140aafb22edeab0cc41f15f53b12a118c0ac215 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 15 Jul 2019 23:14:53 +0200
+Subject: [PATCH] ALSA: hda/hdmi - Fix i915 reverse port/pin mapping
+Git-commit: 3140aafb22edeab0cc41f15f53b12a118c0ac215
+Patch-mainline: v5.3-rc1
+References: bsc#1111666
+
+The recent fix for Icelake HDMI codec introduced the mapping from pin
+NID to the i915 gfx port number. However, it forgot the reverse
+mapping from the port number to the pin NID that is used in the ELD
+notifier callback. As a result, it's processed to a wrong widget and
+gives a warning like
+ snd_hda_codec_hdmi hdaudioC0D2: HDMI: pin nid 5 not registered
+
+This patch corrects it with a proper reverse mapping function.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204133
+Fixes: b0d8bc50b9f2 ("ALSA: hda: hdmi - add Icelake support")
+Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ sound/pci/hda/patch_hdmi.c | 24 +++++++++++++++++++-----
+ 1 file changed, 19 insertions(+), 5 deletions(-)
+
+diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
+index 1e6c489bca15..0b2a26e2c5f1 100644
+--- a/sound/pci/hda/patch_hdmi.c
++++ b/sound/pci/hda/patch_hdmi.c
+@@ -2524,18 +2524,32 @@ static int intel_pin2port(void *audio_ptr, int pin_nid)
+ return -1;
+ }
+
++static int intel_port2pin(struct hda_codec *codec, int port)
++{
++ struct hdmi_spec *spec = codec->spec;
++
++ if (!spec->port_num) {
++ /* we assume only from port-B to port-D */
++ if (port < 1 || port > 3)
++ return 0;
++ /* intel port is 1-based */
++ return port + intel_base_nid(codec) - 1;
++ }
++
++ if (port < 1 || port > spec->port_num)
++ return 0;
++ return spec->port_map[port - 1];
++}
++
+ static void intel_pin_eld_notify(void *audio_ptr, int port, int pipe)
+ {
+ struct hda_codec *codec = audio_ptr;
+ int pin_nid;
+ int dev_id = pipe;
+
+- /* we assume only from port-B to port-D */
+- if (port < 1 || port > 3)
++ pin_nid = intel_port2pin(codec, port);
++ if (!pin_nid)
+ return;
+-
+- pin_nid = port + intel_base_nid(codec) - 1; /* intel port is 1-based */
+-
+ /* skip notification during system suspend (but not in runtime PM);
+ * the state will be updated at resume
+ */
+--
+2.16.4
+
diff --git a/patches.drivers/ALSA-hda-hdmi-Remove-duplicated-define.patch b/patches.drivers/ALSA-hda-hdmi-Remove-duplicated-define.patch
new file mode 100644
index 0000000000..21dbd0d2ac
--- /dev/null
+++ b/patches.drivers/ALSA-hda-hdmi-Remove-duplicated-define.patch
@@ -0,0 +1,34 @@
+From eb4177116bf568a413c544eca3f4446cb4064be9 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 15 Jul 2019 23:12:13 +0200
+Subject: [PATCH] ALSA: hda/hdmi - Remove duplicated define
+Git-commit: eb4177116bf568a413c544eca3f4446cb4064be9
+Patch-mainline: v5.3-rc1
+References: bsc#1111666
+
+INTEL_GET_VENDOR_VERB is defined twice identically.
+Let's remove a superfluous line.
+
+Fixes: b0d8bc50b9f2 ("ALSA: hda: hdmi - add Icelake support")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ sound/pci/hda/patch_hdmi.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
+index 40323d91f9e4..1e6c489bca15 100644
+--- a/sound/pci/hda/patch_hdmi.c
++++ b/sound/pci/hda/patch_hdmi.c
+@@ -2416,7 +2416,6 @@ static void intel_haswell_fixup_connect_list(struct hda_codec *codec,
+ snd_hda_override_conn_list(codec, nid, spec->num_cvts, spec->cvt_nids);
+ }
+
+-#define INTEL_GET_VENDOR_VERB 0xf81
+ #define INTEL_GET_VENDOR_VERB 0xf81
+ #define INTEL_SET_VENDOR_VERB 0x781
+ #define INTEL_EN_DP12 0x02 /* enable DP 1.2 features */
+--
+2.16.4
+
diff --git a/patches.drm/drm-vc4-fix-fb-references-in-async-update.patch b/patches.drm/drm-vc4-fix-fb-references-in-async-update.patch
new file mode 100644
index 0000000000..f8d2bc62a1
--- /dev/null
+++ b/patches.drm/drm-vc4-fix-fb-references-in-async-update.patch
@@ -0,0 +1,41 @@
+From c16b85559dcfb5a348cc085a7b4c75ed49b05e2c Mon Sep 17 00:00:00 2001
+From: Helen Koike <helen.koike@collabora.com>
+Date: Mon, 3 Jun 2019 13:56:09 -0300
+Subject: [PATCH] drm/vc4: fix fb references in async update
+Git-commit: c16b85559dcfb5a348cc085a7b4c75ed49b05e2c
+Patch-mainline: v5.2-rc4
+References: bsc#1141312
+
+[ adjusted the context to match with SLE15-SP1 -- tiwai ]
+
+Async update callbacks are expected to set the old_fb in the new_state
+so prepare/cleanup framebuffers are balanced.
+
+Calling drm_atomic_set_fb_for_plane() (which gets a reference of the new
+fb and put the old fb) is not required, as it's taken care by
+drm_mode_cursor_universal() when calling drm_atomic_helper_update_plane().
+
+Cc: <stable@vger.kernel.org> # v4.19+
+Fixes: 539c320bfa97 ("drm/vc4: update cursors asynchronously through atomic")
+Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
+Signed-off-by: Helen Koike <helen.koike@collabora.com>
+Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
+Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20190603165610.24614-5-helen.koike@collabora.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/vc4/vc4_plane.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/vc4/vc4_plane.c
++++ b/drivers/gpu/drm/vc4/vc4_plane.c
+@@ -815,7 +815,7 @@ static void vc4_plane_atomic_async_updat
+
+ if (plane->state->fb != state->fb) {
+ vc4_plane_async_set_fb(plane, state->fb);
+- drm_atomic_set_fb_for_plane(plane->state, state->fb);
++ swap(plane->state->fb, state->fb);
+ }
+
+ /* Set the cursor's position on the screen. This is the
diff --git a/patches.kabi/hda-relaxed_resume-flag-kabi-fix.patch b/patches.kabi/hda-relaxed_resume-flag-kabi-fix.patch
new file mode 100644
index 0000000000..0ff011bc2a
--- /dev/null
+++ b/patches.kabi/hda-relaxed_resume-flag-kabi-fix.patch
@@ -0,0 +1,28 @@
+From: Takashi Iwai <tiwai@suse.de>
+Subject: kABI fix for hda_codec.relaxed_resume flag
+Patch-mainline: Never, kABI workaround
+References: bsc#1111666
+
+The recent fix
+ ALSA-hda-Don-t-resume-forcibly-i915-HDMI-DP-codec.patch
+introduced a new bit flag to hda_codec object, and we need to wrap it
+with the usual ifdef for kABI compatibility.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ include/sound/hda_codec.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/include/sound/hda_codec.h
++++ b/include/sound/hda_codec.h
+@@ -262,7 +262,9 @@ struct hda_codec {
+ unsigned int auto_runtime_pm:1; /* enable automatic codec runtime pm */
+ unsigned int force_pin_prefix:1; /* Add location prefix */
+ unsigned int link_down_at_suspend:1; /* link down at runtime suspend */
++#ifndef __GENKSYMS__
+ unsigned int relaxed_resume:1; /* don't resume forcibly for jack */
++#endif
+
+ #ifdef CONFIG_PM
+ unsigned long power_on_acct;
diff --git a/series.conf b/series.conf
index 7b4f3317e2..582fe7ae7b 100644
--- a/series.conf
+++ b/series.conf
@@ -47560,6 +47560,7 @@
patches.drm/0002-drm-i915-gvt-refine-ggtt-range-validation.patch
patches.drm/0003-drm-i915-gvt-Fix-cmd-length-of-VEB_DI_IECP.patch
patches.drm/drm-msm-fix-fb-references-in-async-update.patch
+ patches.drm/drm-vc4-fix-fb-references-in-async-update.patch
patches.drm/drm-don-t-block-fb-changes-for-async-plane-updates.patch
patches.drm/drm-arm-mali-dp-Add-a-loop-around-the-second-set-CVA.patch
patches.drm/drm-arm-hdlcd-Actually-validate-CRTC-modes.patch
@@ -47895,6 +47896,9 @@
patches.drivers/PCI-Return-error-if-cannot-probe-VF.patch
patches.drivers/PCI-Always-allow-probing-with-driver_override.patch
patches.fixes/PCI-P2PDMA-Fix-missing-check-for-dma_virt_ops.patch
+ patches.drivers/ALSA-hda-hdmi-Remove-duplicated-define.patch
+ patches.drivers/ALSA-hda-hdmi-Fix-i915-reverse-port-pin-mapping.patch
+ patches.drivers/ALSA-hda-Don-t-resume-forcibly-i915-HDMI-DP-codec.patch
# davem/net-next
patches.drivers/cxgb4-Enable-hash-filter-with-offload.patch
@@ -48499,6 +48503,7 @@
##########################################################
# Sound
##########################################################
+ patches.kabi/hda-relaxed_resume-flag-kabi-fix.patch
########################################################
# printk