From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: cleanup pipe_update trace functions with new crtc debug info v2
Date: Thu, 17 Sep 2015 17:23:19 +0300 [thread overview]
Message-ID: <20150917142319.GP26517@intel.com> (raw)
In-Reply-To: <1442415270-11192-1-git-send-email-jbarnes@virtuousgeek.org>
On Wed, Sep 16, 2015 at 07:54:30AM -0700, Jesse Barnes wrote:
> 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)
>
> Requested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
> drivers/gpu/drm/i915/i915_trace.h | 22 +++++++++++-----------
> drivers/gpu/drm/i915/intel_sprite.c | 9 ++++-----
> 2 files changed, 15 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
> index e6b5c74..016a07d 100644
> --- a/drivers/gpu/drm/i915/i915_trace.h
> +++ b/drivers/gpu/drm/i915/i915_trace.h
> @@ -17,8 +17,8 @@
> /* pipe updates */
>
> TRACE_EVENT(i915_pipe_update_start,
> - TP_PROTO(struct intel_crtc *crtc, u32 min, u32 max),
> - TP_ARGS(crtc, min, max),
> + TP_PROTO(struct intel_crtc *crtc),
> + TP_ARGS(crtc),
>
> TP_STRUCT__entry(
> __field(enum pipe, pipe)
> @@ -33,8 +33,8 @@ TRACE_EVENT(i915_pipe_update_start,
> __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev,
> crtc->pipe);
> __entry->scanline = intel_get_crtc_scanline(crtc);
> - __entry->min = min;
> - __entry->max = max;
> + __entry->min = crtc->debug.min_vbl;
> + __entry->max = crtc->debug.max_vbl;
> ),
>
> TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u",
> @@ -43,8 +43,8 @@ TRACE_EVENT(i915_pipe_update_start,
> );
>
> TRACE_EVENT(i915_pipe_update_vblank_evaded,
> - TP_PROTO(struct intel_crtc *crtc, u32 min, u32 max, u32 frame),
> - TP_ARGS(crtc, min, max, frame),
> + TP_PROTO(struct intel_crtc *crtc),
> + TP_ARGS(crtc),
>
> TP_STRUCT__entry(
> __field(enum pipe, pipe)
> @@ -56,10 +56,10 @@ TRACE_EVENT(i915_pipe_update_vblank_evaded,
>
> TP_fast_assign(
> __entry->pipe = crtc->pipe;
> - __entry->frame = frame;
> - __entry->scanline = intel_get_crtc_scanline(crtc);
> - __entry->min = min;
> - __entry->max = max;
> + __entry->frame = crtc->debug.start_vbl_count;
> + __entry->scanline = crtc->debug.scanline_start;
> + __entry->min = crtc->debug.min_vbl;
> + __entry->max = crtc->debug.max_vbl;
> ),
>
> TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u",
> @@ -80,7 +80,7 @@ TRACE_EVENT(i915_pipe_update_end,
> TP_fast_assign(
> __entry->pipe = crtc->pipe;
> __entry->frame = frame;
> - __entry->scanline = intel_get_crtc_scanline(crtc);
> + __entry->scanline = crtc->debug.scanline_start;
That needs to be the end scanline, so must be passed in.
With that fixed this is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ),
>
> TP_printk("pipe %c, frame=%u, scanline=%u",
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 7de121d..a60a657 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -102,7 +102,9 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
> if (WARN_ON(drm_crtc_vblank_get(&crtc->base)))
> 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 (;;) {
> /*
> @@ -133,15 +135,12 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
>
> drm_crtc_vblank_put(&crtc->base);
>
> - crtc->debug.min_vbl = min;
> - crtc->debug.max_vbl = max;
> crtc->debug.scanline_start = scanline;
> crtc->debug.start_vbl_time = ktime_get();
> crtc->debug.start_vbl_count =
> dev->driver->get_vblank_counter(dev, pipe);
>
> - trace_i915_pipe_update_vblank_evaded(crtc, min, max,
> - crtc->debug.start_vbl_count);
> + trace_i915_pipe_update_vblank_evaded(crtc);
> }
>
> /**
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-09-17 14:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 21:19 [PATCH] drm/i915: add more debug info for when atomic updates fail v3 Jesse Barnes
2015-09-15 21:20 ` [PATCH] drm/i915: cleanup pipe_update trace functions with new crtc debug info Jesse Barnes
2015-09-15 21:53 ` Ville Syrjälä
2015-09-16 14:54 ` [PATCH] drm/i915: cleanup pipe_update trace functions with new crtc debug info v2 Jesse Barnes
2015-09-17 14:23 ` Ville Syrjälä [this message]
2015-09-17 15:08 ` [PATCH] drm/i915: cleanup pipe_update trace functions with new crtc debug info v3 Jesse Barnes
2015-09-18 10:00 ` Ville Syrjälä
2015-09-18 11:25 ` Jani Nikula
2015-09-15 21:46 ` [PATCH] drm/i915: add more debug info for when atomic updates fail v3 Ville Syrjälä
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150917142319.GP26517@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jbarnes@virtuousgeek.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox