Commit cf22ef78 authored by Leo Liu's avatar Leo Liu Committed by Alex Deucher
Browse files

drm/amdgpu: Use the sched from entity for amdgpu_cs trace



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: 4624459c ("drm/amdgpu: add gang submit frontend v6")
Signed-off-by: default avatarLeo Liu <leo.liu@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 442d61af
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -153,10 +153,10 @@ TRACE_EVENT(amdgpu_cs,

	    TP_fast_assign(
			   __entry->bo_list = p->bo_list;
			   __entry->ring = to_amdgpu_ring(job->base.sched)->idx;
			   __entry->ring = to_amdgpu_ring(job->base.entity->rq->sched)->idx;
			   __entry->dw = ib->length_dw;
			   __entry->fences = amdgpu_fence_count_emitted(
				to_amdgpu_ring(job->base.sched));
				to_amdgpu_ring(job->base.entity->rq->sched));
			   ),
	    TP_printk("bo_list=%p, ring=%u, dw=%u, fences=%u",
		      __entry->bo_list, __entry->ring, __entry->dw,