Michel Dänzer wrote:
On Thu, 2009-12-03 at 09:48 +0100, Arnaud Mouiche wrote:
Hi,

I start to play with EXA and tried to implement it under kdrive, for a
Davinci implementation
(http://focus.ti.com/docs/prod/folders/print/tms320dm6446.html)

- staring with version 1.7.1 of xserver (getting from xorg 7.5)
- as davinci can be consider as a slow platform, so target kdrive for
that job
- copy/paste  hw/kdrive/fbdev as a starting point (working fine) and
looks at what hw/kdrive/ephyr is doing for EXA init, and with a EXA
implementation that does nothing first.

there is a segfault when using "ExaMigrationSmart" and/or when
"checkDirtyCorrectness" is true.
not happened with "ExaMigrationGreedy",

Note that the default in Xorg is ExaMigrationAlways, and the other
heuristics haven't been actively maintained since that's been the case.
ok, good to know !

and the segfault is due to a use of REGION_NOTEMPTY (pScreen, DamageRegion(pExaPixmap->pDamage)
with pExaPixmap->pDamage == NULL
(see background informations for the whole details)

Does the patch below fix the crash?
yes it (obviously) fix this the crash, and no other place with such pExaPixmap->pDamage miss use up to now. I will continue this way, with ExaMigrationAlways, and report any other issue.

Thanks,

arnaud


diff --git a/exa/exa_migration_classic.c b/exa/exa_migration_classic.c
index 95189be..871679f 100644
--- a/exa/exa_migration_classic.c
+++ b/exa/exa_migration_classic.c
@@ -75,6 +75,9 @@ exaPixmapIsDirty (PixmapPtr pPix)
     if (pExaPixmap == NULL)
        EXA_FatalErrorDebugWithRet(("EXA bug: exaPixmapIsDirty was called on a 
non-exa pixmap.\n"), TRUE);
+ if (!pExaPixmap->pDamage)
+       return FALSE;
+
     return REGION_NOTEMPTY (pScreen, DamageRegion(pExaPixmap->pDamage)) ||
        !REGION_EQUAL(pScreen, &pExaPixmap->validSys, &pExaPixmap->validFB);
 }



_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to