xf86-video-intel: Branch 'modesetting' - src/i830_driver.c src/i830_video.c

Eric Anholt anholt at kemper.freedesktop.org
Tue Feb 27 03:12:59 EET 2007


 src/i830_driver.c |    2 +-
 src/i830_video.c  |   17 ++++++++++++-----
 2 files changed, 13 insertions(+), 6 deletions(-)

New commits:
diff-tree 6ed28c5aa34ff1d8b99a8d4721ddac7b9cac41ed (from 36bfeb890aeb17a8ee058790dd69b4e9aba644a1)
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Feb 26 17:12:44 2007 -0800

    Fix XV issues on 965 after the allocation rework

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 1dfd7a8..135e6fa 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2482,7 +2482,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr 
 		    "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 92f094f..4c64b30 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,



More information about the xorg-commit mailing list