Commit e5510fac authored by Jesse Barnes's avatar Jesse Barnes Committed by Dave Airlie

drm/i915: add tracepoints for flip requests & completions

Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent b9c2c9ae
...@@ -262,6 +262,42 @@ DEFINE_EVENT(i915_ring, i915_ring_wait_end, ...@@ -262,6 +262,42 @@ DEFINE_EVENT(i915_ring, i915_ring_wait_end,
TP_ARGS(dev) TP_ARGS(dev)
); );
TRACE_EVENT(i915_flip_request,
TP_PROTO(int plane, struct drm_gem_object *obj),
TP_ARGS(plane, obj),
TP_STRUCT__entry(
__field(int, plane)
__field(struct drm_gem_object *, obj)
),
TP_fast_assign(
__entry->plane = plane;
__entry->obj = obj;
),
TP_printk("plane=%d, obj=%p", __entry->plane, __entry->obj)
);
TRACE_EVENT(i915_flip_complete,
TP_PROTO(int plane, struct drm_gem_object *obj),
TP_ARGS(plane, obj),
TP_STRUCT__entry(
__field(int, plane)
__field(struct drm_gem_object *, obj)
),
TP_fast_assign(
__entry->plane = plane;
__entry->obj = obj;
),
TP_printk("plane=%d, obj=%p", __entry->plane, __entry->obj)
);
#endif /* _I915_TRACE_H_ */ #endif /* _I915_TRACE_H_ */
/* This part must be outside protection */ /* This part must be outside protection */
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "intel_drv.h" #include "intel_drv.h"
#include "i915_drm.h" #include "i915_drm.h"
#include "i915_drv.h" #include "i915_drv.h"
#include "i915_trace.h"
#include "drm_dp_helper.h" #include "drm_dp_helper.h"
#include "drm_crtc_helper.h" #include "drm_crtc_helper.h"
...@@ -4650,6 +4651,8 @@ static void do_intel_finish_page_flip(struct drm_device *dev, ...@@ -4650,6 +4651,8 @@ static void do_intel_finish_page_flip(struct drm_device *dev,
atomic_dec_and_test(&obj_priv->pending_flip)) atomic_dec_and_test(&obj_priv->pending_flip))
DRM_WAKEUP(&dev_priv->pending_flip_queue); DRM_WAKEUP(&dev_priv->pending_flip_queue);
schedule_work(&work->work); schedule_work(&work->work);
trace_i915_flip_complete(intel_crtc->plane, work->pending_flip_obj);
} }
void intel_finish_page_flip(struct drm_device *dev, int pipe) 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,6 +4784,8 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
trace_i915_flip_request(intel_crtc->plane, obj);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment