提交 d637ce3f 编写于 作者: J Jesse Barnes 提交者: Jani Nikula

drm/i915: cleanup pipe_update trace functions with new crtc debug info v3

Use the new debug info in the intel_crtc struct in these functions
rather than passing them as args.

v2: move min/max assignment back above first trace call (Ville)
    use scanline from crtc->debug rather than fetching a new one (Ville)
v3: fix up trace_i915_pipe_update_end, needs end scanline (Ville)
Requested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: NJani Nikula <jani.nikula@intel.com>
上级 eb120ef6
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
/* pipe updates */ /* pipe updates */
TRACE_EVENT(i915_pipe_update_start, TRACE_EVENT(i915_pipe_update_start,
TP_PROTO(struct intel_crtc *crtc, u32 min, u32 max), TP_PROTO(struct intel_crtc *crtc),
TP_ARGS(crtc, min, max), TP_ARGS(crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(enum pipe, pipe) __field(enum pipe, pipe)
...@@ -33,8 +33,8 @@ TRACE_EVENT(i915_pipe_update_start, ...@@ -33,8 +33,8 @@ TRACE_EVENT(i915_pipe_update_start,
__entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev,
crtc->pipe); crtc->pipe);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
__entry->min = min; __entry->min = crtc->debug.min_vbl;
__entry->max = max; __entry->max = crtc->debug.max_vbl;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u",
...@@ -43,8 +43,8 @@ TRACE_EVENT(i915_pipe_update_start, ...@@ -43,8 +43,8 @@ TRACE_EVENT(i915_pipe_update_start,
); );
TRACE_EVENT(i915_pipe_update_vblank_evaded, TRACE_EVENT(i915_pipe_update_vblank_evaded,
TP_PROTO(struct intel_crtc *crtc, u32 min, u32 max, u32 frame), TP_PROTO(struct intel_crtc *crtc),
TP_ARGS(crtc, min, max, frame), TP_ARGS(crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(enum pipe, pipe) __field(enum pipe, pipe)
...@@ -56,10 +56,10 @@ TRACE_EVENT(i915_pipe_update_vblank_evaded, ...@@ -56,10 +56,10 @@ TRACE_EVENT(i915_pipe_update_vblank_evaded,
TP_fast_assign( TP_fast_assign(
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = frame; __entry->frame = crtc->debug.start_vbl_count;
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = crtc->debug.scanline_start;
__entry->min = min; __entry->min = crtc->debug.min_vbl;
__entry->max = max; __entry->max = crtc->debug.max_vbl;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u",
...@@ -68,8 +68,8 @@ TRACE_EVENT(i915_pipe_update_vblank_evaded, ...@@ -68,8 +68,8 @@ TRACE_EVENT(i915_pipe_update_vblank_evaded,
); );
TRACE_EVENT(i915_pipe_update_end, TRACE_EVENT(i915_pipe_update_end,
TP_PROTO(struct intel_crtc *crtc, u32 frame), TP_PROTO(struct intel_crtc *crtc, u32 frame, int scanline_end),
TP_ARGS(crtc, frame), TP_ARGS(crtc, frame, scanline_end),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(enum pipe, pipe) __field(enum pipe, pipe)
...@@ -80,7 +80,7 @@ TRACE_EVENT(i915_pipe_update_end, ...@@ -80,7 +80,7 @@ TRACE_EVENT(i915_pipe_update_end,
TP_fast_assign( TP_fast_assign(
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = frame; __entry->frame = frame;
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = scanline_end;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u", TP_printk("pipe %c, frame=%u, scanline=%u",
......
...@@ -102,7 +102,9 @@ void intel_pipe_update_start(struct intel_crtc *crtc) ...@@ -102,7 +102,9 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
if (WARN_ON(drm_crtc_vblank_get(&crtc->base))) if (WARN_ON(drm_crtc_vblank_get(&crtc->base)))
return; return;
trace_i915_pipe_update_start(crtc, min, max); crtc->debug.min_vbl = min;
crtc->debug.max_vbl = max;
trace_i915_pipe_update_start(crtc);
for (;;) { for (;;) {
/* /*
...@@ -133,15 +135,12 @@ void intel_pipe_update_start(struct intel_crtc *crtc) ...@@ -133,15 +135,12 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
drm_crtc_vblank_put(&crtc->base); drm_crtc_vblank_put(&crtc->base);
crtc->debug.min_vbl = min;
crtc->debug.max_vbl = max;
crtc->debug.scanline_start = scanline; crtc->debug.scanline_start = scanline;
crtc->debug.start_vbl_time = ktime_get(); crtc->debug.start_vbl_time = ktime_get();
crtc->debug.start_vbl_count = crtc->debug.start_vbl_count =
dev->driver->get_vblank_counter(dev, pipe); dev->driver->get_vblank_counter(dev, pipe);
trace_i915_pipe_update_vblank_evaded(crtc, min, max, trace_i915_pipe_update_vblank_evaded(crtc);
crtc->debug.start_vbl_count);
} }
/** /**
...@@ -161,7 +160,7 @@ void intel_pipe_update_end(struct intel_crtc *crtc) ...@@ -161,7 +160,7 @@ void intel_pipe_update_end(struct intel_crtc *crtc)
u32 end_vbl_count = dev->driver->get_vblank_counter(dev, pipe); u32 end_vbl_count = dev->driver->get_vblank_counter(dev, pipe);
ktime_t end_vbl_time = ktime_get(); ktime_t end_vbl_time = ktime_get();
trace_i915_pipe_update_end(crtc, end_vbl_count); trace_i915_pipe_update_end(crtc, end_vbl_count, scanline_end);
local_irq_enable(); local_irq_enable();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册