[Intel-gfx] [PATCH] drm/i915: Don't update the render-clock for every bo.
Chris Wilson
chris at chris-wilson.co.uk
Tue Dec 1 15:11:21 CET 2009
Excerpts from Eric Anholt's message of Tue Dec 01 00:33:05 +0000 2009:
> On Mon, 30 Nov 2009 01:08:56 +0000, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > Only update the render-clock on transition from busy to idle and vice
> > versa, or else we burn a significant percentage of the cpu just rewriting
> > the register -- not quite as power-friendly as intended ;-)
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Jesse Barnes <jbarnes at virtuousgeek.org>
>
> Mostly looks good.
>
> With this change, though, there seems to be a race where the idle timer
> could fire making busy = false, new work comes in and marks busy = true
> (setting render clock), then the scheduled work for idling the GPU
> happens and busy is untouched but the clocks get dropped. Any following
> work would be done at low render clock, until busy = false happens again
> and we get another chance to wake up.
I think Jesse got it right in that scenario:
mark busy -> busy=1, increase renderclock, schedule timer
mark busy -> busy==1 then modify timer
...
timeout -> busy=0, add idle task
[mark busy -> busy=1, increase renderclock, schedule timer]
idle handler -> busy==1 then skip
-> busy==0 then decrease renderclock
I may very well be mistaken though, I so frequently am.
-ickle
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list