diff options
author | David P <megver83@parabola.nu> | 2020-01-06 22:43:23 -0300 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2020-01-06 22:43:23 -0300 |
commit | 7dfb34b68de75b345f4a7dc75a5a83ed063994d2 (patch) | |
tree | f9e5e3e3b2a45b788c36eea05ae4a64909de4ef1 /libre/linux-libre-pae | |
parent | 8971402589d668a3a5fc2b6e9b9f3e9775b6dd35 (diff) | |
download | abslibre-7dfb34b68de75b345f4a7dc75a5a83ed063994d2.tar.gz abslibre-7dfb34b68de75b345f4a7dc75a5a83ed063994d2.tar.bz2 abslibre-7dfb34b68de75b345f4a7dc75a5a83ed063994d2.zip |
updpkg: libre/linux-libre-pae 5.4.8-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'libre/linux-libre-pae')
14 files changed, 545 insertions, 28 deletions
diff --git a/libre/linux-libre-pae/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/libre/linux-libre-pae/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch index bcd694ec0..ae31ff9b5 100644 --- a/libre/linux-libre-pae/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ b/libre/linux-libre-pae/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch @@ -1,7 +1,7 @@ -From 270144c854dea695a7721fdd3a5503eb4acae7e4 Mon Sep 17 00:00:00 2001 +From 524202522faf86d81efaa96dc984d1996ddda302 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> Date: Mon, 16 Sep 2019 04:53:20 +0200 -Subject: [PATCH 1/5] ZEN: Add sysctl and CONFIG to disallow unprivileged +Subject: [PATCH 01/13] ZEN: Add sysctl and CONFIG to disallow unprivileged CLONE_NEWUSER Our default behavior continues to match the vanilla kernel. @@ -80,7 +80,7 @@ index 6cabc124378c..fda4986da9eb 100644 if (err) goto bad_unshare_out; diff --git a/kernel/sysctl.c b/kernel/sysctl.c -index b6f2f35d0bcf..2e9c273990e8 100644 +index 70665934d53e..9797869ed829 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -110,6 +110,9 @@ extern int core_uses_pid; @@ -128,5 +128,5 @@ index 8eadadc478f9..c36ecd19562c 100644 static DEFINE_MUTEX(userns_state_mutex); -- -2.24.0 +2.24.1 diff --git a/libre/linux-libre-pae/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch b/libre/linux-libre-pae/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch index 9befdd67a..cf03b7a6b 100644 --- a/libre/linux-libre-pae/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch +++ b/libre/linux-libre-pae/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch @@ -1,7 +1,7 @@ -From f20221735640685313d5020d7e6db4aad293a3ae Mon Sep 17 00:00:00 2001 +From 54dd8abeea02e5ea426a83f0a924d874a9c6e617 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao <ztuowen@gmail.com> Date: Wed, 16 Oct 2019 15:06:28 -0600 -Subject: [PATCH 2/5] lib: devres: add a helper function for ioremap_uc +Subject: [PATCH 02/13] lib: devres: add a helper function for ioremap_uc Implement a resource managed strongly uncachable ioremap function. @@ -75,5 +75,5 @@ index 6a0e9bd6524a..17624d35e82d 100644 * devm_ioremap_nocache - Managed ioremap_nocache() * @dev: Generic device to remap IO address for -- -2.24.0 +2.24.1 diff --git a/libre/linux-libre-pae/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch b/libre/linux-libre-pae/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch index 926097948..ed715ad45 100644 --- a/libre/linux-libre-pae/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch +++ b/libre/linux-libre-pae/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch @@ -1,7 +1,7 @@ -From affb9e39e0d2b1eefff47e2dc0a0aa3893b9bb5d Mon Sep 17 00:00:00 2001 +From 044bbe9ec44257ffb87b96b291636f5a854c3d14 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao <ztuowen@gmail.com> Date: Wed, 16 Oct 2019 15:06:29 -0600 -Subject: [PATCH 3/5] mfd: intel-lpss: Use devm_ioremap_uc for MMIO +Subject: [PATCH 03/13] mfd: intel-lpss: Use devm_ioremap_uc for MMIO Some BIOS erroneously specifies write-combining BAR for intel-lpss-pci in MTRR. This will cause the system to hang during boot. If possible, @@ -44,5 +44,5 @@ index bfe4ff337581..b0f0781a6b9c 100644 if (!lpss->priv) return -ENOMEM; -- -2.24.0 +2.24.1 diff --git a/libre/linux-libre-pae/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch b/libre/linux-libre-pae/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch index f3cba134a..24a7c3d84 100644 --- a/libre/linux-libre-pae/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch +++ b/libre/linux-libre-pae/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch @@ -1,7 +1,7 @@ -From bdbb6d41bab0f525b679cf5018f77d5299773568 Mon Sep 17 00:00:00 2001 +From 0407fd310903c18882a7e0463930a71a46b61027 Mon Sep 17 00:00:00 2001 From: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Tue, 29 Oct 2019 20:00:21 +0300 -Subject: [PATCH 4/5] PCI: pciehp: Do not disable interrupt twice on suspend +Subject: [PATCH 04/13] PCI: pciehp: Do not disable interrupt twice on suspend We try to keep PCIe hotplug ports runtime suspended when entering system suspend. Because the PCIe portdrv sets the DPM_FLAG_NEVER_SKIP flag, the PM @@ -95,5 +95,5 @@ index b3122c151b80..56daad828c9e 100644 #endif /* PM */ }; -- -2.24.0 +2.24.1 diff --git a/libre/linux-libre-pae/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch b/libre/linux-libre-pae/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch index 0fc654b74..7d05b2578 100644 --- a/libre/linux-libre-pae/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch +++ b/libre/linux-libre-pae/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch @@ -1,7 +1,7 @@ -From 23db61d908b9a4854c9b15565d4cbfa800c45cfe Mon Sep 17 00:00:00 2001 +From b9bebf4cde0cf46438b2a7ab1652172e8e16c33e Mon Sep 17 00:00:00 2001 From: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Tue, 29 Oct 2019 20:00:22 +0300 -Subject: [PATCH 5/5] PCI: pciehp: Prevent deadlock on disconnect +Subject: [PATCH 05/13] PCI: pciehp: Prevent deadlock on disconnect This addresses deadlocks in these common cases in hierarchies containing two switches: @@ -96,10 +96,10 @@ Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> 4 files changed, 61 insertions(+), 19 deletions(-) diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h -index 654c972b8ea0..afea59a3aad2 100644 +index 882ce82c4699..aa61d4c219d7 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h -@@ -172,10 +172,10 @@ void pciehp_set_indicators(struct controller *ctrl, int pwr, int attn); +@@ -174,10 +174,10 @@ void pciehp_set_indicators(struct controller *ctrl, int pwr, int attn); void pciehp_get_latch_status(struct controller *ctrl, u8 *status); int pciehp_query_power_fault(struct controller *ctrl); @@ -151,7 +151,7 @@ index 56daad828c9e..312cc45c44c7 100644 (!occupied && (ctrl->state == ON_STATE || ctrl->state == BLINKINGOFF_STATE))) diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c -index 21af7b16d7a4..c760a13ec7b1 100644 +index dd8e4a5fb282..6503d15effbb 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c @@ -226,7 +226,7 @@ void pciehp_handle_disable_request(struct controller *ctrl) @@ -173,7 +173,7 @@ index 21af7b16d7a4..c760a13ec7b1 100644 return; } diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c -index 1a522c1c4177..526a8f70bac5 100644 +index 86d97f3112f0..a2a263764ef8 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -201,17 +201,29 @@ static void pcie_write_cmd_nowait(struct controller *ctrl, u16 cmd, u16 mask) @@ -268,5 +268,5 @@ index 1a522c1c4177..526a8f70bac5 100644 int pciehp_query_power_fault(struct controller *ctrl) -- -2.24.0 +2.24.1 diff --git a/libre/linux-libre-pae/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch b/libre/linux-libre-pae/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch new file mode 100644 index 000000000..7b749ce70 --- /dev/null +++ b/libre/linux-libre-pae/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch @@ -0,0 +1,78 @@ +From f74b67cce5f0c5c37b0c5cb0020a818f0594a743 Mon Sep 17 00:00:00 2001 +From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> +Date: Thu, 28 Nov 2019 23:50:40 +0100 +Subject: [PATCH 06/13] ACPI: PM: s2idle: Rework ACPI events synchronization + +Note that the EC GPE processing need not be synchronized in +acpi_s2idle_wake() after invoking acpi_ec_dispatch_gpe(), because +that function checks the GPE status and dispatches its handler if +need be and the SCI action handler is not going to run anyway at +that point. + +Moreover, it is better to drain all of the pending ACPI events +before restoring the working-state configuration of GPEs in +acpi_s2idle_restore(), because those events are likely to be related +to system wakeup, in which case they will not be relevant going +forward. + +Rework the code to take these observations into account. + +Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> +--- + drivers/acpi/sleep.c | 26 +++++++++++++++++++------- + 1 file changed, 19 insertions(+), 7 deletions(-) + +diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c +index 2af937a8b1c5..6747a279621b 100644 +--- a/drivers/acpi/sleep.c ++++ b/drivers/acpi/sleep.c +@@ -977,6 +977,16 @@ static int acpi_s2idle_prepare_late(void) + return 0; + } + ++static void acpi_s2idle_sync(void) ++{ ++ /* ++ * The EC driver uses the system workqueue and an additional special ++ * one, so those need to be flushed too. ++ */ ++ acpi_ec_flush_work(); ++ acpi_os_wait_events_complete(); /* synchronize Notify handling */ ++} ++ + static void acpi_s2idle_wake(void) + { + /* +@@ -1001,13 +1011,8 @@ static void acpi_s2idle_wake(void) + * should be missed by canceling the wakeup here. + */ + pm_system_cancel_wakeup(); +- /* +- * The EC driver uses the system workqueue and an additional +- * special one, so those need to be flushed too. +- */ +- acpi_os_wait_events_complete(); /* synchronize EC GPE processing */ +- acpi_ec_flush_work(); +- acpi_os_wait_events_complete(); /* synchronize Notify handling */ ++ ++ acpi_s2idle_sync(); + + rearm_wake_irq(acpi_sci_irq); + } +@@ -1024,6 +1029,13 @@ static void acpi_s2idle_restore_early(void) + + static void acpi_s2idle_restore(void) + { ++ /* ++ * Drain pending events before restoring the working-state configuration ++ * of GPEs. ++ */ ++ acpi_os_wait_events_complete(); /* synchronize GPE processing */ ++ acpi_s2idle_sync(); ++ + s2idle_wakeup = false; + + acpi_enable_all_runtime_gpes(); +-- +2.24.1 + diff --git a/libre/linux-libre-pae/0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch b/libre/linux-libre-pae/0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch new file mode 100644 index 000000000..3cab84dee --- /dev/null +++ b/libre/linux-libre-pae/0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch @@ -0,0 +1,36 @@ +From 265dae4f5dac25c15272befa5eefb9b10906435f Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Tue, 24 Dec 2019 05:18:47 +0100 +Subject: [PATCH 07/13] iwlwifi: pcie: restore support for Killer Qu C0 NICs + +Commit 809805a820c6 refactored the cfg mangling. Unfortunately, in this +process the lines which picked the right cfg for Killer Qu C0 NICs after +C0 detection were lost. These lines were added by commit b9500577d361. + +I suspect this is more of the "merge damage" which commit 7cded5658329 +talks about. + +Fixes: 809805a820c6 ("iwlwifi: pcie: move some cfg mangling from trans_pcie_alloc to probe") +Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> +--- + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +index b0b7eca1754e..de62a6dc4e73 100644 +--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +@@ -1107,6 +1107,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) + cfg = &iwl9560_2ac_cfg_qu_c0_jf_b0; + else if (cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0) + cfg = &iwl9560_2ac_160_cfg_qu_c0_jf_b0; ++ else if (cfg == &killer1650s_2ax_cfg_qu_b0_hr_b0) ++ cfg = &killer1650s_2ax_cfg_qu_c0_hr_b0; ++ else if (cfg == &killer1650i_2ax_cfg_qu_b0_hr_b0) ++ cfg = &killer1650i_2ax_cfg_qu_c0_hr_b0; + } + + /* same thing for QuZ... */ +-- +2.24.1 + diff --git a/libre/linux-libre-pae/0008-x86-intel-Disable-HPET-on-Intel-Ice-Lake-platforms.patch b/libre/linux-libre-pae/0008-x86-intel-Disable-HPET-on-Intel-Ice-Lake-platforms.patch new file mode 100644 index 000000000..f07c5886b --- /dev/null +++ b/libre/linux-libre-pae/0008-x86-intel-Disable-HPET-on-Intel-Ice-Lake-platforms.patch @@ -0,0 +1,38 @@ +From ddb94a8dbd9144d7b85f553cb4a85db2ba62374d Mon Sep 17 00:00:00 2001 +From: Kai-Heng Feng <kai.heng.feng@canonical.com> +Date: Fri, 29 Nov 2019 14:23:03 +0800 +Subject: [PATCH 08/13] x86/intel: Disable HPET on Intel Ice Lake platforms + +Like CFL and CFL-H, ICL SoC has skewed HPET timer once it hits PC10. +So let's disable HPET on ICL. + +Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> +Cc: Linus Torvalds <torvalds@linux-foundation.org> +Cc: Peter Zijlstra <peterz@infradead.org> +Cc: Thomas Gleixner <tglx@linutronix.de> +Cc: bp@alien8.de +Cc: feng.tang@intel.com +Cc: harry.pan@intel.com +Cc: hpa@zytor.com +Link: https://lkml.kernel.org/r/20191129062303.18982-2-kai.heng.feng@canonical.com +Signed-off-by: Ingo Molnar <mingo@kernel.org> +--- + arch/x86/kernel/early-quirks.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c +index 606711f5ebf8..2f9ec14be3b1 100644 +--- a/arch/x86/kernel/early-quirks.c ++++ b/arch/x86/kernel/early-quirks.c +@@ -714,6 +714,8 @@ static struct chipset early_qrk[] __initdata = { + PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet}, + { PCI_VENDOR_ID_INTEL, 0x3ec4, + PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet}, ++ { PCI_VENDOR_ID_INTEL, 0x8a12, ++ PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet}, + { PCI_VENDOR_ID_BROADCOM, 0x4331, + PCI_CLASS_NETWORK_OTHER, PCI_ANY_ID, 0, apple_airport_reset}, + {} +-- +2.24.1 + diff --git a/libre/linux-libre-pae/0009-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch b/libre/linux-libre-pae/0009-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch new file mode 100644 index 000000000..c876a8628 --- /dev/null +++ b/libre/linux-libre-pae/0009-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch @@ -0,0 +1,87 @@ +From e0d783c7ee43a39dadeb96ac669c45f3a3192d96 Mon Sep 17 00:00:00 2001 +From: Kai Vehmanen <kai.vehmanen@linux.intel.com> +Date: Fri, 20 Sep 2019 11:39:18 +0300 +Subject: [PATCH 09/13] drm/i915: save AUD_FREQ_CNTRL state at audio domain + suspend + +When audio power domain is suspended, the display driver must +save state of AUD_FREQ_CNTRL on Tiger Lake and Ice Lake +systems. The initial value of the register is set by BIOS and +is read by driver during the audio component init sequence. + +Cc: Jani Nikula <jani.nikula@intel.com> +Cc: Imre Deak <imre.deak@intel.com> +Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> +Signed-off-by: Jani Nikula <jani.nikula@intel.com> +Link: https://patchwork.freedesktop.org/patch/msgid/20190920083918.27057-1-kai.vehmanen@linux.intel.com +--- + drivers/gpu/drm/i915/display/intel_audio.c | 17 +++++++++++++++-- + drivers/gpu/drm/i915/i915_drv.h | 1 + + drivers/gpu/drm/i915/i915_reg.h | 2 ++ + 3 files changed, 18 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c +index ddcccf4408c3..439bc0a93410 100644 +--- a/drivers/gpu/drm/i915/display/intel_audio.c ++++ b/drivers/gpu/drm/i915/display/intel_audio.c +@@ -850,10 +850,17 @@ static unsigned long i915_audio_component_get_power(struct device *kdev) + + ret = intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO); + +- /* Force CDCLK to 2*BCLK as long as we need audio to be powered. */ +- if (dev_priv->audio_power_refcount++ == 0) ++ if (dev_priv->audio_power_refcount++ == 0) { ++ if (IS_TIGERLAKE(dev_priv) || IS_ICELAKE(dev_priv)) { ++ I915_WRITE(AUD_FREQ_CNTRL, dev_priv->audio_freq_cntrl); ++ DRM_DEBUG_KMS("restored AUD_FREQ_CNTRL to 0x%x\n", ++ dev_priv->audio_freq_cntrl); ++ } ++ ++ /* Force CDCLK to 2*BCLK as long as we need audio powered. */ + if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) + glk_force_audio_cdclk(dev_priv, true); ++ } + + return ret; + } +@@ -1114,6 +1121,12 @@ static void i915_audio_component_init(struct drm_i915_private *dev_priv) + return; + } + ++ if (IS_TIGERLAKE(dev_priv) || IS_ICELAKE(dev_priv)) { ++ dev_priv->audio_freq_cntrl = I915_READ(AUD_FREQ_CNTRL); ++ DRM_DEBUG_KMS("init value of AUD_FREQ_CNTRL of 0x%x\n", ++ dev_priv->audio_freq_cntrl); ++ } ++ + dev_priv->audio_component_registered = true; + } + +diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h +index 89b6112bd66b..043ce1b47aeb 100644 +--- a/drivers/gpu/drm/i915/i915_drv.h ++++ b/drivers/gpu/drm/i915/i915_drv.h +@@ -1530,6 +1530,7 @@ struct drm_i915_private { + */ + struct mutex av_mutex; + int audio_power_refcount; ++ u32 audio_freq_cntrl; + + struct { + struct mutex mutex; +diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h +index f8ee9aba3955..e1fe356463ec 100644 +--- a/drivers/gpu/drm/i915/i915_reg.h ++++ b/drivers/gpu/drm/i915/i915_reg.h +@@ -9104,6 +9104,8 @@ enum { + #define HSW_AUD_CHICKENBIT _MMIO(0x65f10) + #define SKL_AUD_CODEC_WAKE_SIGNAL (1 << 15) + ++#define AUD_FREQ_CNTRL _MMIO(0x65900) ++ + /* + * HSW - ICL power wells + * +-- +2.24.1 + diff --git a/libre/linux-libre-pae/0010-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch b/libre/linux-libre-pae/0010-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch new file mode 100644 index 000000000..952bb8d55 --- /dev/null +++ b/libre/linux-libre-pae/0010-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch @@ -0,0 +1,57 @@ +From 3a8fe5edd1f716667d7f1ebd4f06bc808bf89a6d Mon Sep 17 00:00:00 2001 +From: Kai Vehmanen <kai.vehmanen@linux.intel.com> +Date: Thu, 3 Oct 2019 11:55:30 +0300 +Subject: [PATCH 10/13] drm/i915: Fix audio power up sequence for gen10+ + display + +On platfroms with gen10+ display, driver must set the enable bit of +AUDIO_PIN_BUF_CTL register before transactions with the HDA controller +can proceed. Add setting this bit to the audio power up sequence. + +Failing to do this resulted in errors during display audio codec probe, +and failures during resume from suspend. + +Note: We may also need to disable the bit afterwards, but there are +still unresolved issues with that. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111214 +Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> +Signed-off-by: Jani Nikula <jani.nikula@intel.com> +Link: https://patchwork.freedesktop.org/patch/msgid/20191003085531.30990-1-kai.vehmanen@linux.intel.com +--- + drivers/gpu/drm/i915/display/intel_audio.c | 5 +++++ + drivers/gpu/drm/i915/i915_reg.h | 2 ++ + 2 files changed, 7 insertions(+) + +diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c +index 439bc0a93410..440b33762fef 100644 +--- a/drivers/gpu/drm/i915/display/intel_audio.c ++++ b/drivers/gpu/drm/i915/display/intel_audio.c +@@ -860,6 +860,11 @@ static unsigned long i915_audio_component_get_power(struct device *kdev) + /* Force CDCLK to 2*BCLK as long as we need audio powered. */ + if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) + glk_force_audio_cdclk(dev_priv, true); ++ ++ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) ++ I915_WRITE(AUD_PIN_BUF_CTL, ++ (I915_READ(AUD_PIN_BUF_CTL) | ++ AUD_PIN_BUF_ENABLE)); + } + + return ret; +diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h +index e1fe356463ec..ccfea9c2b8bf 100644 +--- a/drivers/gpu/drm/i915/i915_reg.h ++++ b/drivers/gpu/drm/i915/i915_reg.h +@@ -9105,6 +9105,8 @@ enum { + #define SKL_AUD_CODEC_WAKE_SIGNAL (1 << 15) + + #define AUD_FREQ_CNTRL _MMIO(0x65900) ++#define AUD_PIN_BUF_CTL _MMIO(0x48414) ++#define AUD_PIN_BUF_ENABLE REG_BIT(31) + + /* + * HSW - ICL power wells +-- +2.24.1 + diff --git a/libre/linux-libre-pae/0011-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch b/libre/linux-libre-pae/0011-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch new file mode 100644 index 000000000..c1bc3c6e2 --- /dev/null +++ b/libre/linux-libre-pae/0011-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch @@ -0,0 +1,41 @@ +From 66b90ad22d857944d9b8452f064ae48565a40063 Mon Sep 17 00:00:00 2001 +From: Kai Vehmanen <kai.vehmanen@linux.intel.com> +Date: Thu, 3 Oct 2019 11:55:31 +0300 +Subject: [PATCH 11/13] drm/i915: extend audio CDCLK>=2*BCLK constraint to more + platforms + +The CDCLK>=2*BCLK constraint applies to all generations since gen10. +Extend the constraint logic in audio get/put_power(). + +Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> +Signed-off-by: Jani Nikula <jani.nikula@intel.com> +Link: https://patchwork.freedesktop.org/patch/msgid/20191003085531.30990-2-kai.vehmanen@linux.intel.com +--- + drivers/gpu/drm/i915/display/intel_audio.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c +index 440b33762fef..05ef43b13d1c 100644 +--- a/drivers/gpu/drm/i915/display/intel_audio.c ++++ b/drivers/gpu/drm/i915/display/intel_audio.c +@@ -858,7 +858,7 @@ static unsigned long i915_audio_component_get_power(struct device *kdev) + } + + /* Force CDCLK to 2*BCLK as long as we need audio powered. */ +- if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) ++ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) + glk_force_audio_cdclk(dev_priv, true); + + if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) +@@ -877,7 +877,7 @@ static void i915_audio_component_put_power(struct device *kdev, + + /* Stop forcing CDCLK to 2*BCLK if no need for audio to be powered. */ + if (--dev_priv->audio_power_refcount == 0) +- if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) ++ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) + glk_force_audio_cdclk(dev_priv, false); + + intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO, cookie); +-- +2.24.1 + diff --git a/libre/linux-libre-pae/0012-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch b/libre/linux-libre-pae/0012-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch new file mode 100644 index 000000000..7609d0b5f --- /dev/null +++ b/libre/linux-libre-pae/0012-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch @@ -0,0 +1,129 @@ +From e33c3b5720592db7cbaa544b8c05414a17d35afd Mon Sep 17 00:00:00 2001 +From: Chris Wilson <chris@chris-wilson.co.uk> +Date: Mon, 30 Dec 2019 11:15:30 +0000 +Subject: [PATCH 12/13] drm/i915/gt: Detect if we miss WaIdleLiteRestore + +In order to avoid confusing the HW, we must never submit an empty ring +during lite-restore, that is we should always advance the RING_TAIL +before submitting to stay ahead of the RING_HEAD. + +Normally this is prevented by keeping a couple of spare NOPs in the +request->wa_tail so that on resubmission we can advance the tail. This +relies on the request only being resubmitted once, which is the normal +condition as it is seen once for ELSP[1] and then later in ELSP[0]. On +preemption, the requests are unwound and the tail reset back to the +normal end point (as we know the request is incomplete and therefore its +RING_HEAD is even earlier). + +However, if this w/a should fail we would try and resubmit the request +with the RING_TAIL already set to the location of this request's wa_tail +potentially causing a GPU hang. We can spot when we do try and +incorrectly resubmit without advancing the RING_TAIL and spare any +embarrassment by forcing the context restore. + +In the case of preempt-to-busy, we leave the requests running on the HW +while we unwind. As the ring is still live, we cannot rewind our +rq->tail without forcing a reload so leave it set to rq->wa_tail and +only force a reload if we resubmit after a lite-restore. (Normally, the +forced reload will be a part of the preemption event.) + +Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy") +Closes: https://gitlab.freedesktop.org/drm/intel/issues/673 +Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> +Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> +Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> +Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> +Cc: stable@vger.kernel.org +Link: https://patchwork.freedesktop.org/patch/msgid/20191209023215.3519970-1-chris@chris-wilson.co.uk +(cherry picked from commit 82c69bf58650e644c61aa2bf5100b63a1070fd2f) +--- + drivers/gpu/drm/i915/gt/intel_lrc.c | 42 ++++++++++++++--------------- + 1 file changed, 20 insertions(+), 22 deletions(-) + +diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c +index 06a506c29463..6600b2e08fe3 100644 +--- a/drivers/gpu/drm/i915/gt/intel_lrc.c ++++ b/drivers/gpu/drm/i915/gt/intel_lrc.c +@@ -471,12 +471,6 @@ lrc_descriptor(struct intel_context *ce, struct intel_engine_cs *engine) + return desc; + } + +-static void unwind_wa_tail(struct i915_request *rq) +-{ +- rq->tail = intel_ring_wrap(rq->ring, rq->wa_tail - WA_TAIL_BYTES); +- assert_ring_tail_valid(rq->ring, rq->tail); +-} +- + static struct i915_request * + __unwind_incomplete_requests(struct intel_engine_cs *engine) + { +@@ -495,7 +489,6 @@ __unwind_incomplete_requests(struct intel_engine_cs *engine) + continue; /* XXX */ + + __i915_request_unsubmit(rq); +- unwind_wa_tail(rq); + + /* + * Push the request back into the queue for later resubmission. +@@ -649,13 +642,29 @@ execlists_schedule_out(struct i915_request *rq) + i915_request_put(rq); + } + +-static u64 execlists_update_context(const struct i915_request *rq) ++static u64 execlists_update_context(struct i915_request *rq) + { + struct intel_context *ce = rq->hw_context; +- u64 desc; ++ u64 desc = ce->lrc_desc; ++ u32 tail; + +- ce->lrc_reg_state[CTX_RING_TAIL + 1] = +- intel_ring_set_tail(rq->ring, rq->tail); ++ /* ++ * WaIdleLiteRestore:bdw,skl ++ * ++ * We should never submit the context with the same RING_TAIL twice ++ * just in case we submit an empty ring, which confuses the HW. ++ * ++ * We append a couple of NOOPs (gen8_emit_wa_tail) after the end of ++ * the normal request to be able to always advance the RING_TAIL on ++ * subsequent resubmissions (for lite restore). Should that fail us, ++ * and we try and submit the same tail again, force the context ++ * reload. ++ */ ++ tail = intel_ring_set_tail(rq->ring, rq->tail); ++ if (unlikely(ce->lrc_reg_state[CTX_RING_TAIL + 1] == tail)) ++ desc |= CTX_DESC_FORCE_RESTORE; ++ ce->lrc_reg_state[CTX_RING_TAIL + 1] = tail; ++ rq->tail = rq->wa_tail; + + /* + * Make sure the context image is complete before we submit it to HW. +@@ -674,7 +683,6 @@ static u64 execlists_update_context(const struct i915_request *rq) + */ + mb(); + +- desc = ce->lrc_desc; + ce->lrc_desc &= ~CTX_DESC_FORCE_RESTORE; + + return desc; +@@ -1149,16 +1157,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine) + if (!list_is_last(&last->sched.link, + &engine->active.requests)) + return; +- +- /* +- * WaIdleLiteRestore:bdw,skl +- * Apply the wa NOOPs to prevent +- * ring:HEAD == rq:TAIL as we resubmit the +- * request. See gen8_emit_fini_breadcrumb() for +- * where we prepare the padding after the +- * end of the request. +- */ +- last->tail = last->wa_tail; + } + } + +-- +2.24.1 + diff --git a/libre/linux-libre-pae/0013-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch b/libre/linux-libre-pae/0013-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch new file mode 100644 index 000000000..ca540525b --- /dev/null +++ b/libre/linux-libre-pae/0013-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch @@ -0,0 +1,35 @@ +From adb810e1819b859aec1f8eb4c5611bc6ebe82137 Mon Sep 17 00:00:00 2001 +From: Boyan Ding <boyan.j.ding@gmail.com> +Date: Wed, 1 Jan 2020 11:44:49 -0800 +Subject: [PATCH 13/13] pinctrl: sunrisepoint: Add missing Interrupt Status + register offset + +Commit 179e5a6114cc ("pinctrl: intel: Remove default Interrupt Status +offset") removes default interrupt status offset of GPIO controllers, +with previous commits explicitly providing the previously default +offsets. However, the is_offset value in SPTH_COMMUNITY is missing, +preventing related irq from being properly detected and handled. + +Fixes: f702e0b93cdb ("pinctrl: sunrisepoint: Provide Interrupt Status register offset") +Link: https://bugzilla.kernel.org/show_bug.cgi?id=205745 +Cc: stable@vger.kernel.org +Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> +--- + drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c +index 44d7f50bbc82..d936e7aa74c4 100644 +--- a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c ++++ b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c +@@ -49,6 +49,7 @@ + .padown_offset = SPT_PAD_OWN, \ + .padcfglock_offset = SPT_PADCFGLOCK, \ + .hostown_offset = SPT_HOSTSW_OWN, \ ++ .is_offset = SPT_GPI_IS, \ + .ie_offset = SPT_GPI_IE, \ + .pin_base = (s), \ + .npins = ((e) - (s) + 1), \ +-- +2.24.1 + diff --git a/libre/linux-libre-pae/PKGBUILD b/libre/linux-libre-pae/PKGBUILD index b5655e5df..659dc7fb7 100644 --- a/libre/linux-libre-pae/PKGBUILD +++ b/libre/linux-libre-pae/PKGBUILD @@ -9,7 +9,7 @@ _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix pkgbase=linux-libre-pae -pkgver=5.4.2 +pkgver=5.4.8 pkgrel=1 pkgdesc='Linux-libre PAE (physical address extension)' url='https://linux-libre.fsfla.org/' @@ -41,6 +41,14 @@ source=( 0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch 0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch 0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch + 0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch + 0007-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch + 0008-x86-intel-Disable-HPET-on-Intel-Ice-Lake-platforms.patch + 0009-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch + 0010-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch + 0011-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch + 0012-drm-i915-gt-Detect-if-we-miss-WaIdleLiteRestore.patch + 0013-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch ) validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva @@ -48,7 +56,7 @@ validpgpkeys=( ) sha512sums=('0d0915133864eb031adfc6700066147dcf3e768a50a31c39754950c95ef4fd322dc701cd50af49c403ef0325adfcb07e354d5e46c1be3dcdd719a7a55c963f37' 'SKIP' - '0b177b5ab5e7b65769c7b1176590f9fadd134f32af4db2bd0fa362dccfefb28d7fd0865b46418f54f10f039623d86012b49bcfb968bae77274447d7a97da35f5' + '6cf4a01741eec4763e6bbb9762aafad815716f61d43b522da294cf8b2d2a1fc5228fffd710aa5e19aa4ffaa8e59b4ea37cfb987cb49d2cff064b8899b0558fba' 'SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' @@ -59,11 +67,19 @@ sha512sums=('0d0915133864eb031adfc6700066147dcf3e768a50a31c39754950c95ef4fd322dc '63f3c3bfe27eb66391dfa2120193476f03cf668bbd9edf4b7cc5dcb8c53295b830ecb6afd10b9a89c190d7f02597529b484c22dbb849d221ef975af8db1d8049' '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - '5bb7fa615301014045383b5421901892565ba7f7fd67da93e34a2b032d3721f6f3e677f8fc87072a33d0d79089541e37b5a34a14bfab2a71b587e3abe3e9743f' - '3ff6fc2cdf541b73e53b22213dd1b218544b15f363d6ce15f42a6ac2deb928dd8f536962a8162a648751cadde827d25427105d0bac4e596288ef839943b71f3a' - 'cfa690ea2e500b4a9670cfff96c9ffc675ffd34799b6ee41a7e173fb71d4fb915a8ff8b50f8802bbc59d1e9fe1ac458bdbdd3f0af249fbc44d3cc80b09a9da75' - 'd71a80d180f4f0a5491fc87dcda6237e53cb309d21d497a76a4f914ce376b53885cd767db2603e6a7ee5b0e6c1f926ac85865614f0997122a73e1e8d1c127749' - '56e94bb21c2f233c61f91336b08263bfc28a755e65cd8ddad89186e8f157417f51925927182bca106f03ddae6a5139e78647c48b6961b669444c4337c7b64731') + '19084ed74a127eaed636309d142fbac122a6593b2f10f42c70ef79663e318edd7d433fd268a88c036ce38545f7d2fb14a94fb903040ecbf16287b28073a59d32' + '1c5e6e98dbfc2ec9512967aa9c746d7396df0dcc3b8dff38106a6097528b4bfdb60dd9aee7cd189fb710780fb3593dc173e4c348076dd1ae25c7870d41d53286' + 'dbd1a0dff6ac0f481b4879b44aef5cf6ca9d37383c95ec664094138261bcaab689b873f688f77a6df4f11145a4fb27a4b0676fae5eae16e0f3cbe1392acf1266' + '51b47890987eca1def8019464eb41d3c32038fc4158f6a8e4f06adc2cb6567599fadd1835cb35d5edc7b144749ccafed0ad4f8ce4996edf2cf60fa5a46725f20' + 'a79a8900aae9ee2587cc7989b7e77215c63c0fc3bc75eb5ab0b50d378f6bb4072d46821514a97f81bd79498c6fb6ce97183110ccf7baa9b8434e560857f61611' + 'c94cfe2b0c9e02c020955f0315b6b61be51125f612ce50dff15d8a3bd8de2976a98df56283d0198f977570974c12b15219c457d2682927f8a0fd9344b3e324b6' + '629012611c1100cc832121c1d53da9a414abfe638a8273488ca319229a66a706ad15d88cdfe3b1769a6176ba7df24fe585f794a502e20e9134730fcfe0341dc3' + '809461f3c3e3ec6019b0cde26cf69dfb8f171c49cf8a95c59d4bc84cc331aad0c7f5c313844fb7c655cc54381d2737fb9cbedd4cd047c68b0bd217c480d6f7b0' + '2165f7e671c61d43b7bb89c3edcf3cd4bf16a4e57eccd44f18eabeadeae250ed57fe0fd20efc101e11d49444edb3956db05f6fe7038b0ce1c3cca37f96795e1c' + 'ff457ff06c3ea8e2a67346eb728540985f8a0dc172e818d381e88a97917b9c34d5b7938e49b08ce76692123c623f941714b31bd07c1b65e60beaa7e2b7ae5af9' + '277a8f3e9b0b015690ac82ef4e9c531d8e1a1ef2cb173ec73f807c649844623d1505f7f82d6b97134d1398e4a197586126d3df6c4925f40aaed7a60ed10c7986' + '3499d257cce45e9abc6ae040bb8f38c76dce6f23c1986c4b753a44f32528671d7d24ddd230ab639eb23f9081624f986697c604e1bdb12a0e4b91ea60ce91ea01' + 'b17d58ea538af2f250dd3587323cb36e96fbd8c0d406792e5b7dc828c6bce25fdf5834185cb42e327450b74cd0821260d1f53a84057a3d72b004394d9393e19d') _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") @@ -144,7 +160,7 @@ _package() { } _package-headers() { - pkgdesc="Header files and scripts for building modules for $pkgdesc kernel" + pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel" provides=("${_replacesarchkernel[@]/%/-headers=${pkgver%%_*}}") conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") |