Question about X server abort
Michel Dänzer
michel at daenzer.net
Mon Jul 5 02:37:40 PDT 2010
[ Please always keep the list in CC ]
On Fre, 2010-07-02 at 14:05 +0800, 邓逸昕 wrote:
> OK. I will give the error bt ,pixmap call log
Thanks, this helps.
> Breakpoint 2, exaFinishAccess (pDrawable=0x865d880, index=-1) at
> exa.c:420
> 420 EXA_FatalErrorDebugWithRet(("EXA bug: FinishAccess
> called without PrepareAccess for pixmap 0x%p.\n",
> #0 exaFinishAccess (pDrawable=0x865d880, index=-1) at exa.c:420
> #1 0xb6c04520 in exaDestroyPixmap_driver (pPixmap=0x865d880) at
> exa_driver.c:197
> #2 0x0813a6e0 in damageDestroyPixmap (pPixmap=0x865d880) at
> damage.c:1747
> #3 0xb737a567 in XvDestroyPixmap (pPix=0x865d880) at xvmain.c:385
> #4 0x08072472 in dixChangeGC (client=0x0, pGC=0x82dfe60, mask=12288,
> pC32=0x0, pUnion=0xbf830678) at gc.c:290
> #5 0x080aad28 in miPaintWindow (pWin=0x865df78, prgn=0xbf830704,
> what=0) at miexpose.c:660
> #6 0x080aa19c in miHandleExposures (pSrcDrawable=0x865e070,
> pDstDrawable=0x865df78, pGC=0x865e200, srcx=50, srcy=5, width=80,
> height=40, dstx=0, dsty=0, plane=1)
> at miexpose.c:303
> #7 0x081d0f9e in miDoCopy (pSrcDrawable=0x865e070,
> pDstDrawable=0x865df78, pGC=0x865e200, xIn=675, yIn=485, widthSrc=80,
> heightSrc=40, xOut=648, yOut=573, copyProc=
> 0xb6c27d59 <fbCopyNto1>, bitPlane=1, closure=0x0) at micopy.c:343
> #8 0xb6c283c5 in fbCopyPlane (pSrcDrawable=0x865e070,
> pDstDrawable=0x865df78, pGC=0x865e200, xIn=50, yIn=5, widthSrc=80,
> heightSrc=40, xOut=0, yOut=0, bitplane=1)
> at fbcopy.c:361
> #9 0xb6c1008c in ExaCheckCopyPlane (pSrc=0x865e070, pDst=0x865df78,
> pGC=0x865e200, srcx=50, srcy=5, w=80, h=40, dstx=0, dsty=0,
> bitPlane=1) at exa_unaccel.c:236
So it looks like the problem is that a pixmap which was created outside
of a software fallback is destroyed in the course of a software
fallback.
Does the patch below help?
diff --git a/exa/exa_classic.c b/exa/exa_classic.c
index 2cfeda5..b95df9e 100644
--- a/exa/exa_classic.c
+++ b/exa/exa_classic.c
@@ -220,10 +220,18 @@ exaDestroyPixmap_classic (PixmapPtr pPixmap)
if (pPixmap->refcnt == 1)
{
ExaPixmapPriv (pPixmap);
+ int i;
- /* During a fallback we must finish access, but we don't know the index. */
- if (pExaScr->fallback_counter)
- exaFinishAccess(&pPixmap->drawable, -1);
+ /* Finish access if it was prepared (e.g. pixmap created during
+ * software fallback)
+ */
+ for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) {
+ if (pExaScr->access[i].pixmap == pPixmap) {
+ exaFinishAccess(&pPixmap->drawable, i);
+ pExaScr->access[i].pixmap = NULL;
+ break;
+ }
+ }
if (pExaPixmap->area)
{
diff --git a/exa/exa_driver.c b/exa/exa_driver.c
index abe79ba..1f5214f 100644
--- a/exa/exa_driver.c
+++ b/exa/exa_driver.c
@@ -192,10 +192,18 @@ exaDestroyPixmap_driver (PixmapPtr pPixmap)
if (pPixmap->refcnt == 1)
{
ExaPixmapPriv (pPixmap);
+ int i;
- /* During a fallback we must finish access, but we don't know the index. */
- if (pExaScr->fallback_counter)
- exaFinishAccess(&pPixmap->drawable, -1);
+ /* Finish access if it was prepared (e.g. pixmap created during
+ * software fallback)
+ */
+ for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) {
+ if (pExaScr->access[i].pixmap == pPixmap) {
+ exaFinishAccess(&pPixmap->drawable, i);
+ pExaScr->access[i].pixmap = NULL;
+ break;
+ }
+ }
if (pExaPixmap->driverPriv)
pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv);
diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
index 7fa771d..6d434d6 100644
--- a/exa/exa_mixed.c
+++ b/exa/exa_mixed.c
@@ -244,10 +244,18 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap)
if (pPixmap->refcnt == 1)
{
ExaPixmapPriv (pPixmap);
-
- /* During a fallback we must finish access, but we don't know the index. */
- if (pExaScr->fallback_counter)
- exaFinishAccess(&pPixmap->drawable, -1);
+ int i;
+
+ /* Finish access if it was prepared (e.g. pixmap created during
+ * software fallback)
+ */
+ for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) {
+ if (pExaScr->access[i].pixmap == pPixmap) {
+ exaFinishAccess(&pPixmap->drawable, i);
+ pExaScr->access[i].pixmap = NULL;
+ break;
+ }
+ }
if (pExaScr->deferred_mixed_pixmap == pPixmap)
pExaScr->deferred_mixed_pixmap = NULL;
--
Earthling Michel Dänzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
More information about the xorg-devel
mailing list