Fix XV issues on 965 after the allocation rework

This commit is contained in:
Eric Anholt 2007-02-26 17:12:44 -08:00
parent 36bfeb890a
commit 6ed28c5aa3
2 changed files with 13 additions and 6 deletions

View File

@ -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");

View File

@ -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,