drm/amdgpu: ensure all userq VAs mapped before restore
authorZhu Lingshan <lingshan.zhu@amd.com>
Wed, 22 Jul 2026 10:13:44 +0000 (18:13 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 19 Aug 2026 14:03:04 +0000 (10:03 -0400)
commitffdb7a8104f51d552dea4b319c8ce5169f63e724
tree7463a6d1dddb8992ea2b133a76b7f6ecbcb2ebba
parentef5fcf2a6c320676bf8be2dadac93d9023b468b7
drm/amdgpu: ensure all userq VAs mapped before restore

amdgpu_userq_buffer_vas_mapped() checks whether all VAs
of a queue are mapped before restoring it.
So that HW won't access any invalid addresses.

Currently, this function assumes all VAs are mapped if
any VA of a queue has been mapped, which is wrong.

This commit fixes this problem by examining all VAs of
a queue and reporting false if any of them is not mapped.

Signed-off-by: Zhu Lingshan <lingshan.zhu@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