From d761841c7d296e7c579bdf46af593f15839975f7 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Fri, 26 Mar 2021 15:52:05 +0100 Subject: [PATCH] sunxi edge - add upstream patch --- config/kernel/linux-sunxi-edge.config | 2 +- .../archive/sunxi-5.11/patch-5.11.9-10.patch | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 patch/kernel/archive/sunxi-5.11/patch-5.11.9-10.patch diff --git a/config/kernel/linux-sunxi-edge.config b/config/kernel/linux-sunxi-edge.config index d7fb3c5434..d97b4a0480 100644 --- a/config/kernel/linux-sunxi-edge.config +++ b/config/kernel/linux-sunxi-edge.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 5.11.6 Kernel Configuration +# Linux/arm 5.11.10 Kernel Configuration # CONFIG_CC_VERSION_TEXT="arm-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0" CONFIG_CC_IS_GCC=y diff --git a/patch/kernel/archive/sunxi-5.11/patch-5.11.9-10.patch b/patch/kernel/archive/sunxi-5.11/patch-5.11.9-10.patch new file mode 100644 index 0000000000..9d2fc8e043 --- /dev/null +++ b/patch/kernel/archive/sunxi-5.11/patch-5.11.9-10.patch @@ -0,0 +1,52 @@ +diff --git a/Makefile b/Makefile +index 23403c8e08385..824d15c14be02 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 5 + PATCHLEVEL = 11 +-SUBLEVEL = 9 ++SUBLEVEL = 10 + EXTRAVERSION = + NAME = 💕 Valentine's Day Edition 💕 + +diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c +index a76eb2c14e8c5..22073e77fdf9a 100644 +--- a/drivers/gpu/drm/ttm/ttm_bo.c ++++ b/drivers/gpu/drm/ttm/ttm_bo.c +@@ -514,7 +514,7 @@ static void ttm_bo_release(struct kref *kref) + * shrinkers, now that they are queued for + * destruction. + */ +- if (WARN_ON(bo->pin_count)) { ++ if (bo->pin_count) { + bo->pin_count = 0; + ttm_bo_del_from_lru(bo); + ttm_bo_add_mem_to_lru(bo, &bo->mem); +diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h +index b5bef31991967..2564e66e67d74 100644 +--- a/include/drm/ttm/ttm_bo_api.h ++++ b/include/drm/ttm/ttm_bo_api.h +@@ -600,7 +600,6 @@ static inline bool ttm_bo_uses_embedded_gem_object(struct ttm_buffer_object *bo) + static inline void ttm_bo_pin(struct ttm_buffer_object *bo) + { + dma_resv_assert_held(bo->base.resv); +- WARN_ON_ONCE(!kref_read(&bo->kref)); + ++bo->pin_count; + } + +@@ -613,11 +612,8 @@ static inline void ttm_bo_pin(struct ttm_buffer_object *bo) + static inline void ttm_bo_unpin(struct ttm_buffer_object *bo) + { + dma_resv_assert_held(bo->base.resv); +- WARN_ON_ONCE(!kref_read(&bo->kref)); +- if (bo->pin_count) +- --bo->pin_count; +- else +- WARN_ON_ONCE(true); ++ WARN_ON_ONCE(!bo->pin_count); ++ --bo->pin_count; + } + + int ttm_mem_evict_first(struct ttm_bo_device *bdev,