]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: fix userq VM validation v4
authorChristian König <christian.koenig@amd.com>
Wed, 27 Aug 2025 07:28:40 +0000 (09:28 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 16 Sep 2025 21:47:06 +0000 (17:47 -0400)
commit39203f5e6dcf2b0529ae526004e7a9c8ef453ae2
tree5b6716a09aefeb0a2ae603692d742b61e52fc5ad
parentd7ddcf921e7d0d8ebe82e89635bc9dc26ba9540d
drm/amdgpu: fix userq VM validation v4

That was actually complete nonsense and not validating the BOs
at all. The code just cleared all VM areas were it couldn't grab the
lock for a BO.

Try to fix this. Only compile tested at the moment.

v2: fix fence slot reservation as well as pointed out by Sunil.
    also validate PDs, PTs, per VM BOs and update PDEs
v3: grab the status_lock while working with the done list.
v4: rename functions, add some comments, fix waiting for updates to
    complete.
v4: rename amdgpu_vm_lock_done_list(), add some more comments

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h