[Intel-gfx] [PATCH 2/2] glamor: Address GLAMOR/UXA flushing problem.
chris at chris-wilson.co.uk
Tue Nov 15 04:24:58 PST 2011
On Tue, 15 Nov 2011 19:36:14 +0800, Zhigang Gong <zhigang.gong at linux.intel.com> wrote:
> This commit introduces a new function in UXA layer need_flush
> which is used to let the UXA layer to notify the lower layer
> that some pixmap get modified by GLAMOR. And then the intel
> driver could know it need to flush front buffer latter.
> This commit also adds some necessary flushing pointis for UXA
> layer and glamor layer. Basicly, there are three scenarios:
> 1. Before calling into glamor layer, it needs to flush all the
> corresponding UXA batch comand buffer.
> 2. After calling the glamor rendering functions, it needs to
> flush the pending GL operations.
> 3. Before we map a pixmap's BO, we also need to flush all the
> pending GL operations.
> The scenario 2 could be eliminated when we fully change to glamor
I much prefer the one-sided uxa_prepare_access() you have implemented
here for the glamor side. For completeness, you still probably want the
uxa_finish_access() though. Alternatively you need to mark up all
operations with uxa_prepare_access(GLAMOR | NATIVE | SW, READ | WRITE)
which then perform the implicit uxa_finish_access() when the mode
changes, and would also allow you to only flush the glamor operations as
Aside from that, this looks like the right approach to handling the
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx