[PATCH] EXA: fix mixed-pixmaps issue where we could do accel with pixmap mapped

Maarten Maathuis madman2003 at gmail.com
Sat Oct 24 02:05:55 PDT 2009


On Sat, Oct 24, 2009 at 2:45 AM,  <skeggsb at gmail.com> wrote:
> From: Ben Skeggs <bskeggs at redhat.com>
>
> The problem occurs in the following situation:
>
> 1. Create Pixmap
> 2. Software fallback on pixmap: pExaPixmap->pDamage created
> 3. Accel to pixmap: driver pixmap created, exaPixmapIsOffscreen() now true
> 4. Software fallback on pixmap
> 4.1: PrepareAccess() from driver succeeds, so no DFS to system memory copy
> 4.2: Software rendering...
> 4.3: (pExaPixmap->pDamage && exaPixmapIsOffscreen()) is true, so we try
>     to (incorrectly) UTS the data back to the driver pixmap, when we
>     should just call the driver's FinishAccess() hook.
> 4.4: fail
>
> The patch adds an additional check on pExaPixmap->offscreen, which should
> (for the cases exaPixmapIsOffscreen() will return true) only be FALSE
> when we haven't used PrepareAccess() on the pixmap.
>
> Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
> Acked-By: Michel Dänzer <michel at daenzer.net>
> ---
>  exa/exa_migration_mixed.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c
> index f42c9c2..52b18b4 100644
> --- a/exa/exa_migration_mixed.c
> +++ b/exa/exa_migration_mixed.c
> @@ -202,7 +202,8 @@ void exaFinishAccess_mixed(PixmapPtr pPixmap, int index)
>  {
>     ExaPixmapPriv(pPixmap);
>
> -    if (pExaPixmap->pDamage && exaPixmapIsOffscreen(pPixmap)) {
> +    if (pExaPixmap->pDamage && exaPixmapIsOffscreen(pPixmap) &&
> +       !pExaPixmap->offscreen) {
>        DamageRegionProcessPending(&pPixmap->drawable);
>        exaMoveInPixmap_mixed(pPixmap);
>     }
> --
> 1.6.5.rc2
>
> _______________________________________________
> xorg-devel mailing list
> xorg-devel at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-devel
>

Looks sane to me.


More information about the xorg-devel mailing list