* FAILED: patch "[PATCH] drm/amdgpu: Handle NULL bo->tbo.resource (again) in" failed to apply to 6.6-stable tree
@ 2024-12-22 7:27 gregkh
2024-12-23 15:38 ` [PATCH 6.6.y] drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update Michel Dänzer
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2024-12-22 7:27 UTC (permalink / raw)
To: mdaenzer, alexander.deucher, christian.koenig; +Cc: stable
The patch below does not apply to the 6.6-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 <stable@vger.kernel.org>.
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-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 85230ee36d88e7a09fb062d43203035659dd10a5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2024122229-excusable-sample-91cf@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 85230ee36d88e7a09fb062d43203035659dd10a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
Date: Tue, 17 Dec 2024 18:22:56 +0100
Subject: [PATCH] drm/amdgpu: Handle NULL bo->tbo.resource (again) in
amdgpu_vm_bo_update
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Third time's the charm, I hope?
Fixes: d3116756a710 ("drm/ttm: rename bo->mem and make it a pointer")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3837
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 695c2c745e5dff201b75da8a1d237ce403600d04)
Cc: stable@vger.kernel.org
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index ddd7f05e4db9..c9c48b782ec1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1266,10 +1266,9 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,
* next command submission.
*/
if (amdgpu_vm_is_bo_always_valid(vm, bo)) {
- uint32_t mem_type = bo->tbo.resource->mem_type;
-
- if (!(bo->preferred_domains &
- amdgpu_mem_type_to_domain(mem_type)))
+ if (bo->tbo.resource &&
+ !(bo->preferred_domains &
+ amdgpu_mem_type_to_domain(bo->tbo.resource->mem_type)))
amdgpu_vm_bo_evicted(&bo_va->base);
else
amdgpu_vm_bo_idle(&bo_va->base);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 6.6.y] drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update
2024-12-22 7:27 FAILED: patch "[PATCH] drm/amdgpu: Handle NULL bo->tbo.resource (again) in" failed to apply to 6.6-stable tree gregkh
@ 2024-12-23 15:38 ` Michel Dänzer
2024-12-26 1:21 ` Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: Michel Dänzer @ 2024-12-23 15:38 UTC (permalink / raw)
To: stable
From: Michel Dänzer <mdaenzer@redhat.com>
Third time's the charm, I hope?
Fixes: d3116756a710 ("drm/ttm: rename bo->mem and make it a pointer")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3837
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 695c2c745e5dff201b75da8a1d237ce403600d04)
Cc: stable@vger.kernel.org
(cherry picked from commit 85230ee36d88e7a09fb062d43203035659dd10a5)
---
This should apply to the 6.6 and older stable trees.
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index f02b6232680f..2992ce494e00 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1161,10 +1161,9 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,
* next command submission.
*/
if (bo && bo->tbo.base.resv == vm->root.bo->tbo.base.resv) {
- uint32_t mem_type = bo->tbo.resource->mem_type;
-
- if (!(bo->preferred_domains &
- amdgpu_mem_type_to_domain(mem_type)))
+ if (bo->tbo.resource &&
+ !(bo->preferred_domains &
+ amdgpu_mem_type_to_domain(bo->tbo.resource->mem_type)))
amdgpu_vm_bo_evicted(&bo_va->base);
else
amdgpu_vm_bo_idle(&bo_va->base);
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6.6.y] drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update
2024-12-23 15:38 ` [PATCH 6.6.y] drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update Michel Dänzer
@ 2024-12-26 1:21 ` Sasha Levin
0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2024-12-26 1:21 UTC (permalink / raw)
To: stable; +Cc: Michel Dänzer, Sasha Levin
[ Sasha's backport helper bot ]
Hi,
Found matching upstream commit: 85230ee36d88e7a09fb062d43203035659dd10a5
WARNING: Author mismatch between patch and found commit:
Backport author: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel@daenzer.net>
Commit author: Michel Dänzer <mdaenzer@redhat.com>
Status in newer kernel trees:
6.12.y | Not found
6.6.y | Not found
Note: The patch differs from the upstream commit:
---
1: 85230ee36d88 ! 1: eb8466d83331 drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update
@@ Commit message
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 695c2c745e5dff201b75da8a1d237ce403600d04)
Cc: stable@vger.kernel.org
+ (cherry picked from commit 85230ee36d88e7a09fb062d43203035659dd10a5)
## drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c ##
@@ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c: int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,
* next command submission.
*/
- if (amdgpu_vm_is_bo_always_valid(vm, bo)) {
+ if (bo && bo->tbo.base.resv == vm->root.bo->tbo.base.resv) {
- uint32_t mem_type = bo->tbo.resource->mem_type;
-
- if (!(bo->preferred_domains &
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.6.y | Success | Success |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-26 1:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-22 7:27 FAILED: patch "[PATCH] drm/amdgpu: Handle NULL bo->tbo.resource (again) in" failed to apply to 6.6-stable tree gregkh
2024-12-23 15:38 ` [PATCH 6.6.y] drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update Michel Dänzer
2024-12-26 1:21 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox