[Intel-gfx] [PATCH v4] drm/i915: use hrtimer in wait for vblank
Daniel Vetter
daniel at ffwll.ch
Tue Mar 25 11:00:26 CET 2014
On Tue, Mar 25, 2014 at 11:32:23AM +0200, Jani Nikula wrote:
> On Tue, 25 Mar 2014, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > On Tue, Mar 25, 2014 at 02:28:22PM +0530, Arun R Murthy wrote:
> >> In wait for vblank use usleep_range, which will use hrtimers instead of
> >> msleep. Using msleep(1~20) there are more chances of sleeping for 20ms.
> >> Using usleep_range uses hrtimers and hence are precise, worst case will
> >> trigger an interrupt at the higher/max timeout.
> >>
> >> As per kernel document "Documentation/timers/timers-howto.txt" sleeping
> >> for 10us to 20ms its recomended to use usleep_range.
> >>
> >> Signed-off-by: Arun R Murthy <arun.r.murthy at intel.com>
> >
> > Lgtm, I still feel that our use of W=1 is fairly arbitrary and worth
> > tweaking in future.
>
> With the current code, this is essentially the same as the original
> patch. We never have W > 20, and thus we always take the usleep_range()
> path. So W is definitely worth tweaking if we go with this now.
>
> Nitpick, the macro params should be parenthesized. This will now break
> for _wait_for(cond, 10, 2 + 1) and such.
>
> Arun, please don't immediately reply with updated patches if there's
> discussion still going on. See what the conclusion is first. Thanks.
Also when quickly replying a single patch please use in-reply-to to the
correct thread. This way the discussion is still kept tighlty grouped
together even when you resend quickly.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list