drm/amdgpu: Use the sched from entity for amdgpu_cs trace
authorLeo Liu <leo.liu@amd.com>
Mon, 16 Jan 2023 14:55:57 +0000 (09:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:13 +0000 (09:33 +0100)
commit208680ccf7bff31fc08735c2a23fd3dd3c19b903
tree0f099f6e6927a0ca11fcf5c3ab37f60a7c3f3d06
parenta8fa337595639ca83792f320864cb953edcccacd
drm/amdgpu: Use the sched from entity for amdgpu_cs trace

[ Upstream commit cf22ef78f22ce4df4757472c5dbd33c430c5b659 ]

The problem is that base sched hasn't been assigned yet at this moment,
causing something like "ring=0" all the time from trace.

mpv:cs0-3473    [002] ..... 129.047431: amdgpu_cs: ring=0, dw=48, fences=0
mpv:cs0-3473    [002] ..... 129.089125: amdgpu_cs: ring=0, dw=48, fences=0
mpv:cs0-3473    [002] ..... 129.130987: amdgpu_cs: ring=0, dw=48, fences=0
mpv:cs0-3473    [002] ..... 129.172478: amdgpu_cs: ring=0, dw=48, fences=0

Fixes: 4624459c84d7 ("drm/amdgpu: add gang submit frontend v6")
Signed-off-by: Leo Liu <leo.liu@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_trace.h