All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: don't frob the vblank ts in finish_page_flip
Date: Wed, 03 Oct 2012 11:09:23 +0300	[thread overview]
Message-ID: <1349251763.1026.1.camel@localhost> (raw)
In-Reply-To: <1349201437-17177-1-git-send-email-daniel.vetter@ffwll.ch>

On Tue, 2012-10-02 at 20:10 +0200, Daniel Vetter wrote:
> Now that we correctly generate it, this hack is no longer required (and
> might actually paper over a serious bug).
> 
> pageflip timestamps are sanity check in the latest version of the flip-test
> in intel-gpu-tools.
> 
> v2: Also remove the gettimeofday(&now) which is no longer used.
> Noticed by Mario Kleiner.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Tested-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_display.c |   23 +----------------------
>  1 file changed, 1 insertion(+), 22 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 57c1309..67912fe 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6181,15 +6181,13 @@ static void do_intel_finish_page_flip(struct drm_device *dev,
>  	struct intel_unpin_work *work;
>  	struct drm_i915_gem_object *obj;
>  	struct drm_pending_vblank_event *e;
> -	struct timeval tnow, tvbl;
> +	struct timeval tvbl;
>  	unsigned long flags;
>  
>  	/* Ignore early vblank irqs */
>  	if (intel_crtc == NULL)
>  		return;
>  
> -	do_gettimeofday(&tnow);
> -
>  	spin_lock_irqsave(&dev->event_lock, flags);
>  	work = intel_crtc->unpin_work;
>  	if (work == NULL || !work->pending) {
> @@ -6203,25 +6201,6 @@ static void do_intel_finish_page_flip(struct drm_device *dev,
>  		e = work->event;
>  		e->event.sequence = drm_vblank_count_and_time(dev, intel_crtc->pipe, &tvbl);
>  
> -		/* Called before vblank count and timestamps have
> -		 * been updated for the vblank interval of flip
> -		 * completion? Need to increment vblank count and
> -		 * add one videorefresh duration to returned timestamp
> -		 * to account for this. We assume this happened if we
> -		 * get called over 0.9 frame durations after the last
> -		 * timestamped vblank.
> -		 *
> -		 * This calculation can not be used with vrefresh rates
> -		 * below 5Hz (10Hz to be on the safe side) without
> -		 * promoting to 64 integers.
> -		 */
> -		if (10 * (timeval_to_ns(&tnow) - timeval_to_ns(&tvbl)) >
> -		    9 * crtc->framedur_ns) {
> -			e->event.sequence++;
> -			tvbl = ns_to_timeval(timeval_to_ns(&tvbl) +
> -					     crtc->framedur_ns);
> -		}
> -
>  		e->event.tv_sec = tvbl.tv_sec;
>  		e->event.tv_usec = tvbl.tv_usec;
>  

  reply	other threads:[~2012-10-03  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 18:10 [PATCH] drm/i915: don't frob the vblank ts in finish_page_flip Daniel Vetter
2012-10-03  8:09 ` Imre Deak [this message]
2012-10-03 14:34   ` 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=1349251763.1026.1.camel@localhost \
    --to=imre.deak@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.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 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.