FAILED: patch "[PATCH] drm/amdgpu: Fix amdgpu_bo_move() when old_mem and new_mem are" failed to apply to 5.15-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x ee94a65f192c05c543b4d3ad7137cd696b5c18fc
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026072905-unbundle-serving-0266@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From ee94a65f192c05c543b4d3ad7137cd696b5c18fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timur=20Krist=C3=B3f?= <[email protected]>
Date: Mon, 25 May 2026 13:33:18 +0200
Subject: [PATCH] drm/amdgpu: Fix amdgpu_bo_move() when old_mem and new_mem are
both GTT
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The UVD code relies on GTT to GTT moves in order to ensure that its BOs don't cross 256M segments.
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +18 -0
@@ -515,6 +515,15 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,if (new_mem->mem_type ==TTM_PL_TT || new_mem->mem_type ==AMDGPU_PL_PREEMPT ) { +if (old_mem && (old_mem->mem_type ==TTM_PL_TT || + old_mem->mem_type ==AMDGPU_PL_PREEMPT )) { + r =ttm_bo_wait_ctx (bo, ctx); +if (r) +return r; + +amdgpu_ttm_backend_unbind (bo->bdev, bo->ttm); + } + r =amdgpu_ttm_backend_bind (bo->bdev, bo->ttm, new_mem);if (r)return r;
@@ -549,6 +558,15 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,ttm_bo_assign_mem (bo, new_mem);return 0 ; } +if ((old_mem->mem_type ==TTM_PL_TT || + old_mem->mem_type ==AMDGPU_PL_PREEMPT ) && + (new_mem->mem_type ==TTM_PL_TT || + new_mem->mem_type ==AMDGPU_PL_PREEMPT )) { +amdgpu_bo_move_notify (bo, evict, new_mem); +ttm_resource_free (bo, &bo->resource); +ttm_bo_assign_mem (bo, new_mem); +return 0 ; + } if (old_mem->mem_type == AMDGPU_PL_GDS || old_mem->mem_type == AMDGPU_PL_GWS ||
Sasha Levin
maintainerPATCH 1/1 drm/amdgpu: Fix amdgpu_bo_move() when old_mem and new_mem are both GTT
From: Timur Kristóf <[email protected]>
[ Upstream commit ee94a65f192c05c543b4d3ad7137cd696b5c18fc ]
The UVD code relies on GTT to GTT moves in order to ensure that its BOs don't cross 256M segments.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +17 -0
@@ -472,6 +472,15 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,if (new_mem->mem_type ==TTM_PL_TT || new_mem->mem_type ==AMDGPU_PL_PREEMPT ) { +if (old_mem && (old_mem->mem_type ==TTM_PL_TT || + old_mem->mem_type ==AMDGPU_PL_PREEMPT )) { + r =ttm_bo_wait_ctx (bo, ctx); +if (r) +return r; + +amdgpu_ttm_backend_unbind (bo->bdev, bo->ttm); + } + r =amdgpu_ttm_backend_bind (bo->bdev, bo->ttm, new_mem);if (r)return r;
@@ -506,6 +515,14 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,ttm_bo_assign_mem (bo, new_mem); goto out; } +if ((old_mem->mem_type ==TTM_PL_TT || + old_mem->mem_type ==AMDGPU_PL_PREEMPT ) && + (new_mem->mem_type ==TTM_PL_TT || + new_mem->mem_type ==AMDGPU_PL_PREEMPT )) { +ttm_resource_free (bo, &bo->resource); +ttm_bo_assign_mem (bo, new_mem); + goto out; + } if (old_mem->mem_type == AMDGPU_PL_GDS || old_mem->mem_type == AMDGPU_PL_GWS ||
Signature · 1 line
2.53.0