drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap
authorWang, Beyond <Wang.Beyond@amd.com>
Tue, 12 Dec 2023 13:03:04 +0000 (21:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:29 +0000 (20:14 +0000)
commite7a0ee45c653784edda5e36bae6ae3c75fd5e7a8
tree180061e128d052223143d8999aca899eaa4bef4b
parent1f2b0ec25103ca9e60b2b43c41bbd0d77178ea62
drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap

[ Upstream commit 94aeb4117343d072e3a35b9595bcbfc0058ee724 ]

Issue: during evict or validate happened on amdgpu_bo, the 'from' and
'to' is always same in ftrace event of amdgpu_bo_move

where calling the 'trace_amdgpu_bo_move', the comment says move_notify
is called before move happens, but actually it is called after move
happens, here the new_mem is same as bo->resource

Fix: move trace_amdgpu_bo_move from move_notify to amdgpu_bo_move

Signed-off-by: Wang, Beyond <Wang.Beyond@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@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