]> git.hungrycats.org Git - linux/commit
drm/amdgpu: Only set bo->moved when the BO was actually moved
authorNatalie Vock <natalie.vock@gmx.de>
Fri, 29 May 2026 15:30:50 +0000 (17:30 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2026 17:00:44 +0000 (13:00 -0400)
commit5be7f6720a0ff93cf224c9bc81d1f493bf3fe632
treec78bcf3aa566a994f17f0c9cf35d6de86167093f
parent93c8fe6d56037f284be7116d0c8155847c6d7fbe
drm/amdgpu: Only set bo->moved when the BO was actually moved

The "moved" VM state is a bit unfortunately named, because BOs can end
up in this state without being physically moved. While we need to
invalidate every mapping when BOs are physically moved, in some other
cases like PRT binds/unbinds there is no need to refresh mappings except
those affected by the bind.

Full invalidation of all BO mappings manifested as severe regressions in
PRT bind performance, which this patch fixes. The offending patch is
4cdbba5a16aa ("drm/amdgpu: restructure VM state machine v4") in the
amd-staging-drm-next tree, although it has not yet propagated anywhere
else.

Fixes: 4cdbba5a16aa ("drm/amdgpu: restructure VM state machine v4")
Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5437
Signed-off-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 0b2fa33b4235991a100dd799c891cf5c242aaed1)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c