public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Imre Deak <imre.deak@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Rob Clark <rob.clark@linaro.org>
Subject: Re: [RFC 4/4] drm: add support for raw monotonic vblank timestamps
Date: Sun, 7 Oct 2012 22:33:46 +0200	[thread overview]
Message-ID: <20121007203346.GB7352@phenom.ffwll.local> (raw)
In-Reply-To: <1349484556.23130.15.camel@ideak-mobl>

On Sat, Oct 06, 2012 at 03:49:16AM +0300, Imre Deak wrote:
> On Fri, 2012-10-05 at 18:09 -0600, Rob Clark wrote:
> > 
> > 	/* 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) {
> > 		event->event.sequence++;
> > 		tvbl = ns_to_timeval(timeval_to_ns(&tvbl) +
> > 				     crtc->framedur_ns);
> > 	}
> 
> This has been recently removed by danvet's "drm/i915: don't frob the
> vblank ts in finish_page_flip", though not yet committed, so we can do
> away with it here too.

Yeah, I'd prefer if the common code doesn't have such hackes - this bit
here papered over some bugs in our driver code, but only partially
successfully ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2012-10-07 20:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 13:36 [RFC 0/4] drm: add raw monotonic timestamp support Imre Deak
2012-10-05 13:36 ` [RFC 1/4] time: export getnstime_raw_and_real for DRM Imre Deak
2012-10-05 16:14   ` Kristian Høgsberg
2012-10-09 10:25     ` Imre Deak
2012-10-05 13:37 ` [RFC 2/4] drm: make memset/calloc for _vblank_time more robust Imre Deak
2012-10-05 13:37 ` [RFC 3/4] drm: use raw time in drm_calc_vbltimestamp_from_scanoutpos Imre Deak
2012-10-05 13:37 ` [RFC 4/4] drm: add support for raw monotonic vblank timestamps Imre Deak
2012-10-05 13:55   ` Michel Dänzer
2012-10-05 13:59     ` Imre Deak
2012-10-05 14:14       ` Michel Dänzer
2012-10-05 14:21         ` Imre Deak
2012-10-05 22:18   ` Rob Clark
2012-10-05 23:41     ` Imre Deak
2012-10-06  0:09       ` Rob Clark
2012-10-06  0:49         ` Imre Deak
2012-10-07 20:33           ` Daniel Vetter [this message]
2012-10-05 23:07 ` [RFC 0/4] drm: add raw monotonic timestamp support Eric Anholt
2012-10-08 11:22   ` Imre Deak
2012-10-11 10:29 ` Laurent Pinchart
2012-10-11 11:21   ` Imre Deak
2012-10-11 10:32 ` Laurent Pinchart
2012-10-11 11:22   ` Imre Deak
2012-10-23 18:53 ` [PATCH 0/2] drm: add " Imre Deak
2012-10-23 18:53 ` [PATCH 1/2] drm: use monotonic time in drm_calc_vbltimestamp_from_scanoutpos Imre Deak
2012-10-24 23:05   ` Mario Kleiner
2012-10-25 10:28     ` Imre Deak
2012-10-25 19:45       ` Mario Kleiner
2012-10-23 18:53 ` [PATCH 2/2] drm: add support for monotonic vblank timestamps Imre Deak
2012-10-24  8:08   ` Michel Dänzer
2012-10-24 11:40     ` Imre Deak

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=20121007203346.GB7352@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rob.clark@linaro.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