Skip to contentSkip to conversation

FAILED: patch "[PATCH] nouveau: set placement to original placement on uvmm" failed to apply to 6.6-stable tree

PATCH In review [email protected] 2 participants 3 messages Aug 7, 2024 – Aug 12, 2024

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

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 <[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-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 9c685f61722d30a22d55bb8a48f7a48bb2e19bcc
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024080722-overlying-unmasking-3eb7@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..

Possible dependencies:

9c685f61722d ("nouveau: set placement to original placement on uvmm validate.") 014f831abcb8 ("drm/nouveau: use GPUVM common infrastructure") 94bc2249f08e ("drm/gpuvm: add an abstraction for a VM / BO combination") 8af72338dd81 ("drm/gpuvm: reference count drm_gpuvm structures") 266f7618e761 ("drm/nouveau: separately allocate struct nouveau_uvmm") 809ef191ee60 ("drm/gpuvm: add drm_gpuvm_flags to drm_gpuvm") 6118411428a3 ("drm/nouveau: make use of the GPUVM's shared dma-resv") bbe8458037e7 ("drm/gpuvm: add common dma-resv per struct drm_gpuvm") b41e297abd23 ("drm/nouveau: make use of drm_gpuvm_range_valid()") 546ca4d35dcc ("drm/gpuvm: convert WARN() to drm_WARN() variants") 78f54469b871 ("drm/nouveau: uvmm: rename 'umgr' to 'base'") f72c2db47080 ("drm/gpuvm: rename struct drm_gpuva_manager to struct drm_gpuvm")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 9c685f61722d30a22d55bb8a48f7a48bb2e19bcc Mon Sep 17 00:00:00 2001
From: Dave Airlie <[email protected]>
Date: Wed, 15 May 2024 12:55:41 +1000
Subject: [PATCH] nouveau: set placement to original placement on uvmm
validate.

When a buffer is evicted for memory pressure or TTM evict all, the placement is set to the eviction domain, this means the buffer never gets revalidated on the next exec to the correct domain.

I think this should be fine to use the initial domain from the object creation, as least with VM_BIND this won't change after init so this should be the correct answer.

Fixes b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Cc Danilo Krummrich <[email protected]>
Cc <[email protected]> # v6.6
drivers/gpu/drm/nouveau/nouveau_uvmm.c +1 -0
index 9402fa320a7e..48f105239f42 100644
@@ -1803,6 +1803,7 @@ nouveau_uvmm_bo_validate(struct drm_gpuvm_bo *vm_bo, struct drm_exec *exec)
 {
 	struct nouveau_bo *nvbo = nouveau_gem_object(vm_bo->obj);
 
+	nouveau_bo_placement_set(nvbo, nvbo->valid_domains, 0);
 	return nouveau_bo_validate(nvbo, true, false);
 }
 
maintainer
#1 lore raw

PATCH 1/1 nouveau: set placement to original placement on uvmm validate.

From: Dave Airlie <[email protected]>

When a buffer is evicted for memory pressure or TTM evict all, the placement is set to the eviction domain, this means the buffer never gets revalidated on the next exec to the correct domain.

I think this should be fine to use the initial domain from the object creation, as least with VM_BIND this won't change after init so this should be the correct answer.

Fixes b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Cc Danilo Krummrich <[email protected]>
Cc <[email protected]> # v6.6
(cherry picked from commit 9c685f61722d30a22d55bb8a48f7a48bb2e19bcc)
---
 drivers/gpu/drm/nouveau/nouveau_uvmm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nouveau_uvmm.c +4 -2
index 2bbcdc649e86..3d41e590d471 100644
@@ -1320,6 +1320,7 @@ nouveau_uvmm_bind_job_submit(struct nouveau_job *job)
 
 		drm_gpuva_for_each_op(va_op, op->ops) {
 			struct drm_gem_object *obj = op_gem_obj(va_op);
+			struct nouveau_bo *nvbo;
 
 			if (unlikely(!obj))
 				continue;
@@ -1330,8 +1331,9 @@ nouveau_uvmm_bind_job_submit(struct nouveau_job *job)
 			if (unlikely(va_op->op == DRM_GPUVA_OP_UNMAP))
 				continue;
 
-			ret = nouveau_bo_validate(nouveau_gem_object(obj),
-						  true, false);
+			nvbo = nouveau_gem_object(obj);
+			nouveau_bo_placement_set(nvbo, nvbo->valid_domains, 0);
+			ret = nouveau_bo_validate(nvbo, true, false);
 			if (ret) {
 				op = list_last_op(&bind_job->ops);
 				goto unwind;
Signature · 1 line
2.45.2
author maintainer
#2 lore raw

Re: [PATCH 6.6.y] nouveau: set placement to original placement on uvmm validate.

Quoted 18 lines · Danilo Krummrich

From: Dave Airlie <[email protected]>

When a buffer is evicted for memory pressure or TTM evict all, the placement is set to the eviction domain, this means the buffer never gets revalidated on the next exec to the correct domain.

I think this should be fine to use the initial domain from the object creation, as least with VM_BIND this won't change after init so this should be the correct answer.

Fixes b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Cc Danilo Krummrich <[email protected]>
Cc <[email protected]> # v6.6
(cherry picked from commit 9c685f61722d30a22d55bb8a48f7a48bb2e19bcc)
Quoted 3 lines
---
 drivers/gpu/drm/nouveau/nouveau_uvmm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Now queued up, thanks.

greg k-h