From 110d54fbc65c63a886c9fac1330276881bc902c4 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Fri, 3 Apr 2020 07:32:54 -0700 Subject: Updated to 5.5.15 --- ...-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch | 152 --------------------- PKGBUILD | 7 +- 2 files changed, 2 insertions(+), 157 deletions(-) delete mode 100644 0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch diff --git a/0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch b/0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch deleted file mode 100644 index af462ee..0000000 --- a/0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch +++ /dev/null @@ -1,152 +0,0 @@ -From ec701fa986108fae10bee7cfe269e12210521c5f Mon Sep 17 00:00:00 2001 -From: Golan Ben Ami -Date: Wed, 18 Mar 2020 08:12:54 +0200 -Subject: 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); - --- -cgit v1.2.2-1-gc45e - diff --git a/PKGBUILD b/PKGBUILD index 22728f2..3e129d3 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -19,7 +19,7 @@ pkgbase=linux-ck _supver=5 _majver=5 -_minver=14 +_minver=15 _gccpatchver='20191217' _gccpatchger='9.1' _gccpatchker='5.5' @@ -53,7 +53,6 @@ source=( 0008-drm-i915-gem-Reinitialise-the-local-list-before-repeating.patch 0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch 0010-drm-i915-Introduce-a-vma.kref.patch - 0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch graysky_bdver2-hotfix.patch linux-ck-patch-${_supver}.${_majver}-${_ckpatchversion}.xz::http://ck.kolivas.org/patches/${_supver}.0/${_supver}.${_majver}/${_supver}.${_majver}-${_ckpatchversion}/patch-${_supver}.${_majver}-${_ckpatchversion}.xz graysky_bdver2-hotfix.patch @@ -67,7 +66,7 @@ validpgpkeys=( '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) # https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc -b2sums=('654024b8aff12a1d15a8cc2e3698f98707bc5a7a5825d592e7cc047c1222d8561403013068c08e35e408364bd40575d749503dd5cad189594d45b80a295d13a0' +b2sums=('503fe041789b791755c8dcf28c52acd58fe4fa3e5e4e5b672dc41ab0ed54a2f8b00bbaebd340984fddc6eb5465df57313a087921eac01931d10c44eeb2cc753d' 'SKIP' 'ab1fb19c67d4c107f75767581c33d9c1458b4d9fdb88f4adb41d30a36f5a2f95f1c48ef079eb87e1e6e8ce2f98b293195cb2c0f2a8ec975aa817453289158c6e' '2e822cf7d4ff8b7458e22d3ce110fd8534e17a9aac2feace41c591f70697e1fab7bd9ce307c60a6361fbe525d10dab74c8b76fcb5276cd27f6e945f8fdfcc25c' @@ -79,7 +78,6 @@ b2sums=('654024b8aff12a1d15a8cc2e3698f98707bc5a7a5825d592e7cc047c1222d8561403013 'c1410e2d53dd7afb6d68f75c557774e37f466a5b5b7432ec6802b2c2a9644c8a6b5fcd38a76781b9229a9cb2cf4c0c55129ee050918577937d91dd7ee789f3b8' '63e9e6ceda80243910c073ec81555f2781d75ac4b3cb5000c1328f2624f7be840684b0f383768020e82bce502aa90a1c8729f7b3e91c099652075a42da2187cf' '078bb20a03b7e43ad0685b0c3f6a54f1c4bd32d25e0f6c6434100c6f5f5bc27cd6281bf2134b7c7034e6aa448d895d23c20d32f7d1cc40e55f0735af777694a3' - '7b56fe6d171bc9f5154fd6dd89e6678f7e65f26d53551ebc758142a3440cb796b8f7badc361b1e19ff70dfc842dce235fb3b476d35994cb0022157ae64e28cf3' '1892bd22775eac3bcc4d37f4fd30c95346bf3a0888cbbff57fd614973b525390dff2e315ce35b2e498523cceaab94ff21a80475dee8df3de4dd8fc0fab07d74e' '54bdd9958d8fa9c3affa1972ca7d9821330394fbacf7ed25e098675d439764d0c918b4ee6554aaea23762bb90060cb2ee952bff569f54903e6b27fa10e8f4b09' '1892bd22775eac3bcc4d37f4fd30c95346bf3a0888cbbff57fd614973b525390dff2e315ce35b2e498523cceaab94ff21a80475dee8df3de4dd8fc0fab07d74e' @@ -114,7 +112,6 @@ prepare() { patch -p1 -i ../0008-drm-i915-gem-Reinitialise-the-local-list-before-repeating.patch patch -p1 -i ../0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch patch -p1 -i ../0010-drm-i915-Introduce-a-vma.kref.patch - patch -p1 -i ../0011-iwlwifi-dont-send-GEO_TX_POWER_LIMIT-if-no-wgds-table.patch # fix naming schema in EXTRAVERSION of ck patch set -- cgit v1.2.1 From b81466ae64eb9dde19d2f05524e8da749352fcf7 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sat, 11 Apr 2020 10:47:14 -0700 Subject: Updated to 5.5.16 --- PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 3e129d3..c63e4fa 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -19,7 +19,7 @@ pkgbase=linux-ck _supver=5 _majver=5 -_minver=15 +_minver=16 _gccpatchver='20191217' _gccpatchger='9.1' _gccpatchker='5.5' @@ -66,7 +66,7 @@ validpgpkeys=( '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) # https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc -b2sums=('503fe041789b791755c8dcf28c52acd58fe4fa3e5e4e5b672dc41ab0ed54a2f8b00bbaebd340984fddc6eb5465df57313a087921eac01931d10c44eeb2cc753d' +b2sums=('dd15f3d9c52356cae47c8c7bc57779fb8810afa3695daf207165f0508557d7d3a6cd92a1c023d86d264aee73503c10d32e8cedda1111ebf0202df48ae84f514d' 'SKIP' 'ab1fb19c67d4c107f75767581c33d9c1458b4d9fdb88f4adb41d30a36f5a2f95f1c48ef079eb87e1e6e8ce2f98b293195cb2c0f2a8ec975aa817453289158c6e' '2e822cf7d4ff8b7458e22d3ce110fd8534e17a9aac2feace41c591f70697e1fab7bd9ce307c60a6361fbe525d10dab74c8b76fcb5276cd27f6e945f8fdfcc25c' -- cgit v1.2.1 From 656760b8357de61fd16c3fd175a62e466244e414 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Mon, 13 Apr 2020 12:28:03 -0700 Subject: Updated to 5.5.17 --- PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index c63e4fa..9038660 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -19,7 +19,7 @@ pkgbase=linux-ck _supver=5 _majver=5 -_minver=16 +_minver=17 _gccpatchver='20191217' _gccpatchger='9.1' _gccpatchker='5.5' @@ -66,7 +66,7 @@ validpgpkeys=( '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) # https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc -b2sums=('dd15f3d9c52356cae47c8c7bc57779fb8810afa3695daf207165f0508557d7d3a6cd92a1c023d86d264aee73503c10d32e8cedda1111ebf0202df48ae84f514d' +b2sums=('541210fd9b4f7229e63a6d38b6b857ca92c83509be1e0278ef76e9550c70b17e318d40bd5027c4793ca2bf232647a1021b21b80232cb9ad2fa1b5cc126eaceb7' 'SKIP' 'ab1fb19c67d4c107f75767581c33d9c1458b4d9fdb88f4adb41d30a36f5a2f95f1c48ef079eb87e1e6e8ce2f98b293195cb2c0f2a8ec975aa817453289158c6e' '2e822cf7d4ff8b7458e22d3ce110fd8534e17a9aac2feace41c591f70697e1fab7bd9ce307c60a6361fbe525d10dab74c8b76fcb5276cd27f6e945f8fdfcc25c' -- cgit v1.2.1 From 8bb675660780a6245dea9586379a1e4e34b4a936 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Fri, 17 Apr 2020 16:08:19 -0700 Subject: Updated to 5.5.18 --- PKGBUILD | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 9038660..2268904 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -19,7 +19,7 @@ pkgbase=linux-ck _supver=5 _majver=5 -_minver=17 +_minver=18 _gccpatchver='20191217' _gccpatchger='9.1' _gccpatchker='5.5' @@ -45,7 +45,6 @@ source=( https://www.kernel.org/pub/linux/kernel/v${_supver}.x/${_srcname}.tar.{xz,sign} 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch 0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch - 0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch 0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch 0005-drm_i915_gem_Take_runtime-pm_wakeref_prior_to_unbinding.patch 0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch @@ -66,11 +65,10 @@ validpgpkeys=( '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) # https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc -b2sums=('541210fd9b4f7229e63a6d38b6b857ca92c83509be1e0278ef76e9550c70b17e318d40bd5027c4793ca2bf232647a1021b21b80232cb9ad2fa1b5cc126eaceb7' +b2sums=('b30d52ddb7833e61d6ac84b97e3bde362992b3bb4fca307acfdafd01d703654dafa48c8bdc38c6821e82e139cefff8e699c31da6832af37a77cd574d63475e3b' 'SKIP' 'ab1fb19c67d4c107f75767581c33d9c1458b4d9fdb88f4adb41d30a36f5a2f95f1c48ef079eb87e1e6e8ce2f98b293195cb2c0f2a8ec975aa817453289158c6e' '2e822cf7d4ff8b7458e22d3ce110fd8534e17a9aac2feace41c591f70697e1fab7bd9ce307c60a6361fbe525d10dab74c8b76fcb5276cd27f6e945f8fdfcc25c' - 'd8027cd96a447ea0987a67f3e65d157bb3d396069a944b140610f74c663677fe45e171e96a92dfd5eda8f71a5c715fd8114ee0e60b7620bc401a2a548bcf83cc' 'df41200d86f1fd493861d4b4a091ec5f853ce7668ec9712f57e574ce2c1a94c7054ec8abcdf947086e5f98b0cdde73523521552536c91373dacdd10c4ecf4c1a' 'f4d5f82c5deb981f475fd18a408e23b5f170e23c7a49c3563171e55abd78c07c475a7a9c67850c4a3665ce3447cd7b5fb3171e47af8cd8077822f2a6679cfd9b' '70d02b7fc8b26c783eaabafb9bef5d3895c0031642dc8b71d8737762722695221340315576433d1544b79b37446212ce5e3d0936f695af307b3344a717274ba8' @@ -104,7 +102,6 @@ prepare() { echo "Applying hotfixes" patch -p1 -i ../0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch patch -p1 -i ../0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch - patch -p1 -i ../0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch patch -p1 -i ../0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch patch -p1 -i ../0005-drm_i915_gem_Take_runtime-pm_wakeref_prior_to_unbinding.patch patch -p1 -i ../0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch -- cgit v1.2.1 From e06bd8ae322f24ebf0b9d7480f1ea6a080c2f3c4 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Fri, 17 Apr 2020 16:08:53 -0700 Subject: Remove obsolete patch --- ...PageReserved-manipulation-from-drm_pci_al.patch | 91 ---------------------- 1 file changed, 91 deletions(-) delete mode 100644 0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch diff --git a/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch b/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch deleted file mode 100644 index 15688c8..0000000 --- a/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch +++ /dev/null @@ -1,91 +0,0 @@ -From c40f78c76b2f3ae55c348e8b206b0b283f01549c Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Sun, 2 Feb 2020 17:16:31 +0000 -Subject: 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); -- } - } - - /** --- -cgit v1.2.2-1-gc45e - -- cgit v1.2.1 From 0a88f37002e48a79798542e3923a7d073d5b424e Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Tue, 21 Apr 2020 16:07:30 -0700 Subject: Updated to 5.5.19 --- ...e_i915_active_acquire_with__active_retire.patch | 78 ---------------------- ...e_i915_active_acquire_with__active_retire.patch | 78 ++++++++++++++++++++++ ...15-gem-Avoid-parking-the-vma-as-we-unbind.patch | 63 ----------------- ...15-gem-Avoid-parking-the-vma-as-we-unbind.patch | 63 +++++++++++++++++ PKGBUILD | 12 ++-- 5 files changed, 147 insertions(+), 147 deletions(-) delete mode 100644 0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch create mode 100644 0004-drm_i915_Serialise_i915_active_acquire_with__active_retire.patch delete mode 100644 0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch create mode 100644 0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch diff --git a/0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch b/0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch deleted file mode 100644 index 937adac..0000000 --- a/0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 167299b5c1cc6f0c1274271aec0ab2b9fec01594 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Thu, 5 Dec 2019 18:33:32 +0000 -Subject: 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); --- -cgit v1.2.2-1-gc45e - diff --git a/0004-drm_i915_Serialise_i915_active_acquire_with__active_retire.patch b/0004-drm_i915_Serialise_i915_active_acquire_with__active_retire.patch new file mode 100644 index 0000000..937adac --- /dev/null +++ b/0004-drm_i915_Serialise_i915_active_acquire_with__active_retire.patch @@ -0,0 +1,78 @@ +From 167299b5c1cc6f0c1274271aec0ab2b9fec01594 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Thu, 5 Dec 2019 18:33:32 +0000 +Subject: 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); +-- +cgit v1.2.2-1-gc45e + diff --git a/0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch b/0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch deleted file mode 100644 index 9887e67..0000000 --- a/0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 89678e8921d00143665237e719f96cfc8425f804 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Tue, 3 Dec 2019 15:50:32 +0000 -Subject: 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); - } --- -cgit v1.2.2-1-gc45e - diff --git a/0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch b/0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch new file mode 100644 index 0000000..9887e67 --- /dev/null +++ b/0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch @@ -0,0 +1,63 @@ +From 89678e8921d00143665237e719f96cfc8425f804 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Tue, 3 Dec 2019 15:50:32 +0000 +Subject: 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); + } +-- +cgit v1.2.2-1-gc45e + diff --git a/PKGBUILD b/PKGBUILD index 2268904..2ea950f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -19,7 +19,7 @@ pkgbase=linux-ck _supver=5 _majver=5 -_minver=18 +_minver=19 _gccpatchver='20191217' _gccpatchger='9.1' _gccpatchker='5.5' @@ -45,9 +45,9 @@ source=( https://www.kernel.org/pub/linux/kernel/v${_supver}.x/${_srcname}.tar.{xz,sign} 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch 0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch - 0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch + 0004-drm_i915_Serialise_i915_active_acquire_with__active_retire.patch 0005-drm_i915_gem_Take_runtime-pm_wakeref_prior_to_unbinding.patch - 0006-drm-915-gem-Avoid-parking-the-vma-as-we-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-repeating.patch 0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch @@ -65,7 +65,7 @@ validpgpkeys=( '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) # https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc -b2sums=('b30d52ddb7833e61d6ac84b97e3bde362992b3bb4fca307acfdafd01d703654dafa48c8bdc38c6821e82e139cefff8e699c31da6832af37a77cd574d63475e3b' +b2sums=('cd30a600a2b9ecd3f26ff994fa54871a0fabb24ca1db70b0657732fffcc9c77e9aaf14ab440b2544b77744ea0a8c325de47dbe01e8df54cc47880d38343ac1e9' 'SKIP' 'ab1fb19c67d4c107f75767581c33d9c1458b4d9fdb88f4adb41d30a36f5a2f95f1c48ef079eb87e1e6e8ce2f98b293195cb2c0f2a8ec975aa817453289158c6e' '2e822cf7d4ff8b7458e22d3ce110fd8534e17a9aac2feace41c591f70697e1fab7bd9ce307c60a6361fbe525d10dab74c8b76fcb5276cd27f6e945f8fdfcc25c' @@ -102,9 +102,9 @@ prepare() { echo "Applying hotfixes" patch -p1 -i ../0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch patch -p1 -i ../0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch - patch -p1 -i ../0004-drm_915_Serialise_i915_active_acquire_with__active_retire.patch + patch -p1 -i ../0004-drm_i915_Serialise_i915_active_acquire_with__active_retire.patch patch -p1 -i ../0005-drm_i915_gem_Take_runtime-pm_wakeref_prior_to_unbinding.patch - patch -p1 -i ../0006-drm-915-gem-Avoid-parking-the-vma-as-we-unbind.patch + patch -p1 -i ../0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch patch -p1 -i ../0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch patch -p1 -i ../0008-drm-i915-gem-Reinitialise-the-local-list-before-repeating.patch patch -p1 -i ../0009-drm-i915-Add-a-simple-is-bound-check-before-unbinding.patch -- cgit v1.2.1