diff options
author | Eric Anholt <anholt@FreeBSD.org> | 2006-06-18 00:25:34 -0700 |
---|---|---|
committer | Eric Anholt <anholt@FreeBSD.org> | 2006-06-18 00:32:17 -0700 |
commit | 89a5a0024a7e077a0726ffe1427e573df3bcbef5 (patch) | |
tree | f54e171bbd9b55f13f9e6dd7bdd971887c77658c /src | |
parent | f2ab3aa3199e1c4b0edec72b5acea6d725cc514a (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/i830_rotate.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/i830_rotate.c b/src/i830_rotate.c index e4a80645..ad4c484b 100644 --- a/src/i830_rotate.c +++ b/src/i830_rotate.c @@ -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; |