drm/radeon: add trace_radeon_vm_flush
authorChristian König <christian.koenig@amd.com>
Tue, 22 Jul 2014 15:42:34 +0000 (17:42 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Aug 2014 12:53:38 +0000 (08:53 -0400)
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_trace.h
drivers/gpu/drm/radeon/radeon_vm.c

index f749f2c3bbdb838a63bdcd6598409387de3c790b..cd781f34bd8df02d07147d430d0f2eea34a5c4e5 100644 (file)
@@ -104,6 +104,24 @@ TRACE_EVENT(radeon_vm_set_page,
                      __entry->flags, __entry->count)
 );
 
+TRACE_EVENT(radeon_vm_flush,
+           TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id),
+           TP_ARGS(pd_addr, ring, id),
+           TP_STRUCT__entry(
+                            __field(u64, pd_addr)
+                            __field(u32, ring)
+                            __field(u32, id)
+                            ),
+
+           TP_fast_assign(
+                          __entry->pd_addr = pd_addr;
+                          __entry->ring = ring;
+                          __entry->id = id;
+                          ),
+           TP_printk("pd_addr=%010Lx, ring=%u, id=%u",
+                     __entry->pd_addr, __entry->ring, __entry->id)
+);
+
 DECLARE_EVENT_CLASS(radeon_fence_request,
 
            TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
index f0a8cd7a83a6d1c64c345ee96b90e25631d13c77..2a2509e7ba874bc78480809fc493961d65fd1271 100644 (file)
@@ -240,6 +240,7 @@ void radeon_vm_flush(struct radeon_device *rdev,
        /* if we can't remember our last VM flush then flush now! */
        /* XXX figure out why we have to flush all the time */
        if (!vm->last_flush || true || pd_addr != vm->pd_gpu_addr) {
+               trace_radeon_vm_flush(pd_addr, ring, vm->id);
                vm->pd_gpu_addr = pd_addr;
                radeon_ring_vm_flush(rdev, ring, vm);
        }