From: Greg Kroah-Hartman Date: Thu, 25 Mar 2021 08:55:30 +0000 (+0100) Subject: 5.11-stable patches X-Git-Tag: v5.11.10~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3cefdc143263faccab45578dedd8799111e332de;p=thirdparty%2Fkernel%2Fstable-queue.git 5.11-stable patches added patches: revert-drm-ttm-make-ttm_bo_unpin-more-defensive.patch revert-drm-ttm-warn-on-pinning-without-holding-a.patch --- diff --git a/queue-5.11/revert-drm-ttm-make-ttm_bo_unpin-more-defensive.patch b/queue-5.11/revert-drm-ttm-make-ttm_bo_unpin-more-defensive.patch new file mode 100644 index 00000000000..9139616f853 --- /dev/null +++ b/queue-5.11/revert-drm-ttm-make-ttm_bo_unpin-more-defensive.patch @@ -0,0 +1,41 @@ +From 603426d4f1787045603a1005dad428ae733e14d2 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 25 Mar 2021 09:51:30 +0100 +Subject: Revert "drm/ttm: make ttm_bo_unpin more defensive" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Greg Kroah-Hartman + +This reverts commit 0492006cc5ecb112d109a4b5cfa99798184a69e2 which is +commit 6c5403173a13a08ff61dbdafa4c0ed4a9dedbfe0 upstream. + +It, and the following revert, are causing unneeded warnings to be sent +to the kernel log. For 5.11 these are not needed at this point in time. + +Cc: Christian König +Cc: Matthew Auld +Cc: Sasha Levin +Link: https://lore.kernel.org/r/8c3da8bc-0bf3-496f-1fd6-4f65a07b2d13@amd.com +Signed-off-by: Greg Kroah-Hartman +--- + include/drm/ttm/ttm_bo_api.h | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/include/drm/ttm/ttm_bo_api.h ++++ b/include/drm/ttm/ttm_bo_api.h +@@ -613,11 +613,9 @@ static inline void ttm_bo_pin(struct ttm + static inline void ttm_bo_unpin(struct ttm_buffer_object *bo) + { + dma_resv_assert_held(bo->base.resv); ++ WARN_ON_ONCE(!bo->pin_count); + WARN_ON_ONCE(!kref_read(&bo->kref)); +- if (bo->pin_count) +- --bo->pin_count; +- else +- WARN_ON_ONCE(true); ++ --bo->pin_count; + } + + int ttm_mem_evict_first(struct ttm_bo_device *bdev, diff --git a/queue-5.11/revert-drm-ttm-warn-on-pinning-without-holding-a.patch b/queue-5.11/revert-drm-ttm-warn-on-pinning-without-holding-a.patch new file mode 100644 index 00000000000..da32072da07 --- /dev/null +++ b/queue-5.11/revert-drm-ttm-warn-on-pinning-without-holding-a.patch @@ -0,0 +1,58 @@ +From 32b39ecbca3c922ca95b9ef3075b62c09e1fb4ea Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 25 Mar 2021 09:52:40 +0100 +Subject: Revert "drm/ttm: Warn on pinning without holding a reference" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Greg Kroah-Hartman + +This reverts commit 7d09e9725b5dcc8d14e101de931e4969d033a6ad which is +commit 57fcd550eb15bce14a7154736379dfd4ed60ae81 upstream. + +It is causing too many warnings on 5.11.y, so should be dropped for now. + +Cc: Huang Rui +Cc: Christian König +Cc: Daniel Vetter +Cc: Christian Koenig +Cc: Huang Rui +Cc: Sasha Levin +Reported-by: Oleksandr Natalenko +Link: https://lore.kernel.org/r/8c3da8bc-0bf3-496f-1fd6-4f65a07b2d13@amd.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/ttm/ttm_bo.c | 2 +- + include/drm/ttm/ttm_bo_api.h | 2 -- + 2 files changed, 1 insertion(+), 3 deletions(-) + +--- 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 * + * 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); +--- 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_ + 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; + } + +@@ -614,7 +613,6 @@ static inline void ttm_bo_unpin(struct t + { + dma_resv_assert_held(bo->base.resv); + WARN_ON_ONCE(!bo->pin_count); +- WARN_ON_ONCE(!kref_read(&bo->kref)); + --bo->pin_count; + } + diff --git a/queue-5.11/series b/queue-5.11/series new file mode 100644 index 00000000000..42cc7b33c8b --- /dev/null +++ b/queue-5.11/series @@ -0,0 +1,2 @@ +revert-drm-ttm-make-ttm_bo_unpin-more-defensive.patch +revert-drm-ttm-warn-on-pinning-without-holding-a.patch