diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-07-01 19:48:37 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-07-02 00:04:14 -0400 |
commit | e5510fac98a706c424034950f55bb5e819c46f51 (patch) | |
tree | 4a0bc3c324538e45844b94174d21983e6c75ddc5 /drivers/gpu | |
parent | b9c2c9ae882f058084e13e339925dbf8d2d20271 (diff) |
drm/i915: add tracepoints for flip requests & completions
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_trace.h | 36 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 5 |
2 files changed, 41 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h index fab21760dd5..fea97a21cc1 100644 --- a/drivers/gpu/drm/i915/i915_trace.h +++ b/drivers/gpu/drm/i915/i915_trace.h | |||
@@ -262,6 +262,42 @@ DEFINE_EVENT(i915_ring, i915_ring_wait_end, | |||
262 | TP_ARGS(dev) | 262 | TP_ARGS(dev) |
263 | ); | 263 | ); |
264 | 264 | ||
265 | TRACE_EVENT(i915_flip_request, | ||
266 | TP_PROTO(int plane, struct drm_gem_object *obj), | ||
267 | |||
268 | TP_ARGS(plane, obj), | ||
269 | |||
270 | TP_STRUCT__entry( | ||
271 | __field(int, plane) | ||
272 | __field(struct drm_gem_object *, obj) | ||
273 | ), | ||
274 | |||
275 | TP_fast_assign( | ||
276 | __entry->plane = plane; | ||
277 | __entry->obj = obj; | ||
278 | ), | ||
279 | |||
280 | TP_printk("plane=%d, obj=%p", __entry->plane, __entry->obj) | ||
281 | ); | ||
282 | |||
283 | TRACE_EVENT(i915_flip_complete, | ||
284 | TP_PROTO(int plane, struct drm_gem_object *obj), | ||
285 | |||
286 | TP_ARGS(plane, obj), | ||
287 | |||
288 | TP_STRUCT__entry( | ||
289 | __field(int, plane) | ||
290 | __field(struct drm_gem_object *, obj) | ||
291 | ), | ||
292 | |||
293 | TP_fast_assign( | ||
294 | __entry->plane = plane; | ||
295 | __entry->obj = obj; | ||
296 | ), | ||
297 | |||
298 | TP_printk("plane=%d, obj=%p", __entry->plane, __entry->obj) | ||
299 | ); | ||
300 | |||
265 | #endif /* _I915_TRACE_H_ */ | 301 | #endif /* _I915_TRACE_H_ */ |
266 | 302 | ||
267 | /* This part must be outside protection */ | 303 | /* This part must be outside protection */ |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 68dcf36e279..f879589bead 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "intel_drv.h" | 33 | #include "intel_drv.h" |
34 | #include "i915_drm.h" | 34 | #include "i915_drm.h" |
35 | #include "i915_drv.h" | 35 | #include "i915_drv.h" |
36 | #include "i915_trace.h" | ||
36 | #include "drm_dp_helper.h" | 37 | #include "drm_dp_helper.h" |
37 | 38 | ||
38 | #include "drm_crtc_helper.h" | 39 | #include "drm_crtc_helper.h" |
@@ -4650,6 +4651,8 @@ static void do_intel_finish_page_flip(struct drm_device *dev, | |||
4650 | atomic_dec_and_test(&obj_priv->pending_flip)) | 4651 | atomic_dec_and_test(&obj_priv->pending_flip)) |
4651 | DRM_WAKEUP(&dev_priv->pending_flip_queue); | 4652 | DRM_WAKEUP(&dev_priv->pending_flip_queue); |
4652 | schedule_work(&work->work); | 4653 | schedule_work(&work->work); |
4654 | |||
4655 | trace_i915_flip_complete(intel_crtc->plane, work->pending_flip_obj); | ||
4653 | } | 4656 | } |
4654 | 4657 | ||
4655 | void intel_finish_page_flip(struct drm_device *dev, int pipe) | 4658 | void intel_finish_page_flip(struct drm_device *dev, int pipe) |
@@ -4781,6 +4784,8 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, | |||
4781 | 4784 | ||
4782 | mutex_unlock(&dev->struct_mutex); | 4785 | mutex_unlock(&dev->struct_mutex); |
4783 | 4786 | ||
4787 | trace_i915_flip_request(intel_crtc->plane, obj); | ||
4788 | |||
4784 | return 0; | 4789 | return 0; |
4785 | } | 4790 | } |
4786 | 4791 | ||