diff options
author | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2021-12-03 20:42:22 -0800 |
---|---|---|
committer | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2021-12-03 20:42:22 -0800 |
commit | c619e0a5cb122d730a26a7284d0f3de147c87e5d (patch) | |
tree | b3791f400f0145b9c20d80ed597ce50e27f139a8 | |
parent | Updated to 5.15.3 (diff) | |
download | linux-c619e0a5cb122d730a26a7284d0f3de147c87e5d.tar.xz |
Updated to 5.15.6
-rw-r--r-- | 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch | 2 | ||||
-rw-r--r-- | 0002-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch (renamed from 0005-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch) | 4 | ||||
-rw-r--r-- | 0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch | 47 | ||||
-rw-r--r-- | 0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch | 56 | ||||
-rw-r--r-- | 0003-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch (renamed from 0007-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch) | 8 | ||||
-rw-r--r-- | 0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch | 40 | ||||
-rw-r--r-- | 0004-cpufreq-intel_pstate-ITMT-support-for-overclocked-sy.patch | 55 | ||||
-rw-r--r-- | 0005-Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch | 60 | ||||
-rw-r--r-- | 0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch | 108 | ||||
-rw-r--r-- | 0006-lg-laptop-Recognize-more-models.patch | 39 | ||||
-rw-r--r-- | 0007-Revert-drm-i915-Implement-Wa_1508744258.patch | 47 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | config | 8 |
13 files changed, 237 insertions, 281 deletions
diff --git a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch index 9c90773..40d4241 100644 --- a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch @@ -1,4 +1,4 @@ -From 47d2645e7e3964621caea15feae6b806bd63ad92 Mon Sep 17 00:00:00 2001 +From e640cb2990858fa20aba91e73ed4fc48c94ec201 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> Date: Mon, 16 Sep 2019 04:53:20 +0200 Subject: [PATCH 1/8] ZEN: Add sysctl and CONFIG to disallow unprivileged diff --git a/0005-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch b/0002-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch index 315dd1e..11fa658 100644 --- a/0005-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch +++ b/0002-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch @@ -1,7 +1,7 @@ -From 6edac03ec96354bac75a0240ee1f848836a2fb19 Mon Sep 17 00:00:00 2001 +From 1ac8f753e4249e6864c1c42070ba957ceef1f82a Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org> Date: Thu, 18 Nov 2021 22:53:31 +0100 -Subject: [PATCH 5/8] PCI: Add more NVIDIA controllers to the MSI masking quirk +Subject: [PATCH 2/8] PCI: Add more NVIDIA controllers to the MSI masking quirk For: https://bugs.archlinux.org/task/72734 For: https://bugs.archlinux.org/task/72777 diff --git a/0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch b/0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch deleted file mode 100644 index 8cd4c11..0000000 --- a/0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 150424b14ca70f807b083aaae52db9eb072ba2e4 Mon Sep 17 00:00:00 2001 -From: Larry Finger <Larry.Finger@lwfinger.net> -Date: Sun, 7 Nov 2021 11:35:43 -0600 -Subject: [PATCH 2/8] staging: r8188eu: Fix breakage introduced when 5G code - was removed - -In commit 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions -and code"), two entries were removed from RTW_ChannelPlanMap[], but not replaced -with zeros. The position within this table is important, thus the patch broke -systems operating in regulatory domains osted later than entry 0x13 in the table. -Unfortunately, the FCC entry comes before that point and most testers did not see -this problem. - -Reported-and-tested-by: Zameer Manji <zmanji@gmail.com> -Reported-by: kernel test robot <lkp@intel.com> -Fixes: 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions and code") -Cc: Stable <stable@vger.kernel.org> # v5.5+ -Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> -For: https://bugs.archlinux.org/task/72659 -For: https://bugs.archlinux.org/task/72760 ---- - drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c -index 5a472a4954b0..e5c907ac10fc 100644 ---- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c -+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c -@@ -104,6 +104,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { - {0x01}, /* 0x10, RT_CHANNEL_DOMAIN_JAPAN */ - {0x02}, /* 0x11, RT_CHANNEL_DOMAIN_FCC_NO_DFS */ - {0x01}, /* 0x12, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */ -+ {0x00}, /* 0x13 */ - {0x02}, /* 0x14, RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS */ - {0x00}, /* 0x15, RT_CHANNEL_DOMAIN_ETSI_NO_DFS */ - {0x00}, /* 0x16, RT_CHANNEL_DOMAIN_KOREA_NO_DFS */ -@@ -115,6 +116,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { - {0x00}, /* 0x1C, */ - {0x00}, /* 0x1D, */ - {0x00}, /* 0x1E, */ -+ {0x00}, /* 0x1F, */ - /* 0x20 ~ 0x7F , New Define ===== */ - {0x00}, /* 0x20, RT_CHANNEL_DOMAIN_WORLD_NULL */ - {0x01}, /* 0x21, RT_CHANNEL_DOMAIN_ETSI1_NULL */ --- -2.33.1 - diff --git a/0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch b/0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch deleted file mode 100644 index 2e55d5d..0000000 --- a/0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 946e7362fca464b136ec89171e565e33153ccdcf Mon Sep 17 00:00:00 2001 -From: Marc Zyngier <maz@kernel.org> -Date: Thu, 4 Nov 2021 18:01:29 +0000 -Subject: [PATCH 3/8] PCI/MSI: Deal with devices lying about their MSI mask - capability - -It appears that some devices are lying about their mask capability, -pretending that they don't have it, while they actually do. -The net result is that now that we don't enable MSIs on such -endpoint. - -Add a new per-device flag to deal with this. Further patches will -make use of it, sadly. - -Signed-off-by: Marc Zyngier <maz@kernel.org> -Signed-off-by: Thomas Gleixner <tglx@linutronix.de> -Reviewed-by: Thomas Gleixner <tglx@linutronix.de> -Link: https://lore.kernel.org/r/20211104180130.3825416-2-maz@kernel.org -Cc: Bjorn Helgaas <helgaas@kernel.org> -For: https://bugs.archlinux.org/task/72734 -For: https://bugs.archlinux.org/task/72777 ---- - drivers/pci/msi.c | 3 +++ - include/linux/pci.h | 2 ++ - 2 files changed, 5 insertions(+) - -diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c -index ea6371eb9b25..e2dedfa9072d 100644 ---- a/drivers/pci/msi.c -+++ b/drivers/pci/msi.c -@@ -477,6 +477,9 @@ msi_setup_entry(struct pci_dev *dev, int nvec, struct irq_affinity *affd) - goto out; - - pci_read_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, &control); -+ /* Lies, damned lies, and MSIs */ -+ if (dev->dev_flags & PCI_DEV_FLAGS_HAS_MSI_MASKING) -+ control |= PCI_MSI_FLAGS_MASKBIT; - - entry->msi_attrib.is_msix = 0; - entry->msi_attrib.is_64 = !!(control & PCI_MSI_FLAGS_64BIT); -diff --git a/include/linux/pci.h b/include/linux/pci.h -index cd8aa6fce204..152a4d74f87f 100644 ---- a/include/linux/pci.h -+++ b/include/linux/pci.h -@@ -233,6 +233,8 @@ enum pci_dev_flags { - PCI_DEV_FLAGS_NO_FLR_RESET = (__force pci_dev_flags_t) (1 << 10), - /* Don't use Relaxed Ordering for TLPs directed at this device */ - PCI_DEV_FLAGS_NO_RELAXED_ORDERING = (__force pci_dev_flags_t) (1 << 11), -+ /* Device does honor MSI masking despite saying otherwise */ -+ PCI_DEV_FLAGS_HAS_MSI_MASKING = (__force pci_dev_flags_t) (1 << 12), - }; - - enum pci_irq_reroute_variant { --- -2.33.1 - diff --git a/0007-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch b/0003-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch index ea598c4..8038a54 100644 --- a/0007-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch +++ b/0003-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch @@ -1,7 +1,7 @@ -From aba4d743dacede0c1a7f4ed56a9f949e3349c833 Mon Sep 17 00:00:00 2001 +From 74db74ec6ce112c6137d51610429e7ac9ea5b6c1 Mon Sep 17 00:00:00 2001 From: Ajay Garg <ajaygargnsit@gmail.com> Date: Tue, 12 Oct 2021 19:26:53 +0530 -Subject: [PATCH 7/8] iommu: intel: do deep dma-unmapping, to avoid +Subject: [PATCH 3/8] iommu: intel: do deep dma-unmapping, to avoid kernel-flooding. Origins at : @@ -71,10 +71,10 @@ Link: https://lore.kernel.org/linux-iommu/20211012135653.3852-1-ajaygargnsit@gma 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c -index d75f59ae28e6..485a8ea71394 100644 +index 78f8c8e6803e..d8da48a91ba3 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c -@@ -5090,6 +5090,8 @@ static size_t intel_iommu_unmap(struct iommu_domain *domain, +@@ -5092,6 +5092,8 @@ static size_t intel_iommu_unmap(struct iommu_domain *domain, gather->freelist = domain_unmap(dmar_domain, start_pfn, last_pfn, gather->freelist); diff --git a/0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch b/0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch deleted file mode 100644 index 4fdb40c..0000000 --- a/0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch +++ /dev/null @@ -1,40 +0,0 @@ -From d791f46784859b98205808be0e08fc70eeb91d45 Mon Sep 17 00:00:00 2001 -From: Marc Zyngier <maz@kernel.org> -Date: Thu, 4 Nov 2021 18:01:30 +0000 -Subject: [PATCH 4/8] PCI: Add MSI masking quirk for Nvidia ION AHCI - -The ION AHCI device pretends that MSI masking isn't a thing, while it -actually implements it and needs MSIs to be unmasked to work. Add a quirk -to that effect. - -Reported-by: Rui Salvaterra <rsalvaterra@gmail.com> -Signed-off-by: Marc Zyngier <maz@kernel.org> -Signed-off-by: Thomas Gleixner <tglx@linutronix.de> -Tested-by: Rui Salvaterra <rsalvaterra@gmail.com> -Reviewed-by: Thomas Gleixner <tglx@linutronix.de> -Cc: Bjorn Helgaas <helgaas@kernel.org> -Link: https://lore.kernel.org/r/CALjTZvbzYfBuLB+H=fj2J+9=DxjQ2Uqcy0if_PvmJ-nU-qEgkg@mail.gmail.com -Link: https://lore.kernel.org/r/20211104180130.3825416-3-maz@kernel.org -For: https://bugs.archlinux.org/task/72734 -For: https://bugs.archlinux.org/task/72777 ---- - drivers/pci/quirks.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c -index 6c957124f84d..208fa03acdda 100644 ---- a/drivers/pci/quirks.c -+++ b/drivers/pci/quirks.c -@@ -5796,3 +5796,9 @@ static void apex_pci_fixup_class(struct pci_dev *pdev) - } - DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a, - PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class); -+ -+static void nvidia_ion_ahci_fixup(struct pci_dev *pdev) -+{ -+ pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING; -+} -+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup); --- -2.33.1 - diff --git a/0004-cpufreq-intel_pstate-ITMT-support-for-overclocked-sy.patch b/0004-cpufreq-intel_pstate-ITMT-support-for-overclocked-sy.patch new file mode 100644 index 0000000..886f0f2 --- /dev/null +++ b/0004-cpufreq-intel_pstate-ITMT-support-for-overclocked-sy.patch @@ -0,0 +1,55 @@ +From 62f1f7606485d450b23f86bc18dab101e7a2443d Mon Sep 17 00:00:00 2001 +From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> +Date: Thu, 18 Nov 2021 21:18:01 -0800 +Subject: [PATCH 4/8] cpufreq: intel_pstate: ITMT support for overclocked + system + +On systems with overclocking enabled, CPPC Highest Performance can be +hard coded to 0xff. In this case even if we have cores with different +highest performance, ITMT can't be enabled as the current implementation +depends on CPPC Highest Performance. + +On such systems we can use MSR_HWP_CAPABILITIES maximum performance field +when CPPC.Highest Performance is 0xff. + +Due to legacy reasons, we can't solely depend on MSR_HWP_CAPABILITIES as +in some older systems CPPC Highest Performance is the only way to identify +different performing cores. + +Reported-by: Michael Larabel <Michael@MichaelLarabel.com> +Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> +--- + drivers/cpufreq/intel_pstate.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c +index e15c3bc17a55..8a2c6b58b652 100644 +--- a/drivers/cpufreq/intel_pstate.c ++++ b/drivers/cpufreq/intel_pstate.c +@@ -335,6 +335,8 @@ static void intel_pstste_sched_itmt_work_fn(struct work_struct *work) + + static DECLARE_WORK(sched_itmt_work, intel_pstste_sched_itmt_work_fn); + ++#define CPPC_MAX_PERF U8_MAX ++ + static void intel_pstate_set_itmt_prio(int cpu) + { + struct cppc_perf_caps cppc_perf; +@@ -345,6 +347,14 @@ static void intel_pstate_set_itmt_prio(int cpu) + if (ret) + return; + ++ /* ++ * On some systems with overclocking enabled, CPPC.highest_perf is hardcoded to 0xff. ++ * In this case we can't use CPPC.highest_perf to enable ITMT. ++ * In this case we can look at MSR_HWP_CAPABILITIES bits [8:0] to decide. ++ */ ++ if (cppc_perf.highest_perf == CPPC_MAX_PERF) ++ cppc_perf.highest_perf = HWP_HIGHEST_PERF(READ_ONCE(all_cpu_data[cpu]->hwp_cap_cached)); ++ + /* + * The priorities can be set regardless of whether or not + * sched_set_itmt_support(true) has been called and it is valid to +-- +2.33.1 + diff --git a/0005-Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch b/0005-Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch new file mode 100644 index 0000000..e84d183 --- /dev/null +++ b/0005-Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch @@ -0,0 +1,60 @@ +From ae3386d67597db29ad2ba2685815e224a39897bc Mon Sep 17 00:00:00 2001 +From: Kiran K <kiran.k@intel.com> +Date: Wed, 13 Oct 2021 13:35:11 +0530 +Subject: [PATCH 5/8] Bluetooth: btintel: Fix bdaddress comparison with garbage + value + +Intel Read Verision(TLV) data is parsed into a local structure variable +and it contains a field for bd address. Bd address is returned only in +bootloader mode and hence bd address in TLV structure needs to be validated +only if controller is present in boot loader mode. + +Signed-off-by: Kiran K <kiran.k@intel.com> +Reviewed-by: Tedd Ho-Jeong An <tedd.an@intel.com> +--- + drivers/bluetooth/btintel.c | 22 ++++++++++++++-------- + 1 file changed, 14 insertions(+), 8 deletions(-) + +diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c +index f1705b46fc88..b9055a3e61ed 100644 +--- a/drivers/bluetooth/btintel.c ++++ b/drivers/bluetooth/btintel.c +@@ -2006,14 +2006,16 @@ static int btintel_prepare_fw_download_tlv(struct hci_dev *hdev, + if (ver->img_type == 0x03) { + btintel_clear_flag(hdev, INTEL_BOOTLOADER); + btintel_check_bdaddr(hdev); +- } +- +- /* If the OTP has no valid Bluetooth device address, then there will +- * also be no valid address for the operational firmware. +- */ +- if (!bacmp(&ver->otp_bd_addr, BDADDR_ANY)) { +- bt_dev_info(hdev, "No device address configured"); +- set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks); ++ } else { ++ /* ++ * Check for valid bd address in boot loader mode. Device ++ * will be marked as unconfigured if empty bd address is ++ * found. ++ */ ++ if (!bacmp(&ver->otp_bd_addr, BDADDR_ANY)) { ++ bt_dev_info(hdev, "No device address configured"); ++ set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks); ++ } + } + + btintel_get_fw_name_tlv(ver, fwname, sizeof(fwname), "sfi"); +@@ -2303,6 +2305,10 @@ static int btintel_setup_combined(struct hci_dev *hdev) + goto exit_error; + } + ++ /* memset ver_tlv to start with clean state as few fields are exclusive ++ * to bootloader mode and are not populated in operational mode ++ */ ++ memset(&ver_tlv, 0, sizeof(ver_tlv)); + /* For TLV type device, parse the tlv data */ + err = btintel_parse_version_tlv(hdev, &ver_tlv, skb); + if (err) { +-- +2.33.1 + diff --git a/0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch b/0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch deleted file mode 100644 index e5b94c4..0000000 --- a/0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 8414110f6b3801058a55b505539da7f7d7acd1fb Mon Sep 17 00:00:00 2001 -From: Evan Quan <evan.quan@amd.com> -Date: Mon, 15 Nov 2021 10:51:37 +0800 -Subject: [PATCH 6/8] drm/amd/pm: avoid duplicate powergate/ungate setting - -Just bail out if the target IP block is already in the desired -powergate/ungate state. This can avoid some duplicate settings -which sometimes may cause unexpected issues. - -Link: https://lore.kernel.org/all/YV81vidWQLWvATMM@zn.tnic/ - -Change-Id: I66346c69f121df0f5ee20182451313ae4fda2d04 -Signed-off-by: Evan Quan <evan.quan@amd.com> -Tested-by: Borislav Petkov <bp@suse.de> -Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> -For: https://bugs.archlinux.org/task/72753 ---- - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ - drivers/gpu/drm/amd/include/amd_shared.h | 3 ++- - drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 10 ++++++++++ - drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 8 ++++++++ - 4 files changed, 23 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c -index c1e34aa5925b..96ca42bcfdbf 100644 ---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c -+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c -@@ -3532,6 +3532,9 @@ int amdgpu_device_init(struct amdgpu_device *adev, - adev->rmmio_size = pci_resource_len(adev->pdev, 2); - } - -+ for (i = 0; i < AMD_IP_BLOCK_TYPE_NUM; i++) -+ atomic_set(&adev->pm.pwr_state[i], POWER_STATE_UNKNOWN); -+ - adev->rmmio = ioremap(adev->rmmio_base, adev->rmmio_size); - if (adev->rmmio == NULL) { - return -ENOMEM; -diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h -index 257f280d3d53..bd077ea224a4 100644 ---- a/drivers/gpu/drm/amd/include/amd_shared.h -+++ b/drivers/gpu/drm/amd/include/amd_shared.h -@@ -98,7 +98,8 @@ enum amd_ip_block_type { - AMD_IP_BLOCK_TYPE_ACP, - AMD_IP_BLOCK_TYPE_VCN, - AMD_IP_BLOCK_TYPE_MES, -- AMD_IP_BLOCK_TYPE_JPEG -+ AMD_IP_BLOCK_TYPE_JPEG, -+ AMD_IP_BLOCK_TYPE_NUM, - }; - - enum amd_clockgating_state { -diff --git a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c -index 03581d5b1836..08362d506534 100644 ---- a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c -+++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c -@@ -927,6 +927,13 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev, uint32_t block - { - int ret = 0; - const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; -+ enum ip_power_state pwr_state = gate ? POWER_STATE_OFF : POWER_STATE_ON; -+ -+ if (atomic_read(&adev->pm.pwr_state[block_type]) == pwr_state) { -+ dev_dbg(adev->dev, "IP block%d already in the target %s state!", -+ block_type, gate ? "gate" : "ungate"); -+ return 0; -+ } - - switch (block_type) { - case AMD_IP_BLOCK_TYPE_UVD: -@@ -979,6 +986,9 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev, uint32_t block - break; - } - -+ if (!ret) -+ atomic_set(&adev->pm.pwr_state[block_type], pwr_state); -+ - return ret; - } - -diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h -index 98f1b3d8c1d5..16e3f72d31b9 100644 ---- a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h -+++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h -@@ -417,6 +417,12 @@ struct amdgpu_dpm { - enum amd_dpm_forced_level forced_level; - }; - -+enum ip_power_state { -+ POWER_STATE_UNKNOWN, -+ POWER_STATE_ON, -+ POWER_STATE_OFF, -+}; -+ - struct amdgpu_pm { - struct mutex mutex; - u32 current_sclk; -@@ -452,6 +458,8 @@ struct amdgpu_pm { - struct i2c_adapter smu_i2c; - struct mutex smu_i2c_mutex; - struct list_head pm_attr_list; -+ -+ atomic_t pwr_state[AMD_IP_BLOCK_TYPE_NUM]; - }; - - #define R600_SSTU_DFLT 0 --- -2.33.1 - diff --git a/0006-lg-laptop-Recognize-more-models.patch b/0006-lg-laptop-Recognize-more-models.patch new file mode 100644 index 0000000..812b041 --- /dev/null +++ b/0006-lg-laptop-Recognize-more-models.patch @@ -0,0 +1,39 @@ +From 675d4b66de78eec370cf5053eecdf00b26780af3 Mon Sep 17 00:00:00 2001 +From: Matan Ziv-Av <matan@svgalib.org> +Date: Tue, 23 Nov 2021 22:14:55 +0200 +Subject: [PATCH 6/8] lg-laptop: Recognize more models + +LG uses 5 instead of 0 in the third digit (second digit after 2019) of the year string to indicate newer models in the same year. Handle this case as well. + +Signed-off-by: Matan Ziv-Av <matan@svgalib.org> +For: https://bugs.archlinux.org/task/71772 +--- + drivers/platform/x86/lg-laptop.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c +index 88b551caeaaf..d6f74d3a7605 100644 +--- a/drivers/platform/x86/lg-laptop.c ++++ b/drivers/platform/x86/lg-laptop.c +@@ -658,6 +658,18 @@ static int acpi_add(struct acpi_device *device) + if (product && strlen(product) > 4) + switch (product[4]) { + case '5': ++ if (strlen(product) > 5) ++ switch (product[5]) { ++ case 'N': ++ year = 2021; ++ break; ++ case '0': ++ year = 2016; ++ break; ++ default: ++ year = 2022; ++ } ++ break; + case '6': + year = 2016; + break; +-- +2.33.1 + diff --git a/0007-Revert-drm-i915-Implement-Wa_1508744258.patch b/0007-Revert-drm-i915-Implement-Wa_1508744258.patch new file mode 100644 index 0000000..5517ef5 --- /dev/null +++ b/0007-Revert-drm-i915-Implement-Wa_1508744258.patch @@ -0,0 +1,47 @@ +From 2b3efb722d72940a61adb5898d92d8ebacd9e3a8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= <jose.souza@intel.com> +Date: Fri, 19 Nov 2021 06:09:30 -0800 +Subject: [PATCH 7/8] Revert "drm/i915: Implement Wa_1508744258" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This workarounds are causing hangs, because I missed the fact that it +needs to be enabled for all cases and disabled when doing a resolve +pass. + +So KMD only needs to whitelist it and UMD will be the one setting it +on per case. + +This reverts commit 28ec02c9cbebf3feeaf21a59df9dfbc02bda3362. + +Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/4145 +Signed-off-by: José Roberto de Souza <jose.souza@intel.com> +Fixes: 28ec02c9cbeb ("drm/i915: Implement Wa_1508744258") +Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com> +For: https://bugs.archlinux.org/task/72752 +--- + drivers/gpu/drm/i915/gt/intel_workarounds.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c +index aae609d7d85d..6b5ab19a2ada 100644 +--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c ++++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c +@@ -621,13 +621,6 @@ static void gen12_ctx_workarounds_init(struct intel_engine_cs *engine, + FF_MODE2_GS_TIMER_MASK, + FF_MODE2_GS_TIMER_224, + 0, false); +- +- /* +- * Wa_14012131227:dg1 +- * Wa_1508744258:tgl,rkl,dg1,adl-s,adl-p +- */ +- wa_masked_en(wal, GEN7_COMMON_SLICE_CHICKEN1, +- GEN9_RHWO_OPTIMIZATION_DISABLE); + } + + static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine, +-- +2.33.1 + @@ -18,7 +18,7 @@ _custom=0 pkgbase=linux _supver=5 _majver=15 -_minver=3 +_minver=6 _gccpatchver='20211114' _gccpatchker='5.15+' if [ "$_minver" == "0" ]; then @@ -42,12 +42,12 @@ source=( https://www.kernel.org/pub/linux/kernel/v${_supver}.x/${_srcname}.tar.{xz,sign} config # the main kernel config file 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch - 0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch - 0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch - 0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch - 0005-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch - 0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch - 0007-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch + 0002-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch + 0003-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch + 0004-cpufreq-intel_pstate-ITMT-support-for-overclocked-sy.patch + 0005-Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch + 0006-lg-laptop-Recognize-more-models.patch + 0007-Revert-drm-i915-Implement-Wa_1508744258.patch kernel_compiler_patch-${_gccpatchver}.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/${_gccpatchver}.tar.gz ath9k-regdom-hack.patch raid6-default-algo.patch @@ -57,16 +57,16 @@ validpgpkeys=( '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) # https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc -b2sums=('93379b68cfe85a979a7a39179e2bf622702d5e4f7a1d5a5bace1e8d11583d77966bce5b0e61f047fcb40c6c2be401e7725b3aa01e602c6ef4ac045a24ebcc2cd' +b2sums=('dedcff13b0829b9bdfc4998a9bedcf932dee48ade3bef722ccbd8fc7bef9832462ac2f1064b77926f86d93c7035634db8ba8f6c1e2d957ff749b34e218c565c7' 'SKIP' - 'f30324872cc582f45019c4f601643962070c8f19adedca66783bb502251c09548aaa9f1c7ce831cf5aca89362c75bd006464a8202307393fdab46571e1201c6d' - 'dd3a7d6db14da32e1988894e679f7cad9675903ff317f26a17a3bf149876108bee44556e5cd34ed09062c13cf4ac6a060add416856566ef26ace86c884c3a2f0' - '73cb63b9468a8feb6b8ed5c0b817fc03b82a64642745fe94323209a34ff273c9a17ab3b44844613341da0d2b38747f2b815a4ede7451b3533239319093cdc937' - 'f3581e3b7da67ade68172811c71afa817db9884ffb755ead4e0850bb2a4f219409623c3b97feaa73d1b05b8e086184ed8fed6b2d3baeb194903089e3ee7fd5cb' - '5f6df31f50d9d26f56437ee2d4bcd9d8cd71e112021448ece33ffd6bb288ab55bec536b83131a72225b235bc0bd3b9abeb56e49ad5bd35e4d884ab46b045fd1d' - 'a418582cdaa4e6596668582d6549471b204e972cc251e51a68180f129cd0d548873a5a6856e3ea7aff12baba19b9c50c90b9d76c0dfa9243f55f4aab68d371bc' - '5faedb1487dbdc49090c8c30e332945b59a2c68510be59b908708730dd979b655f88927a2a1380adbb743d0589f34f34b7d49f1eb060cf6b73bf1b99fb2f6420' - '1b4fa5ebee55288d189fb6159af819c175f3dffa1d88537d1dcddf719e4d6fff9e232417a0c455e6b6337d313c988c3e886e4bfad58716351495e55fdb45b61b' + 'd542fc258c4381355fe44f604c8656d4b266df5709fd8fb63c63486935f0c6b1220df08802d497fa9371c9011479e3ca33c23d8514a71374d862648380344f9c' + 'f1e7205c4033abe680c5ddc9542a677f27b725f2d8b9b84133d877b1d60d5c373ed2873445202bdd7e15b6f56c96ffa2427fc1e36b485c25ae69907f486c4603' + 'ac15c66f8ca31bc051766ad8321111f8a6b3d2c0ad2b26cc654a54a707a0dfcdd4a22f21f96f7d0395b9afb3ad1c6f9cca043fb055d62ab3706f63e746316c94' + '6c52152b263816f116d4a5bfe47a41a781056db2b18afaf3bd1db4e5839d57a8f8bddb340879f734642f967c8686146c6fdb0af852e5144e6c15216d5b6ee7fd' + '087676835d15d3c13da86a37e2de922a461b973931ecf29f1ddefddfa23df3ea045799db1f62aa3be70d57df4436ae5fe4f2ef99c05258a1aa9944c00724cdc5' + 'b693e06413968585a18b1d504768433420588764485eee298b70d5ca622197d7d134bf42d4f517b0f8367a188f90580825d1c3f8a55099ec69fc14be66465f16' + 'ac8502cd579880d05108aad23b844633a67ff9d8b83b63d2a0fc7fa1031aa3b09ee52989415cc27a0ef13f8a9e3f035bf27b33ed1dafc5132c4edc371800c061' + 'c5928b74720dc96865b2b94e35ee790cd96e3197abe1eb2140d79bc931b433564b80155c4129fc6d9e4215b44a620e78a3fdb1e92677e689c503b0157b43960b' '534091fb5034226d48f18da2114305860e67ee49a1d726b049a240ce61df83e840a9a255e5b8fa9279ec07dd69fb0aea6e2e48962792c2b5367db577a4423d8d' 'b6ef77035611139fa9a6d5b8d30570e2781bb4da483bb569884b0bd0129b62e0b82a5a6776fefe43fee801c70d39de1ea4d4c177f7cedd5ac135e3c64f7b895a' 'fde132f3705d908e6f2147c78a2193289916d72304ca5efa2229d79fc3e57a857314ce94e71425caef2f7f7b6cf87f05ef86335dc8bd4be78e7035afe608005a') @@ -89,12 +89,12 @@ prepare() { # Hotfixes echo "Applying hotfixes" patch -p1 -i ../0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch - patch -p1 -i ../0002-staging-r8188eu-Fix-breakage-introduced-when-5G-code.patch - patch -p1 -i ../0003-PCI-MSI-Deal-with-devices-lying-about-their-MSI-mask.patch - patch -p1 -i ../0004-PCI-Add-MSI-masking-quirk-for-Nvidia-ION-AHCI.patch - patch -p1 -i ../0005-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch - patch -p1 -i ../0006-drm-amd-pm-avoid-duplicate-powergate-ungate-setting.patch - patch -p1 -i ../0007-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch + patch -p1 -i ../0002-PCI-Add-more-NVIDIA-controllers-to-the-MSI-masking-q.patch + patch -p1 -i ../0003-iommu-intel-do-deep-dma-unmapping-to-avoid-kernel-fl.patch + patch -p1 -i ../0004-cpufreq-intel_pstate-ITMT-support-for-overclocked-sy.patch + patch -p1 -i ../0005-Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch + patch -p1 -i ../0006-lg-laptop-Recognize-more-models.patch + patch -p1 -i ../0007-Revert-drm-i915-Implement-Wa_1508744258.patch # graysky gcc patch @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 5.14.11 Kernel Configuration +# Linux/x86 5.15.5 Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.1.0" CONFIG_CC_IS_GCC=y @@ -2385,6 +2385,7 @@ CONFIG_MTD_BLOCK=m # CONFIG_SSFDC is not set # CONFIG_SM_FTL is not set # CONFIG_MTD_OOPS is not set +CONFIG_MTD_PSTORE=m # CONFIG_MTD_SWAP is not set # CONFIG_MTD_PARTITIONED_MASTER is not set @@ -9816,6 +9817,11 @@ CONFIG_PSTORE_COMPRESS_DEFAULT="zstd" # CONFIG_PSTORE_PMSG is not set # CONFIG_PSTORE_FTRACE is not set CONFIG_PSTORE_RAM=m +CONFIG_PSTORE_ZONE=m +CONFIG_PSTORE_BLK=m +CONFIG_PSTORE_BLK_BLKDEV="" +CONFIG_PSTORE_BLK_KMSG_SIZE=64 +CONFIG_PSTORE_BLK_MAX_REASON=2 # CONFIG_SYSV_FS is not set CONFIG_UFS_FS=m # CONFIG_UFS_FS_WRITE is not set |