summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--0003-ALSA-hda-Fix-DP-MST-support-for-NVIDIA-codecs.patch182
-rw-r--r--0004-btrfs-send-fix-emission-of-invalid-clone-operations-within-the-same.patch (renamed from 0003-btrfs-send-fix-emission-of-invalid-clone-operations-within-the-same.patch)0
-rw-r--r--PKGBUILD19
-rw-r--r--config2
4 files changed, 195 insertions, 8 deletions
diff --git a/0003-ALSA-hda-Fix-DP-MST-support-for-NVIDIA-codecs.patch b/0003-ALSA-hda-Fix-DP-MST-support-for-NVIDIA-codecs.patch
new file mode 100644
index 0000000..1e74d55
--- /dev/null
+++ b/0003-ALSA-hda-Fix-DP-MST-support-for-NVIDIA-codecs.patch
@@ -0,0 +1,182 @@
+From 6b43b6519a752c51657b9afa4eb844cad29d2b8c Mon Sep 17 00:00:00 2001
+From: Nikhil Mahale <nmahale@nvidia.com>
+Date: Mon, 3 Feb 2020 15:36:17 +0530
+Subject: ALSA: hda - Fix DP-MST support for NVIDIA codecs
+
+If dyn_pcm_assign is set, different jack objects are being created
+for pcm and pins.
+
+If dyn_pcm_assign is set, generic_hdmi_build_jack() calls into
+add_hdmi_jack_kctl() to create and track separate jack object for
+pcm. Like sync_eld_via_acomp(), hdmi_present_sense_via_verbs() also
+need to report status change of the pcm jack.
+
+Rename pin_idx_to_jack() to pin_idx_to_pcm_jack(). The code to
+report status change of pcm jack, move it to update_eld() which is
+common for acomp and !acomp code paths.
+
+Fixes: 5398e94fb753 ALSA: hda - Add DP-MST support for NVIDIA codecs
+Signed-off-by: Nikhil Mahale <nmahale@nvidia.com>
+---
+ sound/pci/hda/patch_hdmi.c | 94 +++++++++++++++++++++++-----------------------
+ 1 file changed, 47 insertions(+), 47 deletions(-)
+
+diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
+index 630b1f5c276d..469b25065643 100644
+--- a/sound/pci/hda/patch_hdmi.c
++++ b/sound/pci/hda/patch_hdmi.c
+@@ -1477,6 +1477,35 @@ static void hdmi_pcm_reset_pin(struct hdmi_spec *spec,
+ per_pin->channels = 0;
+ }
+
++static struct snd_jack *pin_idx_to_pcm_jack(struct hda_codec *codec,
++ struct hdmi_spec_per_pin *per_pin)
++{
++ struct hdmi_spec *spec = codec->spec;
++ struct snd_jack *jack = NULL;
++ struct hda_jack_tbl *jack_tbl;
++
++ /* if !dyn_pcm_assign, get jack from hda_jack_tbl
++ * in !dyn_pcm_assign case, spec->pcm_rec[].jack is not
++ * NULL even after snd_hda_jack_tbl_clear() is called to
++ * free snd_jack. This may cause access invalid memory
++ * when calling snd_jack_report
++ */
++ if (per_pin->pcm_idx >= 0 && spec->dyn_pcm_assign) {
++ jack = spec->pcm_rec[per_pin->pcm_idx].jack;
++ } else if (!spec->dyn_pcm_assign) {
++ /*
++ * jack tbl doesn't support DP MST
++ * DP MST will use dyn_pcm_assign,
++ * so DP MST will never come here
++ */
++ jack_tbl = snd_hda_jack_tbl_get_mst(codec, per_pin->pin_nid,
++ per_pin->dev_id);
++ if (jack_tbl)
++ jack = jack_tbl->jack;
++ }
++ return jack;
++}
++
+ /* update per_pin ELD from the given new ELD;
+ * setup info frame and notification accordingly
+ */
+@@ -1487,9 +1516,15 @@ static bool update_eld(struct hda_codec *codec,
+ struct hdmi_eld *pin_eld = &per_pin->sink_eld;
+ struct hdmi_spec *spec = codec->spec;
+ bool old_eld_valid = pin_eld->eld_valid;
++ struct snd_jack *pcm_jack;
+ bool eld_changed;
+ int pcm_idx;
+
++ /* pcm_idx >=0 before update_eld() means it is in monitor
++ * disconnected event. Jack must be fetched before update_eld()
++ */
++ pcm_jack = pin_idx_to_pcm_jack(codec, per_pin);
++
+ /* for monitor disconnection, save pcm_idx firstly */
+ pcm_idx = per_pin->pcm_idx;
+ if (spec->dyn_pcm_assign) {
+@@ -1544,6 +1579,14 @@ static bool update_eld(struct hda_codec *codec,
+ SNDRV_CTL_EVENT_MASK_VALUE |
+ SNDRV_CTL_EVENT_MASK_INFO,
+ &get_hdmi_pcm(spec, pcm_idx)->eld_ctl->id);
++
++ if (!pcm_jack)
++ pcm_jack = pin_idx_to_pcm_jack(codec, per_pin);
++ if (eld_changed && pcm_jack)
++ snd_jack_report(pcm_jack,
++ (eld->monitor_present && eld->eld_valid) ?
++ SND_JACK_AVOUT : 0);
++
+ return eld_changed;
+ }
+
+@@ -1566,7 +1609,6 @@ static bool hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin,
+ * the unsolicited response to avoid custom WARs.
+ */
+ int present;
+- bool ret;
+ bool do_repoll = false;
+
+ present = snd_hda_jack_pin_sense(codec, pin_nid, dev_id);
+@@ -1600,45 +1642,14 @@ static bool hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin,
+ else
+ update_eld(codec, per_pin, eld);
+
+- ret = !repoll || !eld->monitor_present || eld->eld_valid;
+-
+ jack = snd_hda_jack_tbl_get_mst(codec, pin_nid, per_pin->dev_id);
+ if (jack) {
+- jack->block_report = !ret;
++ jack->block_report = do_repoll;
+ jack->pin_sense = (eld->monitor_present && eld->eld_valid) ?
+ AC_PINSENSE_PRESENCE : 0;
+ }
+ mutex_unlock(&per_pin->lock);
+- return ret;
+-}
+-
+-static struct snd_jack *pin_idx_to_jack(struct hda_codec *codec,
+- struct hdmi_spec_per_pin *per_pin)
+-{
+- struct hdmi_spec *spec = codec->spec;
+- struct snd_jack *jack = NULL;
+- struct hda_jack_tbl *jack_tbl;
+-
+- /* if !dyn_pcm_assign, get jack from hda_jack_tbl
+- * in !dyn_pcm_assign case, spec->pcm_rec[].jack is not
+- * NULL even after snd_hda_jack_tbl_clear() is called to
+- * free snd_jack. This may cause access invalid memory
+- * when calling snd_jack_report
+- */
+- if (per_pin->pcm_idx >= 0 && spec->dyn_pcm_assign)
+- jack = spec->pcm_rec[per_pin->pcm_idx].jack;
+- else if (!spec->dyn_pcm_assign) {
+- /*
+- * jack tbl doesn't support DP MST
+- * DP MST will use dyn_pcm_assign,
+- * so DP MST will never come here
+- */
+- jack_tbl = snd_hda_jack_tbl_get_mst(codec, per_pin->pin_nid,
+- per_pin->dev_id);
+- if (jack_tbl)
+- jack = jack_tbl->jack;
+- }
+- return jack;
++ return !do_repoll;
+ }
+
+ /* update ELD and jack state via audio component */
+@@ -1647,8 +1658,6 @@ static void sync_eld_via_acomp(struct hda_codec *codec,
+ {
+ struct hdmi_spec *spec = codec->spec;
+ struct hdmi_eld *eld = &spec->temp_eld;
+- struct snd_jack *jack = NULL;
+- bool changed;
+ int size;
+
+ mutex_lock(&per_pin->lock);
+@@ -1671,17 +1680,8 @@ static void sync_eld_via_acomp(struct hda_codec *codec,
+ eld->eld_size = 0;
+ }
+
+- /* pcm_idx >=0 before update_eld() means it is in monitor
+- * disconnected event. Jack must be fetched before update_eld()
+- */
+- jack = pin_idx_to_jack(codec, per_pin);
+- changed = update_eld(codec, per_pin, eld);
+- if (jack == NULL)
+- jack = pin_idx_to_jack(codec, per_pin);
+- if (changed && jack)
+- snd_jack_report(jack,
+- (eld->monitor_present && eld->eld_valid) ?
+- SND_JACK_AVOUT : 0);
++ update_eld(codec, per_pin, eld);
++
+ mutex_unlock(&per_pin->lock);
+ }
+
+--
+cgit v1.2.1-1-g437b
+
diff --git a/0003-btrfs-send-fix-emission-of-invalid-clone-operations-within-the-same.patch b/0004-btrfs-send-fix-emission-of-invalid-clone-operations-within-the-same.patch
index 496cc6f..496cc6f 100644
--- a/0003-btrfs-send-fix-emission-of-invalid-clone-operations-within-the-same.patch
+++ b/0004-btrfs-send-fix-emission-of-invalid-clone-operations-within-the-same.patch
diff --git a/PKGBUILD b/PKGBUILD
index e8ed15a..7ae8c1e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,8 +13,10 @@
pkgbase=linux-libre
_supver=5
_majver=5
-_minver=1
+_minver=2
_gccpatchver='20191217'
+_gccpatchger='9.1'
+_gccpatchker='5.5'
if [ "$_minver" == "0" ]; then
pkgver=${_supver}.${_majver}
else
@@ -38,7 +40,8 @@ source=(
https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnumajver}/linux-libre-${_gnumajver}.tar.xz{,.sign}
0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch
- 0003-btrfs-send-fix-emission-of-invalid-clone-operations-within-the-same.patch
+ 0003-ALSA-hda-Fix-DP-MST-support-for-NVIDIA-codecs.patch
+ 0004-btrfs-send-fix-emission-of-invalid-clone-operations-within-the-same.patch
graysky_bdver2-hotfix.patch
kernel_gcc_patch-${_gccpatchver}.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/${_gccpatchver}.tar.gz
ath9k-regdom-hack.patch
@@ -55,13 +58,14 @@ b2sums=('a4d4c927af24f61aba451cc21117c5a508ab2037b81ca6add19b4838940f8f321c8bf14
'SKIP'
'ab1fb19c67d4c107f75767581c33d9c1458b4d9fdb88f4adb41d30a36f5a2f95f1c48ef079eb87e1e6e8ce2f98b293195cb2c0f2a8ec975aa817453289158c6e'
'2e822cf7d4ff8b7458e22d3ce110fd8534e17a9aac2feace41c591f70697e1fab7bd9ce307c60a6361fbe525d10dab74c8b76fcb5276cd27f6e945f8fdfcc25c'
+ 'ea755ddfbc59fd8a6eb2b23b80acec6f357fd7fbb2dac48275cec24d388c70c484808e8edf7450edf609ae2f33ab0e718075ba2636666cdd2f99ed64df796a79'
'b3f2c12f0d298ffec1a0d8237de80741d935af7b64f967f6ea2473741fbe4616edb7c321dc7a69c57b50d2313330a581b1f3086f64b15a10b2b640e26af659c4'
'1892bd22775eac3bcc4d37f4fd30c95346bf3a0888cbbff57fd614973b525390dff2e315ce35b2e498523cceaab94ff21a80475dee8df3de4dd8fc0fab07d74e'
'd76bd0bf237ea2bb7999fd3715cb664d89148cb0ade8057d57cdb40bc0a7954336e50ee077312e5e192398b0f35f055786deb98af9130d57e60f2ea040fbb66f'
'2e58bb89b247b1678355368956e67c1de51fcde97a227b2162f6771e30f17fa5520faafe7be4b6816a542e7ae10d05f64c6b6354f352c12746d4b8da632936dd'
'fde132f3705d908e6f2147c78a2193289916d72304ca5efa2229d79fc3e57a857314ce94e71425caef2f7f7b6cf87f05ef86335dc8bd4be78e7035afe608005a'
- 'ca3cff10d6d000006562df14bc2cb0742721a3a9f6b8a04cc918ada905823fe623d5e21f95fb44967e018276d18b35816ec7e5588a4a71dbd7b2d688699fa70f'
- '6cd2f10e0aed1bc94abe3fd4b7646509d442a86e4796608f7b62025273e7443581a0daacae7bd0abf22efa206d1ed4d9028813d525ed02bf50c7254c32cff5aa'
+ 'fbfdad1242231dfb81c513dcfd704f384e6d80223ebb0f36dee50dd6b7eb8c4815afe61a9c769296a0afc67f74926a55f07bf2a8e07a51a0fadb117b00df2a78'
+ 'd0aac61cf1ff6721892b3697773bf85f8b464603fafb724edfe0f48b9a40dfd4dfc8df751f3ee1f06c131775624968421d3d0e55b06c3d61792c4934287a9164'
'SKIP')
#export KBUILD_BUILD_HOST=arc4linux
@@ -82,16 +86,17 @@ prepare() {
echo "Applying hotfixes"
patch -p1 -i ../0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
patch -p1 -i ../0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch
- patch -p1 -i ../0003-btrfs-send-fix-emission-of-invalid-clone-operations-within-the-same.patch
+ patch -p1 -i ../0003-ALSA-hda-Fix-DP-MST-support-for-NVIDIA-codecs.patch
+ patch -p1 -i ../0004-btrfs-send-fix-emission-of-invalid-clone-operations-within-the-same.patch
# graysky gcc hotfixes
echo "Applying graysky gcc patch hotfixes"
- patch -p1 -i ../graysky_bdver2-hotfix.patch "$srcdir/kernel_gcc_patch-${_gccpatchver}/enable_additional_cpu_optimizations_for_gcc_v9.1+_kernel_v5.5+.patch"
+ patch -p1 -i ../graysky_bdver2-hotfix.patch "$srcdir/kernel_gcc_patch-${_gccpatchver}/enable_additional_cpu_optimizations_for_gcc_v${_gccpatchger}+_kernel_v${_gccpatchker}+.patch"
# graysky gcc patch
echo "Applying graysky cpu patch"
- patch -p1 -i ../kernel_gcc_patch-${_gccpatchver}/enable_additional_cpu_optimizations_for_gcc_v9.1+_kernel_v5.5+.patch
+ patch -p1 -i ../kernel_gcc_patch-${_gccpatchver}/enable_additional_cpu_optimizations_for_gcc_v${_gccpatchger}+_kernel_v${_gccpatchker}+.patch
# Ignore ath9k eeprom patch
diff --git a/config b/config
index 098d813..93729a6 100644
--- a/config
+++ b/config
@@ -8720,7 +8720,7 @@ CONFIG_AMD_IOMMU_V2=y
CONFIG_DMAR_TABLE=y
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_SVM=y
-CONFIG_INTEL_IOMMU_DEFAULT_ON=y
+# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
CONFIG_IRQ_REMAP=y
CONFIG_HYPERV_IOMMU=y