]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amdgpu: restructure VM state machine v4
authorChristian König <christian.koenig@amd.com>
Tue, 20 Jan 2026 12:09:52 +0000 (13:09 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 15:54:32 +0000 (11:54 -0400)
commit4cdbba5a16aaf16513b69cc332b1d6f971a44b52
tree9598ad909fa515edc5c5296226f3f63c5dd3f06c
parentd352990bcaab3ab1d74c782614cae3dd496a5772
drm/amdgpu: restructure VM state machine v4

Instead of coming up with more sophisticated names for states a VM BO
can be in, group them by the type of BO first and then by the state.

So we end with BO type kernel, always_valid and individual and then states
evicted, moved and idle.

Not much functional change, except that evicted_user is moved back
together with the other BOs again which makes the handling in
amdgpu_vm_validate() a bit more complex.

Also fixes a problem with user queues and amdgpu_vm_ready(). We didn't
considered the VM ready when user BOs were not ideally placed, harmless
performance impact for kernel queues but a complete show stopper for
userqueues.

v2: fix a few typos in comments, rename the BO types to make them more
    descriptive, fix a couple of bugs found during testing
v3: squashed together with revert to old status lock handling, looks
    like the first patch still had some bug which this one here should fix.
    Fix a missing lock around debugfs printing.
v4: fix merge clash pointed out by Prike

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Sunil Khatri <sunil.khatri@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
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c