diff options
Diffstat (limited to 'driver/xf86-video-intel/src/i830_video.c')
-rw-r--r-- | driver/xf86-video-intel/src/i830_video.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/driver/xf86-video-intel/src/i830_video.c b/driver/xf86-video-intel/src/i830_video.c index db21d8728..c97dfc8f3 100644 --- a/driver/xf86-video-intel/src/i830_video.c +++ b/driver/xf86-video-intel/src/i830_video.c @@ -1,4 +1,3 @@ -#define VIDEO_DEBUG 0 /*************************************************************************** Copyright 2000 Intel Corporation. All Rights Reserved. @@ -172,7 +171,7 @@ Edummy(const char *dummy, ...) OUT_RING(MI_NOOP); \ OUT_RING(MI_OVERLAY_FLIP | MI_OVERLAY_FLIP_CONTINUE); \ } \ - if (IS_I965G(pI830)) \ + if (IS_I96X(pI830)) \ OUT_RING(pI830->OverlayMem->Start | OFC_UPDATE); \ else \ OUT_RING(pI830->OverlayMem->Physical | OFC_UPDATE); \ @@ -190,7 +189,7 @@ Edummy(const char *dummy, ...) OUT_RING(MI_FLUSH | MI_WRITE_DIRTY_STATE); \ OUT_RING(MI_NOOP); \ OUT_RING(MI_OVERLAY_FLIP | MI_OVERLAY_FLIP_OFF); \ - if (IS_I965G(pI830)) \ + if (IS_I96X(pI830)) \ OUT_RING(pI830->OverlayMem->Start | OFC_UPDATE); \ else \ OUT_RING(pI830->OverlayMem->Physical | OFC_UPDATE); \ @@ -447,7 +446,7 @@ I830InitVideo(ScreenPtr pScreen) xvContrast = MAKE_ATOM("XV_CONTRAST"); /* Set up overlay video if we can do it at this depth. */ - if (!IS_I965G(pI830) && pScrn->bitsPerPixel != 8) { + if (!IS_I96X(pI830) && pScrn->bitsPerPixel != 8) { overlayAdaptor = I830SetupImageVideoOverlay(pScreen); if (overlayAdaptor != NULL) { adaptors[num_adaptors++] = overlayAdaptor; @@ -462,7 +461,7 @@ I830InitVideo(ScreenPtr pScreen) /* Set up textured video if we can do it at this depth and we are on * supported hardware. */ - if (pScrn->bitsPerPixel >= 16 && (IS_I9XX(pI830) || IS_I965G(pI830))) { + if (pScrn->bitsPerPixel >= 16 && (IS_I9XX(pI830) || IS_I96X(pI830))) { texturedAdaptor = I830SetupImageVideoTextured(pScreen); if (texturedAdaptor != NULL) { adaptors[num_adaptors++] = texturedAdaptor; @@ -935,14 +934,16 @@ I830SetPortAttribute(ScrnInfoPtr pScrn, pPriv->brightness = value; overlay->OCLRC0 = (pPriv->contrast << 18) | (pPriv->brightness & 0xff); ErrorF("BRIGHTNESS\n"); - OVERLAY_UPDATE; + if (*pI830->overlayOn) + OVERLAY_UPDATE; } 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_UPDATE; + if (*pI830->overlayOn) + OVERLAY_UPDATE; } else if (pI830->Clone && attribute == xvPipe) { if ((value < 0) || (value > 1)) return BadValue; @@ -956,7 +957,8 @@ I830SetPortAttribute(ScrnInfoPtr pScrn, else overlay->OCONFIG |= OVERLAY_PIPE_B; ErrorF("PIPE CHANGE\n"); - OVERLAY_UPDATE; + if (*pI830->overlayOn) + OVERLAY_UPDATE; } else if (attribute == xvGamma0 && (IS_I9XX(pI830))) { pPriv->gamma0 = value; } else if (attribute == xvGamma1 && (IS_I9XX(pI830))) { @@ -983,7 +985,8 @@ I830SetPortAttribute(ScrnInfoPtr pScrn, break; } ErrorF("COLORKEY\n"); - OVERLAY_UPDATE; + if (*pI830->overlayOn) + OVERLAY_UPDATE; REGION_EMPTY(pScrn->pScreen, &pPriv->clip); } else if(attribute == xvDoubleBuffer) { if ((value < 0) || (value > 1)) @@ -1001,13 +1004,8 @@ I830SetPortAttribute(ScrnInfoPtr pScrn, attribute == xvGamma3 || attribute == xvGamma4 || attribute == xvGamma5) && (IS_I9XX(pI830))) { - CARD32 r = overlay->OCMD & OVERLAY_ENABLE; ErrorF("GAMMA\n"); - overlay->OCMD &= ~OVERLAY_ENABLE; - OVERLAY_UPDATE; I830UpdateGamma(pScrn); - overlay->OCMD |= r; - OVERLAY_UPDATE; } return Success; @@ -1849,7 +1847,7 @@ I830DisplayVideo(ScrnInfoPtr pScrn, int id, short width, short height, dstBox->x2, dstBox->y2); /* buffer locations */ - if (IS_I965G(pI830)) + if (IS_I96X(pI830)) { overlay->OBUF_0Y = 0; overlay->OBUF_0U = 0; @@ -2997,7 +2995,7 @@ I830PutImage(ScrnInfoPtr pScrn, if (pPriv->textured) { pitchAlignMask = 3; } else { - if (IS_I965G(pI830)) + if (IS_I96X(pI830)) pitchAlignMask = 255; else pitchAlignMask = 63; @@ -3033,7 +3031,7 @@ I830PutImage(ScrnInfoPtr pScrn, ErrorF("srcPitch: %d, dstPitch: %d, size: %d\n", srcPitch, dstPitch, size); #endif - if (IS_I965G(pI830)) + if (IS_I96X(pI830)) extraLinear = BRW_LINEAR_EXTRA; else extraLinear = 0; @@ -3147,7 +3145,7 @@ I830PutImage(ScrnInfoPtr pScrn, I830DisplayVideo(pScrn, destId, width, height, dstPitch, x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h); - } else if (IS_I965G(pI830)) { + } else if (IS_I96X(pI830)) { BroadwaterDisplayVideoTextured (pScrn, pPriv, destId, clipBoxes, width, height, dstPitch, x1, y1, x2, y2, src_w, src_h, drw_w, drw_h, pDraw); @@ -3621,7 +3619,7 @@ I830VideoSwitchModeAfter(ScrnInfoPtr pScrn, DisplayModePtr mode) } } - if (!IS_I965G(pI830)) { + if (!IS_I96X(pI830)) { if (pPriv->pipe == 0) { if (INREG(PIPEACONF) & PIPEACONF_DOUBLE_WIDE) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, |