On Tue, 18 Aug 2009 12:10:34 -0700
Keith Whitwell <kei...@vmware.com> wrote:

> This seems wrong to me -- the client doesn't need to sleep - all it's
> going to do is build a command buffer targeting the new backbuffer.
> There's no problem with that, it should be the preserve of the GPU
> scheduler (TTM or GEM) to ensure those commands (once submitted)
> don't get executed until the buffer is available - otherwise you're
> potentially pausing your application for no good reason.  The app
> should be throttled if it gets more than a couple of frames ahead,
> but there should be 100% overlap with hardware otherwise.

I think this is possible with the current scheme if you return a "flip
complete" event immediately, or structure your DDX driver to indicate
completion early.  That would mean tracking busy (i.e. flip pending)
buffers in your scheduler (I think I had it hooked into GEM at one
point, but with the generic code it's not needed), but it's definitely
possible as Thomas described.  And I agree you want to keep the GPU fed
with commands (that it can actually execute!) as much as possible;
that's especially important for low end chips.

> If you need  a solution that doesn't rely on the buffer manager,
> perhaps resort to triple-buffering, or else create a new buffer and
> return that in DRI2GetBuffers (and let the scanout one be freed once
> the flip is done). 

Yeah, that's another good option; should be fairly trivial with this
codebase (the next DRI2GetBuffers call would just come back immediately
with new buffers).

> It seems like arbitrating command execution against on-hardware
> buffers should be the preserve of the kernel memory manager & other
> actors shouldn't be double-guessing that.

Right, but the main thing here is to avoid here is putting the whole
server to sleep.

Anyway, to me this discussion is more of a "future directions" one than
a blocker for this particular patchset.  AFAICT the only thing that
needs fixing with this patch is my lock confusion (struct_mutex vs
mode_config).  Or would you like something substantial changed with
these bits before they land?

-- 
Jesse Barnes, Intel Open Source Technology Center

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to