drm/radeon: add ring to fence trace functions
authorChristian König <christian.koenig@amd.com>
Thu, 23 Jan 2014 13:24:17 +0000 (14:24 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Jan 2014 20:23:03 +0000 (15:23 -0500)
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_fence.c
drivers/gpu/drm/radeon/radeon_trace.h

index 866744e47cfacc20c98a19151c9b7529eb9c447b..c37cb79a9489aadd38a84b2f59a6aed7e56333a5 100644 (file)
@@ -121,7 +121,7 @@ int radeon_fence_emit(struct radeon_device *rdev,
        (*fence)->seq = ++rdev->fence_drv[ring].sync_seq[ring];
        (*fence)->ring = ring;
        radeon_fence_ring_emit(rdev, ring, *fence);
-       trace_radeon_fence_emit(rdev->ddev, (*fence)->seq);
+       trace_radeon_fence_emit(rdev->ddev, ring, (*fence)->seq);
        return 0;
 }
 
@@ -313,7 +313,7 @@ static int radeon_fence_wait_seq(struct radeon_device *rdev, u64 *target_seq,
                                continue;
 
                        last_seq[i] = atomic64_read(&rdev->fence_drv[i].last_seq);
-                       trace_radeon_fence_wait_begin(rdev->ddev, target_seq[i]);
+                       trace_radeon_fence_wait_begin(rdev->ddev, i, target_seq[i]);
                        radeon_irq_kms_sw_irq_get(rdev, i);
                }
 
@@ -332,7 +332,7 @@ static int radeon_fence_wait_seq(struct radeon_device *rdev, u64 *target_seq,
                                continue;
 
                        radeon_irq_kms_sw_irq_put(rdev, i);
-                       trace_radeon_fence_wait_end(rdev->ddev, target_seq[i]);
+                       trace_radeon_fence_wait_end(rdev->ddev, i, target_seq[i]);
                }
 
                if (unlikely(r < 0))
index 0473257d407886e175f77347078b2de54c61cfc3..f749f2c3bbdb838a63bdcd6598409387de3c790b 100644 (file)
@@ -106,42 +106,45 @@ TRACE_EVENT(radeon_vm_set_page,
 
 DECLARE_EVENT_CLASS(radeon_fence_request,
 
-           TP_PROTO(struct drm_device *dev, u32 seqno),
+           TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
 
-           TP_ARGS(dev, seqno),
+           TP_ARGS(dev, ring, seqno),
 
            TP_STRUCT__entry(
                             __field(u32, dev)
+                            __field(int, ring)
                             __field(u32, seqno)
                             ),
 
            TP_fast_assign(
                           __entry->dev = dev->primary->index;
+                          __entry->ring = ring;
                           __entry->seqno = seqno;
                           ),
 
-           TP_printk("dev=%u, seqno=%u", __entry->dev, __entry->seqno)
+           TP_printk("dev=%u, ring=%d, seqno=%u",
+                     __entry->dev, __entry->ring, __entry->seqno)
 );
 
 DEFINE_EVENT(radeon_fence_request, radeon_fence_emit,
 
-           TP_PROTO(struct drm_device *dev, u32 seqno),
+           TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
 
-           TP_ARGS(dev, seqno)
+           TP_ARGS(dev, ring, seqno)
 );
 
 DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_begin,
 
-           TP_PROTO(struct drm_device *dev, u32 seqno),
+           TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
 
-           TP_ARGS(dev, seqno)
+           TP_ARGS(dev, ring, seqno)
 );
 
 DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_end,
 
-           TP_PROTO(struct drm_device *dev, u32 seqno),
+           TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
 
-           TP_ARGS(dev, seqno)
+           TP_ARGS(dev, ring, seqno)
 );
 
 DECLARE_EVENT_CLASS(radeon_semaphore_request,