diff options
author | Thomas Hellström <thomas@shipmail.org> | 2008-10-29 10:56:34 +0000 |
---|---|---|
committer | Thomas Hellström <thomas@shipmail.org> | 2008-10-29 10:56:34 +0000 |
commit | 6c8df98ccf9eb73a03893e86dfc03f413aa1bc70 (patch) | |
tree | 807062711d93921406d8e6f51003084dec0cc963 /src/via_accel.c | |
parent | fe96558a0a5f6c01fb17c0d2df3b3fd0f3f2d49e (diff) |
Some accel cleanups. Fix a VT switch segfault
Diffstat (limited to 'src/via_accel.c')
-rw-r--r-- | src/via_accel.c | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/via_accel.c b/src/via_accel.c index ed13667..b6a5433 100644 --- a/src/via_accel.c +++ b/src/via_accel.c @@ -588,32 +588,12 @@ viaExaPixmapIsOffscreen(PixmapPtr p) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; VIAPtr pVia = VIAPTR(pScrn); - return (viaInBuffer(&pVia->offscreen, p->devPrivate.ptr) != NULL); -} - -static unsigned long -viaExaPixmapOffset(PixmapPtr p) -{ - ScreenPtr pScreen = p->drawable.pScreen; - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - VIAPtr pVia = VIAPTR(pScrn); - void *ptr; - struct _ViaOffscreenBuffer *buf; - - ptr = (void *) exaGetPixmapOffset(p) + - (unsigned long) pVia->exaMem.virtual; - - buf = viaInBuffer(&pVia->offscreen, ptr); - - if (!buf) - FatalError("Offscreen pixmap is not offscreen.\n"); + if (pVia->vtNotified == TRUE) + return FALSE; - return (unsigned long)ptr - (unsigned long) buf->virtual + - driBOOffset(buf->buf); + return (viaInBuffer(&pVia->offscreen, p->devPrivate.ptr) != NULL); } - - static Bool viaExaPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planeMask, Pixel fg) { @@ -702,8 +682,6 @@ viaExaPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir, if (exaGetPixmapPitch(pDstPixmap) & 7) return FALSE; - tdc->srcOffset = viaExaPixmapOffset(pSrcPixmap); - tdc->cmd = VIA_GEC_BLT | VIAACCELCOPYROP(alu); if (xdir < 0) tdc->cmd |= VIA_GEC_DECX; |