[PATCH] Ensure blitter quiescience before reading pixels from the framebuffer

Bernardo Innocenti bernie at codewiz.org
Mon Jul 30 07:39:44 PDT 2007

Michel Dänzer wrote:

>> afaik, as of today XAA is still the default on all mayor Linux
>> distros.  Simple bug fixes are probably still wanted.
> So are you volunteering to maintain XAA? :)


No, but I will contribute bugfixes like this one for problems that directly
affect me.  I depend on XAA because EXA is still unusably slow on all hardware
I ever tried it with.  I wonder if there's someone with a different experience.

>> I'm unsure how we could eliminate those 1x1 pixmaps used for solid fills,
>> but they're certainly a big performance hit.  In some cases, we even upload
>> them to the framebuffer by *dma*, then read the pixel with CPU :-)
> Adam Jackson fixed that in GIT.

This patch?


That's not really a fix, rather a workaround: we still upload the pixmap to the
framebuffer, and we still allocate and initialize it in memory, which is also

Moreover, even when we hit the fast path, exaGetPixmapFirstPixel() is a rather
slow implementation for a simple "read pixel" operation: it calls into 3 other
non inlineable functions, one of which rather complex.

> If there's still a measurable penalty in some cases with the above change,
> this is probably the way to go.

I always wanted to run oprofile on one of Cairo's benchmark to see how the
overhead is distributed.  But Carl Worth already provided plenty of proof.

The overhead is quite visible also with the naked eye: after walking through the
server-side code for drawing one trapezoid, I'm actually surprised it still runs
so fast :-)

   // Bernardo Innocenti
 \X/  http://www.codewiz.org/

More information about the xorg mailing list