diff options
author | Eric Anholt <eric@anholt.net> | 2007-02-26 17:12:44 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-02-26 17:12:44 -0800 |
commit | 6ed28c5aa34ff1d8b99a8d4721ddac7b9cac41ed (patch) | |
tree | 5514aaa4ff5118b62a1150711d5f445fbdec6176 | |
parent | 36bfeb890aeb17a8ee058790dd69b4e9aba644a1 (diff) |
Fix XV issues on 965 after the allocation rework
-rw-r--r-- | src/i830_driver.c | 2 | ||||
-rw-r--r-- | src/i830_video.c | 17 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index 1dfd7a83..135e6fad 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2482,7 +2482,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) "needs 2D acceleration.\n"); pI830->XvEnabled = FALSE; } - if (pI830->overlay_regs == NULL) { + if (!IS_I9XX(pI830) && pI830->overlay_regs == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Disabling Xv because the overlay register buffer " "allocation failed.\n"); diff --git a/src/i830_video.c b/src/i830_video.c index 92f094fa..4c64b309 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -472,7 +472,9 @@ I830InitVideo(ScreenPtr pScreen) } /* Set up overlay video if we can do it at this depth. */ - if (!IS_I965G(pI830) && pScrn->bitsPerPixel != 8) { + if (!IS_I965G(pI830) && pScrn->bitsPerPixel != 8 && + pI830->overlay_regs != NULL) + { overlayAdaptor = I830SetupImageVideoOverlay(pScreen); if (overlayAdaptor != NULL) { adaptors[num_adaptors++] = overlayAdaptor; @@ -925,8 +927,7 @@ I830SetPortAttribute(ScrnInfoPtr pScrn, { I830PortPrivPtr pPriv = (I830PortPrivPtr) data; I830Ptr pI830 = I830PTR(pScrn); - I830OverlayRegPtr overlay = - (I830OverlayRegPtr) (pI830->FbBase + pI830->overlay_regs->offset); + I830OverlayRegPtr overlay; if (pPriv->textured) { /* XXX: Currently the brightness/saturation attributes aren't hooked up. @@ -936,6 +937,8 @@ I830SetPortAttribute(ScrnInfoPtr pScrn, return Success; } + overlay = (I830OverlayRegPtr) (pI830->FbBase + pI830->overlay_regs->offset); + if (attribute == xvBrightness) { if ((value < -128) || (value > 127)) return BadValue; @@ -2160,8 +2163,7 @@ I830PutImage(ScrnInfoPtr pScrn, I830Ptr pI830 = I830PTR(pScrn); I830PortPrivPtr pPriv = (I830PortPrivPtr) data; ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex]; - I830OverlayRegPtr overlay = - (I830OverlayRegPtr) (pI830->FbBase + pI830->overlay_regs->offset); + I830OverlayRegPtr overlay; PixmapPtr pPixmap; INT32 x1, x2, y1, y2; int srcPitch, srcPitch2 = 0, dstPitch, destId; @@ -2170,6 +2172,11 @@ I830PutImage(ScrnInfoPtr pScrn, int pitchAlignMask; int extraLinear; + if (pPriv->textured) + overlay = NULL; + else + (I830OverlayRegPtr) (pI830->FbBase + pI830->overlay_regs->offset); + #if 0 ErrorF("I830PutImage: src: (%d,%d)(%d,%d), dst: (%d,%d)(%d,%d)\n" "width %d, height %d\n", src_x, src_y, src_w, src_h, drw_x, drw_y, |