]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: fix check in amdgpu_hmm_invalidate_gfx
authorChristian König <christian.koenig@amd.com>
Wed, 24 Jun 2026 14:00:41 +0000 (16:00 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2026 17:01:05 +0000 (13:01 -0400)
commit52f650963d8825e97a0ccdd2b616f8a01d9d3d38
tree3647d2e94621f44cd3f33c46174e6a1bf6f014c8
parentefcedeececcf995fcf717b21e39aa7c446fa3bf7
drm/amdgpu: fix check in amdgpu_hmm_invalidate_gfx

For a short moment during alloc/free the userptr BO is not part of his VM,
so bo->vm_bo can be NULL.

Keep a reference to the VM root PD as parent of the userptr BO so that
we can always use that to wait for all submissions of the VM instead of
only the one involving the userptr BO.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 91250893cbaa ("drm/amdgpu: fix waiting for all submissions for userptrs")
Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5399
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 631849ff5d603841e74f19f4a5e30fe1f7d7cf30)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c