From 72c9ab660ff2d9068ffb126e3ee45aba10877507 Mon Sep 17 00:00:00 2001 From: David P Date: Mon, 30 Mar 2020 18:23:49 -0400 Subject: updpkg: kernels/linux-libre-xtreme 5.5.13-1 Signed-off-by: David P --- ...RM-atags-add-support-for-Marvell-s-u-boot.patch | 6 +- ...ctl-and-CONFIG-to-disallow-unprivileged-C.patch | 16 +- ...dt-retrieve-MAC-addresses-from-Marvell-bo.patch | 23 +- ...cie-restore-support-for-Killer-Qu-C0-NICs.patch | 42 +++ ...vres-add-a-helper-function-for-ioremap_uc.patch | 79 ----- .../0003-SMILE-Plug-device-tree-file.patch | 10 +- ...PageReserved-manipulation-from-drm_pci_al.patch | 92 ++++++ ...d-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch | 48 --- ...PCI-pciehp-Prevent-deadlock-on-disconnect.patch | 272 ---------------- ...rialise-i915_active_acquire-with-__active.patch | 79 +++++ .../0004-fix-mvsdio-eMMC-timing.patch | 6 +- ...s2idle-Rework-ACPI-events-synchronization.patch | 78 ----- ...m-Take-runtime-pm-wakeref-prior-to-unbind.patch | 130 ++++++++ ...x-Allow-mac-address-to-be-set-as-a-parame.patch | 7 +- ...15-gem-Avoid-parking-the-vma-as-we-unbind.patch | 63 ++++ ...cie-restore-support-for-Killer-Qu-C0-NICs.patch | 36 --- .../0006-set-default-cubietruck-led-triggers.patch | 10 +- ...15-gem-Try-to-flush-pending-unbind-events.patch | 64 ++++ ...ve-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch | 87 ----- ...odroid-set-higher-minimum-buck2-regulator.patch | 8 +- .../0008-ARM-dove-enable-ethernet-on-D3Plug.patch | 8 +- ...x-audio-power-up-sequence-for-gen10-displ.patch | 57 ---- ...m-Reinitialise-the-local-list-before-repe.patch | 34 ++ .../0009-USB-Armory-MkII-support.patch | 11 +- ...d-a-simple-is-bound-check-before-unbindin.patch | 41 +++ ...tend-audio-CDCLK-2-BCLK-constraint-to-mor.patch | 41 --- ...8947-1-Fix-__arch_get_hw_counter-access-t.patch | 28 ++ .../0010-drm-i915-Introduce-a-vma.kref.patch | 252 +++++++++++++++ ...mit-audio-CDCLK-2-BCLK-constraint-back-to.patch | 64 ---- ...-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch | 152 +++++++++ ...Add-DC-feature-mask-to-disable-fractional.patch | 80 ----- kernels/linux-libre-xtreme/PKGBUILD | 109 +++---- kernels/linux-libre-xtreme/config.armv7h | 292 +++++++++++------ kernels/linux-libre-xtreme/config.i686 | 340 ++++++++++++-------- kernels/linux-libre-xtreme/config.x86_64 | 357 +++++++++++++-------- kernels/linux-libre-xtreme/linux-armv7h.preset | 6 +- 36 files changed, 1690 insertions(+), 1338 deletions(-) create mode 100644 kernels/linux-libre-xtreme/0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch delete mode 100644 kernels/linux-libre-xtreme/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch create mode 100644 kernels/linux-libre-xtreme/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch delete mode 100644 kernels/linux-libre-xtreme/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch delete mode 100644 kernels/linux-libre-xtreme/0004-PCI-pciehp-Prevent-deadlock-on-disconnect.patch create mode 100644 kernels/linux-libre-xtreme/0004-drm-i915-Serialise-i915_active_acquire-with-__active.patch delete mode 100644 kernels/linux-libre-xtreme/0005-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch create mode 100644 kernels/linux-libre-xtreme/0005-drm-i915-gem-Take-runtime-pm-wakeref-prior-to-unbind.patch create mode 100644 kernels/linux-libre-xtreme/0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch delete mode 100644 kernels/linux-libre-xtreme/0006-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch create mode 100644 kernels/linux-libre-xtreme/0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch delete mode 100644 kernels/linux-libre-xtreme/0007-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch delete mode 100644 kernels/linux-libre-xtreme/0008-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch create mode 100644 kernels/linux-libre-xtreme/0008-drm-i915-gem-Reinitialise-the-local-list-before-repe.patch create mode 100644 kernels/linux-libre-xtreme/0009-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch delete mode 100644 kernels/linux-libre-xtreme/0009-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch create mode 100644 kernels/linux-libre-xtreme/0010-Revert-ARM-8947-1-Fix-__arch_get_hw_counter-access-t.patch create mode 100644 kernels/linux-libre-xtreme/0010-drm-i915-Introduce-a-vma.kref.patch delete mode 100644 kernels/linux-libre-xtreme/0010-drm-i915-Limit-audio-CDCLK-2-BCLK-constraint-back-to.patch create mode 100644 kernels/linux-libre-xtreme/0011-iwlwifi-don-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch delete mode 100644 kernels/linux-libre-xtreme/0014-drm-amdgpu-Add-DC-feature-mask-to-disable-fractional.patch diff --git a/kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch b/kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch index 074903c47..0d038219b 100644 --- a/kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch +++ b/kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch @@ -1,7 +1,7 @@ -From 88f69b1dcdda406ba9e4c6ad51f0577623d238b1 Mon Sep 17 00:00:00 2001 +From 970026f1d5752c5d9f3d7f524b18ad5d81f7f436 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Dec 2012 19:59:28 +0100 -Subject: [PATCH 1/9] ARM: atags: add support for Marvell's u-boot +Subject: [PATCH 01/10] ARM: atags: add support for Marvell's u-boot Marvell uses a specific atag in its u-boot which includes among other information the MAC addresses for up to 4 network interfaces. @@ -47,5 +47,5 @@ index 25ceda63b284..83578c54975b 100644 }; -- -2.23.0 +2.25.0 diff --git a/kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch index 237b22025..f2a08ca64 100644 --- a/kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ b/kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch @@ -1,7 +1,7 @@ -From 8bd7ec174daab92ac3305aca4d0ec09418254eff Mon Sep 17 00:00:00 2001 +From b7ea2fa503702cbbd1eb2d38371b5650aab88666 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Mon, 16 Sep 2019 04:53:20 +0200 -Subject: [PATCH 01/14] ZEN: Add sysctl and CONFIG to disallow unprivileged +Subject: [PATCH 01/11] ZEN: Add sysctl and CONFIG to disallow unprivileged CLONE_NEWUSER Our default behavior continues to match the vanilla kernel. @@ -13,10 +13,10 @@ Our default behavior continues to match the vanilla kernel. 4 files changed, 50 insertions(+) diff --git a/init/Kconfig b/init/Kconfig -index b4daad2bac23..362f82c5ec07 100644 +index 74297c392dd4..44221292a9eb 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -1118,6 +1118,22 @@ config USER_NS +@@ -1102,6 +1102,22 @@ config USER_NS If unsure, say N. @@ -40,7 +40,7 @@ index b4daad2bac23..362f82c5ec07 100644 bool "PID Namespaces" default y diff --git a/kernel/fork.c b/kernel/fork.c -index 755d8160e001..ed909f8050b2 100644 +index 080809560072..1cb7b827b57b 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -106,6 +106,11 @@ @@ -55,7 +55,7 @@ index 755d8160e001..ed909f8050b2 100644 /* * Minimum number of threads to boot the kernel -@@ -1779,6 +1784,10 @@ static __latent_entropy struct task_struct *copy_process( +@@ -1843,6 +1848,10 @@ static __latent_entropy struct task_struct *copy_process( if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) return ERR_PTR(-EINVAL); @@ -66,7 +66,7 @@ index 755d8160e001..ed909f8050b2 100644 /* * Thread groups must share signals as well, and detached threads * can only be started up within the thread group. -@@ -2836,6 +2845,12 @@ int ksys_unshare(unsigned long unshare_flags) +@@ -2923,6 +2932,12 @@ int ksys_unshare(unsigned long unshare_flags) if (unshare_flags & CLONE_NEWNS) unshare_flags |= CLONE_FS; @@ -128,5 +128,5 @@ index 8eadadc478f9..c36ecd19562c 100644 static DEFINE_MUTEX(userns_state_mutex); -- -2.25.0 +2.26.0 diff --git a/kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch b/kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch index 546120041..7e8f17fb2 100644 --- a/kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch +++ b/kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch @@ -1,8 +1,8 @@ -From cb931641740269a78b002b438904292a1110a5a7 Mon Sep 17 00:00:00 2001 +From ba8c3d62a09ad9582879577a1a71f36213cdc179 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Dec 2012 19:56:58 +0100 -Subject: [PATCH 2/9] ARM: atags/fdt: retrieve MAC addresses from Marvell boot - loader +Subject: [PATCH 02/10] ARM: atags/fdt: retrieve MAC addresses from Marvell + boot loader The atags are parsed and if a Marvell atag is found, up to 4 MAC addresses are extracted there and assigned to node aliases eth0..3 @@ -13,22 +13,13 @@ address set. Signed-off-by: Willy Tarreau --- - arch/arm/boot/compressed/atags_to_fdt.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) + arch/arm/boot/compressed/atags_to_fdt.c | 6 ++++++ + 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c -index 330cd3c2eae5..82f3802ff695 100644 +index 64c49747f8a3..60cd5e5bac93 100644 --- a/arch/arm/boot/compressed/atags_to_fdt.c +++ b/arch/arm/boot/compressed/atags_to_fdt.c -@@ -19,7 +19,7 @@ static int node_offset(void *fdt, const char *node_path) - } - - static int setprop(void *fdt, const char *node_path, const char *property, -- uint32_t *val_array, int size) -+ void *val_array, int size) - { - int offset = node_offset(fdt, node_path); - if (offset < 0) @@ -203,6 +203,12 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space) hex_str(serno, atag->u.serialnr.high); hex_str(serno+8, atag->u.serialnr.low); @@ -43,5 +34,5 @@ index 330cd3c2eae5..82f3802ff695 100644 } -- -2.23.0 +2.25.0 diff --git a/kernels/linux-libre-xtreme/0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch b/kernels/linux-libre-xtreme/0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch new file mode 100644 index 000000000..c729cbd74 --- /dev/null +++ b/kernels/linux-libre-xtreme/0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch @@ -0,0 +1,42 @@ +From 09ad81782f04168200af2f7dc4345830bfee9eef Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Tue, 24 Dec 2019 06:16:39 +0100 +Subject: [PATCH 02/11] iwlwifi: pcie: restore support for Killer Qu C0 NICs + +Commit 809805a820c6 ("iwlwifi: pcie: move some cfg mangling from +trans_pcie_alloc to probe") 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 ("iwlwifi: pcie: handle switching killer Qu B0 NICs to +C0"). + +I suspect this is more of the "merge damage" which commit 7cded5658329 +("iwlwifi: pcie: fix merge damage on making QnJ exclusive") talks about. + +Restore the missing lines so the driver loads the right firmware for +these NICs. + +Fixes: 809805a820c6 ("iwlwifi: pcie: move some cfg mangling from trans_pcie_alloc to probe") +Signed-off-by: Jan Alexander Steffens (heftig) +--- + 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.26.0 + diff --git a/kernels/linux-libre-xtreme/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch b/kernels/linux-libre-xtreme/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch deleted file mode 100644 index 8c0ba2b8d..000000000 --- a/kernels/linux-libre-xtreme/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 6a7489b6d1f0a586c08cc3ae6887f53f59e96b86 Mon Sep 17 00:00:00 2001 -From: Tuowen Zhao -Date: Wed, 16 Oct 2019 15:06:28 -0600 -Subject: [PATCH 02/14] lib: devres: add a helper function for ioremap_uc - -Implement a resource managed strongly uncachable ioremap function. - -Cc: # v4.19+ -Tested-by: AceLan Kao -Signed-off-by: Tuowen Zhao -Acked-by: Mika Westerberg -Acked-by: Andy Shevchenko -Acked-by: Luis Chamberlain -Signed-off-by: Lee Jones ---- - include/linux/io.h | 2 ++ - lib/devres.c | 19 +++++++++++++++++++ - 2 files changed, 21 insertions(+) - -diff --git a/include/linux/io.h b/include/linux/io.h -index accac822336a..a59834bc0a11 100644 ---- a/include/linux/io.h -+++ b/include/linux/io.h -@@ -64,6 +64,8 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr) - - void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, - resource_size_t size); -+void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset, -+ resource_size_t size); - void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, - resource_size_t size); - void __iomem *devm_ioremap_wc(struct device *dev, resource_size_t offset, -diff --git a/lib/devres.c b/lib/devres.c -index 6a0e9bd6524a..17624d35e82d 100644 ---- a/lib/devres.c -+++ b/lib/devres.c -@@ -9,6 +9,7 @@ - enum devm_ioremap_type { - DEVM_IOREMAP = 0, - DEVM_IOREMAP_NC, -+ DEVM_IOREMAP_UC, - DEVM_IOREMAP_WC, - }; - -@@ -39,6 +40,9 @@ static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset, - case DEVM_IOREMAP_NC: - addr = ioremap_nocache(offset, size); - break; -+ case DEVM_IOREMAP_UC: -+ addr = ioremap_uc(offset, size); -+ break; - case DEVM_IOREMAP_WC: - addr = ioremap_wc(offset, size); - break; -@@ -68,6 +72,21 @@ void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, - } - EXPORT_SYMBOL(devm_ioremap); - -+/** -+ * devm_ioremap_uc - Managed ioremap_uc() -+ * @dev: Generic device to remap IO address for -+ * @offset: Resource address to map -+ * @size: Size of map -+ * -+ * Managed ioremap_uc(). Map is automatically unmapped on driver detach. -+ */ -+void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset, -+ resource_size_t size) -+{ -+ return __devm_ioremap(dev, offset, size, DEVM_IOREMAP_UC); -+} -+EXPORT_SYMBOL_GPL(devm_ioremap_uc); -+ - /** - * devm_ioremap_nocache - Managed ioremap_nocache() - * @dev: Generic device to remap IO address for --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch b/kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch index b07e149b7..683074a2f 100644 --- a/kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch +++ b/kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch @@ -1,7 +1,7 @@ -From 8dc29eb34efbef2aa3ce6e499cea11765286ffbd Mon Sep 17 00:00:00 2001 +From 2fd36c0086abd28bbbc98d4d147939c0a588c9e2 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 5 Sep 2014 15:41:19 -0600 -Subject: [PATCH 3/9] SMILE Plug device tree file +Subject: [PATCH 03/10] SMILE Plug device tree file This adds a dts file for the SMILE Plug, which only differs from the Mirabox dts with the LED definitions. @@ -14,10 +14,10 @@ Signed-off-by: Kevin Mihelich create mode 100644 arch/arm/boot/dts/armada-370-smileplug.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index b21b3a64641a..a0f92b9dbd7d 100644 +index 08011dc8c7a6..9f10323ecfde 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -1216,6 +1216,7 @@ dtb-$(CONFIG_MACH_ARMADA_370) += \ +@@ -1227,6 +1227,7 @@ dtb-$(CONFIG_MACH_ARMADA_370) += \ armada-370-db.dtb \ armada-370-dlink-dns327l.dtb \ armada-370-mirabox.dtb \ @@ -205,5 +205,5 @@ index 000000000000..d01308ab848b + }; +}; -- -2.23.0 +2.25.0 diff --git a/kernels/linux-libre-xtreme/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch b/kernels/linux-libre-xtreme/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch new file mode 100644 index 000000000..9ce302035 --- /dev/null +++ b/kernels/linux-libre-xtreme/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch @@ -0,0 +1,92 @@ +From 7e8f0d17203665f1e6cb110ecbfc90e9ebed8c28 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Sun, 2 Feb 2020 17:16:31 +0000 +Subject: [PATCH 03/11] drm: Remove PageReserved manipulation from + drm_pci_alloc + +drm_pci_alloc/drm_pci_free are very thin wrappers around the core dma +facilities, and we have no special reason within the drm layer to behave +differently. In particular, since + +commit de09d31dd38a50fdce106c15abd68432eebbd014 +Author: Kirill A. Shutemov +Date: Fri Jan 15 16:51:42 2016 -0800 + + page-flags: define PG_reserved behavior on compound pages + + As far as I can see there's no users of PG_reserved on compound pages. + Let's use PF_NO_COMPOUND here. + +it has been illegal to combine GFP_COMP with SetPageReserved, so lets +stop doing both and leave the dma layer to its own devices. + +Reported-by: Taketo Kabe +Bug: https://gitlab.freedesktop.org/drm/intel/issues/1027 +Fixes: de09d31dd38a ("page-flags: define PG_reserved behavior on compound pages") +Signed-off-by: Chris Wilson +Cc: # v4.5+ +Reviewed-by: Alex Deucher +Link: https://patchwork.freedesktop.org/patch/msgid/20200202171635.4039044-1-chris@chris-wilson.co.uk +--- + drivers/gpu/drm/drm_pci.c | 23 ++--------------------- + 1 file changed, 2 insertions(+), 21 deletions(-) + +diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c +index a86a3ab2771c..235729f4aadb 100644 +--- a/drivers/gpu/drm/drm_pci.c ++++ b/drivers/gpu/drm/drm_pci.c +@@ -51,8 +51,6 @@ + drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t align) + { + drm_dma_handle_t *dmah; +- unsigned long addr; +- size_t sz; + + /* pci_alloc_consistent only guarantees alignment to the smallest + * PAGE_SIZE order which is greater than or equal to the requested size. +@@ -68,20 +66,13 @@ drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t ali + dmah->size = size; + dmah->vaddr = dma_alloc_coherent(&dev->pdev->dev, size, + &dmah->busaddr, +- GFP_KERNEL | __GFP_COMP); ++ GFP_KERNEL); + + if (dmah->vaddr == NULL) { + kfree(dmah); + return NULL; + } + +- /* XXX - Is virt_to_page() legal for consistent mem? */ +- /* Reserve */ +- for (addr = (unsigned long)dmah->vaddr, sz = size; +- sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { +- SetPageReserved(virt_to_page((void *)addr)); +- } +- + return dmah; + } + +@@ -94,19 +85,9 @@ EXPORT_SYMBOL(drm_pci_alloc); + */ + void __drm_legacy_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah) + { +- unsigned long addr; +- size_t sz; +- +- if (dmah->vaddr) { +- /* XXX - Is virt_to_page() legal for consistent mem? */ +- /* Unreserve */ +- for (addr = (unsigned long)dmah->vaddr, sz = dmah->size; +- sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { +- ClearPageReserved(virt_to_page((void *)addr)); +- } ++ if (dmah->vaddr) + dma_free_coherent(&dev->pdev->dev, dmah->size, dmah->vaddr, + dmah->busaddr); +- } + } + + /** +-- +2.26.0 + diff --git a/kernels/linux-libre-xtreme/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch b/kernels/linux-libre-xtreme/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch deleted file mode 100644 index 5fc96db08..000000000 --- a/kernels/linux-libre-xtreme/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 80b9003aa031b66333ab68692e0661b8d7a7e5f7 Mon Sep 17 00:00:00 2001 -From: Tuowen Zhao -Date: Wed, 16 Oct 2019 15:06:29 -0600 -Subject: [PATCH 03/14] 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, -this bug could be corrected with a firmware update. - -This patch use devm_ioremap_uc to overwrite/ignore the MTRR settings -by forcing the use of strongly uncachable pages for intel-lpss. - -The BIOS bug is present on Dell XPS 13 7390 2-in-1: - -[ 0.001734] 5 base 4000000000 mask 6000000000 write-combining - -4000000000-7fffffffff : PCI Bus 0000:00 - 4000000000-400fffffff : 0000:00:02.0 (i915) - 4010000000-4010000fff : 0000:00:15.0 (intel-lpss-pci) - -Link: https://bugzilla.kernel.org/show_bug.cgi?id=203485 -Cc: # v4.19+ -Tested-by: AceLan Kao -Signed-off-by: Tuowen Zhao -Acked-by: Mika Westerberg -Acked-by: Andy Shevchenko -Tested-by: Roman Gilg -Signed-off-by: Lee Jones ---- - drivers/mfd/intel-lpss.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c -index bfe4ff337581..b0f0781a6b9c 100644 ---- a/drivers/mfd/intel-lpss.c -+++ b/drivers/mfd/intel-lpss.c -@@ -384,7 +384,7 @@ int intel_lpss_probe(struct device *dev, - if (!lpss) - return -ENOMEM; - -- lpss->priv = devm_ioremap(dev, info->mem->start + LPSS_PRIV_OFFSET, -+ lpss->priv = devm_ioremap_uc(dev, info->mem->start + LPSS_PRIV_OFFSET, - LPSS_PRIV_SIZE); - if (!lpss->priv) - return -ENOMEM; --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0004-PCI-pciehp-Prevent-deadlock-on-disconnect.patch b/kernels/linux-libre-xtreme/0004-PCI-pciehp-Prevent-deadlock-on-disconnect.patch deleted file mode 100644 index 69bcddb7a..000000000 --- a/kernels/linux-libre-xtreme/0004-PCI-pciehp-Prevent-deadlock-on-disconnect.patch +++ /dev/null @@ -1,272 +0,0 @@ -From 4c3a182e5ce8a05eb3db20b908a60015fb47d021 Mon Sep 17 00:00:00 2001 -From: Mika Westerberg -Date: Tue, 29 Oct 2019 20:00:22 +0300 -Subject: [PATCH 04/14] PCI: pciehp: Prevent deadlock on disconnect - -This addresses deadlocks in these common cases in hierarchies containing -two switches: - - - All involved ports are runtime suspended and they are unplugged. This - can happen easily if the drivers involved automatically enable runtime - PM (xHCI for example does that). - - - System is suspended (e.g., closing the lid on a laptop) with a dock + - something else connected, and the dock is unplugged while suspended. - -These cases lead to the following deadlock: - - INFO: task irq/126-pciehp:198 blocked for more than 120 seconds. - irq/126-pciehp D 0 198 2 0x80000000 - Call Trace: - schedule+0x2c/0x80 - schedule_timeout+0x246/0x350 - wait_for_completion+0xb7/0x140 - kthread_stop+0x49/0x110 - free_irq+0x32/0x70 - pcie_shutdown_notification+0x2f/0x50 - pciehp_remove+0x27/0x50 - pcie_port_remove_service+0x36/0x50 - device_release_driver+0x12/0x20 - bus_remove_device+0xec/0x160 - device_del+0x13b/0x350 - device_unregister+0x1a/0x60 - remove_iter+0x1e/0x30 - device_for_each_child+0x56/0x90 - pcie_port_device_remove+0x22/0x40 - pcie_portdrv_remove+0x20/0x60 - pci_device_remove+0x3e/0xc0 - device_release_driver_internal+0x18c/0x250 - device_release_driver+0x12/0x20 - pci_stop_bus_device+0x6f/0x90 - pci_stop_bus_device+0x31/0x90 - pci_stop_and_remove_bus_device+0x12/0x20 - pciehp_unconfigure_device+0x88/0x140 - pciehp_disable_slot+0x6a/0x110 - pciehp_handle_presence_or_link_change+0x263/0x400 - pciehp_ist+0x1c9/0x1d0 - irq_thread_fn+0x24/0x60 - irq_thread+0xeb/0x190 - kthread+0x120/0x140 - - INFO: task irq/190-pciehp:2288 blocked for more than 120 seconds. - irq/190-pciehp D 0 2288 2 0x80000000 - Call Trace: - __schedule+0x2a2/0x880 - schedule+0x2c/0x80 - schedule_preempt_disabled+0xe/0x10 - mutex_lock+0x2c/0x30 - pci_lock_rescan_remove+0x15/0x20 - pciehp_unconfigure_device+0x4d/0x140 - pciehp_disable_slot+0x6a/0x110 - pciehp_handle_presence_or_link_change+0x263/0x400 - pciehp_ist+0x1c9/0x1d0 - irq_thread_fn+0x24/0x60 - irq_thread+0xeb/0x190 - kthread+0x120/0x140 - -What happens here is that the whole hierarchy is runtime resumed and the -parent PCIe downstream port, which got the hot-remove event, starts -removing devices below it, taking pci_lock_rescan_remove() lock. When the -child PCIe port is runtime resumed it calls pciehp_check_presence() which -ends up calling pciehp_card_present() and pciehp_check_link_active(). Both -of these use pcie_capability_read_word(), which notices that the underlying -device is already gone and returns PCIBIOS_DEVICE_NOT_FOUND with the -capability value set to 0. When pciehp gets this value it thinks that its -child device is also hot-removed and schedules its IRQ thread to handle the -event. - -The deadlock happens when the child's IRQ thread runs and tries to acquire -pci_lock_rescan_remove() which is already taken by the parent and the -parent waits for the child's IRQ thread to finish. - -Prevent this from happening by checking the return value of -pcie_capability_read_word() and if it is PCIBIOS_DEVICE_NOT_FOUND stop -performing any hot-removal activities. - -[bhelgaas: add common scenarios to commit log] -Link: https://lore.kernel.org/r/20191029170022.57528-2-mika.westerberg@linux.intel.com -Tested-by: Kai-Heng Feng -Signed-off-by: Mika Westerberg -Signed-off-by: Bjorn Helgaas ---- - drivers/pci/hotplug/pciehp.h | 6 ++-- - drivers/pci/hotplug/pciehp_core.c | 11 ++++-- - drivers/pci/hotplug/pciehp_ctrl.c | 4 +-- - drivers/pci/hotplug/pciehp_hpc.c | 59 +++++++++++++++++++++++++------ - 4 files changed, 61 insertions(+), 19 deletions(-) - -diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h -index 882ce82c4699..aa61d4c219d7 100644 ---- a/drivers/pci/hotplug/pciehp.h -+++ b/drivers/pci/hotplug/pciehp.h -@@ -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); --bool pciehp_card_present(struct controller *ctrl); --bool pciehp_card_present_or_link_active(struct controller *ctrl); -+int pciehp_card_present(struct controller *ctrl); -+int pciehp_card_present_or_link_active(struct controller *ctrl); - int pciehp_check_link_status(struct controller *ctrl); --bool pciehp_check_link_active(struct controller *ctrl); -+int pciehp_check_link_active(struct controller *ctrl); - void pciehp_release_ctrl(struct controller *ctrl); - - int pciehp_sysfs_enable_slot(struct hotplug_slot *hotplug_slot); -diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c -index 56daad828c9e..312cc45c44c7 100644 ---- a/drivers/pci/hotplug/pciehp_core.c -+++ b/drivers/pci/hotplug/pciehp_core.c -@@ -139,10 +139,15 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value) - { - struct controller *ctrl = to_ctrl(hotplug_slot); - struct pci_dev *pdev = ctrl->pcie->port; -+ int ret; - - pci_config_pm_runtime_get(pdev); -- *value = pciehp_card_present_or_link_active(ctrl); -+ ret = pciehp_card_present_or_link_active(ctrl); - pci_config_pm_runtime_put(pdev); -+ if (ret < 0) -+ return ret; -+ -+ *value = ret; - return 0; - } - -@@ -158,13 +163,13 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value) - */ - static void pciehp_check_presence(struct controller *ctrl) - { -- bool occupied; -+ int occupied; - - down_read(&ctrl->reset_lock); - mutex_lock(&ctrl->state_lock); - - occupied = pciehp_card_present_or_link_active(ctrl); -- if ((occupied && (ctrl->state == OFF_STATE || -+ if ((occupied > 0 && (ctrl->state == OFF_STATE || - ctrl->state == BLINKINGON_STATE)) || - (!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 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) - - void pciehp_handle_presence_or_link_change(struct controller *ctrl, u32 events) - { -- bool present, link_active; -+ int present, link_active; - - /* - * If the slot is on and presence or link has changed, turn it off. -@@ -257,7 +257,7 @@ void pciehp_handle_presence_or_link_change(struct controller *ctrl, u32 events) - mutex_lock(&ctrl->state_lock); - present = pciehp_card_present(ctrl); - link_active = pciehp_check_link_active(ctrl); -- if (!present && !link_active) { -+ if (present <= 0 && link_active <= 0) { - mutex_unlock(&ctrl->state_lock); - return; - } -diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c -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) - pcie_do_write_cmd(ctrl, cmd, mask, false); - } - --bool pciehp_check_link_active(struct controller *ctrl) -+/** -+ * pciehp_check_link_active() - Is the link active -+ * @ctrl: PCIe hotplug controller -+ * -+ * Check whether the downstream link is currently active. Note it is -+ * possible that the card is removed immediately after this so the -+ * caller may need to take it into account. -+ * -+ * If the hotplug controller itself is not available anymore returns -+ * %-ENODEV. -+ */ -+int pciehp_check_link_active(struct controller *ctrl) - { - struct pci_dev *pdev = ctrl_dev(ctrl); - u16 lnk_status; -- bool ret; -+ int ret; - -- pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnk_status); -- ret = !!(lnk_status & PCI_EXP_LNKSTA_DLLLA); -+ ret = pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnk_status); -+ if (ret == PCIBIOS_DEVICE_NOT_FOUND || lnk_status == (u16)~0) -+ return -ENODEV; - -- if (ret) -- ctrl_dbg(ctrl, "%s: lnk_status = %x\n", __func__, lnk_status); -+ ret = !!(lnk_status & PCI_EXP_LNKSTA_DLLLA); -+ ctrl_dbg(ctrl, "%s: lnk_status = %x\n", __func__, lnk_status); - - return ret; - } -@@ -373,13 +385,29 @@ void pciehp_get_latch_status(struct controller *ctrl, u8 *status) - *status = !!(slot_status & PCI_EXP_SLTSTA_MRLSS); - } - --bool pciehp_card_present(struct controller *ctrl) -+/** -+ * pciehp_card_present() - Is the card present -+ * @ctrl: PCIe hotplug controller -+ * -+ * Function checks whether the card is currently present in the slot and -+ * in that case returns true. Note it is possible that the card is -+ * removed immediately after the check so the caller may need to take -+ * this into account. -+ * -+ * It the hotplug controller itself is not available anymore returns -+ * %-ENODEV. -+ */ -+int pciehp_card_present(struct controller *ctrl) - { - struct pci_dev *pdev = ctrl_dev(ctrl); - u16 slot_status; -+ int ret; - -- pcie_capability_read_word(pdev, PCI_EXP_SLTSTA, &slot_status); -- return slot_status & PCI_EXP_SLTSTA_PDS; -+ ret = pcie_capability_read_word(pdev, PCI_EXP_SLTSTA, &slot_status); -+ if (ret == PCIBIOS_DEVICE_NOT_FOUND || slot_status == (u16)~0) -+ return -ENODEV; -+ -+ return !!(slot_status & PCI_EXP_SLTSTA_PDS); - } - - /** -@@ -390,10 +418,19 @@ bool pciehp_card_present(struct controller *ctrl) - * Presence Detect State bit, this helper also returns true if the Link Active - * bit is set. This is a concession to broken hotplug ports which hardwire - * Presence Detect State to zero, such as Wilocity's [1ae9:0200]. -+ * -+ * Returns: %1 if the slot is occupied and %0 if it is not. If the hotplug -+ * port is not present anymore returns %-ENODEV. - */ --bool pciehp_card_present_or_link_active(struct controller *ctrl) -+int pciehp_card_present_or_link_active(struct controller *ctrl) - { -- return pciehp_card_present(ctrl) || pciehp_check_link_active(ctrl); -+ int ret; -+ -+ ret = pciehp_card_present(ctrl); -+ if (ret) -+ return ret; -+ -+ return pciehp_check_link_active(ctrl); - } - - int pciehp_query_power_fault(struct controller *ctrl) --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0004-drm-i915-Serialise-i915_active_acquire-with-__active.patch b/kernels/linux-libre-xtreme/0004-drm-i915-Serialise-i915_active_acquire-with-__active.patch new file mode 100644 index 000000000..791b3ae6c --- /dev/null +++ b/kernels/linux-libre-xtreme/0004-drm-i915-Serialise-i915_active_acquire-with-__active.patch @@ -0,0 +1,79 @@ +From bb4e672920c042aea805e1d47933e2f26b02fbd8 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Thu, 5 Dec 2019 18:33:32 +0000 +Subject: [PATCH 04/11] drm/i915: Serialise i915_active_acquire() with + __active_retire() + +As __active_retire() does it's final atomic_dec() under the +ref->tree_lock spinlock, in order to prevent ourselves from reusing the +ref->cache and ref->tree as they are being destroyed, we need to +serialise with the retirement during i915_active_acquire(). + +[ +0.000005] kernel BUG at drivers/gpu/drm/i915/i915_active.c:157! +[ +0.000011] invalid opcode: 0000 [#1] SMP +[ +0.000004] CPU: 7 PID: 188 Comm: kworker/u16:4 Not tainted 5.4.0-rc8-03070-gac5e57322614 #89 +[ +0.000002] Hardware name: Razer Razer Blade Stealth 13 Late 2019/LY320, BIOS 1.02 09/10/2019 +[ +0.000082] Workqueue: events_unbound active_work [i915] +[ +0.000059] RIP: 0010:__active_retire+0x115/0x120 [i915] +[ +0.000003] Code: 75 28 48 8b 3d 8c 6e 1a 00 48 89 ee e8 e4 5f a5 c0 48 8b 44 24 10 65 48 33 04 25 28 00 00 00 75 0f 48 83 c4 18 5b 5d 41 5c c3 <0f> 0b 0f 0b 0f 0b e8 a0 90 87 c0 0f 1f 44 00 00 48 8b 3d 54 6e 1a +[ +0.000002] RSP: 0018:ffffb833003f7e48 EFLAGS: 00010286 +[ +0.000003] RAX: ffff8d6e8d726d00 RBX: ffff8d6f9db4e840 RCX: 0000000000000000 +[ +0.000001] RDX: ffffffff82605930 RSI: ffff8d6f9adc4908 RDI: ffff8d6e96cefe28 +[ +0.000002] RBP: ffff8d6e96cefe00 R08: 0000000000000000 R09: ffff8d6f9ffe9a50 +[ +0.000002] R10: 0000000000000048 R11: 0000000000000018 R12: ffff8d6f9adc4930 +[ +0.000001] R13: ffff8d6f9e04fb00 R14: 0000000000000000 R15: ffff8d6f9adc4988 +[ +0.000002] FS: 0000000000000000(0000) GS:ffff8d6f9ffc0000(0000) knlGS:0000000000000000 +[ +0.000002] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +[ +0.000002] CR2: 000055eb5a34cf10 CR3: 000000018d609002 CR4: 0000000000760ee0 +[ +0.000002] PKRU: 55555554 +[ +0.000001] Call Trace: +[ +0.000010] process_one_work+0x1aa/0x350 +[ +0.000004] worker_thread+0x4d/0x3a0 +[ +0.000004] kthread+0xfb/0x130 +[ +0.000004] ? process_one_work+0x350/0x350 +[ +0.000003] ? kthread_park+0x90/0x90 +[ +0.000005] ret_from_fork+0x1f/0x40 + +Reported-by: Kenneth Graunke +Fixes: c9ad602feabe ("drm/i915: Split i915_active.mutex into an irq-safe spinlock for the rbtree") +Signed-off-by: Chris Wilson +Cc: Tvrtko Ursulin +Cc: Kenneth Graunke +Cc: Matthew Auld +Tested-by: Kenneth Graunke +Reviewed-by: Kenneth Graunke +Link: https://patchwork.freedesktop.org/patch/msgid/20191205183332.801237-1-chris@chris-wilson.co.uk +--- + drivers/gpu/drm/i915/i915_active.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c +index a19e7d89bc8a..378b52d1ab74 100644 +--- a/drivers/gpu/drm/i915/i915_active.c ++++ b/drivers/gpu/drm/i915/i915_active.c +@@ -91,10 +91,9 @@ static void debug_active_init(struct i915_active *ref) + + static void debug_active_activate(struct i915_active *ref) + { +- spin_lock_irq(&ref->tree_lock); ++ lockdep_assert_held(&ref->tree_lock); + if (!atomic_read(&ref->count)) /* before the first inc */ + debug_object_activate(ref, &active_debug_desc); +- spin_unlock_irq(&ref->tree_lock); + } + + static void debug_active_deactivate(struct i915_active *ref) +@@ -407,8 +406,10 @@ int i915_active_acquire(struct i915_active *ref) + if (!atomic_read(&ref->count) && ref->active) + err = ref->active(ref); + if (!err) { ++ spin_lock_irq(&ref->tree_lock); /* vs __active_retire() */ + debug_active_activate(ref); + atomic_inc(&ref->count); ++ spin_unlock_irq(&ref->tree_lock); + } + + mutex_unlock(&ref->mutex); +-- +2.26.0 + diff --git a/kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch b/kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch index 791a546d6..81f90ebd9 100644 --- a/kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch +++ b/kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch @@ -1,7 +1,7 @@ -From 579d132a05177e4b85d3ff2321762948fd78b420 Mon Sep 17 00:00:00 2001 +From c49db8d7558931cf54a5e3ed4565ecbfda2a989a Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 5 Sep 2014 15:43:56 -0600 -Subject: [PATCH 4/9] fix mvsdio eMMC timing +Subject: [PATCH 04/10] fix mvsdio eMMC timing These changes from Globalscale change the MMC timing to allow the eMMC versions of the Mirabox and SMILE Plug to work. @@ -34,5 +34,5 @@ index 74a0a7fbbf7f..92eadb116762 100644 host->clock = ios->clock; host->ns_per_clk = 1000000000 / (host->base_clock / (m+1)); -- -2.23.0 +2.25.0 diff --git a/kernels/linux-libre-xtreme/0005-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch b/kernels/linux-libre-xtreme/0005-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch deleted file mode 100644 index 859dd5404..000000000 --- a/kernels/linux-libre-xtreme/0005-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch +++ /dev/null @@ -1,78 +0,0 @@ -From ab195ccffbd0721892d70102ab836fd106361fe7 Mon Sep 17 00:00:00 2001 -From: "Rafael J. Wysocki" -Date: Thu, 28 Nov 2019 23:50:40 +0100 -Subject: [PATCH 05/14] 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 ---- - 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.25.0 - diff --git a/kernels/linux-libre-xtreme/0005-drm-i915-gem-Take-runtime-pm-wakeref-prior-to-unbind.patch b/kernels/linux-libre-xtreme/0005-drm-i915-gem-Take-runtime-pm-wakeref-prior-to-unbind.patch new file mode 100644 index 000000000..f984a0174 --- /dev/null +++ b/kernels/linux-libre-xtreme/0005-drm-i915-gem-Take-runtime-pm-wakeref-prior-to-unbind.patch @@ -0,0 +1,130 @@ +From aa9a02673b4cffa21cc6742edba6b42fb0e8fc62 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Tue, 3 Dec 2019 10:13:46 +0000 +Subject: [PATCH 05/11] drm/i915/gem: Take runtime-pm wakeref prior to + unbinding + +Some machines require ACPI for runtime resume, and ACPI is quite kmalloc +happy. We cannot handle kmalloc from inside the vm->mutex, as they are +used by the shrinker, and so we must ensure the global runtime-pm is +awake prior to unbinding to avoid the potential inversion. + +<4> [57.121748] ====================================================== +<4> [57.121750] WARNING: possible circular locking dependency detected +<4> [57.121753] 5.4.0-rc8-CI-CI_DRM_7466+ #1 Tainted: G U +<4> [57.121754] ------------------------------------------------------ +<4> [57.121756] i915_pm_rpm/1105 is trying to acquire lock: +<4> [57.121758] ffffffff82263a40 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.117+0x0/0x30 +<4> [57.121766] +but task is already holding lock: +<4> [57.121768] ffff888475a593c0 (&vm->mutex){+.+.}, at: i915_vma_unbind+0x21/0x50 [i915] +<4> [57.121868] +which lock already depends on the new lock. + +<4> [57.121869] +the existing dependency chain (in reverse order) is: +<4> [57.121871] +-> #1 (&vm->mutex){+.+.}: +<4> [57.121951] i915_gem_shrinker_taints_mutex+0xa2/0xd0 [i915] +<4> [57.122028] i915_address_space_init+0xa9/0x170 [i915] +<4> [57.122104] i915_ggtt_init_hw+0x47/0x130 [i915] +<4> [57.122150] i915_driver_probe+0xbb4/0x15f0 [i915] +<4> [57.122197] i915_pci_probe+0x43/0x1c0 [i915] +<4> [57.122202] pci_device_probe+0x9e/0x120 +<4> [57.122206] really_probe+0xea/0x420 +<4> [57.122209] driver_probe_device+0x10b/0x120 +<4> [57.122212] device_driver_attach+0x4a/0x50 +<4> [57.122214] __driver_attach+0x97/0x130 +<4> [57.122217] bus_for_each_dev+0x74/0xc0 +<4> [57.122220] bus_add_driver+0x142/0x220 +<4> [57.122222] driver_register+0x56/0xf0 +<4> [57.122226] do_one_initcall+0x58/0x2ff +<4> [57.122230] do_init_module+0x56/0x1f8 +<4> [57.122233] load_module+0x243e/0x29f0 +<4> [57.122236] __do_sys_finit_module+0xe9/0x110 +<4> [57.122239] do_syscall_64+0x4f/0x210 +<4> [57.122242] entry_SYSCALL_64_after_hwframe+0x49/0xbe +<4> [57.122244] +-> #0 (fs_reclaim){+.+.}: +<4> [57.122249] __lock_acquire+0x1328/0x15d0 +<4> [57.122251] lock_acquire+0xa7/0x1c0 +<4> [57.122254] fs_reclaim_acquire.part.117+0x24/0x30 +<4> [57.122257] __kmalloc+0x48/0x320 +<4> [57.122261] acpi_ns_internalize_name+0x44/0x9b +<4> [57.122264] acpi_ns_get_node_unlocked+0x6b/0xd3 +<4> [57.122267] acpi_ns_get_node+0x3b/0x50 +<4> [57.122271] acpi_get_handle+0x8a/0xb4 +<4> [57.122274] acpi_has_method+0x1c/0x40 +<4> [57.122278] acpi_pci_set_power_state+0x40/0xe0 +<4> [57.122281] pci_platform_power_transition+0x3e/0x90 +<4> [57.122284] pci_set_power_state+0x83/0xf0 +<4> [57.122287] pci_restore_standard_config+0x22/0x40 +<4> [57.122289] pci_pm_runtime_resume+0x23/0xc0 +<4> [57.122293] __rpm_callback+0xb1/0x110 +<4> [57.122296] rpm_callback+0x1a/0x70 +<4> [57.122299] rpm_resume+0x50e/0x790 +<4> [57.122302] __pm_runtime_resume+0x42/0x80 +<4> [57.122357] __intel_runtime_pm_get+0x15/0x60 [i915] +<4> [57.122435] ggtt_unbind_vma+0x24/0x60 [i915] +<4> [57.122514] __i915_vma_unbind.part.39+0xb5/0x500 [i915] +<4> [57.122593] i915_vma_unbind+0x2d/0x50 [i915] +<4> [57.122668] i915_gem_object_unbind+0x11c/0x260 [i915] +<4> [57.122740] i915_gem_object_set_cache_level+0x32/0x90 [i915] +<4> [57.122810] i915_gem_set_caching_ioctl+0x1f7/0x2f0 [i915] +<4> [57.122815] drm_ioctl_kernel+0xa7/0xf0 +<4> [57.122818] drm_ioctl+0x2e1/0x390 +<4> [57.122822] do_vfs_ioctl+0xa0/0x6f0 +<4> [57.122825] ksys_ioctl+0x35/0x60 +<4> [57.122828] __x64_sys_ioctl+0x11/0x20 +<4> [57.122830] do_syscall_64+0x4f/0x210 +<4> [57.122833] entry_SYSCALL_64_after_hwframe+0x49/0xbe + +Closes: https://gitlab.freedesktop.org/drm/intel/issues/711 +Signed-off-by: Chris Wilson +Reviewed-by: Matthew Auld +Link: https://patchwork.freedesktop.org/patch/msgid/20191203101347.2836057-1-chris@chris-wilson.co.uk +--- + drivers/gpu/drm/i915/i915_gem.c | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c +index 3f07948ea4da..ed2436db5dd2 100644 +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -119,10 +119,23 @@ i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data, + int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + unsigned long flags) + { +- struct i915_vma *vma; ++ struct intel_runtime_pm *rpm = &to_i915(obj->base.dev)->runtime_pm; + LIST_HEAD(still_in_list); ++ intel_wakeref_t wakeref; ++ struct i915_vma *vma; + int ret = 0; + ++ if (!atomic_read(&obj->bind_count)) ++ return 0; ++ ++ /* ++ * As some machines use ACPI to handle runtime-resume callbacks, and ++ * ACPI is quite kmalloc happy, we cannot resume beneath the vm->mutex ++ * as they are required by the shrinker. Ergo, we wake the device up ++ * first just in case. ++ */ ++ wakeref = intel_runtime_pm_get(rpm); ++ + spin_lock(&obj->vma.lock); + while (!ret && (vma = list_first_entry_or_null(&obj->vma.list, + struct i915_vma, +@@ -146,6 +159,8 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + list_splice(&still_in_list, &obj->vma.list); + spin_unlock(&obj->vma.lock); + ++ intel_runtime_pm_put(rpm, wakeref); ++ + return ret; + } + +-- +2.26.0 + diff --git a/kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch b/kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch index e95960163..3ae8471eb 100644 --- a/kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch +++ b/kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch @@ -1,7 +1,8 @@ -From 585c73f82751043ebcf1e097a29bb9c6d2c3fbd1 Mon Sep 17 00:00:00 2001 +From afac272fddea145b4ba7532370818ada190b4058 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Feb 2014 01:43:50 -0300 -Subject: [PATCH 5/9] net/smsc95xx: Allow mac address to be set as a parameter +Subject: [PATCH 05/10] net/smsc95xx: Allow mac address to be set as a + parameter --- drivers/net/usb/smsc95xx.c | 56 ++++++++++++++++++++++++++++++++++++++ @@ -91,5 +92,5 @@ index 355be77f4241..c94a7193e0b9 100644 /* maybe the boot loader passed the MAC address in devicetree */ -- -2.23.0 +2.25.0 diff --git a/kernels/linux-libre-xtreme/0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch b/kernels/linux-libre-xtreme/0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch new file mode 100644 index 000000000..0ff019a0f --- /dev/null +++ b/kernels/linux-libre-xtreme/0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch @@ -0,0 +1,63 @@ +From 6d55f899daa078d167aa497b71c9e7fd5f3d57fb Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Tue, 3 Dec 2019 15:50:32 +0000 +Subject: [PATCH 06/11] drm/i915/gem: Avoid parking the vma as we unbind + +In order to avoid keeping a reference on the i915_vma (which is long +overdue!) we have to coordinate all the possible lifetimes and only use +the vma while we know it is alive. In this episode, we are reminded that +while idle, the closed vma are destroyed. So if the GT idles while we are +working with the vma, the vma itself becomes invalid. + +First class i915_vma here we come, but in the meantime keep piling on +the straw. + +Signed-off-by: Chris Wilson +Reviewed-by: Matthew Auld +Link: https://patchwork.freedesktop.org/patch/msgid/20191203155032.3137263-1-chris@chris-wilson.co.uk +--- + drivers/gpu/drm/i915/i915_gem.c | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c +index ed2436db5dd2..739543812422 100644 +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -141,18 +141,33 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + struct i915_vma, + obj_link))) { + struct i915_address_space *vm = vma->vm; ++ bool awake = false; + +- ret = -EBUSY; ++ ret = -EAGAIN; + if (!i915_vm_tryopen(vm)) + break; + ++ /* Prevent vma being freed by i915_vma_parked as we unbind */ ++ if (intel_gt_pm_get_if_awake(vm->gt)) { ++ awake = true; ++ } else { ++ if (i915_vma_is_closed(vma)) { ++ spin_unlock(&obj->vma.lock); ++ goto err_vm; ++ } ++ } ++ + list_move_tail(&vma->obj_link, &still_in_list); + spin_unlock(&obj->vma.lock); + ++ ret = -EBUSY; + if (flags & I915_GEM_OBJECT_UNBIND_ACTIVE || + !i915_vma_is_active(vma)) + ret = i915_vma_unbind(vma); + ++ if (awake) ++ intel_gt_pm_put(vm->gt); ++err_vm: + i915_vm_close(vm); + spin_lock(&obj->vma.lock); + } +-- +2.26.0 + diff --git a/kernels/linux-libre-xtreme/0006-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch b/kernels/linux-libre-xtreme/0006-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch deleted file mode 100644 index c521a2baf..000000000 --- a/kernels/linux-libre-xtreme/0006-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch +++ /dev/null @@ -1,36 +0,0 @@ -From e2842366b3a552a92584adf926eed813baeb6c68 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 24 Dec 2019 05:18:47 +0100 -Subject: [PATCH 06/14] 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) ---- - 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.25.0 - diff --git a/kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch b/kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch index efbbb49c4..05a6eeabd 100644 --- a/kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch +++ b/kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch @@ -1,7 +1,7 @@ -From 8fb925eac047386a298303e501042a0fd30e9ef9 Mon Sep 17 00:00:00 2001 +From f99f3a8c0e2db1d9dd487cd70569098f36bb325e Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 14 Feb 2015 12:32:27 +0100 -Subject: [PATCH 6/9] set default cubietruck led triggers +Subject: [PATCH 06/10] set default cubietruck led triggers Signed-off-by: Kevin Mihelich --- @@ -12,7 +12,7 @@ diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7 index 8c8dee6ea461..4f52a11b913e 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts -@@ -78,6 +78,7 @@ +@@ -78,6 +78,7 @@ leds { blue { label = "cubietruck:blue:usr"; gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; @@ -20,7 +20,7 @@ index 8c8dee6ea461..4f52a11b913e 100644 }; orange { -@@ -93,6 +94,7 @@ +@@ -93,6 +94,7 @@ white { green { label = "cubietruck:green:usr"; gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; @@ -29,5 +29,5 @@ index 8c8dee6ea461..4f52a11b913e 100644 }; -- -2.23.0 +2.25.0 diff --git a/kernels/linux-libre-xtreme/0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch b/kernels/linux-libre-xtreme/0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch new file mode 100644 index 000000000..8ff7e17cb --- /dev/null +++ b/kernels/linux-libre-xtreme/0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch @@ -0,0 +1,64 @@ +From 589899b9b2b46961ccb096262b8e85b1656a4d15 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Wed, 4 Dec 2019 12:35:56 +0000 +Subject: [PATCH 07/11] drm/i915/gem: Try to flush pending unbind events + +If we cannot handle a vma within the unbind loop, try to flush the +pending events (i915_vma_parked, i915_vm_release) and try again. This +avoids a round trip to userspace that is not guaranteed to make forward +progress, as the events we wait upon require being idle. + +References: cb6c3d45f948 ("drm/i915/gem: Avoid parking the vma as we unbind") +Signed-off-by: Chris Wilson +Cc: Matthew Auld +Reviewed-by: Matthew Auld +Link: https://patchwork.freedesktop.org/patch/msgid/20191204123556.3740002-1-chris@chris-wilson.co.uk +--- + drivers/gpu/drm/i915/i915_gem.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c +index 739543812422..85b12228c2cf 100644 +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -123,7 +123,7 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + LIST_HEAD(still_in_list); + intel_wakeref_t wakeref; + struct i915_vma *vma; +- int ret = 0; ++ int ret; + + if (!atomic_read(&obj->bind_count)) + return 0; +@@ -136,6 +136,8 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + */ + wakeref = intel_runtime_pm_get(rpm); + ++try_again: ++ ret = 0; + spin_lock(&obj->vma.lock); + while (!ret && (vma = list_first_entry_or_null(&obj->vma.list, + struct i915_vma, +@@ -153,6 +155,7 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + } else { + if (i915_vma_is_closed(vma)) { + spin_unlock(&obj->vma.lock); ++ i915_vma_parked(vm->gt); + goto err_vm; + } + } +@@ -174,6 +177,11 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + list_splice(&still_in_list, &obj->vma.list); + spin_unlock(&obj->vma.lock); + ++ if (ret == -EAGAIN && flags & I915_GEM_OBJECT_UNBIND_ACTIVE) { ++ rcu_barrier(); /* flush the i915_vm_release() */ ++ goto try_again; ++ } ++ + intel_runtime_pm_put(rpm, wakeref); + + return ret; +-- +2.26.0 + diff --git a/kernels/linux-libre-xtreme/0007-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch b/kernels/linux-libre-xtreme/0007-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch deleted file mode 100644 index 26403bf22..000000000 --- a/kernels/linux-libre-xtreme/0007-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 4e768b987ae3cde128a3e73b922a5bb8323b07e0 Mon Sep 17 00:00:00 2001 -From: Kai Vehmanen -Date: Fri, 20 Sep 2019 11:39:18 +0300 -Subject: [PATCH 07/14] 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 -Cc: Imre Deak -Signed-off-by: Kai Vehmanen -Signed-off-by: Jani Nikula -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 7b6e68f082f8..a99ef18665f2 100644 ---- a/drivers/gpu/drm/i915/i915_reg.h -+++ b/drivers/gpu/drm/i915/i915_reg.h -@@ -9110,6 +9110,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.25.0 - diff --git a/kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch b/kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch index 40413f479..0bac600f6 100644 --- a/kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch +++ b/kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch @@ -1,7 +1,7 @@ -From 054ac5f337ad4f79b22c9b191dc47f001722f0d6 Mon Sep 17 00:00:00 2001 +From 318282bc517494fa1b17c1b6433b3005337d07b4 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Thu, 11 Aug 2016 00:42:37 -0600 -Subject: [PATCH 7/9] exynos4412-odroid: set higher minimum buck2 regulator +Subject: [PATCH 07/10] exynos4412-odroid: set higher minimum buck2 regulator voltage Set a higher minimum voltage to help reboot issue. @@ -16,7 +16,7 @@ diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts index ea55f377d17c..a7bfc58bbc79 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi -@@ -430,7 +430,7 @@ +@@ -430,7 +430,7 @@ buck1_reg: BUCK1 { buck2_reg: BUCK2 { regulator-name = "vdd_arm"; @@ -26,5 +26,5 @@ index ea55f377d17c..a7bfc58bbc79 100644 regulator-always-on; regulator-boot-on; -- -2.23.0 +2.25.0 diff --git a/kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch b/kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch index b1687bf5c..a31dc210e 100644 --- a/kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch +++ b/kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch @@ -1,7 +1,7 @@ -From 8b696580b73c7f6e7f3e9635bd2ad1c5c59e9082 Mon Sep 17 00:00:00 2001 +From 9409129a50f721937f0b16f00f6ba45e3b9d066a Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sun, 7 May 2017 13:32:25 -0600 -Subject: [PATCH 8/9] ARM: dove: enable ethernet on D3Plug +Subject: [PATCH 08/10] ARM: dove: enable ethernet on D3Plug Signed-off-by: Kevin Mihelich --- @@ -12,7 +12,7 @@ diff --git a/arch/arm/boot/dts/dove-d3plug.dts b/arch/arm/boot/dts/dove-d3plug.d index 826026c28f90..a4c9963e1261 100644 --- a/arch/arm/boot/dts/dove-d3plug.dts +++ b/arch/arm/boot/dts/dove-d3plug.dts -@@ -61,6 +61,13 @@ +@@ -61,6 +61,13 @@ usb_power: regulator@1 { &uart0 { status = "okay"; }; &sata0 { status = "okay"; }; &i2c0 { status = "okay"; }; @@ -27,5 +27,5 @@ index 826026c28f90..a4c9963e1261 100644 /* Samsung M8G2F eMMC */ &sdio0 { -- -2.23.0 +2.25.0 diff --git a/kernels/linux-libre-xtreme/0008-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch b/kernels/linux-libre-xtreme/0008-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch deleted file mode 100644 index 33416eb57..000000000 --- a/kernels/linux-libre-xtreme/0008-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch +++ /dev/null @@ -1,57 +0,0 @@ -From ec0217ea2a6aeb9b99b84bbc7b01023ab1f3547a Mon Sep 17 00:00:00 2001 -From: Kai Vehmanen -Date: Thu, 3 Oct 2019 11:55:30 +0300 -Subject: [PATCH 08/14] 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 -Signed-off-by: Jani Nikula -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 a99ef18665f2..1dd7b6187780 100644 ---- a/drivers/gpu/drm/i915/i915_reg.h -+++ b/drivers/gpu/drm/i915/i915_reg.h -@@ -9111,6 +9111,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.25.0 - diff --git a/kernels/linux-libre-xtreme/0008-drm-i915-gem-Reinitialise-the-local-list-before-repe.patch b/kernels/linux-libre-xtreme/0008-drm-i915-gem-Reinitialise-the-local-list-before-repe.patch new file mode 100644 index 000000000..f6311e266 --- /dev/null +++ b/kernels/linux-libre-xtreme/0008-drm-i915-gem-Reinitialise-the-local-list-before-repe.patch @@ -0,0 +1,34 @@ +From 442f9ca36769ea043af37729382044afd7f18676 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Thu, 5 Dec 2019 13:29:12 +0000 +Subject: [PATCH 08/11] drm/i915/gem: Reinitialise the local list before + repeating + +As we may start the loop again, we require our local list of i915_vma +we've processed to be reinitialised. + +Fixes: aa5e4453dc05 ("drm/i915/gem: Try to flush pending unbind events") +Closes: https://gitlab.freedesktop.org/drm/intel/issues/731 +Signed-off-by: Chris Wilson +Reviewed-by: Andi Shyti +Link: https://patchwork.freedesktop.org/patch/msgid/20191205132912.606868-1-chris@chris-wilson.co.uk +--- + drivers/gpu/drm/i915/i915_gem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c +index 85b12228c2cf..c2c025c4f4ad 100644 +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -174,7 +174,7 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + i915_vm_close(vm); + spin_lock(&obj->vma.lock); + } +- list_splice(&still_in_list, &obj->vma.list); ++ list_splice_init(&still_in_list, &obj->vma.list); + spin_unlock(&obj->vma.lock); + + if (ret == -EAGAIN && flags & I915_GEM_OBJECT_UNBIND_ACTIVE) { +-- +2.26.0 + diff --git a/kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch b/kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch index 4c8f8fed3..bcb8556ce 100644 --- a/kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch +++ b/kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch @@ -1,7 +1,7 @@ -From 55e7015aa06dd943b55a0101beddae1c811a2be5 Mon Sep 17 00:00:00 2001 +From 9c5a1645cef4d1ba381db9c4b375b9dc900a4475 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sun, 11 Aug 2019 12:34:17 -0600 -Subject: [PATCH 9/9] USB Armory MkII support +Subject: [PATCH 09/10] USB Armory MkII support --- arch/arm/boot/dts/Makefile | 2 + @@ -12,10 +12,10 @@ Subject: [PATCH 9/9] USB Armory MkII support create mode 100644 arch/arm/boot/dts/imx6ull-usbarmory.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index a0f92b9dbd7d..5d6e9f76f6db 100644 +index 9f10323ecfde..ab24e8e9d0c2 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -580,9 +580,11 @@ dtb-$(CONFIG_SOC_IMX6UL) += \ +@@ -585,10 +585,12 @@ dtb-$(CONFIG_SOC_IMX6UL) += \ imx6ul-tx6ul-0010.dtb \ imx6ul-tx6ul-0011.dtb \ imx6ul-tx6ul-mainboard.dtb \ @@ -23,6 +23,7 @@ index a0f92b9dbd7d..5d6e9f76f6db 100644 imx6ull-14x14-evk.dtb \ imx6ull-colibri-eval-v3.dtb \ imx6ull-colibri-wifi-eval-v3.dtb \ + imx6ull-opos6uldev.dtb \ + imx6ull-usbarmory.dtb \ imx6ull-phytec-segin-ff-rdk-nand.dtb \ imx6ull-phytec-segin-ff-rdk-emmc.dtb \ @@ -551,5 +552,5 @@ index 000000000000..85cf30bff527 + status = "okay"; +}; -- -2.23.0 +2.25.0 diff --git a/kernels/linux-libre-xtreme/0009-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch b/kernels/linux-libre-xtreme/0009-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch new file mode 100644 index 000000000..2cfe9d67c --- /dev/null +++ b/kernels/linux-libre-xtreme/0009-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch @@ -0,0 +1,41 @@ +From eaf3c3bb64d3ca5da3ccfdc6b3d181eaf6c22ec8 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Sun, 22 Dec 2019 21:02:54 +0000 +Subject: [PATCH 09/11] drm/i915: Add a simple is-bound check before unbinding + +Only acquire the various atomic references required to unbind the vma if +we do need to unbind the vma. + +Signed-off-by: Chris Wilson +Acked-by: Imre Deak +Link: https://patchwork.freedesktop.org/patch/msgid/20191222210256.2066451-1-chris@chris-wilson.co.uk +--- + drivers/gpu/drm/i915/i915_gem.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c +index c2c025c4f4ad..83eed642cbcd 100644 +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -145,6 +145,10 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + struct i915_address_space *vm = vma->vm; + bool awake = false; + ++ list_move_tail(&vma->obj_link, &still_in_list); ++ if (!i915_vma_is_bound(vma, I915_VMA_BIND_MASK)) ++ continue; ++ + ret = -EAGAIN; + if (!i915_vm_tryopen(vm)) + break; +@@ -160,7 +164,6 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + } + } + +- list_move_tail(&vma->obj_link, &still_in_list); + spin_unlock(&obj->vma.lock); + + ret = -EBUSY; +-- +2.26.0 + diff --git a/kernels/linux-libre-xtreme/0009-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch b/kernels/linux-libre-xtreme/0009-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch deleted file mode 100644 index 45575cb0b..000000000 --- a/kernels/linux-libre-xtreme/0009-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch +++ /dev/null @@ -1,41 +0,0 @@ -From cadc43b7d4de84c039658b482b52581b6d170081 Mon Sep 17 00:00:00 2001 -From: Kai Vehmanen -Date: Thu, 3 Oct 2019 11:55:31 +0300 -Subject: [PATCH 09/14] 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 -Signed-off-by: Jani Nikula -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.25.0 - diff --git a/kernels/linux-libre-xtreme/0010-Revert-ARM-8947-1-Fix-__arch_get_hw_counter-access-t.patch b/kernels/linux-libre-xtreme/0010-Revert-ARM-8947-1-Fix-__arch_get_hw_counter-access-t.patch new file mode 100644 index 000000000..8f3349acc --- /dev/null +++ b/kernels/linux-libre-xtreme/0010-Revert-ARM-8947-1-Fix-__arch_get_hw_counter-access-t.patch @@ -0,0 +1,28 @@ +From d8639dab6b5256a2f409da50a6ce73b9502a6823 Mon Sep 17 00:00:00 2001 +From: Kevin Mihelich +Date: Sun, 2 Feb 2020 18:38:22 -0700 +Subject: [PATCH 10/10] Revert "ARM: 8947/1: Fix __arch_get_hw_counter() access + to CNTVCT" + +This reverts commit 04bb96427d4ee33fbdf15648ddf578c6ba1aef54. +--- + arch/arm/include/asm/vdso/gettimeofday.h | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/arch/arm/include/asm/vdso/gettimeofday.h b/arch/arm/include/asm/vdso/gettimeofday.h +index 0ad2429c324f..5b879ae7afc1 100644 +--- a/arch/arm/include/asm/vdso/gettimeofday.h ++++ b/arch/arm/include/asm/vdso/gettimeofday.h +@@ -75,9 +75,6 @@ static __always_inline u64 __arch_get_hw_counter(int clock_mode) + #ifdef CONFIG_ARM_ARCH_TIMER + u64 cycle_now; + +- if (!clock_mode) +- return -EINVAL; +- + isb(); + cycle_now = read_sysreg(CNTVCT); + +-- +2.25.0 + diff --git a/kernels/linux-libre-xtreme/0010-drm-i915-Introduce-a-vma.kref.patch b/kernels/linux-libre-xtreme/0010-drm-i915-Introduce-a-vma.kref.patch new file mode 100644 index 000000000..d19487298 --- /dev/null +++ b/kernels/linux-libre-xtreme/0010-drm-i915-Introduce-a-vma.kref.patch @@ -0,0 +1,252 @@ +From 6bd575b4b4a9d1cb898608d25df5e6aefe5a0240 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Sun, 22 Dec 2019 21:02:55 +0000 +Subject: [PATCH 10/11] drm/i915: Introduce a vma.kref + +Start introducing a kref on i915_vma in order to protect the vma unbind +(i915_gem_object_unbind) from a parallel destruction (i915_vma_parked). +Later, we will use the refcount to manage all access and turn i915_vma +into a first class container. + +Signed-off-by: Chris Wilson +Cc: Imre Deak +Acked-by: Imre Deak +Link: https://patchwork.freedesktop.org/patch/msgid/20191222210256.2066451-2-chris@chris-wilson.co.uk +--- + drivers/gpu/drm/i915/gem/i915_gem_object.c | 2 +- + .../gpu/drm/i915/gem/selftests/huge_pages.c | 3 +-- + .../drm/i915/gem/selftests/i915_gem_mman.c | 4 +-- + drivers/gpu/drm/i915/i915_gem.c | 27 +++++++------------ + drivers/gpu/drm/i915/i915_gem_gtt.c | 5 ++-- + drivers/gpu/drm/i915/i915_vma.c | 9 ++++--- + drivers/gpu/drm/i915/i915_vma.h | 25 ++++++++++++++--- + 7 files changed, 44 insertions(+), 31 deletions(-) + +diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915/gem/i915_gem_object.c +index a596548c07bf..b6937469ffd3 100644 +--- a/drivers/gpu/drm/i915/gem/i915_gem_object.c ++++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c +@@ -174,7 +174,7 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915, + GEM_BUG_ON(vma->obj != obj); + spin_unlock(&obj->vma.lock); + +- i915_vma_destroy(vma); ++ __i915_vma_put(vma); + + spin_lock(&obj->vma.lock); + } +diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c +index 688c49a24f32..bd1e2c12de63 100644 +--- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c ++++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c +@@ -1110,8 +1110,7 @@ static int __igt_write_huge(struct intel_context *ce, + out_vma_unpin: + i915_vma_unpin(vma); + out_vma_close: +- i915_vma_destroy(vma); +- ++ __i915_vma_put(vma); + return err; + } + +diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +index e81c2726f7fd..3d8f00d40d42 100644 +--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c ++++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +@@ -161,7 +161,7 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj, + kunmap(p); + + out: +- i915_vma_destroy(vma); ++ __i915_vma_put(vma); + return err; + } + +@@ -255,7 +255,7 @@ static int check_partial_mappings(struct drm_i915_gem_object *obj, + if (err) + return err; + +- i915_vma_destroy(vma); ++ __i915_vma_put(vma); + + if (igt_timeout(end_time, + "%s: timed out after tiling=%d stride=%d\n", +diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c +index 83eed642cbcd..0475a0343487 100644 +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -143,7 +143,6 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + struct i915_vma, + obj_link))) { + struct i915_address_space *vm = vma->vm; +- bool awake = false; + + list_move_tail(&vma->obj_link, &still_in_list); + if (!i915_vma_is_bound(vma, I915_VMA_BIND_MASK)) +@@ -154,26 +153,18 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + break; + + /* Prevent vma being freed by i915_vma_parked as we unbind */ +- if (intel_gt_pm_get_if_awake(vm->gt)) { +- awake = true; +- } else { +- if (i915_vma_is_closed(vma)) { +- spin_unlock(&obj->vma.lock); +- i915_vma_parked(vm->gt); +- goto err_vm; +- } +- } +- ++ vma = __i915_vma_get(vma); + spin_unlock(&obj->vma.lock); + +- ret = -EBUSY; +- if (flags & I915_GEM_OBJECT_UNBIND_ACTIVE || +- !i915_vma_is_active(vma)) +- ret = i915_vma_unbind(vma); ++ if (vma) { ++ ret = -EBUSY; ++ if (flags & I915_GEM_OBJECT_UNBIND_ACTIVE || ++ !i915_vma_is_active(vma)) ++ ret = i915_vma_unbind(vma); ++ ++ __i915_vma_put(vma); ++ } + +- if (awake) +- intel_gt_pm_put(vm->gt); +-err_vm: + i915_vm_close(vm); + spin_lock(&obj->vma.lock); + } +diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c +index 44727806dfd7..dd2c20f7d4d2 100644 +--- a/drivers/gpu/drm/i915/i915_gem_gtt.c ++++ b/drivers/gpu/drm/i915/i915_gem_gtt.c +@@ -522,7 +522,7 @@ void __i915_vm_close(struct i915_address_space *vm) + + atomic_and(~I915_VMA_PIN_MASK, &vma->flags); + WARN_ON(__i915_vma_unbind(vma)); +- i915_vma_destroy(vma); ++ __i915_vma_put(vma); + + i915_gem_object_put(obj); + } +@@ -1790,7 +1790,7 @@ static void gen6_ppgtt_cleanup(struct i915_address_space *vm) + { + struct gen6_ppgtt *ppgtt = to_gen6_ppgtt(i915_vm_to_ppgtt(vm)); + +- i915_vma_destroy(ppgtt->vma); ++ __i915_vma_put(ppgtt->vma); + + gen6_ppgtt_free_pd(ppgtt); + free_scratch(vm); +@@ -1878,6 +1878,7 @@ static struct i915_vma *pd_vma_create(struct gen6_ppgtt *ppgtt, int size) + + i915_active_init(&vma->active, NULL, NULL); + ++ kref_init(&vma->ref); + mutex_init(&vma->pages_mutex); + vma->vm = i915_vm_get(&ggtt->vm); + vma->ops = &pd_vma_ops; +diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c +index 01c822256b39..00973017abba 100644 +--- a/drivers/gpu/drm/i915/i915_vma.c ++++ b/drivers/gpu/drm/i915/i915_vma.c +@@ -112,6 +112,7 @@ vma_create(struct drm_i915_gem_object *obj, + if (vma == NULL) + return ERR_PTR(-ENOMEM); + ++ kref_init(&vma->ref); + mutex_init(&vma->pages_mutex); + vma->vm = i915_vm_get(vm); + vma->ops = &vm->vma_ops; +@@ -978,8 +979,10 @@ void i915_vma_reopen(struct i915_vma *vma) + __i915_vma_remove_closed(vma); + } + +-void i915_vma_destroy(struct i915_vma *vma) ++void i915_vma_release(struct kref *ref) + { ++ struct i915_vma *vma = container_of(ref, typeof(*vma), ref); ++ + if (drm_mm_node_allocated(&vma->node)) { + mutex_lock(&vma->vm->mutex); + atomic_and(~I915_VMA_PIN_MASK, &vma->flags); +@@ -1027,7 +1030,7 @@ void i915_vma_parked(struct intel_gt *gt) + spin_unlock_irq(>->closed_lock); + + if (obj) { +- i915_vma_destroy(vma); ++ __i915_vma_put(vma); + i915_gem_object_put(obj); + } + +@@ -1192,7 +1195,7 @@ int __i915_vma_unbind(struct i915_vma *vma) + i915_vma_detach(vma); + vma_unbind_pages(vma); + +- drm_mm_remove_node(&vma->node); /* pairs with i915_vma_destroy() */ ++ drm_mm_remove_node(&vma->node); /* pairs with i915_vma_release() */ + return 0; + } + +diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h +index 465932813bc5..ce1db908ad69 100644 +--- a/drivers/gpu/drm/i915/i915_vma.h ++++ b/drivers/gpu/drm/i915/i915_vma.h +@@ -51,14 +51,19 @@ enum i915_cache_level; + */ + struct i915_vma { + struct drm_mm_node node; +- struct drm_i915_gem_object *obj; ++ + struct i915_address_space *vm; + const struct i915_vma_ops *ops; +- struct i915_fence_reg *fence; ++ ++ struct drm_i915_gem_object *obj; + struct dma_resv *resv; /** Alias of obj->resv */ ++ + struct sg_table *pages; + void __iomem *iomap; + void *private; /* owned by creator */ ++ ++ struct i915_fence_reg *fence; ++ + u64 size; + u64 display_alignment; + struct i915_page_sizes page_sizes; +@@ -71,6 +76,7 @@ struct i915_vma { + * handles (but same file) for execbuf, i.e. the number of aliases + * that exist in the ctx->handle_vmas LUT for this vma. + */ ++ struct kref ref; + atomic_t open_count; + atomic_t flags; + /** +@@ -333,7 +339,20 @@ int __must_check i915_vma_unbind(struct i915_vma *vma); + void i915_vma_unlink_ctx(struct i915_vma *vma); + void i915_vma_close(struct i915_vma *vma); + void i915_vma_reopen(struct i915_vma *vma); +-void i915_vma_destroy(struct i915_vma *vma); ++ ++static inline struct i915_vma *__i915_vma_get(struct i915_vma *vma) ++{ ++ if (kref_get_unless_zero(&vma->ref)) ++ return vma; ++ ++ return NULL; ++} ++ ++void i915_vma_release(struct kref *ref); ++static inline void __i915_vma_put(struct i915_vma *vma) ++{ ++ kref_put(&vma->ref, i915_vma_release); ++} + + #define assert_vma_held(vma) dma_resv_assert_held((vma)->resv) + +-- +2.26.0 + diff --git a/kernels/linux-libre-xtreme/0010-drm-i915-Limit-audio-CDCLK-2-BCLK-constraint-back-to.patch b/kernels/linux-libre-xtreme/0010-drm-i915-Limit-audio-CDCLK-2-BCLK-constraint-back-to.patch deleted file mode 100644 index 777c6f789..000000000 --- a/kernels/linux-libre-xtreme/0010-drm-i915-Limit-audio-CDCLK-2-BCLK-constraint-back-to.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 2828549af6c24235da03337c781053d4fc5edd08 Mon Sep 17 00:00:00 2001 -From: Kai Vehmanen -Date: Tue, 31 Dec 2019 16:00:07 +0200 -Subject: [PATCH 10/14] drm/i915: Limit audio CDCLK>=2*BCLK constraint back to - GLK only - -Revert changes done in commit f6ec9483091f ("drm/i915: extend audio -CDCLK>=2*BCLK constraint to more platforms"). Audio drivers -communicate with i915 over HDA bus multiple times during system -boot-up and each of these transactions result in matching -get_power/put_power calls to i915, and depending on the platform, -a modeset change causing visible flicker. - -GLK is the only platform with minimum CDCLK significantly lower -than BCLK, and thus for GLK setting a higher CDCLK is mandatory. - -For other platforms, minimum CDCLK is close but below 2*BCLK -(e.g. on ICL, CDCLK=176.4kHz with BCLK=96kHz). Spec-wise the constraint -should be set, but in practise no communication errors have been -reported and the downside if set is the flicker observed at boot-time. - -Revert to old behaviour until better mechanism to manage -probe-time clocks is available. - -The full CDCLK>=2*BCLK constraint is still enforced at pipe -enable time in intel_crtc_compute_min_cdclk(). - -Bugzilla: https://gitlab.freedesktop.org/drm/intel/issues/913 -Fixes: f6ec9483091f ("drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms") -Signed-off-by: Kai Vehmanen -Reviewed-by: Matt Roper -Signed-off-by: Matt Roper -Link: https://patchwork.freedesktop.org/patch/msgid/20191231140007.31728-1-kai.vehmanen@linux.intel.com -(cherry picked from commit 1ee48a61aa57dbdbc3cd2808d8b28df40d938e44) -Signed-off-by: Joonas Lahtinen ---- - 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 05ef43b13d1c..0cf475f3063c 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 (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) -+ if (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 (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) -+ if (IS_GEMINILAKE(dev_priv)) - glk_force_audio_cdclk(dev_priv, false); - - intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO, cookie); --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0011-iwlwifi-don-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch b/kernels/linux-libre-xtreme/0011-iwlwifi-don-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch new file mode 100644 index 000000000..2003d7b14 --- /dev/null +++ b/kernels/linux-libre-xtreme/0011-iwlwifi-don-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch @@ -0,0 +1,152 @@ +From c596b143fad6e865f3f9de19c10c4b02998371f0 Mon Sep 17 00:00:00 2001 +From: Golan Ben Ami +Date: Wed, 18 Mar 2020 08:12:54 +0200 +Subject: [PATCH 11/11] iwlwifi: don't send GEO_TX_POWER_LIMIT if no wgds table + +The GEO_TX_POWER_LIMIT command was sent although +there is no wgds table, so the fw got wrong SAR values +from the driver. + +Fix this by avoiding sending the command if no wgds +tables are available. + +Signed-off-by: Golan Ben Ami +Fixes: 39c1a9728f93 ("iwlwifi: refactor the SAR tables from mvm to acpi") +Signed-off-by: Luca Coelho +Tested-By: Jonathan McDowell +Tested-by: Len Brown +--- + drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 14 ++++++++------ + drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 14 ++++++++------ + drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 9 ++++++++- + 3 files changed, 24 insertions(+), 13 deletions(-) + +diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c +index 48d375a86d86..ba2aff3af0fe 100644 +--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c ++++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c +@@ -6,7 +6,7 @@ + * GPL LICENSE SUMMARY + * + * Copyright(c) 2017 Intel Deutschland GmbH +- * Copyright (C) 2019 Intel Corporation ++ * Copyright (C) 2019 - 2020 Intel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as +@@ -27,7 +27,7 @@ + * BSD LICENSE + * + * Copyright(c) 2017 Intel Deutschland GmbH +- * Copyright (C) 2019 Intel Corporation ++ * Copyright (C) 2019 - 2020 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +@@ -491,13 +491,13 @@ int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt, + } + IWL_EXPORT_SYMBOL(iwl_validate_sar_geo_profile); + +-void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, +- struct iwl_per_chain_offset_group *table) ++int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, ++ struct iwl_per_chain_offset_group *table) + { + int ret, i, j; + + if (!iwl_sar_geo_support(fwrt)) +- return; ++ return -EOPNOTSUPP; + + ret = iwl_sar_get_wgds_table(fwrt); + if (ret < 0) { +@@ -505,7 +505,7 @@ void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, + "Geo SAR BIOS table invalid or unavailable. (%d)\n", + ret); + /* we don't fail if the table is not available */ +- return; ++ return -ENOENT; + } + + BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES * ACPI_WGDS_NUM_BANDS * +@@ -530,5 +530,7 @@ void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, + i, j, value[1], value[2], value[0]); + } + } ++ ++ return 0; + } + IWL_EXPORT_SYMBOL(iwl_sar_geo_init); +diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h +index 4a6e8262974b..5590e5cc8fbb 100644 +--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h ++++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h +@@ -6,7 +6,7 @@ + * GPL LICENSE SUMMARY + * + * Copyright(c) 2017 Intel Deutschland GmbH +- * Copyright(c) 2018 - 2019 Intel Corporation ++ * Copyright(c) 2018 - 2020 Intel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as +@@ -27,7 +27,7 @@ + * BSD LICENSE + * + * Copyright(c) 2017 Intel Deutschland GmbH +- * Copyright(c) 2018 - 2019 Intel Corporation ++ * Copyright(c) 2018 - 2020 Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +@@ -171,8 +171,9 @@ bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt); + int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt, + struct iwl_host_cmd *cmd); + +-void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, +- struct iwl_per_chain_offset_group *table); ++int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, ++ struct iwl_per_chain_offset_group *table); ++ + #else /* CONFIG_ACPI */ + + static inline void *iwl_acpi_get_object(struct device *dev, acpi_string method) +@@ -243,9 +244,10 @@ static inline int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt, + return -ENOENT; + } + +-static inline void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, +- struct iwl_per_chain_offset_group *table) ++static inline int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, ++ struct iwl_per_chain_offset_group *table) + { ++ return -ENOENT; + } + + #endif /* CONFIG_ACPI */ +diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +index c09624d8d7ee..81b7da5815eb 100644 +--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +@@ -749,10 +749,17 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm) + u16 cmd_wide_id = WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT); + union geo_tx_power_profiles_cmd cmd; + u16 len; ++ int ret; + + cmd.geo_cmd.ops = cpu_to_le32(IWL_PER_CHAIN_OFFSET_SET_TABLES); + +- iwl_sar_geo_init(&mvm->fwrt, cmd.geo_cmd.table); ++ ret = iwl_sar_geo_init(&mvm->fwrt, cmd.geo_cmd.table); ++ /* ++ * It is a valid scenario to not support SAR, or miss wgds table, ++ * but in that case there is no need to send the command. ++ */ ++ if (ret) ++ return 0; + + cmd.geo_cmd.table_revision = cpu_to_le32(mvm->fwrt.geo_rev); + +-- +2.26.0 + diff --git a/kernels/linux-libre-xtreme/0014-drm-amdgpu-Add-DC-feature-mask-to-disable-fractional.patch b/kernels/linux-libre-xtreme/0014-drm-amdgpu-Add-DC-feature-mask-to-disable-fractional.patch deleted file mode 100644 index 63ea0fe6b..000000000 --- a/kernels/linux-libre-xtreme/0014-drm-amdgpu-Add-DC-feature-mask-to-disable-fractional.patch +++ /dev/null @@ -1,80 +0,0 @@ -From ca12fbca4bf7482a73ace2a0504bd8fc7f980dc1 Mon Sep 17 00:00:00 2001 -From: Leo Li -Date: Mon, 21 Oct 2019 14:58:47 -0400 -Subject: [PATCH 14/14] drm/amdgpu: Add DC feature mask to disable fractional - pwm -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[Why] - -Some LED panel drivers might not like fractional PWM. In such cases, -backlight flickering may be observed. - -[How] - -Add a DC feature mask to disable fractional PWM, and associate it with -the preexisting dc_config flag. - -The flag is only plumbed through the dmcu firmware, so plumb it through -the driver path as well. - -To disable, add the following to the linux cmdline: -amdgpu.dcfeaturemask=0x4 - -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204957 -Signed-off-by: Leo Li -Reviewed-by: Anthony Koo -Tested-by: Lukáš Krejčí -Signed-off-by: Alex Deucher ---- - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ - drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 4 ++++ - drivers/gpu/drm/amd/include/amd_shared.h | 1 + - 3 files changed, 8 insertions(+) - -diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c -index 4e9c15c409ba..25b72eb76add 100644 ---- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c -+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c -@@ -697,6 +697,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) - if (amdgpu_dc_feature_mask & DC_MULTI_MON_PP_MCLK_SWITCH_MASK) - init_data.flags.multi_mon_pp_mclk_switch = true; - -+ if (amdgpu_dc_feature_mask & DC_DISABLE_FRACTIONAL_PWM_MASK) -+ init_data.flags.disable_fractional_pwm = true; -+ - init_data.flags.power_down_display_on_boot = true; - - #ifdef CONFIG_DRM_AMD_DC_DCN2_0 -diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c -index 7700a855d77c..698b84acc44f 100644 ---- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c -+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c -@@ -404,6 +404,10 @@ static bool dce_abm_init_backlight(struct abm *abm) - /* Enable the backlight output */ - REG_UPDATE(BL_PWM_CNTL, BL_PWM_EN, 1); - -+ /* Disable fractional pwm if configured */ -+ REG_UPDATE(BL_PWM_CNTL, BL_PWM_FRACTIONAL_EN, -+ abm->ctx->dc->config.disable_fractional_pwm ? 0 : 1); -+ - /* Unlock group 2 backlight registers */ - REG_UPDATE(BL_PWM_GRP1_REG_LOCK, - BL_PWM_GRP1_REG_LOCK, 0); -diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h -index 8889aaceec60..5450ed762b7a 100644 ---- a/drivers/gpu/drm/amd/include/amd_shared.h -+++ b/drivers/gpu/drm/amd/include/amd_shared.h -@@ -143,6 +143,7 @@ enum PP_FEATURE_MASK { - enum DC_FEATURE_MASK { - DC_FBC_MASK = 0x1, - DC_MULTI_MON_PP_MCLK_SWITCH_MASK = 0x2, -+ DC_DISABLE_FRACTIONAL_PWM_MASK = 0x4, - }; - - enum amd_dpm_forced_level; --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/PKGBUILD b/kernels/linux-libre-xtreme/PKGBUILD index a5db3028b..ea07b3d51 100644 --- a/kernels/linux-libre-xtreme/PKGBUILD +++ b/kernels/linux-libre-xtreme/PKGBUILD @@ -7,12 +7,12 @@ _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix pkgbase=linux-libre-xtreme -pkgver=5.4.18 +pkgver=5.5.13 _hrdedrel=a pkgrel=1 pkgdesc='Security-Hardened Linux-libre (with Apparmor by default)' -rcnver=5.4.12 -rcnrel=armv7-x15 +rcnver=5.5.11 +rcnrel=armv7-x14 url='https://wiki.parabola.nu/Xtreme' arch=(i686 x86_64 armv7h) license=(GPL2) @@ -21,7 +21,7 @@ makedepends=( xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) options=('!strip') -_srcname=linux-5.4 +_srcname=linux-5.5 source=( "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu/linux-libre-${_srcname##*-}-gnu.tar.xz"{,.sign} "https://linux-libre.fsfla.org/pub/linux-libre/releases/$pkgver-gnu/patch-${_srcname##*-}-gnu-$pkgver-gnu.xz"{,.sign} @@ -38,19 +38,16 @@ source=( 0002-fix-Atmel-maXTouch-touchscreen-support.patch # extracted patches from Arch Linux kernel sources 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch - 0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch - 0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch - 0004-PCI-pciehp-Prevent-deadlock-on-disconnect.patch - 0005-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch - 0006-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch - 0007-drm-i915-save-AUD_FREQ_CNTRL-state-at-audio-domain-s.patch - 0008-drm-i915-Fix-audio-power-up-sequence-for-gen10-displ.patch - 0009-drm-i915-extend-audio-CDCLK-2-BCLK-constraint-to-mor.patch - 0010-drm-i915-Limit-audio-CDCLK-2-BCLK-constraint-back-to.patch - #0011-pinctrl-sunrisepoint-Add-missing-Interrupt-Status-re.patch - #0012-Revert-iwlwifi-mvm-fix-scan-config-command-size.patch - #0013-e1000e-Revert-e1000e-Make-watchdog-use-delayed-work.patch - 0014-drm-amdgpu-Add-DC-feature-mask-to-disable-fractional.patch + 0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch + 0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch + 0004-drm-i915-Serialise-i915_active_acquire-with-__active.patch + 0005-drm-i915-gem-Take-runtime-pm-wakeref-prior-to-unbind.patch + 0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch + 0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch + 0008-drm-i915-gem-Reinitialise-the-local-list-before-repe.patch + 0009-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch + 0010-drm-i915-Introduce-a-vma.kref.patch + 0011-iwlwifi-don-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch ) source_armv7h=( # RCN patch (CM3 firmware deblobbed and bloatware removed) @@ -65,6 +62,7 @@ source_armv7h=( 0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch 0008-ARM-dove-enable-ethernet-on-D3Plug.patch 0009-USB-Armory-MkII-support.patch + 0010-Revert-ARM-8947-1-Fix-__arch_get_hw_counter-access-t.patch ) source_x86_64=("https://github.com/anthraxx/linux-hardened/releases/download/$pkgver.$_hrdedrel/linux-hardened-$pkgver.$_hrdedrel.patch"{,.sig}) validpgpkeys=( @@ -73,9 +71,9 @@ validpgpkeys=( '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak ) -sha512sums=('0d0915133864eb031adfc6700066147dcf3e768a50a31c39754950c95ef4fd322dc701cd50af49c403ef0325adfcb07e354d5e46c1be3dcdd719a7a55c963f37' +sha512sums=('187368a8fb4e04acfd7d18a024d6cdbc2841bcc06dcfbc3a053706e8512c3e3f573755228347c11bd791b296ec60eb2d67d5075ece2aef234a847e72f2b3e746' 'SKIP' - 'b05dfcf2ea677838c4442753478ef385860943842edd527deb7849b0db9b9663833ff1f360aae6d7bafab64e645268137204535fe8f575f50620b9c7a21182f2' + '2c882f6256bb9409b59fde28183e71701e969aab8a0e36821550a639a5c5de3e3b129a708f0f9c83135653cfccc837601850b631fb6d63449e2083319aba1d30' 'SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' @@ -83,36 +81,37 @@ sha512sums=('0d0915133864eb031adfc6700066147dcf3e768a50a31c39754950c95ef4fd322dc 'SKIP' '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' 'SKIP' - '6176a74f5a2a44ba5842d9980f2263d2cfd041bba9f3e42bdc1d8486818e4e528365ce17872b96c6327902665bc0d1ccdb6efe8e4e00dc2653dea02cb5714e87' - '75853183eed65a381fc9dd7cfe1028efbc9deac22f25d1b382bdecd5b511f8dcd2a39ed1aa551af330f2bdb2aac514a42e012bdc989004d2326bdf4afc35f7b0' - 'cf833d7eab1d19091e0d7859a90569c07e7ba5cc67312cfbfde18c01de8306edc14daf2649ecc09673876fc2057b3bb5ead4decdf4329d214fdaf5b6506ac5de' - 'f01e7925b262d2874a8a991b1f27d057356a2a384d2012b61be5a631d4e4d7cf87461c8fb9e7f183831f5a829ad204897f1f0545a52df6288a0e04a5c2e31b96' + 'a5b2c5c1f3ef457b61d63c6df4a4d13b5020ab6317e4c66b280306d19de7ef56f5eb93e3b80fa8dc63a19660da47b070368acf3e65171913b17ed8aafd4bf178' + '6b3b28e59d40f78239bfda230a55182e53b32dd530a2cc1da5e4f19606aad9b6c20d1a5150a2faa4013a6881080577eb85442ee6831627984f48791b19ed6477' + '2390b976f5c7fb4044d079ee38129e9fbf793c9e93a4b4033c7e4df9d8482eb4f1ec436895500912f4d4301fd3339b1dbcdad80667c2d6521f240b4d63497744' + 'aca591b5a2e838754e3c5fd2c0e50098ad54c2d0f990de5bf9cff8608e881daf0e37132294ed1a0e0a7b9e1c194c0b89f95da001d94febdb25a01c409060e3ac' '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - '0598a2a1aaae286e4681e7e8696bb82b992d8917735b33a333c449695d6dbad0c35127704219c6274e327b3112ad2f7bbf45961112e341948651ecfd3e712458' - '955b233a754ae5005d247b6192fb776507481ee0c887672d75238cdd5fe55d24327d3e3c3e04b5daf41ac3249977c0b1a5f0be4fd4d77e41783c05b0dfc68477' - '57075f7a032071bda7fe047c7560032df2e037259425fbd3f230631880490f98841d337ea61d47d8d5993ec39311832ba2f967ad382a1678c0ddf1a77d43aad2' - 'd93abdd716c20c63352a13adf5217a3431f5a35e9aab7bbee272c06e81649d75bdc7cc52033c85dee295a05dbe2db69da03d4fcc0a8220f060f237dc698ae3aa' - '5ee06e83dbf614dcf18d938a89ef1639d9b78b6764baad530d8039679af9b0c9d99fd7e81984bbc6c911f428ce5800d2c843b504d283e63a38a9359f5fd2f8f8' - '8c3bd587d9ad6ea287931d3e17c4159139653ab58bdbebc945bb416ddf6564d94171389fed83cf73828a1a3b30ac52cb4922efdcac9227b5a57b4c04433bb9d6' - '30be3ef2bd74dc5002be776991e4dcba08a87773ede451efc3ed2ae87853111b47503989b834c80b5a8b550eb3ee1804a4b3f76ca0057b09a86d01b3fba054ef' - '74fa48f77088cffb3d9c442db2828ca5fa6534c144231e7ba07085c168f24206cc30b642ea2417fe7965cbf9f7f38445283637b3abf5d02150efd5752a073848' - 'cd04bdac9f0347a2fffda160e149b24b57d75e7b563700f576a32871b0b52ac7c04e1dcaf7ddabf4c5e886db9c7f09d32bbeb391384d3d5056da211b043dec9b' - 'd75549345dc622feb20beecabd06871d95037a7b8475427c2ad01f10c87ee01bc7d2a026262c4ba9efc053e5c58c099bb05cf6072afded8314acf795025da85f' - 'f35ae1e4215f3dd5ce1680962e157f02807ed8151d98dc9c34570926ba713f3747957c199db65efa72691ac4ca1aaaa40dea69f35ec24be20a0f93f9156aaee7') -sha512sums_x86_64=('20fadadaf284447286f62595f34eb9cac718dbab911b34848e5c1cdf88eb761eb821551c940f1501c40444199968bf6594b7f2d85d17ace5ffc8440ba587a142' + 'dfe4fb9f41247bde1c0b7b53922f98d30efe6e2fa810673b4f897f3a54c02ea6aa2a37a0532a8b5d4e6a0e0b016d931757bd4d3e6b2e3ef03cf05e61fc748b20' + 'fb8a16c9c5cc398f2ce0bacdad37adcd740a6e48829a29f2991a5451f8ef455060d39ead11030ca7bff8d6317faff5a705b811eae935a33c990972840a74befa' + '7904b2463445f7bd6cbae2325d189cba99b61f363eb8b34decbd0074d9e54fbc5d2077b63491ba10a3a02021ce7f35dd8ee86561f523d032b1ce50193f83c0ac' + '96ad606769ef0d3b1dd7c86444675908ed79c10b4db82d6c8090d33ee1945da9c166f516dc2394ea0fe03e9333194c225239f8f5e712dd3d1fa490ddc461f655' + '3ad7761dbdf10b857239765cd72179d0fe95d5dd654dd83591f177886bc3f5b52d4c82994e77f86ac2a250003ca707003e8b576d37923f1412822ca8b44110b9' + 'af8823fd0a61177f31866e89050554b145cea13b73e9f907dda8dd8d07d1448b01bfb8057795f3ec83764639d1a5abc0d51c03fe4b7c9dd54a067568f488f04b' + '74009876f1ea4e5e3a705659ed0af28d1535c1dd4a42b478fafd75d7a2879a0138e67d29783252833ddda84c7703f155025f7cd4b2d775f385df3f4fa9bb8f02' + '0b4a6fdaaf9e4b65aca8910c78cf30749db0deaa2dbf8e38786e0483b81fdf7862e8bcb4c18e1612432c5a1f307e318a18df8c2e3410217d0e3aded1c1d917be' + '7dda55bfaf3b4f77901e6378ff7c6617cb65b1c731f908f6e64371aed02dee17f15530e74c4243255bb27a4a7d0db0254ea93de191b599e541501f726883bd7f' + '4f4bc1de6375276d38207d0a82aab58c422c0bb7f8565791f984693f4254bc1a1b5989b39fb765457294f56e6b2d17d1e753bd56b98c5c17f556b7992a08afac' + '8cabc3719077e6c2fc092b746f030182aeff2373fc670726fd96df1f9004f507f5631b47ee7c7e4ddf37fc11e90180308c1969285411558e18fda3818d74d9fb') +sha512sums_x86_64=('5356887d1d0ad4406ff1e090947e5c107b072fe4edb040ac5dc6f431c276ee24297f4a4b485ff016ea9024dea861bb4817cf07dcfb39e922e3caa5e4c069d185' 'SKIP') -sha512sums_armv7h=('6d1e07ed008522faa61ad61491ba90bfd5aed97817825dc1f140ce3d099e091fbff2398936e7d6bbf7d04d5250dc73f622022f1dba9af1052c936cf72e4e934a' +sha512sums_armv7h=('53b5ab4baaf9e58f31e72d5395a7bbb187bc90c75c3ef00a927e282a336e2f5dfe9e54c0d4ad5ab901037ddd7d5c472ae2539f5a6d44a02105bce95b2c23269c' 'SKIP' - 'b576a9c40ba59485c350f71b9234d9e71f245e25b26382bd2f67019f3309c3b5705a6020eae0a9dfccacc763fb2056a5937c0a8ff4e64f99ba1d60f0b2acb03f' - '85a13a274d4cbaca3ddbe8eaf883f1a1184765f8d09d6d40bb32defbe0876cb0153513e8db8671d7fc053e383ced793b74245ff29364a760e1a52bb36ebc8e85' - 'f9ce0bb4f06be6f742d8a31384e90fdab1a4686f14d5a8845e0c341dcfa62ae59db933237174223de9b32f9d91f99125c20ede7dff664755f1d42ea0cecdefdb' - 'b32623904f984118ebdd8ec31816885d73776ed80a68fa23925e67451f28a8f080dd8545307bb2f857435894adfa8b3db7c8a99aa02b8b3f2b5f8e3223d98a47' - 'd114f1e69504413e81dd67684f5b1ce69aa09d5bc768c7eee96a7d6b7ec47b32cd8f02593c878b0e9091475467de36a3d7c478e34a39148fa849548f53637b84' - 'bc0c6b1726679498393be8d4c417c62e1f356fe5c617c71ff23532652fdd5f314e5bfc6172eaca79cd4806b81031bf2f879d7d1a6050ad4c616c04e6bdf93c2a' - 'b13bea6412580325dba0d02cf0dc712e860f659569ffcb968aa4836fdb2882448cfee4659a675a70affccae02c8d2589d80b7239eef5ae7b615162aeaa76f3bb' - 'cff59f974651614587313674455a968ae5390a5ca825d204f0e2f8de2b422d577b007f5297a398e2afeb33ed0d324d34ad58ff4cd56e645bd4ca9a6bdc1354c5' - '54adbec4b6b85cda901df7d2b3eb1f517f10d3528326e60c7afa4b49ccc7cfb43b0d1f574ceb5d7d03c94a0fbcc97c0ef785258292dd26ed46728355da27332c') + '4ad93d447d8671402dd7a2886b5c1329ffd5dd7b7f87e895f792ae937258c5016c7c0512ad03c4065da7520e656d0764d565171be463a378320fb210b54e3dee' + '780e4ce45b35b271dd3459b543681603c1f112f68d5f3500b7c01fdcac205a9d06e9ec13700e8841d4beb831e3e2dda1664a0ac38ef23bb5a47e2df0534767d7' + '7b5faabd9f4a766f92a285857ff750eff4ae08abb8435483ca5bc9a38c4852d373a960ed272ea35b6a055c7ca53d2f3ff869023f91b9dcd0c5adac912c16b109' + '1a75ee9c6a51a95f39a6cbe5b27c034b239dad232961033df0ce9ce01dea8aaa3aa819a0a6b724a468bee8b275f2d7c8a5c56992f3237a18c19cd8ecb3a930e8' + '42e8fa85e9aee0624a120c1260c187b6402d48334dc5db78f753ce5c4edab6d2f8c3d0bfcd65e8fc638c448c7a0ddec9c4f0f9fc6236651c30a5eba1d092453c' + '13e3f21591cd0952d0c29e99998edad4a594225007d3fbb2486a92c235f85246b68030dfb5d5d427cfc82627f85d60dd561add8dcc5570e431706394c14145a0' + 'e253bc19cd306a7b435d507761f3534677136c448885e7b6bf92b5bb28e79e2aad794a0e0b0874828a75146cbeb8586df7ab052effafb8484747c4d4d43f89a4' + 'a8203472a924b720c9f4d8eb05976028cf3ca1e595fddee1801f7594c0bef00b1cd788410b5f8fa28ee2d6ebf1403b6052334f777c53fce0b8958e8e66931d98' + 'dfdd22d4cb803e7dd3fd3455689147c5441392001d8695993f5e7dcad02ff0b4846dd6c53a1fdb67134022ef77e6433c52d38cbbbaccb9d9d849acb8d19c854e' + 'b1eb6025017cb5d73d330e3bf304252c8ec4ae607350d358cc2a78ac765982dec6029b94e85966c34f015d50a39e639caf27c5907bc8dd1a36a5e1f9de206f7f') _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") @@ -180,16 +179,13 @@ prepare() { make olddefconfig make -s kernelrelease > version - echo "Prepared %s version %s" "$pkgbase" "$(