Fix crash with EXA during randr, when XAA structures were being accessed. EXA

shouldn't have any issues with there also being pixmaps in framebuffer while
rotation is active.
This commit is contained in:
Eric Anholt 2006-06-18 00:25:34 -07:00
parent f2ab3aa319
commit 89a5a0024a
1 changed files with 19 additions and 14 deletions

View File

@ -959,21 +959,26 @@ I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode)
}
}
/* Don't allow pixmap cache or offscreen pixmaps when rotated */
/* XAA needs some serious fixing for this to happen */
if (pI830->rotation == RR_Rotate_0) {
pI830->AccelInfoRec->Flags = LINEAR_FRAMEBUFFER | OFFSCREEN_PIXMAPS | PIXMAP_CACHE;
pI830->AccelInfoRec->UsingPixmapCache = TRUE;
/* funny as it seems this will enable XAA's createpixmap */
pI830->AccelInfoRec->maxOffPixWidth = 0;
pI830->AccelInfoRec->maxOffPixHeight = 0;
} else {
pI830->AccelInfoRec->Flags = LINEAR_FRAMEBUFFER;
pI830->AccelInfoRec->UsingPixmapCache = FALSE;
/* funny as it seems this will disable XAA's createpixmap */
pI830->AccelInfoRec->maxOffPixWidth = 1;
pI830->AccelInfoRec->maxOffPixHeight = 1;
#ifdef I830_USE_XAA
if (pI830->AccelInfoRec != NULL) {
/* Don't allow pixmap cache or offscreen pixmaps when rotated */
/* XAA needs some serious fixing for this to happen */
if (pI830->rotation == RR_Rotate_0) {
pI830->AccelInfoRec->Flags = LINEAR_FRAMEBUFFER | OFFSCREEN_PIXMAPS |
PIXMAP_CACHE;
pI830->AccelInfoRec->UsingPixmapCache = TRUE;
/* funny as it seems this will enable XAA's createpixmap */
pI830->AccelInfoRec->maxOffPixWidth = 0;
pI830->AccelInfoRec->maxOffPixHeight = 0;
} else {
pI830->AccelInfoRec->Flags = LINEAR_FRAMEBUFFER;
pI830->AccelInfoRec->UsingPixmapCache = FALSE;
/* funny as it seems this will disable XAA's createpixmap */
pI830->AccelInfoRec->maxOffPixWidth = 1;
pI830->AccelInfoRec->maxOffPixHeight = 1;
}
}
#endif
return TRUE;