]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: trace vm hub during flush as well v2
authorChristian König <christian.koenig@amd.com>
Fri, 7 Apr 2017 15:43:19 +0000 (17:43 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Apr 2017 21:32:21 +0000 (17:32 -0400)
Trace on which hub we are doing the flush.

v2: fix typo in commit message

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Andres Rodriguez <andresx7@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index a98e4b8dd136ca8c2be9f9f3adc480662b77038c..8601904e670ae7cf094a341c19abb76404fb3ec6 100644 (file)
@@ -334,21 +334,25 @@ TRACE_EVENT(amdgpu_vm_copy_ptes,
 );
 
 TRACE_EVENT(amdgpu_vm_flush,
-           TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id),
-           TP_ARGS(pd_addr, ring, id),
+           TP_PROTO(struct amdgpu_ring *ring, unsigned vm_id,
+                    uint64_t pd_addr),
+           TP_ARGS(ring, vm_id, pd_addr),
            TP_STRUCT__entry(
-                            __field(u64, pd_addr)
                             __field(u32, ring)
-                            __field(u32, id)
+                            __field(u32, vm_id)
+                            __field(u32, vm_hub)
+                            __field(u64, pd_addr)
                             ),
 
            TP_fast_assign(
+                          __entry->ring = ring->idx;
+                          __entry->vm_id = vm_id;
+                          __entry->vm_hub = ring->funcs->vmhub;
                           __entry->pd_addr = pd_addr;
-                          __entry->ring = ring;
-                          __entry->id = id;
                           ),
-           TP_printk("ring=%u, id=%u, pd_addr=%010Lx",
-                     __entry->ring, __entry->id, __entry->pd_addr)
+           TP_printk("ring=%u, id=%u, hub=%u, pd_addr=%010Lx",
+                     __entry->ring, __entry->vm_id,
+                     __entry->vm_hub,__entry->pd_addr)
 );
 
 TRACE_EVENT(amdgpu_bo_list_set,
index f23f1b09d8a93c2e74637d753ffbca1c539d69ed..6b95176d3f75fee9401c415efb94e8979c0ad607 100644 (file)
@@ -621,7 +621,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job)
                u64 pd_addr = amdgpu_vm_adjust_mc_addr(adev, job->vm_pd_addr);
                struct dma_fence *fence;
 
-               trace_amdgpu_vm_flush(pd_addr, ring->idx, job->vm_id);
+               trace_amdgpu_vm_flush(ring, job->vm_id, pd_addr);
                amdgpu_ring_emit_vm_flush(ring, job->vm_id, pd_addr);
 
                r = amdgpu_fence_emit(ring, &fence);