xf86-video-intel: Branch 'glucose' - 5 commits - src/i830_driver.c src/i830_memory.c src/i830_quirks.c src/i830_video.c src/i830_video.h

Alan Hourihane alanh at kemper.freedesktop.org
Wed Oct 17 01:44:42 PDT 2007


 src/i830_driver.c |   21 +++++++++++++++++++++
 src/i830_memory.c |    8 ++++----
 src/i830_quirks.c |    6 +++++-
 src/i830_video.c  |   24 ++++++++++--------------
 src/i830_video.h  |    3 +++
 5 files changed, 43 insertions(+), 19 deletions(-)

New commits:
commit 1c69c5d5452581e953da78212ca561170a02fb36
Merge: f538737... c824c45...
Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Wed Oct 17 09:44:33 2007 +0100

    Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-intel into glucose

commit c824c45e72908b5b3fa832fec91c7b47f305180c
Author: Dave Airlie <airlied at optimus.(none)>
Date:   Wed Oct 17 16:35:29 2007 +1000

    intel: make block handler hook happen no matter what video is in use
    
    This shouldn't make a difference now, but for upcoming EXA/batch changes it
    will be more useful

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 1d4e154..4407241 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -197,6 +197,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "i830_display.h"
 #include "i830_debug.h"
 #include "i830_bios.h"
+#include "i830_video.h"
 
 #ifdef XF86DRI
 #include "dri.h"
@@ -2255,6 +2256,23 @@ IntelEmitInvarientState(ScrnInfoPtr pScrn)
    }
 }
 
+static void
+I830BlockHandler(int i,
+		 pointer blockData, pointer pTimeout, pointer pReadmask)
+{
+    ScreenPtr pScreen = screenInfo.screens[i];
+    ScrnInfoPtr pScrn = xf86Screens[i];
+    I830Ptr pI830 = I830PTR(pScrn);
+
+    pScreen->BlockHandler = pI830->BlockHandler;
+
+    (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
+
+    pScreen->BlockHandler = I830BlockHandler;
+
+    I830VideoBlockHandler(i, blockData, pTimeout, pReadmask);
+}
+
 static Bool
 I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 {
@@ -2865,6 +2883,9 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering: Not available\n");
 #endif
 
+   pI830->BlockHandler = pScreen->BlockHandler;
+   pScreen->BlockHandler = I830BlockHandler;
+
    pScreen->SaveScreen = xf86SaveScreen;
    pI830->CloseScreen = pScreen->CloseScreen;
    pScreen->CloseScreen = I830CloseScreen;
diff --git a/src/i830_video.c b/src/i830_video.c
index 8c2d804..255444b 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -105,8 +105,6 @@ static int I830QueryImageAttributesOverlay(ScrnInfoPtr, int, unsigned short *,
 static int I830QueryImageAttributesTextured(ScrnInfoPtr, int, unsigned short *,
 					    unsigned short *, int *, int *);
 
-static void I830BlockHandler(int, pointer, pointer, pointer);
-
 #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
 
 static Atom xvBrightness, xvContrast, xvSaturation, xvColorKey, xvPipe, xvDoubleBuffer;
@@ -866,9 +864,6 @@ I830SetupImageVideoOverlay(ScreenPtr pScreen)
      */
     pPriv->overlayOK = TRUE;
 
-    pI830->BlockHandler = pScreen->BlockHandler;
-    pScreen->BlockHandler = I830BlockHandler;
-
     xvColorKey = MAKE_ATOM("XV_COLORKEY");
     xvBrightness = MAKE_ATOM("XV_BRIGHTNESS");
     xvContrast = MAKE_ATOM("XV_CONTRAST");
@@ -2536,20 +2531,22 @@ I830QueryImageAttributesTextured(ScrnInfoPtr pScrn,
     return I830QueryImageAttributes(pScrn, id, w, h, pitches, offsets, TRUE);
 }
 
-static void
-I830BlockHandler(int i,
-		 pointer blockData, pointer pTimeout, pointer pReadmask)
+void
+I830VideoBlockHandler(int i, pointer blockData, pointer pTimeout,
+		      pointer pReadmask)
 {
-    ScreenPtr pScreen = screenInfo.screens[i];
     ScrnInfoPtr pScrn = xf86Screens[i];
     I830Ptr pI830 = I830PTR(pScrn);
-    I830PortPrivPtr pPriv = GET_PORT_PRIVATE(pScrn);
+    I830PortPrivPtr pPriv;
 
-    pScreen->BlockHandler = pI830->BlockHandler;
+    if (pI830->adaptor == NULL)
+        return;
 
-    (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
+    /* No overlay scaler on the 965. */
+    if (IS_I965G(pI830))
+        return;
 
-    pScreen->BlockHandler = I830BlockHandler;
+    pPriv = GET_PORT_PRIVATE(pScrn);
 
     if (pPriv->videoStatus & TIMER_MASK) {
 #if 1
@@ -2778,7 +2775,6 @@ I830DisplaySurface(XF86SurfacePtr surface,
 	UpdateCurrentTime();
 	pI830Priv->videoStatus = FREE_TIMER;
 	pI830Priv->freeTime = currentTime.milliseconds + FREE_DELAY;
-	pScrn->pScreen->BlockHandler = I830BlockHandler;
     }
 
     return Success;
diff --git a/src/i830_video.h b/src/i830_video.h
index 23954e1..e67831d 100644
--- a/src/i830_video.h
+++ b/src/i830_video.h
@@ -90,3 +90,6 @@ void I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 			      short src_w, short src_h,
 			      short drw_w, short drw_h,
 			      PixmapPtr pPixmap);
+
+void I830VideoBlockHandler(int i, pointer blockData, pointer pTimeout,
+			   pointer pReadmask);
commit aa88d23e615e7f154cf850927a0a7bb9fbb0d2f9
Author: Rob <rglowery at exemail.com.au>
Date:   Wed Oct 17 09:19:19 2007 +0800

    AOpen 965GM mini pc has no LVDS

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 6310fce..1ed6503 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -58,7 +58,8 @@ static void quirk_mac_mini (I830Ptr pI830)
 static i830_quirk i830_quirk_list[] = {
     /* Aopen mini pc */
     { PCI_CHIP_I945_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
-    
+    { PCI_CHIP_I965_GM, 0x8086, 0x1999, quirk_ignore_lvds },
+
     /* Apple Mac mini has no lvds, but macbook pro does */
     { PCI_CHIP_I945_GM, 0x8086, 0x7270, quirk_mac_mini },
     
commit 38900f55e2b50ea383f78adb016e3a02c3bd17ad
Author: Kyle McMartin <kyle at freedesktop.org>
Date:   Tue Oct 16 16:38:28 2007 -0400

    toshiba satellite u300 has no tv out

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 9ae250c..6310fce 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -79,6 +79,9 @@ static i830_quirk i830_quirk_list[] = {
     /* Panasonic Toughbook CF-Y7 has no TV output */
     { PCI_CHIP_I965_GM, 0x10f7, 0x8338, quirk_ignore_tv },
     
+    /* Toshiba Satellite U300 has no TV output */
+    { PCI_CHIP_I965_GM, 0x1179, 0xff50, quirk_ignore_tv },
+
     /* Samsung Q35 has no TV output */
     { PCI_CHIP_I945_GM, 0x144d, 0xc504, quirk_ignore_tv },
     { 0, 0, 0, NULL },
commit 74ac5de14ebb77aeb39d698e9e8d188c9d9abd76
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Tue Oct 16 15:08:26 2007 +0200

    Adapt to libdrm buffer object API changes.

diff --git a/src/i830_memory.c b/src/i830_memory.c
index 2ddc454..bdfbba6 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -260,7 +260,7 @@ i830_free_memory(ScrnInfoPtr pScrn, i830_memory *mem)
     if (mem->bo.size != 0) {
 	I830Ptr pI830 = I830PTR(pScrn);
 
-	drmBOUnReference(pI830->drmSubFD, &mem->bo);
+	drmBOUnreference(pI830->drmSubFD, &mem->bo);
 	if (pI830->bo_list == mem)
 	    pI830->bo_list = mem->next;
 	if (mem->next)
@@ -744,8 +744,8 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
     if (flags & ALLOW_SHARING)
 	mask |= DRM_BO_FLAG_SHAREABLE;
 
-    ret = drmBOCreate(pI830->drmSubFD, 0, size, align / GTT_PAGE_SIZE, NULL,
-		      drm_bo_type_dc, mask, 0, &mem->bo);
+    ret = drmBOCreate(pI830->drmSubFD, size, align / GTT_PAGE_SIZE, NULL,
+		      mask, 0, &mem->bo);
     if (ret) {
 	xfree(mem->name);
 	xfree(mem);
@@ -762,7 +762,7 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
     /* Bind it if we currently control the VT */
     if (pScrn->vtSema) {
 	if (!i830_bind_memory(pScrn, mem)) {
-	    drmBOUnReference(pI830->drmSubFD, &mem->bo);
+	    drmBOUnreference(pI830->drmSubFD, &mem->bo);
 	    xfree(mem->name);
 	    xfree(mem);
 	    return NULL;


More information about the xorg-commit mailing list