summaryrefslogtreecommitdiff
path: root/src/i830_video.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2006-09-25 12:03:27 +0100
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2006-09-25 12:03:27 +0100
commitd6ca9feb78a9211758510751bbf47013caabff49 (patch)
tree8229a3873a8ba6818d4f63e5fb97bff278e9e83b /src/i830_video.c
parent564c830a91afda76706a8c4c2f3287d0b8d514e9 (diff)
Fix bug #7943 where video flickers when changing
attributes. This code was a leftover from testing lockups and shouldn't be needed anymore.
Diffstat (limited to 'src/i830_video.c')
-rw-r--r--src/i830_video.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index c044ddd7..b87e4eb2 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -951,22 +951,14 @@ I830SetPortAttribute(ScrnInfoPtr pScrn,
pPriv->brightness = value;
overlay->OCLRC0 = (pPriv->contrast << 18) | (pPriv->brightness & 0xff);
ErrorF("BRIGHTNESS\n");
- overlay->OCMD &= ~OVERLAY_ENABLE;
OVERLAY_UPDATE;
-#if 1
- OVERLAY_OFF;
-#endif
} else if (attribute == xvContrast) {
if ((value < 0) || (value > 255))
return BadValue;
pPriv->contrast = value;
overlay->OCLRC0 = (pPriv->contrast << 18) | (pPriv->brightness & 0xff);
ErrorF("CONTRAST\n");
- overlay->OCMD &= ~OVERLAY_ENABLE;
OVERLAY_UPDATE;
-#if 1
- OVERLAY_OFF;
-#endif
} else if (pI830->Clone && attribute == xvPipe) {
if ((value < 0) || (value > 1))
return BadValue;
@@ -980,11 +972,7 @@ I830SetPortAttribute(ScrnInfoPtr pScrn,
else
overlay->OCONFIG |= OVERLAY_PIPE_B;
ErrorF("PIPE CHANGE\n");
- overlay->OCMD &= ~OVERLAY_ENABLE;
OVERLAY_UPDATE;
-#if 1
- OVERLAY_OFF;
-#endif
} else if (attribute == xvGamma0 && (IS_I9XX(pI830))) {
pPriv->gamma0 = value;
} else if (attribute == xvGamma1 && (IS_I9XX(pI830))) {
@@ -1011,11 +999,7 @@ I830SetPortAttribute(ScrnInfoPtr pScrn,
break;
}
ErrorF("COLORKEY\n");
- overlay->OCMD &= ~OVERLAY_ENABLE;
OVERLAY_UPDATE;
-#if 1
- OVERLAY_OFF;
-#endif
REGION_EMPTY(pScrn->pScreen, &pPriv->clip);
} else if(attribute == xvDoubleBuffer) {
if ((value < 0) || (value > 1))
@@ -1026,20 +1010,20 @@ I830SetPortAttribute(ScrnInfoPtr pScrn,
} else
return BadMatch;
- /* We've already confirmed that the overlay is off, ready for updating */
+ /* Ensure that the overlay is off, ready for updating */
if ((attribute == xvGamma0 ||
attribute == xvGamma1 ||
attribute == xvGamma2 ||
attribute == xvGamma3 ||
attribute == xvGamma4 ||
attribute == xvGamma5) && (IS_I9XX(pI830))) {
+ CARD32 r = overlay->OCMD & OVERLAY_ENABLE;
ErrorF("GAMMA\n");
overlay->OCMD &= ~OVERLAY_ENABLE;
OVERLAY_UPDATE;
-#if 1
- OVERLAY_OFF;
-#endif
I830UpdateGamma(pScrn);
+ overlay->OCMD |= r;
+ OVERLAY_UPDATE;
}
return Success;