All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915: Add pipe crc tracepoint
Date: Wed, 13 Feb 2019 09:40:28 -0800	[thread overview]
Message-ID: <20190213174028.GB3125@intel.com> (raw)
In-Reply-To: <20190206204910.13965-1-ville.syrjala@linux.intel.com>

On Wed, Feb 06, 2019 at 10:49:07PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Add a tracepoint for pipe crc. Makes life much simpler when staring at
> traces when hunting for fifo underruns and other issues which cause
> corrupted frames. We'll add the tracepoint before filtering out any
> potentially bogus crcs during modeset (should actually verify if that
> filtering is even correct anymore...)
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_irq.c   |  9 +++------
>  drivers/gpu/drm/i915/i915_trace.h | 25 +++++++++++++++++++++++++
>  2 files changed, 28 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 441d2674b272..92bb32ed27fb 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1693,7 +1693,9 @@ static void display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
>  {
>  	struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[pipe];
>  	struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
> -	u32 crcs[5];
> +	u32 crcs[5] = { crc0, crc1, crc2, crc3, crc4 };
> +
> +	trace_intel_pipe_crc(crtc, crcs);
>  
>  	spin_lock(&pipe_crc->lock);
>  	/*
> @@ -1712,11 +1714,6 @@ static void display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
>  	}
>  	spin_unlock(&pipe_crc->lock);
>  
> -	crcs[0] = crc0;
> -	crcs[1] = crc1;
> -	crcs[2] = crc2;
> -	crcs[3] = crc3;
> -	crcs[4] = crc4;
>  	drm_crtc_add_crc_entry(&crtc->base, true,
>  				drm_crtc_accurate_vblank_count(&crtc->base),
>  				crcs);
> diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
> index eab313c3163c..308d36926335 100644
> --- a/drivers/gpu/drm/i915/i915_trace.h
> +++ b/drivers/gpu/drm/i915/i915_trace.h
> @@ -18,6 +18,31 @@
>  
>  /* watermark/fifo updates */
>  
> +TRACE_EVENT(intel_pipe_crc,
> +	    TP_PROTO(struct intel_crtc *crtc, const u32 crcs[5]),
> +	    TP_ARGS(crtc, crcs),
> +
> +	    TP_STRUCT__entry(
> +			     __field(enum pipe, pipe)
> +			     __field(u32, frame)
> +			     __field(u32, scanline)
> +			     __array(u32, crcs, 5)
> +			     ),
> +
> +	    TP_fast_assign(
> +			   __entry->pipe = crtc->pipe;
> +			   __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev,
> +										       crtc->pipe);
> +			   __entry->scanline = intel_get_crtc_scanline(crtc);
> +			   memcpy(__entry->crcs, crcs, sizeof(__entry->crcs));
> +			   ),
> +
> +	    TP_printk("pipe %c, frame=%u, scanline=%u crc=%08x %08x %08x %08x %08x",
> +		      pipe_name(__entry->pipe), __entry->frame, __entry->scanline,
> +		      __entry->crcs[0], __entry->crcs[1], __entry->crcs[2],
> +		      __entry->crcs[3], __entry->crcs[4])
> +);
> +
>  TRACE_EVENT(intel_cpu_fifo_underrun,
>  	    TP_PROTO(struct drm_i915_private *dev_priv, enum pipe pipe),
>  	    TP_ARGS(dev_priv, pipe),
> -- 
> 2.19.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2019-02-13 17:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 20:49 [PATCH 1/4] drm/i915: Add pipe crc tracepoint Ville Syrjala
2019-02-06 20:49 ` [PATCH 2/4] drm/i915: Add pipe enable/disable tracepoints Ville Syrjala
2019-02-13 17:41   ` Rodrigo Vivi
2019-02-06 20:49 ` [PATCH 3/4] drm/i915: Add overlooked plane disable tracepoint into intel_crtc_disable_planes() Ville Syrjala
2019-02-13 17:41   ` Rodrigo Vivi
2019-02-06 20:49 ` [PATCH 4/4] drm/i915: Wrap plane update/disable hook calls Ville Syrjala
2019-02-13 17:41   ` Rodrigo Vivi
2019-02-06 21:19 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Add pipe crc tracepoint Patchwork
2019-02-06 21:49 ` ✓ Fi.CI.BAT: success " Patchwork
2019-02-07  1:44 ` ✓ Fi.CI.IGT: " Patchwork
2019-02-07  5:23 ` [PATCH 1/4] " kbuild test robot
2019-02-07  6:01 ` kbuild test robot
2019-02-13 17:40 ` Rodrigo Vivi [this message]

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=20190213174028.GB3125@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.