public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Also record time difference if vblank evasion fails.
Date: Mon, 31 Aug 2015 14:49:10 +0300	[thread overview]
Message-ID: <20150831114910.GB29811@intel.com> (raw)
In-Reply-To: <1441019066-26469-2-git-send-email-maarten.lankhorst@linux.intel.com>

On Mon, Aug 31, 2015 at 01:04:26PM +0200, Maarten Lankhorst wrote:
> This makes the error message slightly more useful.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_drv.h    | 2 ++
>  drivers/gpu/drm/i915/intel_sprite.c | 6 ++++--
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 172c10ac92ae..513981751e92 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -565,6 +565,8 @@ struct intel_crtc {
>  	int scanline_offset;
>  
>  	unsigned start_vbl_count;
> +	ktime_t start_vbl_time;
> +
>  	struct intel_crtc_atomic_commit atomic;
>  
>  	/* scalers available on this crtc */
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 63fba42be2cf..cc0eb3915f1c 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -134,6 +134,7 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
>  
>  	drm_crtc_vblank_put(&crtc->base);
>  
> +	crtc->start_vbl_time = ktime_get();
>  	crtc->start_vbl_count = dev->driver->get_vblank_counter(dev, pipe);
>  
>  	trace_i915_pipe_update_vblank_evaded(crtc, min, max,
> @@ -160,8 +161,9 @@ void intel_pipe_update_end(struct intel_crtc *crtc)
>  	local_irq_enable();
>  
>  	if (crtc->start_vbl_count && crtc->start_vbl_count != end_vbl_count)
> -		DRM_ERROR("Atomic update failure on pipe %c (start=%u end=%u)\n",
> -			  pipe_name(pipe), crtc->start_vbl_count, end_vbl_count);
> +		DRM_ERROR("Atomic update failure on pipe %c (start=%u end=%u) time %lld us\n",
> +			  pipe_name(pipe), crtc->start_vbl_count, end_vbl_count,
> +			  ktime_us_delta(ktime_get(), crtc->start_vbl_time));

Should really do the ktime_get() before local_irq_enable().

With that fixed this series is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  }
>  
>  static void
> -- 
> 2.1.0
> 
> _______________________________________________
> 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

  reply	other threads:[~2015-08-31 11:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31 11:04 [PATCH 1/2] drm/i915: Remove start frame argument to pipe_update_begin/end Maarten Lankhorst
2015-08-31 11:04 ` [PATCH 2/2] drm/i915: Also record time difference if vblank evasion fails Maarten Lankhorst
2015-08-31 11:49   ` Ville Syrjälä [this message]
2015-09-01 10:15     ` [PATCH v2 2/2] drm/i915: Also record time difference if vblank evasion fails, v2 Maarten Lankhorst
2015-09-02 11:51       ` Daniel Vetter

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=20150831114910.GB29811@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox