winsys/amdgpu: disable VM_ALWAYS_VALID

The referenced commit has been identified as the root cause of
graphic artifacts / hangs on some APUs.

For now disable AMDGPU_GEM_CREATE_VM_ALWAYS_VALID on all chips
except when user queues are used.

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/12809.

Fixes: 8c91624614 ("winsys/amdgpu: use VM_ALWAYS_VALID for all VRAM and GTT allocations")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34547>
(cherry picked from commit 555821ff93)
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2025-04-16 11:27:54 +02:00 committed by Eric Engestrom
parent 0e9f94576f
commit 4437cdabf0
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@
"description": "winsys/amdgpu: disable VM_ALWAYS_VALID",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "8c91624614c1f939974fe0d2d1a3baf83335cecb",
"notes": null

View file

@ -62,7 +62,7 @@ static bool do_winsys_init(struct amdgpu_winsys *aws,
simple_mtx_init(&aws->queues[i].userq.lock, mtx_plain);
/* TODO: Enable this once the kernel handles it efficiently. */
if (aws->info.has_dedicated_vram && !aws->info.use_userq)
if (!aws->info.use_userq)
aws->info.has_local_buffers = false;
return true;