xf86-video-intel: Branch 'xf86-video-intel-2.3-branch' - 7 commits - configure.ac src/i810_reg.h src/i830_debug.c src/i830_driver.c src/i830.h src/i830_quirks.c src/i830_video.c src/xvmc/Makefile.am

Zhenyu Wang zhen at kemper.freedesktop.org
Tue May 6 20:15:48 PDT 2008


 configure.ac         |   20 ++++++++++++++++++--
 src/i810_reg.h       |    1 +
 src/i830.h           |    1 +
 src/i830_debug.c     |    4 ++++
 src/i830_driver.c    |   11 ++++++++++-
 src/i830_quirks.c    |   26 ++++++++++++++++++++++----
 src/i830_video.c     |    4 ++--
 src/xvmc/Makefile.am |    2 +-
 8 files changed, 59 insertions(+), 10 deletions(-)

New commits:
commit 5749983fc6bae0a845bff0dbdd79c87420dffcf4
Author: Eric Anholt <eric at anholt.net>
Date:   Tue May 6 18:48:20 2008 -0700

    Bug #15807: Fix use of the ring while VT-switched, hit by fast user switching.
    
    The fix for flushing at blockhandler with no DRI on 965 was broken and would
    try to flush the chip even when the driver wasn't in control of the VT.
    Hilarity ensued.
    (cherry picked from commit 36ec93300926084fb2951d69b001e4c67bc6ff79)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index d31ceb9..0112e1d 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2407,7 +2407,7 @@ I830BlockHandler(int i,
      * after the page flipping updates, so there's no need to duplicate
      * the effort here.
      */
-    if (!pI830->noAccel && !pI830->directRenderingEnabled)
+    if (pScrn->vtSema && !pI830->noAccel && !pI830->directRenderingEnabled)
 	I830EmitFlush(pScrn);
 
     I830VideoBlockHandler(i, blockData, pTimeout, pReadmask);
commit ab0aa8e16c6bec2785006cee09dc1ae93a1988da
Author: Jesse Barnes <jbarnes at nietzche.virtuousgeek.org>
Date:   Tue May 6 14:38:48 2008 -0700

    Add FIFO watermark regs to register dumper
    (cherry picked from commit 0c00a638ef57aa9d6a3047176b0bfad733f781f0)

diff --git a/src/i810_reg.h b/src/i810_reg.h
index 834b948..cc4620a 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -497,6 +497,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #define FWATER_BLC       0x20d8
 #define FWATER_BLC2	 0x20dc
+#define FWATER_BLC_SELF	 0x20e0
 #define MM_BURST_LENGTH     0x00700000
 #define MM_FIFO_WATERMARK   0x0001F000
 #define LM_BURST_LENGTH     0x00000700
diff --git a/src/i830_debug.c b/src/i830_debug.c
index 15b02ce..0eba57f 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -546,6 +546,10 @@ static struct i830SnapshotRec {
     DEFINEREG(FBC_FENCE_OFF),
     DEFINEREG(FBC_MOD_NUM),
 
+    DEFINEREG(FWATER_BLC),
+    DEFINEREG(FWATER_BLC2),
+    DEFINEREG(FWATER_BLC_SELF),
+
     DEFINEREG2(FPA0, i830_debug_fp),
     DEFINEREG2(FPA1, i830_debug_fp),
     DEFINEREG2(DPLL_A, i830_debug_dpll),
commit ad02b795f5aa01d1e5b85f3661ae574e898fe41e
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Tue May 6 13:52:22 2008 +0800

    Only check xvmc lib when xvmc is enabled.
    
    Don't check xvmc lib if user has already wanted to disable it.
    Fix fdo bug #15762.
    (cherry picked from commit c81a4687fca80bf7367d7f0e9a00a6a09737c5bb)

diff --git a/configure.ac b/configure.ac
index 23939c9..7401451 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,7 +82,7 @@ XORG_DRIVER_CHECK_EXT(XF86DRI, xextproto x11)
 XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server xproto xvmc fontsproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
 # Checks for libraries.
@@ -225,17 +225,21 @@ if test "$VIDEO_DEBUG" = yes; then
 	AC_DEFINE(VIDEO_DEBUG,1,[Enable debug support])
 fi
 
-AC_MSG_CHECKING([whether to include XvMC support])
 if test "$XVMC" = auto; then
 	XVMC="$DRI"
 fi
 if test "$XVMC" = yes && test "$DRI" = no; then
 	AC_MSG_ERROR([XvMC can't be enabled without DRI])
 fi
+if test "$XVMC" = yes; then
+	PKG_CHECK_MODULES(XVMCLIB, [xvmc], [XVMC=yes], [XVMC=no])
+fi
+AC_MSG_CHECKING([whether to include XvMC support])
 AC_MSG_RESULT([$XVMC])
 AM_CONDITIONAL(XVMC, test x$XVMC = xyes)
 if test "$XVMC" = yes; then
 	AC_DEFINE(ENABLE_XVMC,1,[Enable XvMC support])
+    	AC_SUBST([XVMCLIB_CFLAGS])
 fi
 
 
diff --git a/src/xvmc/Makefile.am b/src/xvmc/Makefile.am
index 7ae429a..f571743 100644
--- a/src/xvmc/Makefile.am
+++ b/src/xvmc/Makefile.am
@@ -22,7 +22,7 @@ libIntelXvMC_la_SOURCES = intel_xvmc.c \
                          xf86dristr.h \
                          driDrawable.c \
                          driDrawable.h
-libIntelXvMC_la_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(top_srcdir)/src -DTRUE=1 -DFALSE=0
+libIntelXvMC_la_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @XVMCLIB_CFLAGS@ -I$(top_srcdir)/src -DTRUE=1 -DFALSE=0
 libIntelXvMC_la_LDFLAGS = -version-number 1:0:0
 libIntelXvMC_la_LIBADD = @DRI_LIBS@
 endif
commit 8103c3c404500fa21079bd04530fd8ee836474f4
Author: Bryce Harrington <bryce at bryceharrington.org>
Date:   Tue May 6 13:51:46 2008 +0800

    More quirks from ubuntu/dell
    (cherry picked from commit be746a90a87d7a9807fa4243493e7e4d48f7f1c0)

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index aaff753..72e735b 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -235,6 +235,8 @@ static i830_quirk i830_quirk_list[] = {
     { PCI_CHIP_I965_GM, 0x1028, 0x0254, quirk_ignore_tv },
     /* Dell Inspiron 1735 */
     { PCI_CHIP_I965_GM, 0x1028, 0x0256, quirk_ignore_tv },
+    /* Dell Inspiron 1318 */
+    { PCI_CHIP_I965_GM, 0x1028, 0x0286, quirk_ignore_tv },
 
     /* Lenovo Napa TV (use dmi)*/
     { PCI_CHIP_I945_GM, 0x17aa, SUBSYS_ANY, quirk_lenovo_tv_dmi },
@@ -264,9 +266,6 @@ static i830_quirk i830_quirk_list[] = {
     /* HP Compaq 6730s has no TV output */
     { PCI_CHIP_IGD_GM, 0x103c, 0x30e8, quirk_ignore_tv },
 
-    /* Dell Inspiron 510m needs pipe A force quirk */
-    { PCI_CHIP_I855_GM, 0x1028, 0x0164, quirk_pipea_force },
-
     /* Thinkpad R31 needs pipe A force quirk */
     { PCI_CHIP_I830_M, 0x1014, 0x0505, quirk_pipea_force },
     /* Dell Latitude D500 needs pipe A force quirk */
@@ -277,19 +276,26 @@ static i830_quirk i830_quirk_list[] = {
     { PCI_CHIP_I855_GM, 0x1028, 0x0164, quirk_pipea_force },
     /* Toshiba Protege R-205, S-209 needs pipe A force quirk */
     { PCI_CHIP_I915_GM, 0x1179, 0x0001, quirk_pipea_force },
+    /* Intel 855GM hardware (See LP: #216490) */
+    { PCI_CHIP_I855_GM, 0x1028, 0x00c8, quirk_pipea_force },
 
     /* ThinkPad X40 needs pipe A force quirk */
     { PCI_CHIP_I855_GM, 0x1014, 0x0557, quirk_pipea_force },
 
     /* Sony vaio PCG-r600HFP (fix bug 13722) */
     { PCI_CHIP_I830_M, 0x104d, 0x8100, quirk_ivch_dvob },
+    /* Sony vaio VGN-SZ4MN (See LP: #212163) */
+    { PCI_CHIP_I830_M, 0x104d, 0x81e6, quirk_pipea_force },
 
-    /* Intel 945GM hardware (See LP: #152416) */
+    /* Ordi Enduro UW31 (See LP: #152416) */
     { PCI_CHIP_I945_GM, 0x1584, 0x9900, quirk_ignore_tv },
 
     /* Dell Latitude D500 needs reset modes quirk */
     { PCI_CHIP_I855_GM, 0x1028, 0x0152, quirk_reset_modes },
 
+    /* Littlebit Sepia X35 (rebranded Asus Z37E) (See LP: #201257) */
+    { PCI_CHIP_I965_GM, 0x1043, 0x8265, quirk_ignore_tv },
+
     { 0, 0, 0, NULL },
 };
 
commit 9c5785c2f4faaac4a0d7dab774123389ed595fc0
Author: Jesse Barnes <jbarnes at hobbes.lan>
Date:   Tue Apr 29 13:19:02 2008 -0700

    Add a new quirk for BIOSes that reprogram regs at lid close/open time
    
    Dell Latitude D500s seem to have this problem.  At lid close/open, the DSPABASE
    reg gets reset to 0, so we either need to keep the framebuffer at offset 0 or
    make sure we reprogram the CRTCs after the lid opens again.  Since we can't
    make sure the former is always true (buffer resize, etc.), this patch adds a
    quirk to reset the modes at lid open time.
    
    Fixes FDO bug #14890.
    (cherry picked from commit a0ced923bb793aa22e6bfbeeec0888d3b42ce176)

diff --git a/src/i830.h b/src/i830.h
index e2c39cc..8508f82 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -896,6 +896,7 @@ extern const int I830CopyROP[16];
 #define QUIRK_IGNORE_MACMINI_LVDS 	0x00000004
 #define QUIRK_PIPEA_FORCE		0x00000008
 #define QUIRK_IVCH_NEED_DVOB		0x00000010
+#define QUIRK_RESET_MODES		0x00000020
 extern void i830_fixup_devices(ScrnInfoPtr);
 
 #endif /* _I830_H_ */
diff --git a/src/i830_driver.c b/src/i830_driver.c
index cc3d02d..d31ceb9 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3518,6 +3518,9 @@ I830PMEvent(int scrnIndex, pmEvent event, Bool undo)
 
       I830CheckDevicesTimer(NULL, 0, pScrn);
       SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset);
+      if (pI830->quirk_flag & QUIRK_RESET_MODES)
+	 xf86SetDesiredModes(pScrn);
+
       break;
    default:
       ErrorF("I830PMEvent: received APM event %d\n", event);
diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 24c9658..aaff753 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -161,6 +161,15 @@ static void i830_dmi_dump(void)
     DMIID_DUMP(chassis_asset_tag);
 }
 
+/*
+ * Some machines hose the display regs regardless of the ACPI DOS
+ * setting, so we need to reset modes at ACPI event time.
+ */
+static void quirk_reset_modes (I830Ptr pI830)
+{
+    pI830->quirk_flag |= QUIRK_RESET_MODES;
+}
+
 static void quirk_pipea_force (I830Ptr pI830)
 {
     pI830->quirk_flag |= QUIRK_PIPEA_FORCE;
@@ -278,6 +287,9 @@ static i830_quirk i830_quirk_list[] = {
     /* Intel 945GM hardware (See LP: #152416) */
     { PCI_CHIP_I945_GM, 0x1584, 0x9900, quirk_ignore_tv },
 
+    /* Dell Latitude D500 needs reset modes quirk */
+    { PCI_CHIP_I855_GM, 0x1028, 0x0152, quirk_reset_modes },
+
     { 0, 0, 0, NULL },
 };
 
commit f83960f3edb8a8be12ce9dc46a9b9a292de816d6
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Apr 29 10:32:14 2008 -0700

    Use new xf86RotateFreeShadow function to clean up shadow buffers.
    
    This simply moves code from the driver up into the X server; use it where
    available.
    (cherry picked from commit fff17b9d1b58cb53032d153094826dd306836d59)

diff --git a/configure.ac b/configure.ac
index da479dc..23939c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,6 +173,18 @@ fi
 
 AC_SUBST([XMODES_CFLAGS])
 
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+
+AC_CHECK_DECL(xf86RotateFreeShadow,
+	      [AC_DEFINE(HAVE_FREE_SHADOW, 1, [have new FreeShadow API])],
+	      [],
+	      [#include <xorg-server.h>
+	       #include <windowstr.h>
+	       #include <xf86Crtc.h>])
+	     
+CPPFLAGS="$SAVE_CPPFLAGS"
+
 dnl Use lots of warning flags with GCC
 
 WARN_CFLAGS=""
diff --git a/src/i830_driver.c b/src/i830_driver.c
index f404677..cc3d02d 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3132,7 +3132,9 @@ I830LeaveVT(int scrnIndex, int flags)
    ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
    I830Ptr pI830 = I830PTR(pScrn);
    xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+#ifndef HAVE_FREE_SHADOW
    int o;
+#endif
 
    DPRINTF(PFX, "Leave VT\n");
 
@@ -3160,6 +3162,7 @@ I830LeaveVT(int scrnIndex, int flags)
    }
 #endif
 
+#ifndef HAVE_FREE_SHADOW
    for (o = 0; o < config->num_crtc; o++) {
        xf86CrtcPtr crtc = config->crtc[o];
 
@@ -3170,6 +3173,9 @@ I830LeaveVT(int scrnIndex, int flags)
 	   crtc->rotatedData = NULL;
        }
    }
+#else
+   xf86RotateFreeShadow(pScrn);
+#endif
 
    xf86_hide_cursors (pScrn);
 
commit 1df4fd9f1e7f1c6abea4ea134fbc1b3755988817
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Apr 23 11:08:38 2008 -0700

    Overlay video doesn't require that the target pixmap be in video memory.
    
    I830PutImage was checking to make sure the target pixmap resided in video
    memory, but this isn't necessary when using the overlay. Test
    (cherry picked from commit 1d467a8038946a37844795e8860be113d43219ac)

diff --git a/src/i830_video.c b/src/i830_video.c
index 64024d2..67fe291 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2494,13 +2494,13 @@ I830PutImage(ScrnInfoPtr pScrn,
     }
 
 #ifdef I830_USE_EXA
-    if (pI830->useEXA) {
+    if (pPriv->textured && pI830->useEXA) {
 	/* Force the pixmap into framebuffer so we can draw to it. */
 	exaMoveInPixmap(pPixmap);
     }
 #endif
 
-    if (!pI830->useEXA &&
+    if (pPriv->textured && !pI830->useEXA &&
 	    (((char *)pPixmap->devPrivate.ptr < (char *)pI830->FbBase) ||
 	     ((char *)pPixmap->devPrivate.ptr >= (char *)pI830->FbBase +
 	      pI830->FbMapSize))) {


More information about the xorg-commit mailing list