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 9c685f61722d30a22d55bb8a48f7a48bb2e19bcc # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --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 airlied@redhat.com 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 dakr@redhat.com Cc: stable@vger.kernel.org # v6.6 Signed-off-by: Dave Airlie airlied@redhat.com Signed-off-by: Danilo Krummrich dakr@kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20240515025542.2156774-1-airli...
diff --git a/drivers/gpu/drm/nouveau/nouveau_uvmm.c b/drivers/gpu/drm/nouveau/nouveau_uvmm.c index 9402fa320a7e..48f105239f42 100644 --- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c +++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c @@ -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); }