[PATCH 1/6] exa/mixed: avoid copying back pixmap data when no migration took place

Maarten Maathuis madman2003 at gmail.com
Wed Nov 18 13:01:12 PST 2009


On Wed, Nov 18, 2009 at 9:32 PM, Matt Turner <mattst88 at gmail.com> wrote:
> On Wed, Nov 18, 2009 at 3:23 PM, Maarten Maathuis <madman2003 at gmail.com> wrote:
>> -    if (pExaPixmap->pDamage && exaPixmapIsOffscreen(pPixmap)) {
>> +    if (pExaPixmap->pDamage && !pExaPixmap->offscreen &&
>> +           exaPixmapIsOffscreen(pPixmap)){
>
> Very minor, but there should be a space between ) and { on the last line.

Consider it noted.

>
> Do you have any benchmark results for this change?

This is not about speed, but about correctness. When the driver takes
care of the pixmap access there is simply no need to copy, doing so
could result in outdated content (in the cpu pixmap) being copied to
the gpu pixmap. Now that you mention it, nothing bad probably
happened, because the damage is added as valid and removed as invalid
from the proper region. Worst case scenario is a few extra function
calls and maybe some early copying (some bits of pixmaps could have
been left untouched/damaged if the previous ops were only
destinations).

>
> Matt
>


More information about the xorg-devel mailing list