aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2013-11-12 06:58:04 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-11-15 15:56:02 -0500
commitbd80c8ba995c1dbdddee14acc55c541c499e0442 (patch)
tree4f8f5884a7761da22616ceb64fdcaf79f4fa3780 /drivers/gpu
parent97b6ff6be9da7675aab339334fda996d6c5077d9 (diff)
drm/radeon: add semaphore trace point
Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_semaphore.c6
-rw-r--r--drivers/gpu/drm/radeon/radeon_trace.h36
2 files changed, 41 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_semaphore.c b/drivers/gpu/drm/radeon/radeon_semaphore.c
index 8dcc20f53d73..97d73bfc8782 100644
--- a/drivers/gpu/drm/radeon/radeon_semaphore.c
+++ b/drivers/gpu/drm/radeon/radeon_semaphore.c
@@ -29,7 +29,7 @@
29 */ 29 */
30#include <drm/drmP.h> 30#include <drm/drmP.h>
31#include "radeon.h" 31#include "radeon.h"
32 32#include "radeon_trace.h"
33 33
34int radeon_semaphore_create(struct radeon_device *rdev, 34int radeon_semaphore_create(struct radeon_device *rdev,
35 struct radeon_semaphore **semaphore) 35 struct radeon_semaphore **semaphore)
@@ -56,6 +56,8 @@ int radeon_semaphore_create(struct radeon_device *rdev,
56void radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring, 56void radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
57 struct radeon_semaphore *semaphore) 57 struct radeon_semaphore *semaphore)
58{ 58{
59 trace_radeon_semaphore_signale(ring, semaphore);
60
59 --semaphore->waiters; 61 --semaphore->waiters;
60 radeon_semaphore_ring_emit(rdev, ring, &rdev->ring[ring], semaphore, false); 62 radeon_semaphore_ring_emit(rdev, ring, &rdev->ring[ring], semaphore, false);
61} 63}
@@ -63,6 +65,8 @@ void radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
63void radeon_semaphore_emit_wait(struct radeon_device *rdev, int ring, 65void radeon_semaphore_emit_wait(struct radeon_device *rdev, int ring,
64 struct radeon_semaphore *semaphore) 66 struct radeon_semaphore *semaphore)
65{ 67{
68 trace_radeon_semaphore_wait(ring, semaphore);
69
66 ++semaphore->waiters; 70 ++semaphore->waiters;
67 radeon_semaphore_ring_emit(rdev, ring, &rdev->ring[ring], semaphore, true); 71 radeon_semaphore_ring_emit(rdev, ring, &rdev->ring[ring], semaphore, true);
68} 72}
diff --git a/drivers/gpu/drm/radeon/radeon_trace.h b/drivers/gpu/drm/radeon/radeon_trace.h
index 811bca691b36..9f0e18172b6e 100644
--- a/drivers/gpu/drm/radeon/radeon_trace.h
+++ b/drivers/gpu/drm/radeon/radeon_trace.h
@@ -111,6 +111,42 @@ DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_end,
111 TP_ARGS(dev, seqno) 111 TP_ARGS(dev, seqno)
112); 112);
113 113
114DECLARE_EVENT_CLASS(radeon_semaphore_request,
115
116 TP_PROTO(int ring, struct radeon_semaphore *sem),
117
118 TP_ARGS(ring, sem),
119
120 TP_STRUCT__entry(
121 __field(int, ring)
122 __field(signed, waiters)
123 __field(uint64_t, gpu_addr)
124 ),
125
126 TP_fast_assign(
127 __entry->ring = ring;
128 __entry->waiters = sem->waiters;
129 __entry->gpu_addr = sem->gpu_addr;
130 ),
131
132 TP_printk("ring=%u, waiters=%d, addr=%010Lx", __entry->ring,
133 __entry->waiters, __entry->gpu_addr)
134);
135
136DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_signale,
137
138 TP_PROTO(int ring, struct radeon_semaphore *sem),
139
140 TP_ARGS(ring, sem)
141);
142
143DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_wait,
144
145 TP_PROTO(int ring, struct radeon_semaphore *sem),
146
147 TP_ARGS(ring, sem)
148);
149
114#endif 150#endif
115 151
116/* This part must be outside protection */ 152/* This part must be outside protection */