]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdgpu: once more fix the call oder in amdgpu_ttm_move() v2
authorChristian König <christian.koenig@amd.com>
Thu, 21 Mar 2024 10:32:02 +0000 (11:32 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 30 Apr 2024 13:49:51 +0000 (09:49 -0400)
commitffda7081489b2c14650798b3b46fb76292f163a3
tree3167ac8162842ab2efa4e1aed0efd1e760f1213a
parent4d4d3ff16db2642ade8b2fd64cb1abd65bddcf49
drm/amdgpu: once more fix the call oder in amdgpu_ttm_move() v2

This reverts drm/amdgpu: fix ftrace event amdgpu_bo_move always move
on same heap. The basic problem here is that after the move the old
location is simply not available any more.

Some fixes were suggested, but essentially we should call the move
notification before actually moving things because only this way we have
the correct order for DMA-buf and VM move notifications as well.

Also rework the statistic handling so that we don't update the eviction
counter before the move.

v2: add missing NULL check

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 94aeb4117343 ("drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3171
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
CC: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c