[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force X.Org X11 SVN commit: r2766 - in vendor/X11R7.1/driver/xserver-xorg-video-i810: . src



Author: dnusinow
Date: 2006-08-10 22:51:35 -0400 (Thu, 10 Aug 2006)
New Revision: 2766

Added:
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_video.h
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i915_video.c
Modified:
   vendor/X11R7.1/driver/xserver-xorg-video-i810/README
   vendor/X11R7.1/driver/xserver-xorg-video-i810/README.sgml
   vendor/X11R7.1/driver/xserver-xorg-video-i810/config.h.in
   vendor/X11R7.1/driver/xserver-xorg-video-i810/configure
   vendor/X11R7.1/driver/xserver-xorg-video-i810/configure.ac
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/Makefile.am
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/Makefile.in
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810.h
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_dri.h
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_driver.c
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_reg.h
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830.h
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_cursor.c
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_dri.c
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_dri.h
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_driver.c
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_rotate.c
   vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_video.c
Log:
Vendor drop of i810 1.6.5

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/README
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/README	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/README	2006-08-11 02:51:35 UTC (rev 2766)
@@ -1,6 +1,6 @@
   Information for Intel graphics driver users
   Eric Anholt
-  206-08-04
+  2006-08-04
   ____________________________________________________________
 
   Table of Contents
@@ -117,7 +117,7 @@
      fixed in the current release, but is being actively worked on in
      the modesetting branch.
 
-  +o  Bug #5774: Some systems have issues with VT switching.  This should
+  +o  Bug #5795: Some systems have issues with VT switching.  This should
      be fixed with the modesetting brach integration.
 
   +o  Bug #5817: Hotkey switching from LVDS to CRT breaks CRT output.

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/README.sgml
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/README.sgml	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/README.sgml	2006-08-11 02:51:35 UTC (rev 2766)
@@ -5,7 +5,7 @@
 <article>
 <title>Information for Intel graphics driver users
 <author>Eric Anholt
-<date>206-08-04
+<date>2006-08-04
 <toc>
 
 <sect>Introduction
@@ -84,7 +84,7 @@
   <item>Many systems with Intel graphics have issues with setting video modes
 at larger than some small maximum resolution.  This is not fixed in the current
 release, but is being actively worked on in the modesetting branch.
-  <item>Bug #5774: Some systems have issues with VT switching.  This should
+  <item>Bug #5795: Some systems have issues with VT switching.  This should
 be fixed with the modesetting brach integration.
   <item>Bug #5817: Hotkey switching from LVDS to CRT breaks CRT output.  This
 is a known issue, but will not be fixed in the current release.

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/config.h.in
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/config.h.in	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/config.h.in	2006-08-11 02:51:35 UTC (rev 2766)
@@ -32,6 +32,15 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Major version */
+#undef INTEL_VERSION_MAJOR
+
+/* Minor version */
+#undef INTEL_VERSION_MINOR
+
+/* Patch version */
+#undef INTEL_VERSION_PATCH
+
 /* Name of package */
 #undef PACKAGE
 

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/configure
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/configure	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/configure	2006-08-11 02:51:35 UTC (rev 2766)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for xf86-video-i810 1.6.4.
+# Generated by GNU Autoconf 2.59 for xf86-video-i810 1.6.5.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
@@ -423,8 +423,8 @@
 # Identity of this package.
 PACKAGE_NAME='xf86-video-i810'
 PACKAGE_TARNAME='xf86-video-i810'
-PACKAGE_VERSION='1.6.4'
-PACKAGE_STRING='xf86-video-i810 1.6.4'
+PACKAGE_VERSION='1.6.5'
+PACKAGE_STRING='xf86-video-i810 1.6.5'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
 
 ac_unique_file="Makefile.am"
@@ -974,7 +974,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures xf86-video-i810 1.6.4 to adapt to many kinds of systems.
+\`configure' configures xf86-video-i810 1.6.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1040,7 +1040,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xf86-video-i810 1.6.4:";;
+     short | recursive ) echo "Configuration of xf86-video-i810 1.6.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1192,7 +1192,7 @@
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-xf86-video-i810 configure 1.6.4
+xf86-video-i810 configure 1.6.5
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1206,7 +1206,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by xf86-video-i810 $as_me 1.6.4, which was
+It was created by xf86-video-i810 $as_me 1.6.5, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1544,6 +1544,22 @@
 
 
 
+cat >>confdefs.h <<_ACEOF
+#define INTEL_VERSION_MAJOR $(echo $PACKAGE_VERSION | sed -e 's/^\([0-9]\)\.[0-9]\.[0-9]/\1/')
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define INTEL_VERSION_MINOR $(echo $PACKAGE_VERSION | sed -e 's/^[0-9]\.\([0-9]\)\.[0-9]/\1/')
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define INTEL_VERSION_PATCH $(echo $PACKAGE_VERSION | sed -e 's/^[0-9]\.[0-9]\.\([0-9]\)/\1/')
+_ACEOF
+
+
+
           ac_config_headers="$ac_config_headers config.h"
 
 ac_aux_dir=
@@ -1854,7 +1870,7 @@
 
 # Define the identity of the package.
  PACKAGE='xf86-video-i810'
- VERSION='1.6.4'
+ VERSION='1.6.5'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3736,7 +3752,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 3739 "configure"' > conftest.$ac_ext
+  echo '#line 3755 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -5335,7 +5351,7 @@
 
 
 # Provide some information about the compiler.
-echo "$as_me:5338:" \
+echo "$as_me:5354:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6398,11 +6414,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6401: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6417: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:6405: \$? = $ac_status" >&5
+   echo "$as_me:6421: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -6666,11 +6682,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6669: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6685: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:6673: \$? = $ac_status" >&5
+   echo "$as_me:6689: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -6770,11 +6786,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6773: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6789: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:6777: \$? = $ac_status" >&5
+   echo "$as_me:6793: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9115,7 +9131,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9118 "configure"
+#line 9134 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9215,7 +9231,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9218 "configure"
+#line 9234 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11555,11 +11571,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11558: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11574: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11562: \$? = $ac_status" >&5
+   echo "$as_me:11578: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -11659,11 +11675,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11662: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11678: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:11666: \$? = $ac_status" >&5
+   echo "$as_me:11682: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13229,11 +13245,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13232: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13248: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13236: \$? = $ac_status" >&5
+   echo "$as_me:13252: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13333,11 +13349,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13336: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13352: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13340: \$? = $ac_status" >&5
+   echo "$as_me:13356: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -15536,11 +15552,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15539: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15555: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15543: \$? = $ac_status" >&5
+   echo "$as_me:15559: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -15804,11 +15820,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15807: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15823: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15811: \$? = $ac_status" >&5
+   echo "$as_me:15827: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -15908,11 +15924,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15911: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15927: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15915: \$? = $ac_status" >&5
+   echo "$as_me:15931: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -21075,7 +21091,7 @@
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by xf86-video-i810 $as_me 1.6.4, which was
+This file was extended by xf86-video-i810 $as_me 1.6.5, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21138,7 +21154,7 @@
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-xf86-video-i810 config.status 1.6.4
+xf86-video-i810 config.status 1.6.5
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/configure.ac
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/configure.ac	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/configure.ac	2006-08-11 02:51:35 UTC (rev 2766)
@@ -22,10 +22,20 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-i810],
-        1.6.4,
+        1.6.5,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-i810)
 
+AC_DEFINE_UNQUOTED([INTEL_VERSION_MAJOR],
+		   [$(echo $PACKAGE_VERSION | sed -e 's/^\([[0-9]]\)\.[[0-9]]\.[[0-9]]/\1/')],
+		   [Major version])
+AC_DEFINE_UNQUOTED([INTEL_VERSION_MINOR],
+		   [$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]\.\([[0-9]]\)\.[[0-9]]/\1/')],
+		   [Minor version])
+AC_DEFINE_UNQUOTED([INTEL_VERSION_PATCH],
+		   [$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]\.[[0-9]]\.\([[0-9]]\)/\1/')],
+		   [Patch version])
+
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_CONFIG_HEADER([config.h])
 AC_CONFIG_AUX_DIR(.)

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/Makefile.am
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/Makefile.am	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/Makefile.am	2006-08-11 02:51:35 UTC (rev 2766)
@@ -56,13 +56,15 @@
          i830_memory.c \
          i830_modes.c \
          i830_video.c \
+         i830_video.h \
          i830_rotate.c \
 	 i830_randr.c \
 	 i830_3d.c \
 	 i830_reg.h \
 	 i915_3d.c \
 	 i915_3d.h \
-	 i915_reg.h
+	 i915_reg.h \
+	 i915_video.c
 
 if DRI
 i810_drv_la_SOURCES += \

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/Makefile.in
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/Makefile.in	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/Makefile.in	2006-08-11 02:51:35 UTC (rev 2766)
@@ -87,17 +87,17 @@
 	i810_driver.c i810.h i810_io.c i810_memory.c i810_reg.h \
 	i810_video.c i810_wmark.c i830_accel.c i830_common.h \
 	i830_cursor.c i830_dga.c i830_driver.c i830.h i830_io.c \
-	i830_memory.c i830_modes.c i830_video.c i830_rotate.c \
-	i830_randr.c i830_3d.c i830_reg.h i915_3d.c i915_3d.h \
-	i915_reg.h i810_dri.c i810_dri.h i830_dri.c i810_hwmc.c \
-	i830_dri.h
+	i830_memory.c i830_modes.c i830_video.c i830_video.h \
+	i830_rotate.c i830_randr.c i830_3d.c i830_reg.h i915_3d.c \
+	i915_3d.h i915_reg.h i915_video.c i810_dri.c i810_dri.h \
+	i830_dri.c i810_hwmc.c i830_dri.h
 @DRI_TRUE@am__objects_1 = i810_dri.lo i830_dri.lo i810_hwmc.lo
 am_i810_drv_la_OBJECTS = i810_accel.lo i810_cursor.lo i810_dga.lo \
 	i810_driver.lo i810_io.lo i810_memory.lo i810_video.lo \
 	i810_wmark.lo i830_accel.lo i830_cursor.lo i830_dga.lo \
 	i830_driver.lo i830_io.lo i830_memory.lo i830_modes.lo \
 	i830_video.lo i830_rotate.lo i830_randr.lo i830_3d.lo \
-	i915_3d.lo $(am__objects_1)
+	i915_3d.lo i915_video.lo $(am__objects_1)
 i810_drv_la_OBJECTS = $(am_i810_drv_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -268,9 +268,9 @@
 	i810_driver.c i810.h i810_io.c i810_memory.c i810_reg.h \
 	i810_video.c i810_wmark.c i830_accel.c i830_common.h \
 	i830_cursor.c i830_dga.c i830_driver.c i830.h i830_io.c \
-	i830_memory.c i830_modes.c i830_video.c i830_rotate.c \
-	i830_randr.c i830_3d.c i830_reg.h i915_3d.c i915_3d.h \
-	i915_reg.h $(am__append_1)
+	i830_memory.c i830_modes.c i830_video.c i830_video.h \
+	i830_rotate.c i830_randr.c i830_3d.c i830_reg.h i915_3d.c \
+	i915_3d.h i915_reg.h i915_video.c $(am__append_1)
 all: all-recursive
 
 .SUFFIXES:
@@ -363,6 +363,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i830_rotate.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i830_video.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i915_3d.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i915_video.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810.h
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810.h	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810.h	2006-08-11 02:51:35 UTC (rev 2766)
@@ -64,11 +64,7 @@
 #define I810_VERSION 4000
 #define I810_NAME "I810"
 #define I810_DRIVER_NAME "i810"
-#define I810_MAJOR_VERSION 1
-#define I810_MINOR_VERSION 6
-#define I810_PATCHLEVEL 3
 
-
 /* HWMC Surfaces */
 #define I810_MAX_SURFACES 7
 #define I810_MAX_SUBPICTURES 2

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_dri.h
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_dri.h	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_dri.h	2006-08-11 02:51:35 UTC (rev 2766)
@@ -8,6 +8,10 @@
 
 #define I810_MAX_DRAWABLES 256
 
+#define I810_MAJOR_VERSION 1
+#define I810_MINOR_VERSION 6
+#define I810_PATCHLEVEL 3
+
 typedef struct {
    drm_handle_t regs;
    drmSize regsSize;

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_driver.c
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_driver.c	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_driver.c	2006-08-11 02:51:35 UTC (rev 2766)
@@ -379,7 +379,7 @@
    MODINFOSTRING1,
    MODINFOSTRING2,
    XORG_VERSION_CURRENT,
-   I810_MAJOR_VERSION, I810_MINOR_VERSION, I810_PATCHLEVEL,
+   INTEL_VERSION_MAJOR, INTEL_VERSION_MINOR, INTEL_VERSION_PATCH,
    ABI_CLASS_VIDEODRV,
    ABI_VIDEODRV_VERSION,
    MOD_CLASS_VIDEODRV,

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_reg.h
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_reg.h	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i810_reg.h	2006-08-11 02:51:35 UTC (rev 2766)
@@ -908,9 +908,6 @@
 #define I852_GME				0x2
 #define I852_GM					0x5
 
-#define CMD_MI				(0 << 29)
-#define CMD_2D				(2 << 29)
-#define CMD_3D				(3 << 29)
 /* BLT commands */
 #define COLOR_BLT_CMD		((2<<29)|(0x40<<22)|(0x3))
 #define COLOR_BLT_WRITE_ALPHA	(1<<21)
@@ -940,621 +937,9 @@
 #define XY_MONO_SRC_BLT_WRITE_ALPHA	(1<<21)
 #define XY_MONO_SRC_BLT_WRITE_RGB	(1<<20)
 
-/* 3d state */
-#define STATE3D_ANTI_ALIASING		(CMD_3D | (0x06<<24))
-#define LINE_CAP_WIDTH_MODIFY		(1 << 16)
-#define LINE_CAP_WIDTH_1_0		(0x1 << 14)
-#define LINE_WIDTH_MODIFY		(1 << 8)
-#define LINE_WIDTH_1_0			(0x1 << 6)
-
-#define STATE3D_RASTERIZATION_RULES	(CMD_3D | (0x07<<24))
-#define ENABLE_POINT_RASTER_RULE	(1<<15)
-#define OGL_POINT_RASTER_RULE		(1<<13)
-#define ENABLE_TEXKILL_3D_4D            (1<<10)
-#define TEXKILL_3D                      (0<<9)
-#define TEXKILL_4D                      (1<<9)
-#define ENABLE_LINE_STRIP_PROVOKE_VRTX	(1<<8)
-#define ENABLE_TRI_FAN_PROVOKE_VRTX	(1<<5)
-#define LINE_STRIP_PROVOKE_VRTX(x)	((x)<<6)
-#define TRI_FAN_PROVOKE_VRTX(x) 	((x)<<3)
-
-#define STATE3D_INDEPENDENT_ALPHA_BLEND	(CMD_3D | (0x0b<<24))
-#define IAB_MODIFY_ENABLE	        (1<<23)
-#define IAB_ENABLE       	        (1<<22)
-#define IAB_MODIFY_FUNC         	(1<<21)
-#define IAB_FUNC_SHIFT          	16
-#define IAB_MODIFY_SRC_FACTOR   	(1<<11)
-#define IAB_SRC_FACTOR_SHIFT		6
-#define IAB_SRC_FACTOR_MASK		(BLENDFACT_MASK<<6)
-#define IAB_MODIFY_DST_FACTOR	        (1<<5)
-#define IAB_DST_FACTOR_SHIFT		0
-#define IAB_DST_FACTOR_MASK		(BLENDFACT_MASK<<0)
-
-#define BLENDFUNC_ADD			0x0
-#define BLENDFUNC_SUBTRACT		0x1
-#define BLENDFUNC_REVERSE_SUBTRACT	0x2
-#define BLENDFUNC_MIN			0x3
-#define BLENDFUNC_MAX			0x4
-#define BLENDFUNC_MASK			0x7
-
-#define BLENDFACT_ZERO			0x01
-#define BLENDFACT_ONE			0x02
-#define BLENDFACT_SRC_COLR		0x03
-#define BLENDFACT_INV_SRC_COLR 		0x04
-#define BLENDFACT_SRC_ALPHA		0x05
-#define BLENDFACT_INV_SRC_ALPHA 	0x06
-#define BLENDFACT_DST_ALPHA		0x07
-#define BLENDFACT_INV_DST_ALPHA 	0x08
-#define BLENDFACT_DST_COLR		0x09
-#define BLENDFACT_INV_DST_COLR		0x0a
-#define BLENDFACT_SRC_ALPHA_SATURATE	0x0b
-#define BLENDFACT_CONST_COLOR		0x0c
-#define BLENDFACT_INV_CONST_COLOR	0x0d
-#define BLENDFACT_CONST_ALPHA		0x0e
-#define BLENDFACT_INV_CONST_ALPHA	0x0f
-#define BLENDFACT_MASK          	0x0f
-
-#define STATE3D_MODES_4			(CMD_3D | (0x0d<<24))
-#define ENABLE_LOGIC_OP_FUNC		(1<<23)
-#define LOGIC_OP_FUNC(x)		((x)<<18)
-#define LOGICOP_MASK			(0xf<<18)
-#define MODE4_ENABLE_STENCIL_TEST_MASK	((1<<17)|(0xff00))
-#define ENABLE_STENCIL_TEST_MASK	(1<<17)
-#define STENCIL_TEST_MASK(x)		((x)<<8)
-#define MODE4_ENABLE_STENCIL_WRITE_MASK	((1<<16)|(0x00ff))
-#define ENABLE_STENCIL_WRITE_MASK	(1<<16)
-#define STENCIL_WRITE_MASK(x)		((x)&0xff)
-
-#define LOGICOP_CLEAR			0
-#define LOGICOP_NOR			0x1
-#define LOGICOP_AND_INV 		0x2
-#define LOGICOP_COPY_INV		0x3
-#define LOGICOP_AND_RVRSE		0x4
-#define LOGICOP_INV			0x5
-#define LOGICOP_XOR			0x6
-#define LOGICOP_NAND			0x7
-#define LOGICOP_AND			0x8
-#define LOGICOP_EQUIV			0x9
-#define LOGICOP_NOOP			0xa
-#define LOGICOP_OR_INV			0xb
-#define LOGICOP_COPY			0xc
-#define LOGICOP_OR_RVRSE		0xd
-#define LOGICOP_OR			0xe
-#define LOGICOP_SET			0xf
-
-#define STATE3D_COORD_SET_BINDINGS	(CMD_3D | (0x16<<24))
-#define CSB_TCB(iunit,eunit)		((eunit) << ((iunit) * 3))
-
-#define STATE3D_SCISSOR_ENABLE		(CMD_3D | (0x1c<<24)|(0x10<<19))
-#define ENABLE_SCISSOR_RECT		((1<<1) | 1)
-#define DISABLE_SCISSOR_RECT		((1<<1) | 0)
-
-#define STATE3D_MAP_STATE		(CMD_3D | (0x1d<<24)|(0x00<<16))
-
-#define MS1_MAPMASK_SHIFT               0
-#define MS1_MAPMASK_MASK                (0x8fff<<0)
-
-#define MS2_UNTRUSTED_SURFACE           (1<<31)
-#define MS2_ADDRESS_MASK                0xfffffffc
-#define MS2_VERTICAL_LINE_STRIDE        (1<<1)
-#define MS2_VERTICAL_OFFSET             (1<<1)
-
-#define MS3_HEIGHT_SHIFT              21
-#define MS3_WIDTH_SHIFT               10
-#define MS3_PALETTE_SELECT            (1<<9)
-#define MS3_MAPSURF_FORMAT_SHIFT      7
-#define MS3_MAPSURF_FORMAT_MASK       (0x7<<7)
-#define    MAPSURF_8BIT		 	   (1<<7)
-#define    MAPSURF_16BIT		   (2<<7)
-#define    MAPSURF_32BIT		   (3<<7)
-#define    MAPSURF_422			   (5<<7)
-#define    MAPSURF_COMPRESSED		   (6<<7)
-#define    MAPSURF_4BIT_INDEXED		   (7<<7)
-#define MS3_MT_FORMAT_MASK         (0x7 << 3)
-#define MS3_MT_FORMAT_SHIFT        3
-#define    MT_4BIT_IDX_ARGB8888	           (7<<3) /* SURFACE_4BIT_INDEXED */
-#define    MT_8BIT_I8		           (0<<3) /* SURFACE_8BIT */
-#define    MT_8BIT_L8		           (1<<3)
-#define    MT_8BIT_A8		           (4<<3)
-#define    MT_8BIT_MONO8	           (5<<3)
-#define    MT_16BIT_RGB565 		   (0<<3) /* SURFACE_16BIT */
-#define    MT_16BIT_ARGB1555		   (1<<3)
-#define    MT_16BIT_ARGB4444		   (2<<3)
-#define    MT_16BIT_AY88		   (3<<3)
-#define    MT_16BIT_88DVDU	           (5<<3)
-#define    MT_16BIT_BUMP_655LDVDU	   (6<<3)
-#define    MT_16BIT_I16	                   (7<<3)
-#define    MT_16BIT_L16	                   (8<<3)
-#define    MT_16BIT_A16	                   (9<<3)
-#define    MT_32BIT_ARGB8888		   (0<<3) /* SURFACE_32BIT */
-#define    MT_32BIT_ABGR8888		   (1<<3)
-#define    MT_32BIT_XRGB8888		   (2<<3)
-#define    MT_32BIT_XBGR8888		   (3<<3)
-#define    MT_32BIT_QWVU8888		   (4<<3)
-#define    MT_32BIT_AXVU8888		   (5<<3)
-#define    MT_32BIT_LXVU8888	           (6<<3)
-#define    MT_32BIT_XLVU8888	           (7<<3)
-#define    MT_32BIT_ARGB2101010	           (8<<3)
-#define    MT_32BIT_ABGR2101010	           (9<<3)
-#define    MT_32BIT_AWVU2101010	           (0xA<<3)
-#define    MT_32BIT_GR1616	           (0xB<<3)
-#define    MT_32BIT_VU1616	           (0xC<<3)
-#define    MT_32BIT_xI824	           (0xD<<3)
-#define    MT_32BIT_xA824	           (0xE<<3)
-#define    MT_32BIT_xL824	           (0xF<<3)
-#define    MT_422_YCRCB_SWAPY	           (0<<3) /* SURFACE_422 */
-#define    MT_422_YCRCB_NORMAL	           (1<<3)
-#define    MT_422_YCRCB_SWAPUV	           (2<<3)
-#define    MT_422_YCRCB_SWAPUVY	           (3<<3)
-#define    MT_COMPRESS_DXT1		   (0<<3) /* SURFACE_COMPRESSED */
-#define    MT_COMPRESS_DXT2_3	           (1<<3)
-#define    MT_COMPRESS_DXT4_5	           (2<<3)
-#define    MT_COMPRESS_FXT1		   (3<<3)
-#define    MT_COMPRESS_DXT1_RGB		   (4<<3)
-#define MS3_USE_FENCE_REGS              (1<<2)
-#define MS3_TILED_SURFACE             (1<<1)
-#define MS3_TILE_WALK                 (1<<0)
-
-#define MS4_PITCH_SHIFT                 21
-#define MS4_CUBE_FACE_ENA_NEGX          (1<<20)
-#define MS4_CUBE_FACE_ENA_POSX          (1<<19)
-#define MS4_CUBE_FACE_ENA_NEGY          (1<<18)
-#define MS4_CUBE_FACE_ENA_POSY          (1<<17)
-#define MS4_CUBE_FACE_ENA_NEGZ          (1<<16)
-#define MS4_CUBE_FACE_ENA_POSZ          (1<<15)
-#define MS4_CUBE_FACE_ENA_MASK          (0x3f<<15)
-#define MS4_MAX_LOD_SHIFT		9
-#define MS4_MAX_LOD_MASK		(0x3f<<9)
-#define MS4_MIP_LAYOUT_LEGACY           (0<<8)
-#define MS4_MIP_LAYOUT_BELOW_LPT        (0<<8)
-#define MS4_MIP_LAYOUT_RIGHT_LPT        (1<<8)
-#define MS4_VOLUME_DEPTH_SHIFT          0    
-#define MS4_VOLUME_DEPTH_MASK           (0xff<<0)
-
-#define STATE3D_SAMPLER_STATE		(CMD_3D | (0x1d<<24)|(0x01<<16))
-
-#define SS1_MAPMASK_SHIFT               0
-#define SS1_MAPMASK_MASK                (0x8fff<<0)
-
-#define SS2_REVERSE_GAMMA_ENABLE        (1<<31)
-#define SS2_PLANAR_TO_PACKED_ENABLE     (1<<30)
-#define SS2_COLORSPACE_CONVERSION       (1<<29)
-#define SS2_CHROMAKEY_SHIFT             27
-#define SS2_BASE_MIP_LEVEL_SHIFT        22
-#define SS2_BASE_MIP_LEVEL_MASK         (0x1f<<22)
-#define SS2_MIP_FILTER_SHIFT            20
-#define SS2_MIP_FILTER_MASK             (0x3<<20)
-#define   MIPFILTER_NONE       	0
-#define   MIPFILTER_NEAREST	1
-#define   MIPFILTER_LINEAR	3
-#define SS2_MAG_FILTER_SHIFT          17
-#define SS2_MAG_FILTER_MASK           (0x7<<17)
-#define   FILTER_NEAREST	0
-#define   FILTER_LINEAR		1
-#define   FILTER_ANISOTROPIC	2
-#define   FILTER_4X4_1    	3
-#define   FILTER_4X4_2    	4
-#define   FILTER_4X4_FLAT 	5
-#define   FILTER_6X5_MONO   	6 /* XXX - check */
-#define SS2_MIN_FILTER_SHIFT          14
-#define SS2_MIN_FILTER_MASK           (0x7<<14)
-#define SS2_LOD_BIAS_SHIFT            5
-#define SS2_LOD_BIAS_ONE              (0x10<<5)
-#define SS2_LOD_BIAS_MASK             (0x1ff<<5)
-/* Shadow requires:
- *  MT_X8{I,L,A}24 or MT_{I,L,A}16 texture format
- *  FILTER_4X4_x  MIN and MAG filters
- */
-#define SS2_SHADOW_ENABLE             (1<<4)
-#define SS2_MAX_ANISO_MASK            (1<<3)
-#define SS2_MAX_ANISO_2               (0<<3)
-#define SS2_MAX_ANISO_4               (1<<3)
-#define SS2_SHADOW_FUNC_SHIFT         0
-#define SS2_SHADOW_FUNC_MASK          (0x7<<0)
-/* SS2_SHADOW_FUNC values: see COMPAREFUNC_* */
-
-#define SS3_MIN_LOD_SHIFT            24
-#define SS3_MIN_LOD_ONE              (0x10<<24)
-#define SS3_MIN_LOD_MASK             (0xff<<24)
-#define SS3_KILL_PIXEL_ENABLE        (1<<17)
-#define SS3_TCX_ADDR_MODE_SHIFT      12
-#define SS3_TCX_ADDR_MODE_MASK       (0x7<<12)
-#define   TEXCOORDMODE_WRAP		0
-#define   TEXCOORDMODE_MIRROR		1
-#define   TEXCOORDMODE_CLAMP_EDGE	2
-#define   TEXCOORDMODE_CUBE       	3
-#define   TEXCOORDMODE_CLAMP_BORDER	4
-#define   TEXCOORDMODE_MIRROR_ONCE      5
-#define SS3_TCY_ADDR_MODE_SHIFT      9
-#define SS3_TCY_ADDR_MODE_MASK       (0x7<<9)
-#define SS3_TCZ_ADDR_MODE_SHIFT      6
-#define SS3_TCZ_ADDR_MODE_MASK       (0x7<<6)
-#define SS3_NORMALIZED_COORDS        (1<<5)
-#define SS3_TEXTUREMAP_INDEX_SHIFT   1
-#define SS3_TEXTUREMAP_INDEX_MASK    (0xf<<1)
-#define SS3_DEINTERLACER_ENABLE      (1<<0)
-
-#define SS4_BORDER_COLOR_MASK        (~0)
-
-#define STATE3D_LOAD_STATE_IMMEDIATE_1	(CMD_3D | (0x1d<<24)|(0x04<<16))
-#define I1_LOAD_S(n)				(1 << (4 + n))
-
-#define S0_VB_OFFSET_MASK              0xffffffc
-#define S0_AUTO_CACHE_INV_DISABLE      (1<<0)
-
-#define S1_VERTEX_WIDTH_SHIFT          24
-#define S1_VERTEX_WIDTH_MASK           (0x3f<<24)
-#define S1_VERTEX_PITCH_SHIFT          16
-#define S1_VERTEX_PITCH_MASK           (0x3f<<16)
-
-#define TEXCOORDFMT_2D                 0x0
-#define TEXCOORDFMT_3D                 0x1
-#define TEXCOORDFMT_4D                 0x2
-#define TEXCOORDFMT_1D                 0x3
-#define TEXCOORDFMT_2D_16              0x4
-#define TEXCOORDFMT_4D_16              0x5
-#define TEXCOORDFMT_NOT_PRESENT        0xf
-#define S2_TEXCOORD_FMT0_MASK            0xf
-#define S2_TEXCOORD_FMT1_SHIFT           4
-#define S2_TEXCOORD_FMT(unit, type)    ((type)<<(unit*4))
-#define S2_TEXCOORD_NONE               (~0)
-
-/* S3 not interesting */
-
-#define S4_POINT_WIDTH_SHIFT           23
-#define S4_POINT_WIDTH_MASK            (0x1ff<<23)
-#define S4_LINE_WIDTH_SHIFT            19
-#define S4_LINE_WIDTH_ONE              (0x2<<19)
-#define S4_LINE_WIDTH_MASK             (0xf<<19)
-#define S4_FLATSHADE_ALPHA             (1<<18)
-#define S4_FLATSHADE_FOG               (1<<17)
-#define S4_FLATSHADE_SPECULAR          (1<<16)
-#define S4_FLATSHADE_COLOR             (1<<15)
-#define S4_CULLMODE_BOTH	       (0<<13)
-#define S4_CULLMODE_NONE	       (1<<13)
-#define S4_CULLMODE_CW		       (2<<13)
-#define S4_CULLMODE_CCW		       (3<<13)
-#define S4_CULLMODE_MASK	       (3<<13)
-#define S4_VFMT_POINT_WIDTH            (1<<12)
-#define S4_VFMT_SPEC_FOG               (1<<11)
-#define S4_VFMT_COLOR                  (1<<10)
-#define S4_VFMT_DEPTH_OFFSET           (1<<9)
-#define S4_VFMT_XYZ     	       (1<<6)
-#define S4_VFMT_XYZW     	       (2<<6)
-#define S4_VFMT_XY     		       (3<<6)
-#define S4_VFMT_XYW     	       (4<<6)
-#define S4_VFMT_XYZW_MASK              (7<<6)
-#define S4_FORCE_DEFAULT_DIFFUSE       (1<<5)
-#define S4_FORCE_DEFAULT_SPECULAR      (1<<4)
-#define S4_LOCAL_DEPTH_OFFSET_ENABLE   (1<<3)
-#define S4_VFMT_FOG_PARAM              (1<<2)
-#define S4_SPRITE_POINT_ENABLE         (1<<1)
-#define S4_LINE_ANTIALIAS_ENABLE       (1<<0)
-
-#define S4_VFMT_MASK (S4_VFMT_POINT_WIDTH   | 	\
-		      S4_VFMT_SPEC_FOG      |	\
-		      S4_VFMT_COLOR         |	\
-		      S4_VFMT_DEPTH_OFFSET  |	\
-		      S4_VFMT_XYZW_MASK     |	\
-		      S4_VFMT_FOG_PARAM)
-
-
-#define S5_WRITEDISABLE_ALPHA          (1<<31)
-#define S5_WRITEDISABLE_RED            (1<<30)
-#define S5_WRITEDISABLE_GREEN          (1<<29)
-#define S5_WRITEDISABLE_BLUE           (1<<28)
-#define S5_WRITEDISABLE_MASK           (0xf<<28)
-#define S5_FORCE_DEFAULT_POINT_SIZE    (1<<27)
-#define S5_LAST_PIXEL_ENABLE           (1<<26)
-#define S5_GLOBAL_DEPTH_OFFSET_ENABLE  (1<<25)
-#define S5_FOG_ENABLE                  (1<<24)
-#define S5_STENCIL_REF_SHIFT           16
-#define S5_STENCIL_REF_MASK            (0xff<<16)
-#define S5_STENCIL_TEST_FUNC_SHIFT     13
-#define S5_STENCIL_TEST_FUNC_MASK      (0x7<<13)
-#define S5_STENCIL_FAIL_SHIFT          10
-#define S5_STENCIL_FAIL_MASK           (0x7<<10)
-#define S5_STENCIL_PASS_Z_FAIL_SHIFT   7
-#define S5_STENCIL_PASS_Z_FAIL_MASK    (0x7<<7)
-#define S5_STENCIL_PASS_Z_PASS_SHIFT   4
-#define S5_STENCIL_PASS_Z_PASS_MASK    (0x7<<4)
-#define S5_STENCIL_WRITE_ENABLE        (1<<3)
-#define S5_STENCIL_TEST_ENABLE         (1<<2)
-#define S5_COLOR_DITHER_ENABLE         (1<<1)
-#define S5_LOGICOP_ENABLE              (1<<0)
-
-
-#define S6_ALPHA_TEST_ENABLE           (1<<31)
-#define S6_ALPHA_TEST_FUNC_SHIFT       28
-#define S6_ALPHA_TEST_FUNC_MASK        (0x7<<28)
-#define S6_ALPHA_REF_SHIFT             20
-#define S6_ALPHA_REF_MASK              (0xff<<20)
-#define S6_DEPTH_TEST_ENABLE           (1<<19)
-#define S6_DEPTH_TEST_FUNC_SHIFT       16
-#define S6_DEPTH_TEST_FUNC_MASK        (0x7<<16)
-#define S6_CBUF_BLEND_ENABLE           (1<<15)
-#define S6_CBUF_BLEND_FUNC_SHIFT       12
-#define S6_CBUF_BLEND_FUNC_MASK        (0x7<<12)
-#define S6_CBUF_SRC_BLEND_FACT_SHIFT   8
-#define S6_CBUF_SRC_BLEND_FACT_MASK    (0xf<<8)
-#define S6_CBUF_DST_BLEND_FACT_SHIFT   4
-#define S6_CBUF_DST_BLEND_FACT_MASK    (0xf<<4)
-#define S6_DEPTH_WRITE_ENABLE          (1<<3)
-#define S6_COLOR_WRITE_ENABLE          (1<<2)
-#define S6_TRISTRIP_PV_SHIFT           0
-#define S6_TRISTRIP_PV_MASK            (0x3<<0)
-
-#define S7_DEPTH_OFFSET_CONST_MASK     ~0
-
-#define STATE3D_PIXEL_SHADER_PROGRAM	(CMD_3D | (0x1d<<24)|(0x05<<16))
-
-#define REG_TYPE_R                 0 /* temporary regs, no need to
-				      * dcl, must be written before
-				      * read -- Preserved between
-				      * phases. 
-				      */
-#define REG_TYPE_T                 1 /* Interpolated values, must be
-				      * dcl'ed before use.
-				      *
-				      * 0..7: texture coord,
-				      * 8: diffuse spec,
-				      * 9: specular color,
-				      * 10: fog parameter in w.
-				      */
-#define REG_TYPE_CONST             2 /* Restriction: only one const
-				      * can be referenced per
-				      * instruction, though it may be
-				      * selected for multiple inputs.
-				      * Constants not initialized
-				      * default to zero.
-				      */
-#define REG_TYPE_S                 3 /* sampler */
-#define REG_TYPE_OC                4 /* output color (rgba) */
-#define REG_TYPE_OD                5 /* output depth (w), xyz are
-				      * temporaries.  If not written,
-				      * interpolated depth is used?
-				      */
-#define REG_TYPE_U                 6 /* unpreserved temporaries */
-#define REG_TYPE_MASK              0x7
-#define REG_NR_MASK                0xf
-
-
-/* REG_TYPE_T:
- */
-#define T_TEX0     0
-#define T_TEX1     1
-#define T_TEX2     2
-#define T_TEX3     3
-#define T_TEX4     4
-#define T_TEX5     5
-#define T_TEX6     6
-#define T_TEX7     7
-#define T_DIFFUSE  8
-#define T_SPECULAR 9
-#define T_FOG_W    10		/* interpolated fog is in W coord */
-
-/* Arithmetic instructions */
-
-/* .replicate_swizzle == selection and replication of a particular
- * scalar channel, ie., .xxxx, .yyyy, .zzzz or .wwww 
- */
-#define A0_NOP    (0x0<<24)		/* no operation */
-#define A0_ADD    (0x1<<24)		/* dst = src0 + src1 */
-#define A0_MOV    (0x2<<24)		/* dst = src0 */
-#define A0_MUL    (0x3<<24)		/* dst = src0 * src1 */
-#define A0_MAD    (0x4<<24)		/* dst = src0 * src1 + src2 */
-#define A0_DP2ADD (0x5<<24)		/* dst.xyzw = src0.xy dot src1.xy + src2.replicate_swizzle */
-#define A0_DP3    (0x6<<24)		/* dst.xyzw = src0.xyz dot src1.xyz */
-#define A0_DP4    (0x7<<24)		/* dst.xyzw = src0.xyzw dot src1.xyzw */
-#define A0_FRC    (0x8<<24)		/* dst = src0 - floor(src0) */
-#define A0_RCP    (0x9<<24)		/* dst.xyzw = 1/(src0.replicate_swizzle) */
-#define A0_RSQ    (0xa<<24)		/* dst.xyzw = 1/(sqrt(abs(src0.replicate_swizzle))) */
-#define A0_EXP    (0xb<<24)		/* dst.xyzw = exp2(src0.replicate_swizzle) */
-#define A0_LOG    (0xc<<24)		/* dst.xyzw = log2(abs(src0.replicate_swizzle)) */
-#define A0_CMP    (0xd<<24)		/* dst = (src0 >= 0.0) ? src1 : src2 */
-#define A0_MIN    (0xe<<24)		/* dst = (src0 < src1) ? src0 : src1 */
-#define A0_MAX    (0xf<<24)		/* dst = (src0 >= src1) ? src0 : src1 */
-#define A0_FLR    (0x10<<24)		/* dst = floor(src0) */
-#define A0_MOD    (0x11<<24)		/* dst = src0 fmod 1.0 */
-#define A0_TRC    (0x12<<24)		/* dst = int(src0) */
-#define A0_SGE    (0x13<<24)		/* dst = src0 >= src1 ? 1.0 : 0.0 */
-#define A0_SLT    (0x14<<24)		/* dst = src0 < src1 ? 1.0 : 0.0 */
-#define A0_DEST_SATURATE                 (1<<22)
-#define A0_DEST_TYPE_SHIFT                19
-/* Allow: R, OC, OD, U */
-#define A0_DEST_NR_SHIFT                 14
-/* Allow R: 0..15, OC,OD: 0..0, U: 0..2 */
-#define A0_DEST_CHANNEL_X                (1<<10)
-#define A0_DEST_CHANNEL_Y                (2<<10)
-#define A0_DEST_CHANNEL_Z                (4<<10)
-#define A0_DEST_CHANNEL_W                (8<<10)
-#define A0_DEST_CHANNEL_ALL              (0xf<<10)
-#define A0_DEST_CHANNEL_SHIFT            10
-#define A0_SRC0_TYPE_SHIFT               7
-#define A0_SRC0_NR_SHIFT                 2
-
-#define A0_DEST_CHANNEL_XY              (A0_DEST_CHANNEL_X|A0_DEST_CHANNEL_Y)
-#define A0_DEST_CHANNEL_XYZ             (A0_DEST_CHANNEL_XY|A0_DEST_CHANNEL_Z)
-
-
-#define SRC_X        0
-#define SRC_Y        1
-#define SRC_Z        2
-#define SRC_W        3
-#define SRC_ZERO     4
-#define SRC_ONE      5
-
-#define A1_SRC0_CHANNEL_X_NEGATE         (1<<31)
-#define A1_SRC0_CHANNEL_X_SHIFT          28
-#define A1_SRC0_CHANNEL_Y_NEGATE         (1<<27)
-#define A1_SRC0_CHANNEL_Y_SHIFT          24
-#define A1_SRC0_CHANNEL_Z_NEGATE         (1<<23)
-#define A1_SRC0_CHANNEL_Z_SHIFT          20
-#define A1_SRC0_CHANNEL_W_NEGATE         (1<<19)
-#define A1_SRC0_CHANNEL_W_SHIFT          16
-#define A1_SRC1_TYPE_SHIFT               13
-#define A1_SRC1_NR_SHIFT                 8
-#define A1_SRC1_CHANNEL_X_NEGATE         (1<<7)
-#define A1_SRC1_CHANNEL_X_SHIFT          4
-#define A1_SRC1_CHANNEL_Y_NEGATE         (1<<3)
-#define A1_SRC1_CHANNEL_Y_SHIFT          0
-
-#define A2_SRC1_CHANNEL_Z_NEGATE         (1<<31)
-#define A2_SRC1_CHANNEL_Z_SHIFT          28
-#define A2_SRC1_CHANNEL_W_NEGATE         (1<<27)
-#define A2_SRC1_CHANNEL_W_SHIFT          24
-#define A2_SRC2_TYPE_SHIFT               21
-#define A2_SRC2_NR_SHIFT                 16
-#define A2_SRC2_CHANNEL_X_NEGATE         (1<<15)
-#define A2_SRC2_CHANNEL_X_SHIFT          12
-#define A2_SRC2_CHANNEL_Y_NEGATE         (1<<11)
-#define A2_SRC2_CHANNEL_Y_SHIFT          8
-#define A2_SRC2_CHANNEL_Z_NEGATE         (1<<7)
-#define A2_SRC2_CHANNEL_Z_SHIFT          4
-#define A2_SRC2_CHANNEL_W_NEGATE         (1<<3)
-#define A2_SRC2_CHANNEL_W_SHIFT          0
-
-
-
-/* Texture instructions */
-#define T0_TEXLD     (0x15<<24)	/* Sample texture using predeclared
-				 * sampler and address, and output
-				 * filtered texel data to destination
-				 * register */
-#define T0_TEXLDP    (0x16<<24)	/* Same as texld but performs a
-				 * perspective divide of the texture
-				 * coordinate .xyz values by .w before
-				 * sampling. */
-#define T0_TEXLDB    (0x17<<24)	/* Same as texld but biases the
-				 * computed LOD by w.  Only S4.6 two's
-				 * comp is used.  This implies that a
-				 * float to fixed conversion is
-				 * done. */
-#define T0_TEXKILL   (0x18<<24)	/* Does not perform a sampling
-				 * operation.  Simply kills the pixel
-				 * if any channel of the address
-				 * register is < 0.0. */
-#define T0_DEST_TYPE_SHIFT                19
-/* Allow: R, OC, OD, U */
-/* Note: U (unpreserved) regs do not retain their values between
- * phases (cannot be used for feedback) 
- *
- * Note: oC and OD registers can only be used as the destination of a
- * texture instruction once per phase (this is an implementation
- * restriction). 
- */
-#define T0_DEST_NR_SHIFT                 14
-/* Allow R: 0..15, OC,OD: 0..0, U: 0..2 */
-#define T0_SAMPLER_NR_SHIFT              0 /* This field ignored for TEXKILL */
-#define T0_SAMPLER_NR_MASK               (0xf<<0)
-
-#define T1_ADDRESS_REG_TYPE_SHIFT        24 /* Reg to use as texture coord */
-/* Allow R, T, OC, OD -- R, OC, OD are 'dependent' reads, new program phase */
-#define T1_ADDRESS_REG_NR_SHIFT          17
-#define T2_MBZ                           0
-
-/* Declaration instructions */
-#define D0_DCL       (0x19<<24)	/* Declare a t (interpolated attrib)
-				 * register or an s (sampler)
-				 * register. */
-#define D0_SAMPLE_TYPE_SHIFT              22
-#define D0_SAMPLE_TYPE_2D                 (0x0<<22)
-#define D0_SAMPLE_TYPE_CUBE               (0x1<<22)
-#define D0_SAMPLE_TYPE_VOLUME             (0x2<<22)
-#define D0_SAMPLE_TYPE_MASK               (0x3<<22)
-
-#define D0_TYPE_SHIFT                19
-/* Allow: T, S */
-#define D0_NR_SHIFT                  14
-/* Allow T: 0..10, S: 0..15 */
-#define D0_CHANNEL_X                (1<<10)
-#define D0_CHANNEL_Y                (2<<10)
-#define D0_CHANNEL_Z                (4<<10)
-#define D0_CHANNEL_W                (8<<10)
-#define D0_CHANNEL_ALL              (0xf<<10)
-#define D0_CHANNEL_NONE             (0<<10)
-
-#define D0_CHANNEL_XY               (D0_CHANNEL_X|D0_CHANNEL_Y)
-#define D0_CHANNEL_XYZ              (D0_CHANNEL_XY|D0_CHANNEL_Z)
-/* End description of STATE3D_PIXEL_SHADER_PROGRAM */
-
-#define STATE3D_PIXEL_SHADER_CONSTANTS	(CMD_3D | (0x1d<<24)|(0x06<<16))
-
-#define STATE3D_DRAWING_RECTANGLE	(CMD_3D | (0x1d<<24)|(0x80<<16)|3)
-
-#define STATE3D_SCISSOR_RECTANGLE	(CMD_3D | (0x1d<<24)|(0x81<<16)|1)
-
-#define STATE3D_STIPPLE			(CMD_3D | (0x1d<<24)|(0x83<<16))
-#define ST1_ENABLE               (1<<16)
-#define ST1_MASK                 (0xffff)
-
-#define STATE3D_DEST_BUFFER_VARIABLES	(CMD_3D | (0x1d<<24)|(0x85<<16))
-#define TEX_DEFAULT_COLOR_OGL           (0<<30)
-#define TEX_DEFAULT_COLOR_D3D           (1<<30)
-#define ZR_EARLY_DEPTH                  (1<<29)
-#define LOD_PRECLAMP_OGL                (1<<28)
-#define LOD_PRECLAMP_D3D                (0<<28)
-#define DITHER_FULL_ALWAYS              (0<<26)
-#define DITHER_FULL_ON_FB_BLEND         (1<<26)
-#define DITHER_CLAMPED_ALWAYS           (2<<26)
-#define LINEAR_GAMMA_BLEND_32BPP        (1<<25)
-#define DEBUG_DISABLE_ENH_DITHER        (1<<24)
-#define DSTORG_HORIZ_BIAS(x)		((x)<<20)
-#define DSTORG_VERT_BIAS(x)		((x)<<16)
-#define COLOR_4_2_2_CHNL_WRT_ALL	0
-#define COLOR_4_2_2_CHNL_WRT_Y		(1<<12)
-#define COLOR_4_2_2_CHNL_WRT_CR		(2<<12)
-#define COLOR_4_2_2_CHNL_WRT_CB		(3<<12)
-#define COLOR_4_2_2_CHNL_WRT_CRCB	(4<<12)
-#define COLR_BUF_8BIT			0
-#define COLR_BUF_RGB555 		(1<<8)
-#define COLR_BUF_RGB565 		(2<<8)
-#define COLR_BUF_ARGB8888		(3<<8)
-#define DEPTH_FRMT_16_FIXED		0
-#define DEPTH_FRMT_16_FLOAT		(1<<2)
-#define DEPTH_FRMT_24_FIXED_8_OTHER	(2<<2)
-#define VERT_LINE_STRIDE_1		(1<<1)
-#define VERT_LINE_STRIDE_0		(0<<1)
-#define VERT_LINE_STRIDE_OFS_1		1
-#define VERT_LINE_STRIDE_OFS_0		0
-
-#define STATE3D_CONST_BLEND_COLOR	(CMD_3D | (0x1d<<24)|(0x88<<16))
-
 #define STATE3D_FOG_MODE		((3<<29)|(0x1d<<24)|(0x89<<16)|2)
 #define FOG_MODE_VERTEX 		(1<<31)
-#define STATE3D_MAP_COORD_TRANSFORM	((3<<29)|(0x1d<<24)|(0x8c<<16))
 
-#define STATE3D_BUFFER_INFO		(CMD_3D | (0x1d<<24)|(0x8e<<16)|1)
-#define BUFFERID_COLOR_BACK		(3 << 24)
-#define BUFFERID_COLOR_AUX		(4 << 24)
-#define BUFFERID_MC_INTRA_CORR		(5 << 24)
-#define BUFFERID_DEPTH			(7 << 24)
-#define BUFFER_USE_FENCES		(1 << 23)
-
-#define STATE3D_DFLT_Z_CMD		(CMD_3D | (0x1d<<24)|(0x98<<16))
-
-#define STATE3D_DFLT_DIFFUSE_CMD	(CMD_3D | (0x1d<<24)|(0x99<<16))
-
-#define STATE3D_DFLT_SPEC_CMD		(CMD_3D | (0x1d<<24)|(0x9a<<16))
-
-#define PRIMITIVE3D			(CMD_3D | (0x1f<<24))
-#define PRIM3D_INLINE		(0<<23)
-#define PRIM3D_INDIRECT		(1<<23)
-#define PRIM3D_TRILIST		(0x0<<18)
-#define PRIM3D_TRISTRIP 	(0x1<<18)
-#define PRIM3D_TRISTRIP_RVRSE	(0x2<<18)
-#define PRIM3D_TRIFAN		(0x3<<18)
-#define PRIM3D_POLY		(0x4<<18)
-#define PRIM3D_LINELIST 	(0x5<<18)
-#define PRIM3D_LINESTRIP	(0x6<<18)
-#define PRIM3D_RECTLIST 	(0x7<<18)
-#define PRIM3D_POINTLIST	(0x8<<18)
-#define PRIM3D_DIB		(0x9<<18)
-#define PRIM3D_CLEAR_RECT	(0xa<<18)
-#define PRIM3D_ZONE_INIT	(0xd<<18)
-#define PRIM3D_MASK		(0x1f<<18)
-
-
 #define DISABLE_TEX_TRANSFORM		(1<<28)
 #define TEXTURE_SET(x)			(x<<29)
 
@@ -1610,7 +995,7 @@
 /*
  * New regs for broadwater -- we need to split this file up sensibly somehow.
  */
-#define BRW_3D(Pipeline,Opcode,Subopcode) (CMD_3D | \
+#define BRW_3D(Pipeline,Opcode,Subopcode) ((3 << 29) | \
 					   ((Pipeline) << 27) | \
 					   ((Opcode) << 24) | \
 					   ((Subopcode) << 16))

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830.h
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830.h	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830.h	2006-08-11 02:51:35 UTC (rev 2766)
@@ -447,6 +447,7 @@
 extern void I830SetPIOAccess(I830Ptr pI830);
 extern void I830SetMMIOAccess(I830Ptr pI830);
 extern void I830PrintErrorState(ScrnInfoPtr pScrn);
+extern void I965PrintErrorState(ScrnInfoPtr pScrn);
 extern void I830Sync(ScrnInfoPtr pScrn);
 extern void I830InitHWCursor(ScrnInfoPtr pScrn);
 extern Bool I830CursorInit(ScreenPtr pScreen);

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_cursor.c
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_cursor.c	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_cursor.c	2006-08-11 02:51:35 UTC (rev 2766)
@@ -475,7 +475,6 @@
 {
    I830Ptr pI830 = I830PTR(pScrn);
    CARD32 temp = 0;
-   static Bool outsideViewport = FALSE;
    Bool hide = FALSE, show = FALSE;
    int oldx = x, oldy = y;
    int hotspotx = 0, hotspoty = 0;

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_dri.c
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_dri.c	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_dri.c	2006-08-11 02:51:35 UTC (rev 2766)
@@ -102,8 +102,6 @@
 static void I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
 			       RegionPtr prgnSrc, CARD32 index);
 
-static Bool I830DRICloseFullScreen(ScreenPtr pScreen);
-static Bool I830DRIOpenFullScreen(ScreenPtr pScreen);
 static void I830DRITransitionTo2d(ScreenPtr pScreen);
 static void I830DRITransitionTo3d(ScreenPtr pScreen);
 static void I830DRITransitionMultiToSingle3d(ScreenPtr pScreen);

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_dri.h
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_dri.h	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_dri.h	2006-08-11 02:51:35 UTC (rev 2766)
@@ -3,7 +3,6 @@
 #ifndef _I830_DRI_H
 #define _I830_DRI_H
 
-#include "xf86dri.h"
 #include "xf86drm.h"
 #include "i830_common.h"
 
@@ -11,7 +10,7 @@
 
 #define I830_MAJOR_VERSION 1
 #define I830_MINOR_VERSION 6
-#define I830_PATCHLEVEL 2
+#define I830_PATCHLEVEL 4
 
 #define I830_REG_SIZE 0x80000
 
@@ -19,6 +18,21 @@
    drm_handle_t regs;
    drmSize regsSize;
 
+   drmSize unused1; /* backbufferSize */
+   drm_handle_t unused2; /* backbuffer */
+
+   drmSize unused3; /* depthbufferSize */
+   drm_handle_t unused4; /* depthbuffer */
+
+   drmSize unused5; /* rotatedSize /*/
+   drm_handle_t unused6; /* rotatedbuffer */
+
+   drm_handle_t unused7; /* textures */
+   int unused8; /* textureSize */
+
+   drm_handle_t unused9; /* agp_buffers */
+   drmSize unused10; /* agp_buf_size */
+
    int deviceID;
    int width;
    int height;
@@ -26,6 +40,11 @@
    int cpp;
    int bitsPerPixel;
 
+   int unused11[8]; /* was front/back/depth/rotated offset/pitch */
+
+   int unused12; /* logTextureGranularity */
+   int unused13; /* textureOffset */
+
    int irq;
    int sarea_priv_offset;
 } I830DRIRec, *I830DRIPtr;

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_driver.c
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_driver.c	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_driver.c	2006-08-11 02:51:35 UTC (rev 2766)
@@ -6614,39 +6614,52 @@
 	  INREG(LP_RING + RING_LEN), INREG(LP_RING + RING_START));
 
    ErrorF("Err ID (eir): %x Err Status (esr): %x Err Mask (emr): %x\n",
-	  INREG(EIR), INREG(ESR), INREG(EMR));
+	  (int)INREG(EIR), (int)INREG(ESR), (int)INREG(EMR));
 
-   ErrorF("instdone: %x instdone_1: %x\n", INREG(INST_DONE_I965), INREG(INST_DONE_1));
-   ErrorF("instpm: %x\n", INREG(INST_PM));
+   ErrorF("instdone: %x instdone_1: %x\n", (int)INREG(INST_DONE_I965),
+	  (int)INREG(INST_DONE_1));
+   ErrorF("instpm: %x\n", (int)INREG(INST_PM));
 
    ErrorF("memmode: %lx instps: %lx\n", INREG(MEMMODE), INREG(INST_PS_I965));
 
    ErrorF("HW Status mask (hwstam): %x\nIRQ enable (ier): %x imr: %x iir: %x\n",
-	  INREG(HWSTAM), INREG(IER), INREG(IMR), INREG(IIR));
+	  (int)INREG(HWSTAM), (int)INREG(IER), (int)INREG(IMR),
+	  (int)INREG(IIR));
 
    ErrorF("acthd: %lx dma_fadd_p: %lx\n", INREG(ACTHD), INREG(DMA_FADD_P));
    ErrorF("ecoskpd: %lx excc: %lx\n", INREG(ECOSKPD), INREG(EXCC));
 
-   ErrorF("cache_mode: %x/%x\n", INREG(CACHE_MODE_0), INREG(CACHE_MODE_1));
-   ErrorF("mi_arb_state: %x\n", INREG(MI_ARB_STATE));
+   ErrorF("cache_mode: %x/%x\n", (int)INREG(CACHE_MODE_0),
+	  (int)INREG(CACHE_MODE_1));
+   ErrorF("mi_arb_state: %x\n", (int)INREG(MI_ARB_STATE));
 
-   ErrorF("IA_VERTICES_COUNT_QW %x/%x\n", INREG(IA_VERTICES_COUNT_QW), INREG(IA_VERTICES_COUNT_QW+4));
-   ErrorF("IA_PRIMITIVES_COUNT_QW %x/%x\n", INREG(IA_PRIMITIVES_COUNT_QW), INREG(IA_PRIMITIVES_COUNT_QW+4));
+   ErrorF("IA_VERTICES_COUNT_QW %x/%x\n", (int)INREG(IA_VERTICES_COUNT_QW),
+	  (int)INREG(IA_VERTICES_COUNT_QW+4));
+   ErrorF("IA_PRIMITIVES_COUNT_QW %x/%x\n", (int)INREG(IA_PRIMITIVES_COUNT_QW),
+	  (int)INREG(IA_PRIMITIVES_COUNT_QW+4));
 
-   ErrorF("VS_INVOCATION_COUNT_QW %x/%x\n", INREG(VS_INVOCATION_COUNT_QW), INREG(VS_INVOCATION_COUNT_QW+4));
+   ErrorF("VS_INVOCATION_COUNT_QW %x/%x\n", (int)INREG(VS_INVOCATION_COUNT_QW),
+	  (int)INREG(VS_INVOCATION_COUNT_QW+4));
 
-   ErrorF("GS_INVOCATION_COUNT_QW %x/%x\n", INREG(GS_INVOCATION_COUNT_QW), INREG(GS_INVOCATION_COUNT_QW+4));
-   ErrorF("GS_PRIMITIVES_COUNT_QW %x/%x\n", INREG(GS_PRIMITIVES_COUNT_QW), INREG(GS_PRIMITIVES_COUNT_QW+4));
+   ErrorF("GS_INVOCATION_COUNT_QW %x/%x\n", (int)INREG(GS_INVOCATION_COUNT_QW),
+	  (int)INREG(GS_INVOCATION_COUNT_QW+4));
+   ErrorF("GS_PRIMITIVES_COUNT_QW %x/%x\n", (int)INREG(GS_PRIMITIVES_COUNT_QW),
+	  (int)INREG(GS_PRIMITIVES_COUNT_QW+4));
 
-   ErrorF("CL_INVOCATION_COUNT_QW %x/%x\n", INREG(CL_INVOCATION_COUNT_QW), INREG(CL_INVOCATION_COUNT_QW+4));
-   ErrorF("CL_PRIMITIVES_COUNT_QW %x/%x\n", INREG(CL_PRIMITIVES_COUNT_QW), INREG(CL_PRIMITIVES_COUNT_QW+4));
+   ErrorF("CL_INVOCATION_COUNT_QW %x/%x\n", (int)INREG(CL_INVOCATION_COUNT_QW),
+	  (int)INREG(CL_INVOCATION_COUNT_QW+4));
+   ErrorF("CL_PRIMITIVES_COUNT_QW %x/%x\n", (int)INREG(CL_PRIMITIVES_COUNT_QW),
+	  (int)INREG(CL_PRIMITIVES_COUNT_QW+4));
 
-   ErrorF("PS_INVOCATION_COUNT_QW %x/%x\n", INREG(PS_INVOCATION_COUNT_QW), INREG(PS_INVOCATION_COUNT_QW+4));
-   ErrorF("PS_DEPTH_COUNT_QW %x/%x\n", INREG(PS_DEPTH_COUNT_QW), INREG(PS_DEPTH_COUNT_QW+4));
+   ErrorF("PS_INVOCATION_COUNT_QW %x/%x\n", (int)INREG(PS_INVOCATION_COUNT_QW),
+	  (int)INREG(PS_INVOCATION_COUNT_QW+4));
+   ErrorF("PS_DEPTH_COUNT_QW %x/%x\n", (int)INREG(PS_DEPTH_COUNT_QW),
+	  (int)INREG(PS_DEPTH_COUNT_QW+4));
 
-   ErrorF("WIZ_CTL %x\n", INREG(WIZ_CTL));
-   ErrorF("TS_CTL %x  TS_DEBUG_DATA %x\n", INREG(TS_CTL), INREG(TS_DEBUG_DATA));
-   ErrorF("TD_CTL %x / %x\n", INREG(TD_CTL), INREG(TD_CTL2));
+   ErrorF("WIZ_CTL %x\n", (int)INREG(WIZ_CTL));
+   ErrorF("TS_CTL %x  TS_DEBUG_DATA %x\n", (int)INREG(TS_CTL),
+	  (int)INREG(TS_DEBUG_DATA));
+   ErrorF("TD_CTL %x / %x\n", (int)INREG(TD_CTL), (int)INREG(TD_CTL2));
 
    
 }

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_rotate.c
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_rotate.c	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_rotate.c	2006-08-11 02:51:35 UTC (rev 2766)
@@ -217,7 +217,6 @@
    drm_context_t myContext = 0;
 #endif
    Bool didLock = FALSE;
-   CARD32 format;
 
    if (I830IsPrimary(pScrn)) {
       pI8301 = pI830;
@@ -576,7 +575,7 @@
       OUT_RING(MI_FLUSH | MI_WRITE_DIRTY_STATE | MI_INVALIDATE_MAP_CACHE);
       OUT_RING(0x00000000);
       /* draw rect */
-      OUT_RING(STATE3D_DRAWING_RECTANGLE);
+      OUT_RING(_3DSTATE_DRAW_RECT_CMD);
       OUT_RING(0x00000000);	/* flags */
       OUT_RING(0x00000000);	/* ymin, xmin */
       OUT_RING((pScrn->virtualX - 1) | (pScrn->virtualY - 1) << 16); /* ymax, xmax */
@@ -584,7 +583,7 @@
       OUT_RING(MI_NOOP);
 
       /* front buffer */
-      OUT_RING(STATE3D_BUFFER_INFO);
+      OUT_RING(_3DSTATE_BUF_INFO_CMD);
       OUT_RING(0x03800000 | (((pI830->displayWidth * pI830->cpp) / 4) << 2));
       if (I830IsPrimary(pScrn))
 	 OUT_RING(pI830->FrontBuffer.Start);

Modified: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_video.c
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_video.c	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_video.c	2006-08-11 02:51:35 UTC (rev 2766)
@@ -78,6 +78,7 @@
 #include "regionstr.h"
 #include "randrstr.h"
 #include "i830.h"
+#include "i830_video.h"
 #include "xf86xv.h"
 #include <X11/extensions/Xv.h>
 #include "xaa.h"
@@ -389,46 +390,6 @@
    CARD16 RESERVEDG[0x100 / 2 - N_HORIZ_UV_TAPS * N_PHASES];
 } I830OverlayRegRec, *I830OverlayRegPtr;
 
-typedef struct {
-   CARD32 YBuf0offset;
-   CARD32 UBuf0offset;
-   CARD32 VBuf0offset;
-
-   CARD32 YBuf1offset;
-   CARD32 UBuf1offset;
-   CARD32 VBuf1offset;
-
-   unsigned char currentBuf;
-
-   int brightness;
-   int contrast;
-   int pipe;
-   int doubleBuffer;
-
-   RegionRec clip;
-   CARD32 colorKey;
-
-   CARD32 gamma0;
-   CARD32 gamma1;
-   CARD32 gamma2;
-   CARD32 gamma3;
-   CARD32 gamma4;
-   CARD32 gamma5;
-
-   CARD32 videoStatus;
-   Time offTime;
-   Time freeTime;
-   FBLinearPtr linear;
-
-   Bool overlayOK;
-   int oneLineMode;
-   int scaleRatio;
-   Bool textured;
-} I830PortPrivRec, *I830PortPrivPtr;
-
-#define GET_PORT_PRIVATE(pScrn) \
-   (I830PortPrivPtr)((I830PTR(pScrn))->adaptor->pPortPrivates[0].ptr)
-
 #if VIDEO_DEBUG
 static void
 CompareOverlay(I830Ptr pI830, CARD32 * overlay, int size)
@@ -2134,569 +2095,6 @@
    OVERLAY_UPDATE;
 }
 
-/* Doesn't matter on the order for our purposes */
-typedef struct {
-   unsigned char red, green, blue, alpha;
-} intel_color_t;
-
-/* Vertex format */
-typedef union {
-   struct {
-      float x, y, z, w;
-      intel_color_t color;
-      intel_color_t specular;
-      float u0, v0;
-      float u1, v1;
-      float u2, v2;
-      float u3, v3;
-   } v;
-   float f[24];
-   unsigned int  ui[24];
-   unsigned char ub4[24][4];
-} intelVertex, *intelVertexPtr;
-
-static void draw_poly(CARD32 *vb,
-                      float verts[][2],
-                      float texcoords[][2],
-		      float texcoords2[][2])
-{
-   int vertex_size;
-   intelVertex tmp;
-   int i, k;
-
-   if (texcoords2 != NULL)
-      vertex_size = 10;
-   else
-      vertex_size = 8;
-   
-   /* initial constant vertex fields */
-   tmp.v.z = 1.0;
-   tmp.v.w = 1.0; 
-   tmp.v.color.red = 255;
-   tmp.v.color.green = 255;
-   tmp.v.color.blue = 255;
-   tmp.v.color.alpha = 255;
-   tmp.v.specular.red = 0;
-   tmp.v.specular.green = 0;
-   tmp.v.specular.blue = 0;
-   tmp.v.specular.alpha = 0;
-
-   for (k = 0; k < 4; k++) {
-      tmp.v.x = verts[k][0];
-      tmp.v.y = verts[k][1];
-      tmp.v.u0 = texcoords[k][0];
-      tmp.v.v0 = texcoords[k][1];
-      if (texcoords2 != NULL) {
-	 tmp.v.u1 = texcoords2[k][0];
-	 tmp.v.v1 = texcoords2[k][1];
-      }
-
-      for (i = 0 ; i < vertex_size ; i++)
-         vb[i] = tmp.ui[i];
-
-      vb += vertex_size;
-   }
-}
-
-union intfloat {
-   CARD32 ui;
-   float f;
-};
-
-#define OUT_RING_F(x) do {						\
-   union intfloat _tmp;							\
-   _tmp.f = x;								\
-   OUT_RING(_tmp.ui);							\
-} while (0)
-
-#define OUT_DCL(type, nr) do {						\
-   CARD32 chans = 0;							\
-   if (REG_TYPE_##type == REG_TYPE_T)					\
-      chans = D0_CHANNEL_ALL;						\
-   else if (REG_TYPE_##type != REG_TYPE_S)				\
-      FatalError("wrong reg type %d to declare\n", REG_TYPE_##type);	\
-   OUT_RING(D0_DCL |							\
-	    (REG_TYPE_##type << D0_TYPE_SHIFT) | (nr << D0_NR_SHIFT) |	\
-	    chans);							\
-   OUT_RING(0x00000000);						\
-   OUT_RING(0x00000000);						\
-} while (0)
-
-#define OUT_TEXLD(dest_type, dest_nr, sampler_nr, addr_type, addr_nr)	\
-do {									\
-      OUT_RING(T0_TEXLD |						\
-	       (REG_TYPE_##dest_type << T0_DEST_TYPE_SHIFT) |		\
-	       (dest_nr << T0_DEST_NR_SHIFT) |				\
-	       (sampler_nr << T0_SAMPLER_NR_SHIFT));			\
-      OUT_RING((REG_TYPE_##addr_type << T1_ADDRESS_REG_TYPE_SHIFT) |	\
-	       (addr_nr << T1_ADDRESS_REG_NR_SHIFT));			\
-      OUT_RING(0x00000000);						\
-} while (0)
-
-/* Move the dest_chan from src0 to dest, leaving the other channels alone */
-#define OUT_MOV_TO_CHANNEL(dest_type, dest_nr, src0_type, src0_nr,	\
-			   dest_chan)					\
-do {									\
-   OUT_RING(A0_MOV | A0_DEST_CHANNEL_##dest_chan |			\
-	    (REG_TYPE_##dest_type << A0_DEST_TYPE_SHIFT) |		\
-	    (dest_nr << A0_DEST_NR_SHIFT) |				\
-	    (REG_TYPE_##src0_type << A0_SRC0_TYPE_SHIFT) |		\
-	    (src0_nr << A0_SRC0_NR_SHIFT));				\
-   OUT_RING((SRC_X << A1_SRC0_CHANNEL_X_SHIFT) |			\
-	    (SRC_Y << A1_SRC0_CHANNEL_Y_SHIFT) |			\
-	    (SRC_Z << A1_SRC0_CHANNEL_Z_SHIFT) |			\
-	    (SRC_W << A1_SRC0_CHANNEL_W_SHIFT));			\
-   OUT_RING(0);								\
-} while (0)
-
-/* Dot3-product src0 and src1, storing the result in dest_chan of the dest.
- * Saturates, in case we have out-of-range YUV values.
- */
-#define OUT_DP3_TO_CHANNEL(dest_type, dest_nr, src0_type, src0_nr,	\
-			   src1_type, src1_nr, dest_chan)		\
-do {									\
-   OUT_RING(A0_DP3 | A0_DEST_CHANNEL_##dest_chan | A0_DEST_SATURATE |	\
-	    (REG_TYPE_##dest_type << A0_DEST_TYPE_SHIFT) |		\
-	    (dest_nr << A0_DEST_NR_SHIFT) |				\
-	    (REG_TYPE_##src0_type << A0_SRC0_TYPE_SHIFT) |		\
-	    (src0_nr << A0_SRC0_NR_SHIFT));				\
-   OUT_RING((SRC_X << A1_SRC0_CHANNEL_X_SHIFT) |			\
-	    (SRC_Y << A1_SRC0_CHANNEL_Y_SHIFT) |			\
-	    (SRC_Z << A1_SRC0_CHANNEL_Z_SHIFT) |			\
-	    (SRC_W << A1_SRC0_CHANNEL_W_SHIFT) |			\
-	    (REG_TYPE_##src1_type << A1_SRC1_TYPE_SHIFT) |		\
-	    (src1_nr << A1_SRC1_TYPE_SHIFT) |				\
-	    (SRC_X << A1_SRC1_CHANNEL_X_SHIFT) |			\
-	    (SRC_Y << A1_SRC1_CHANNEL_Y_SHIFT));			\
-   OUT_RING((SRC_Z << A2_SRC1_CHANNEL_Z_SHIFT) |			\
-	    (SRC_W << A2_SRC1_CHANNEL_W_SHIFT));			\
-} while (0)
-
-static void
-I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
-			 RegionPtr dstRegion,
-			 short width, short height, int video_pitch,
-			 int x1, int y1, int x2, int y2,
-			 short src_w, short src_h, short drw_w, short drw_h,
-			 DrawablePtr pDraw)
-{
-   I830Ptr pI830 = I830PTR(pScrn);
-   CARD32 format, ms3, s2;
-   BoxPtr pbox;
-   int nbox, dxo, dyo;
-   Bool planar;
-
-   ErrorF("I915DisplayVideo: %dx%d (pitch %d)\n", width, height,
-	  video_pitch);
-
-   switch (id) {
-   case FOURCC_UYVY:
-   case FOURCC_YUY2:
-      planar = FALSE;
-      break;
-   case FOURCC_YV12:
-   case FOURCC_I420:
-      planar = TRUE;
-      break;
-   default:
-      ErrorF("Unknown format 0x%x\n", id);
-      planar = FALSE;
-      break;
-   }
-
-   /* Tell the rotation code that we have stomped its invariant state by
-    * setting a high bit.  We don't use any invariant 3D state for video, so we
-    * don't have to worry about it ourselves.
-    */
-   *pI830->used3D |= 1 << 30;
-
-   BEGIN_LP_RING(44);
-
-   /* invarient state */
-   OUT_RING(MI_NOOP);
-   OUT_RING(STATE3D_ANTI_ALIASING |
-	    LINE_CAP_WIDTH_MODIFY | LINE_CAP_WIDTH_1_0 |
-	    LINE_WIDTH_MODIFY | LINE_WIDTH_1_0);
-
-   OUT_RING(STATE3D_DFLT_DIFFUSE_CMD);
-   OUT_RING(0x00000000);
-
-   OUT_RING(STATE3D_DFLT_SPEC_CMD);
-   OUT_RING(0x00000000);
-
-   OUT_RING(STATE3D_DFLT_Z_CMD);
-   OUT_RING(0x00000000);
-
-   OUT_RING(STATE3D_COORD_SET_BINDINGS | CSB_TCB(0, 0) | CSB_TCB(1, 1) |
-	    CSB_TCB(2,2) | CSB_TCB(3,3) | CSB_TCB(4,4) | CSB_TCB(5,5) |
-	    CSB_TCB(6,6) | CSB_TCB(7,7));
-
-   OUT_RING(STATE3D_RASTERIZATION_RULES |
-	    ENABLE_TRI_FAN_PROVOKE_VRTX | TRI_FAN_PROVOKE_VRTX(2) |
-	    ENABLE_LINE_STRIP_PROVOKE_VRTX | LINE_STRIP_PROVOKE_VRTX(1) |
-	    ENABLE_TEXKILL_3D_4D | TEXKILL_4D |
-	    ENABLE_POINT_RASTER_RULE | OGL_POINT_RASTER_RULE);
-
-   OUT_RING(STATE3D_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(3) | 1);
-   OUT_RING(0x00000000); /* texture coordinate wrap */
-
-   /* flush map & render cache */
-   OUT_RING(MI_FLUSH | MI_WRITE_DIRTY_STATE | MI_INVALIDATE_MAP_CACHE);
-   OUT_RING(0x00000000);
-
-   /* draw rect -- just clipping */
-   OUT_RING(STATE3D_DRAWING_RECTANGLE);
-   OUT_RING(0x00000000);	/* flags */
-   OUT_RING(0x00000000);	/* ymin, xmin */
-   OUT_RING((pScrn->virtualX - 1) | (pScrn->virtualY - 1) << 16); /* ymax, xmax */
-   OUT_RING(0x00000000);	/* yorigin, xorigin */
-   OUT_RING(MI_NOOP);
-
-   /* scissor */
-   OUT_RING(STATE3D_SCISSOR_ENABLE | DISABLE_SCISSOR_RECT);
-   OUT_RING(STATE3D_SCISSOR_RECTANGLE);
-   OUT_RING(0x00000000);	/* ymin, xmin */
-   OUT_RING(0x00000000);	/* ymax, xmax */
-
-   OUT_RING(0x7c000003);	/* unknown command */
-   OUT_RING(0x7d070000);
-   OUT_RING(0x00000000);
-   OUT_RING(0x68000002);
-
-   /* context setup */
-   OUT_RING(STATE3D_MODES_4 |
-	    ENABLE_LOGIC_OP_FUNC | LOGIC_OP_FUNC(LOGICOP_COPY) |
-	    ENABLE_STENCIL_WRITE_MASK | STENCIL_WRITE_MASK(0xff) |
-	    ENABLE_STENCIL_TEST_MASK | STENCIL_TEST_MASK(0xff));
-
-   OUT_RING(STATE3D_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(2) |
-	    I1_LOAD_S(4) | I1_LOAD_S(5) | I1_LOAD_S(6) | 4);
-   s2 = S2_TEXCOORD_FMT(0, TEXCOORDFMT_2D);
-   if (planar)
-      s2 |= S2_TEXCOORD_FMT(1, TEXCOORDFMT_2D);
-   else
-      s2 |= S2_TEXCOORD_FMT(1, TEXCOORDFMT_NOT_PRESENT);
-   s2 |= S2_TEXCOORD_FMT(2, TEXCOORDFMT_NOT_PRESENT) |
-      S2_TEXCOORD_FMT(3, TEXCOORDFMT_NOT_PRESENT) |
-      S2_TEXCOORD_FMT(4, TEXCOORDFMT_NOT_PRESENT) |
-      S2_TEXCOORD_FMT(5, TEXCOORDFMT_NOT_PRESENT) |
-      S2_TEXCOORD_FMT(6, TEXCOORDFMT_NOT_PRESENT) |
-      S2_TEXCOORD_FMT(7, TEXCOORDFMT_NOT_PRESENT);
-   OUT_RING(s2);
-   OUT_RING((1 << S4_POINT_WIDTH_SHIFT) | S4_LINE_WIDTH_ONE |
-	    S4_CULLMODE_NONE | S4_VFMT_SPEC_FOG | S4_VFMT_COLOR | S4_VFMT_XYZW);
-   OUT_RING(0x00000000); /* S5 - enable bits */
-   OUT_RING((2 << S6_DEPTH_TEST_FUNC_SHIFT) |
-	    (2 << S6_CBUF_SRC_BLEND_FACT_SHIFT) |
-	    (1 << S6_CBUF_DST_BLEND_FACT_SHIFT) | S6_COLOR_WRITE_ENABLE |
-	    (2 << S6_TRISTRIP_PV_SHIFT));
-
-   OUT_RING(STATE3D_INDEPENDENT_ALPHA_BLEND |
-	    IAB_MODIFY_ENABLE |
-	    IAB_MODIFY_FUNC | (BLENDFUNC_ADD << IAB_FUNC_SHIFT) |
-	    IAB_MODIFY_SRC_FACTOR | (BLENDFACT_ONE << IAB_SRC_FACTOR_SHIFT) |
-	    IAB_MODIFY_DST_FACTOR | (BLENDFACT_ZERO << IAB_DST_FACTOR_SHIFT));
-
-   OUT_RING(STATE3D_CONST_BLEND_COLOR);
-   OUT_RING(0x00000000);
-
-   OUT_RING(STATE3D_DEST_BUFFER_VARIABLES);
-   if (pI830->cpp == 2)
-      format = COLR_BUF_RGB565;
-   else
-      format = COLR_BUF_ARGB8888 | DEPTH_FRMT_24_FIXED_8_OTHER;
-
-   OUT_RING(LOD_PRECLAMP_OGL |
-     DSTORG_HORIZ_BIAS(0x80) | DSTORG_VERT_BIAS(0x80) | format);
-
-   OUT_RING(STATE3D_STIPPLE);
-   OUT_RING(0x00000000);
-
-   /* front buffer, pitch, offset */
-   OUT_RING(STATE3D_BUFFER_INFO);
-   OUT_RING(BUFFERID_COLOR_BACK | BUFFER_USE_FENCES |
-	    (((pI830->displayWidth * pI830->cpp) / 4) << 2));
-   OUT_RING(pI830->bufferOffset);
-   ADVANCE_LP_RING();
-
-   if (!planar) {
-      BEGIN_LP_RING(20);
-      /* fragment program - texture blend replace. */
-      OUT_RING(STATE3D_PIXEL_SHADER_PROGRAM | 8);
-      OUT_DCL(S, 0);
-      OUT_DCL(T, 0);
-      OUT_TEXLD(OC, 0, 0, T, 0);
-      /* End fragment program */
-
-      OUT_RING(STATE3D_SAMPLER_STATE | 3);
-      OUT_RING(0x00000001);
-      OUT_RING(SS2_COLORSPACE_CONVERSION |
-	       (FILTER_LINEAR << SS2_MAG_FILTER_SHIFT) |
-	       (FILTER_LINEAR << SS2_MIN_FILTER_SHIFT));
-      OUT_RING((TEXCOORDMODE_CLAMP_EDGE << SS3_TCX_ADDR_MODE_SHIFT) |
-	       (TEXCOORDMODE_CLAMP_EDGE << SS3_TCY_ADDR_MODE_SHIFT));
-      OUT_RING(0x00000000);
-
-      OUT_RING(STATE3D_MAP_STATE | 3);
-      OUT_RING(0x00000001);	/* texture map #1 */
-      OUT_RING(pPriv->YBuf0offset);
-      ms3 = MAPSURF_422;
-      switch (id) {
-      case FOURCC_YUY2:
-	 ms3 |= MT_422_YCRCB_NORMAL;
-	 break;
-      case FOURCC_UYVY:
-	 ms3 |= MT_422_YCRCB_SWAPY;
-	 break;
-      }
-      ms3 |= (height - 1) << MS3_HEIGHT_SHIFT;
-      ms3 |= (width - 1) << MS3_WIDTH_SHIFT;
-      if (!pI830->disableTiling)
-	 ms3 |= MS3_USE_FENCE_REGS;
-      OUT_RING(ms3);
-      OUT_RING(((video_pitch / 4) - 1) << 21);
-      ADVANCE_LP_RING();
-   } else {
-      BEGIN_LP_RING(1 + 18 + (1 + 3*16) + 11 + 11);
-      OUT_RING(MI_NOOP);
-      /* For the planar formats, we set up three samplers -- one for each plane,
-       * in a Y8 format.  Because I couldn't get the special PLANAR_TO_PACKED
-       * shader setup to work, I did the manual pixel shader:
-       *
-       * y' = y - .0625
-       * u' = u - .5
-       * v' = v - .5;
-       *
-       * r = 1.1643 * y' + 0.0     * u' + 1.5958  * v'
-       * g = 1.1643 * y' - 0.39173 * u' - 0.81290 * v'
-       * b = 1.1643 * y' + 2.017   * u' + 0.0     * v'
-       *
-       * register assignment:
-       * r0 = (y',u',v',0)
-       * r1 = (y,y,y,y)
-       * r2 = (u,u,u,u)
-       * r3 = (v,v,v,v)
-       * OC = (r,g,b,1)
-       */
-      OUT_RING(STATE3D_PIXEL_SHADER_CONSTANTS | 16);
-      OUT_RING(0x000000f);	/* constants 0-3 */
-      /* constant 0: normalization offsets */
-      OUT_RING_F(-0.0625);
-      OUT_RING_F(-0.5);
-      OUT_RING_F(-0.5);
-      OUT_RING_F(0.0);
-      /* constant 1: r coefficients*/
-      OUT_RING_F(1.1643);
-      OUT_RING_F(0.0);
-      OUT_RING_F(1.5958);
-      OUT_RING_F(0.0);
-      /* constant 2: g coefficients */
-      OUT_RING_F(1.1643);
-      OUT_RING_F(-0.39173);
-      OUT_RING_F(-0.81290);
-      OUT_RING_F(0.0);
-      /* constant 3: b coefficients */
-      OUT_RING_F(1.1643);
-      OUT_RING_F(2.017);
-      OUT_RING_F(0.0);
-      OUT_RING_F(0.0);
-
-      OUT_RING(STATE3D_PIXEL_SHADER_PROGRAM | (3 * 16 - 1));
-      /* Declare samplers */
-      OUT_DCL(S, 0);
-      OUT_DCL(S, 1);
-      OUT_DCL(S, 2);
-      OUT_DCL(T, 0);
-      OUT_DCL(T, 1);
-
-      /* Load samplers to temporaries.  Y (sampler 0) gets the un-halved coords
-       * from t1.
-       */
-      OUT_TEXLD(R, 1, 0, T, 1);
-      OUT_TEXLD(R, 2, 1, T, 0);
-      OUT_TEXLD(R, 3, 2, T, 0);
-
-      /* Move the sampled YUV data in R[123] to the first 3 channels of R0. */
-      OUT_MOV_TO_CHANNEL(R, 0, R, 1, X);
-      OUT_MOV_TO_CHANNEL(R, 0, R, 2, Y);
-      OUT_MOV_TO_CHANNEL(R, 0, R, 3, Z);
-
-      /* Normalize the YUV data */
-      OUT_RING(A0_ADD | A0_DEST_CHANNEL_ALL |
-	       (REG_TYPE_R << A0_DEST_TYPE_SHIFT) | (0 << A0_DEST_NR_SHIFT) |				\
-	       (REG_TYPE_R << A0_SRC0_TYPE_SHIFT) | (0 << A0_SRC0_NR_SHIFT));
-      OUT_RING((SRC_X << A1_SRC0_CHANNEL_X_SHIFT) |
-	       (SRC_Y << A1_SRC0_CHANNEL_Y_SHIFT) |
-	       (SRC_Z << A1_SRC0_CHANNEL_Z_SHIFT) |
-	       (SRC_W << A1_SRC0_CHANNEL_W_SHIFT) |
-	       (REG_TYPE_CONST << A1_SRC1_TYPE_SHIFT) | (0 << A1_SRC1_NR_SHIFT) |
-	       (SRC_X << A1_SRC1_CHANNEL_X_SHIFT) |
-	       (SRC_Y << A1_SRC1_CHANNEL_Y_SHIFT));
-      OUT_RING((SRC_Z << A2_SRC1_CHANNEL_Z_SHIFT) |
-	       (SRC_W << A2_SRC1_CHANNEL_W_SHIFT));
-
-      /* dot-product the YUV data in R0 by the vectors of coefficients for
-       * calculating R, G, and B, storing the results in the R, G, or B channels
-       * of the output color.
-       */
-      OUT_DP3_TO_CHANNEL(OC, 0, R, 0, CONST, 1, X);
-      OUT_DP3_TO_CHANNEL(OC, 0, R, 0, CONST, 2, Y);
-      OUT_DP3_TO_CHANNEL(OC, 0, R, 0, CONST, 3, Z);
-
-      /* Set alpha of the output to 1.0, by wiring W to 1 and not actually using
-       * the source.
-       */
-      OUT_RING(A0_MOV | A0_DEST_CHANNEL_W |
-	       (REG_TYPE_OC << A0_DEST_TYPE_SHIFT) | (0 << A0_DEST_NR_SHIFT) |
-	       (REG_TYPE_OC << A0_SRC0_TYPE_SHIFT) | (0 << A0_SRC0_NR_SHIFT));
-      OUT_RING((SRC_X << A1_SRC0_CHANNEL_X_SHIFT) |
-	       (SRC_Y << A1_SRC0_CHANNEL_Y_SHIFT) |
-	       (SRC_Z << A1_SRC0_CHANNEL_Z_SHIFT) |
-	       (SRC_ONE << A1_SRC0_CHANNEL_W_SHIFT));
-      OUT_RING(0);
-      /* End fragment program */
-
-      OUT_RING(STATE3D_SAMPLER_STATE | 9);
-      OUT_RING(0x00000007);
-      /* sampler 0 */
-      OUT_RING(0x00000000);
-      OUT_RING((FILTER_LINEAR << SS2_MAG_FILTER_SHIFT) |
-	       (FILTER_LINEAR << SS2_MIN_FILTER_SHIFT));
-      OUT_RING((TEXCOORDMODE_CLAMP_EDGE << SS3_TCX_ADDR_MODE_SHIFT) |
-	       (TEXCOORDMODE_CLAMP_EDGE << SS3_TCY_ADDR_MODE_SHIFT));
-      /* sampler 1 */
-      OUT_RING(0x00000000);
-      OUT_RING((FILTER_LINEAR << SS2_MAG_FILTER_SHIFT) |
-	       (FILTER_LINEAR << SS2_MIN_FILTER_SHIFT));
-      OUT_RING((TEXCOORDMODE_CLAMP_EDGE << SS3_TCX_ADDR_MODE_SHIFT) |
-	       (TEXCOORDMODE_CLAMP_EDGE << SS3_TCY_ADDR_MODE_SHIFT));
-      /* sampler 2 */
-      OUT_RING(0x00000000);
-      OUT_RING((FILTER_LINEAR << SS2_MAG_FILTER_SHIFT) |
-	       (FILTER_LINEAR << SS2_MIN_FILTER_SHIFT));
-      OUT_RING((TEXCOORDMODE_CLAMP_EDGE << SS3_TCX_ADDR_MODE_SHIFT) |
-	       (TEXCOORDMODE_CLAMP_EDGE << SS3_TCY_ADDR_MODE_SHIFT));
-
-      OUT_RING(STATE3D_MAP_STATE | 9);
-      OUT_RING(0x00000007);
-
-      OUT_RING(pPriv->YBuf0offset);
-      ms3 = MAPSURF_8BIT | MT_8BIT_I8;
-      ms3 |= (height - 1) << MS3_HEIGHT_SHIFT;
-      ms3 |= (width - 1) << MS3_WIDTH_SHIFT;
-      OUT_RING(ms3);
-      OUT_RING(((video_pitch * 2 / 4) - 1) << 21);
-
-      OUT_RING(pPriv->UBuf0offset);
-      ms3 = MAPSURF_8BIT | MT_8BIT_I8;
-      ms3 |= (height / 2 - 1) << MS3_HEIGHT_SHIFT;
-      ms3 |= (width / 2 - 1) << MS3_WIDTH_SHIFT;
-      OUT_RING(ms3);
-      OUT_RING(((video_pitch / 4) - 1) << 21);
-
-      OUT_RING(pPriv->VBuf0offset);
-      ms3 = MAPSURF_8BIT | MT_8BIT_I8;
-      ms3 |= (height / 2 - 1) << MS3_HEIGHT_SHIFT;
-      ms3 |= (width / 2 - 1) << MS3_WIDTH_SHIFT;
-      OUT_RING(ms3);
-      OUT_RING(((video_pitch / 4) - 1) << 21);
-      ADVANCE_LP_RING();
-   }
-   
-   {
-      BEGIN_LP_RING(2);
-      OUT_RING(MI_FLUSH | MI_WRITE_DIRTY_STATE | MI_INVALIDATE_MAP_CACHE);
-      OUT_RING(0x00000000);
-      ADVANCE_LP_RING();
-   }
-
-   dxo = dstRegion->extents.x1;
-   dyo = dstRegion->extents.y1;
-
-   pbox = REGION_RECTS(dstRegion);
-   nbox = REGION_NUM_RECTS(dstRegion);
-   while (nbox--)
-   {
-      int box_x1 = pbox->x1;
-      int box_y1 = pbox->y1;
-      int box_x2 = pbox->x2;
-      int box_y2 = pbox->y2;
-      int j;
-      float src_scale_x, src_scale_y;
-      CARD32 vb[40];
-      float verts[4][2], tex[4][2], tex2[4][2];
-      int vert_data_count;
-
-      pbox++;
-
-      src_scale_x = (float)src_w / (float)drw_w;
-      src_scale_y  = (float)src_h / (float)drw_h;
-
-      if (!planar)
-	 vert_data_count = 32;
-      else
-	 vert_data_count = 40;
-
-      BEGIN_LP_RING(vert_data_count + 8);
-      OUT_RING(MI_NOOP);
-      OUT_RING(MI_NOOP);
-      OUT_RING(MI_NOOP);
-      OUT_RING(MI_NOOP);
-      OUT_RING(MI_NOOP);
-      OUT_RING(MI_NOOP);
-      OUT_RING(MI_NOOP);
-
-      /* vertex data */
-      OUT_RING(PRIMITIVE3D | PRIM3D_INLINE | PRIM3D_TRIFAN |
-	       (vert_data_count - 1));
-      verts[0][0] = box_x1; verts[0][1] = box_y1;
-      verts[1][0] = box_x2; verts[1][1] = box_y1;
-      verts[2][0] = box_x2; verts[2][1] = box_y2;
-      verts[3][0] = box_x1; verts[3][1] = box_y2;
-
-      if (!planar) {
-	 tex[0][0] = (box_x1 - dxo) * src_scale_x;
-	 tex[0][1] = (box_y1 - dyo) * src_scale_y;
-	 tex[1][0] = (box_x2 - dxo) * src_scale_x;
-	 tex[1][1] = (box_y1 - dyo) * src_scale_y;
-	 tex[2][0] = (box_x2 - dxo) * src_scale_x;
-	 tex[2][1] = (box_y2 - dyo) * src_scale_y;
-	 tex[3][0] = (box_x1 - dxo) * src_scale_x;
-	 tex[3][1] = (box_y2 - dyo) * src_scale_y;
-	 /* emit vertex buffer */
-	 draw_poly(vb, verts, tex, NULL);
-	 for (j = 0; j < vert_data_count; j++)
-	    OUT_RING(vb[j]);
-      } else {
-	 tex[0][0] = (box_x1 - dxo) * src_scale_x / 2.0;
-	 tex[0][1] = (box_y1 - dyo) * src_scale_y / 2.0;
-	 tex[1][0] = (box_x2 - dxo) * src_scale_x / 2.0;
-	 tex[1][1] = (box_y1 - dyo) * src_scale_y / 2.0;
-	 tex[2][0] = (box_x2 - dxo) * src_scale_x / 2.0;
-	 tex[2][1] = (box_y2 - dyo) * src_scale_y / 2.0;
-	 tex[3][0] = (box_x1 - dxo) * src_scale_x / 2.0;
-	 tex[3][1] = (box_y2 - dyo) * src_scale_y / 2.0;
-	 tex2[0][0] = (box_x1 - dxo) * src_scale_x;
-	 tex2[0][1] = (box_y1 - dyo) * src_scale_y;
-	 tex2[1][0] = (box_x2 - dxo) * src_scale_x;
-	 tex2[1][1] = (box_y1 - dyo) * src_scale_y;
-	 tex2[2][0] = (box_x2 - dxo) * src_scale_x;
-	 tex2[2][1] = (box_y2 - dyo) * src_scale_y;
-	 tex2[3][0] = (box_x1 - dxo) * src_scale_x;
-	 tex2[3][1] = (box_y2 - dyo) * src_scale_y;
-	 /* emit vertex buffer */
-	 draw_poly(vb, verts, tex, tex2);
-	 for (j = 0; j < vert_data_count; j++)
-	    OUT_RING(vb[j]);
-      }
-
-      ADVANCE_LP_RING();
-   }
-
-   if (pI830->AccelInfoRec)
-      pI830->AccelInfoRec->NeedToSync = TRUE;
-}
-
 static const CARD32 sip_kernel_static[][4] = {
 /*    wait (1) a0<1>UW a145<0,1,0>UW { align1 +  } */
     { 0x00000030, 0x20000108, 0x00001220, 0x00000000 },
@@ -2793,6 +2191,7 @@
    return x.i;
 }
 
+#if 0
 static struct {
    CARD32   svg_ctl;
    char	    *name;
@@ -2821,6 +2220,7 @@
       ErrorF("\t%34.34s: 0x%08x\n", svg_ctl_bits[i].name, v);
    }
 }
+#endif
 
 #define WATCH_SF 0
 #define WATCH_WIZ 0
@@ -2836,10 +2236,8 @@
 			       DrawablePtr pDraw)
 {
    I830Ptr pI830 = I830PTR(pScrn);
-   CARD32 format, ms3, s2;
    BoxPtr pbox;
    int nbox, dxo, dyo;
-   Bool planar;
    int urb_vs_start, urb_vs_size;
    int urb_gs_start, urb_gs_size;
    int urb_clip_start, urb_clip_size;
@@ -3413,9 +2811,6 @@
       OUT_RING(0); /* index buffer offset, ignored */
       ADVANCE_LP_RING();
 
-      int   j, k;
-      CARD32	  ctl = 0, rdata;
-      
 #if 0
       for (j = 0; j < 100000; j++) {
 	ctl = INREG(BRW_VF_CTL);

Added: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_video.h
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_video.h	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i830_video.h	2006-08-11 02:51:35 UTC (rev 2766)
@@ -0,0 +1,76 @@
+/***************************************************************************
+ 
+Copyright 2000 Intel Corporation.  All Rights Reserved. 
+
+Permission is hereby granted, free of charge, to any person obtaining a 
+copy of this software and associated documentation files (the 
+"Software"), to deal in the Software without restriction, including 
+without limitation the rights to use, copy, modify, merge, publish, 
+distribute, sub license, and/or sell copies of the Software, and to 
+permit persons to whom the Software is furnished to do so, subject to 
+the following conditions: 
+
+The above copyright notice and this permission notice (including the 
+next paragraph) shall be included in all copies or substantial portions 
+of the Software. 
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 
+IN NO EVENT SHALL INTEL, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, 
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 
+THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+#include "xf86.h"
+#include "xf86_OSproc.h"
+
+typedef struct {
+   CARD32 YBuf0offset;
+   CARD32 UBuf0offset;
+   CARD32 VBuf0offset;
+
+   CARD32 YBuf1offset;
+   CARD32 UBuf1offset;
+   CARD32 VBuf1offset;
+
+   unsigned char currentBuf;
+
+   int brightness;
+   int contrast;
+   int pipe;
+   int doubleBuffer;
+
+   RegionRec clip;
+   CARD32 colorKey;
+
+   CARD32 gamma0;
+   CARD32 gamma1;
+   CARD32 gamma2;
+   CARD32 gamma3;
+   CARD32 gamma4;
+   CARD32 gamma5;
+
+   CARD32 videoStatus;
+   Time offTime;
+   Time freeTime;
+   FBLinearPtr linear;
+
+   Bool overlayOK;
+   int oneLineMode;
+   int scaleRatio;
+   Bool textured;
+} I830PortPrivRec, *I830PortPrivPtr;
+
+#define GET_PORT_PRIVATE(pScrn) \
+   (I830PortPrivPtr)((I830PTR(pScrn))->adaptor->pPortPrivates[0].ptr)
+
+void I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
+			      int id, RegionPtr dstRegion, short width,
+			      short height, int video_pitch,
+			      int x1, int y1, int x2, int y2,
+			      short src_w, short src_h,
+			      short drw_w, short drw_h,
+			      DrawablePtr pDraw);

Added: vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i915_video.c
===================================================================
--- vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i915_video.c	2006-08-10 03:22:41 UTC (rev 2765)
+++ vendor/X11R7.1/driver/xserver-xorg-video-i810/src/i915_video.c	2006-08-11 02:51:35 UTC (rev 2766)
@@ -0,0 +1,467 @@
+/*
+ * Copyright © 2006 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Authors:
+ *    Eric Anholt <eric@anholt.net>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "xf86.h"
+#include "xf86_OSproc.h"
+#include "xf86xv.h"
+#include "fourcc.h"
+
+#include "i830.h"
+#include "i830_video.h"
+#include "i915_reg.h"
+#include "i915_3d.h"
+
+union intfloat {
+   CARD32 ui;
+   float f;
+};
+
+#define OUT_RING_F(x) do {						\
+   union intfloat _tmp;							\
+   _tmp.f = x;								\
+   OUT_RING(_tmp.ui);							\
+} while (0)
+
+
+void
+I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
+			 RegionPtr dstRegion,
+			 short width, short height, int video_pitch,
+			 int x1, int y1, int x2, int y2,
+			 short src_w, short src_h, short drw_w, short drw_h,
+			 DrawablePtr pDraw)
+{
+   I830Ptr pI830 = I830PTR(pScrn);
+   CARD32 format, ms3, s2;
+   BoxPtr pbox;
+   int nbox, dxo, dyo;
+   Bool planar;
+
+   ErrorF("I915DisplayVideo: %dx%d (pitch %d)\n", width, height,
+	  video_pitch);
+
+   switch (id) {
+   case FOURCC_UYVY:
+   case FOURCC_YUY2:
+      planar = FALSE;
+      break;
+   case FOURCC_YV12:
+   case FOURCC_I420:
+      planar = TRUE;
+      break;
+   default:
+      ErrorF("Unknown format 0x%x\n", id);
+      planar = FALSE;
+      break;
+   }
+
+   /* Tell the rotation code that we have stomped its invariant state by
+    * setting a high bit.  We don't use any invariant 3D state for video, so we
+    * don't have to worry about it ourselves.
+    */
+   *pI830->used3D |= 1 << 30;
+
+   BEGIN_LP_RING(44);
+
+   /* invarient state */
+   OUT_RING(MI_NOOP);
+   OUT_RING(_3DSTATE_AA_CMD |
+	    AA_LINE_ECAAR_WIDTH_ENABLE | AA_LINE_ECAAR_WIDTH_1_0 |
+	    AA_LINE_REGION_WIDTH_ENABLE | AA_LINE_REGION_WIDTH_1_0);
+
+   OUT_RING(_3DSTATE_DFLT_DIFFUSE_CMD);
+   OUT_RING(0x00000000);
+
+   OUT_RING(_3DSTATE_DFLT_SPEC_CMD);
+   OUT_RING(0x00000000);
+
+   OUT_RING(_3DSTATE_DFLT_Z_CMD);
+   OUT_RING(0x00000000);
+
+   OUT_RING(_3DSTATE_COORD_SET_BINDINGS | CSB_TCB(0, 0) | CSB_TCB(1, 1) |
+	    CSB_TCB(2,2) | CSB_TCB(3,3) | CSB_TCB(4,4) | CSB_TCB(5,5) |
+	    CSB_TCB(6,6) | CSB_TCB(7,7));
+
+   OUT_RING(_3DSTATE_RASTER_RULES_CMD |
+	    ENABLE_TRI_FAN_PROVOKE_VRTX | TRI_FAN_PROVOKE_VRTX(2) |
+	    ENABLE_LINE_STRIP_PROVOKE_VRTX | LINE_STRIP_PROVOKE_VRTX(1) |
+	    ENABLE_TEXKILL_3D_4D | TEXKILL_4D |
+	    ENABLE_POINT_RASTER_RULE | OGL_POINT_RASTER_RULE);
+
+   OUT_RING(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(3) | 1);
+   OUT_RING(0x00000000); /* texture coordinate wrap */
+
+   /* flush map & render cache */
+   OUT_RING(MI_FLUSH | MI_WRITE_DIRTY_STATE | MI_INVALIDATE_MAP_CACHE);
+   OUT_RING(0x00000000);
+
+   /* draw rect -- just clipping */
+   OUT_RING(_3DSTATE_DRAW_RECT_CMD);
+   OUT_RING(0x00000000);	/* flags */
+   OUT_RING(0x00000000);	/* ymin, xmin */
+   OUT_RING((pScrn->virtualX - 1) |
+	    (pScrn->virtualY - 1) << 16); /* ymax, xmax */
+   OUT_RING(0x00000000);	/* yorigin, xorigin */
+   OUT_RING(MI_NOOP);
+
+   /* scissor */
+   OUT_RING(_3DSTATE_SCISSOR_ENABLE_CMD | DISABLE_SCISSOR_RECT);
+   OUT_RING(_3DSTATE_SCISSOR_RECT_0_CMD);
+   OUT_RING(0x00000000);	/* ymin, xmin */
+   OUT_RING(0x00000000);	/* ymax, xmax */
+
+   OUT_RING(0x7c000003);	/* unknown command */
+   OUT_RING(0x7d070000);
+   OUT_RING(0x00000000);
+   OUT_RING(0x68000002);
+
+   /* context setup */
+   OUT_RING(_3DSTATE_MODES_4_CMD |
+	    ENABLE_LOGIC_OP_FUNC | LOGIC_OP_FUNC(LOGICOP_COPY) |
+	    ENABLE_STENCIL_WRITE_MASK | STENCIL_WRITE_MASK(0xff) |
+	    ENABLE_STENCIL_TEST_MASK | STENCIL_TEST_MASK(0xff));
+
+   OUT_RING(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(2) |
+	    I1_LOAD_S(4) | I1_LOAD_S(5) | I1_LOAD_S(6) | 4);
+   s2 = S2_TEXCOORD_FMT(0, TEXCOORDFMT_2D);
+   if (planar)
+      s2 |= S2_TEXCOORD_FMT(1, TEXCOORDFMT_2D);
+   else
+      s2 |= S2_TEXCOORD_FMT(1, TEXCOORDFMT_NOT_PRESENT);
+   s2 |= S2_TEXCOORD_FMT(2, TEXCOORDFMT_NOT_PRESENT) |
+      S2_TEXCOORD_FMT(3, TEXCOORDFMT_NOT_PRESENT) |
+      S2_TEXCOORD_FMT(4, TEXCOORDFMT_NOT_PRESENT) |
+      S2_TEXCOORD_FMT(5, TEXCOORDFMT_NOT_PRESENT) |
+      S2_TEXCOORD_FMT(6, TEXCOORDFMT_NOT_PRESENT) |
+      S2_TEXCOORD_FMT(7, TEXCOORDFMT_NOT_PRESENT);
+   OUT_RING(s2);
+   OUT_RING((1 << S4_POINT_WIDTH_SHIFT) | S4_LINE_WIDTH_ONE |
+	    S4_CULLMODE_NONE | S4_VFMT_XY);
+   OUT_RING(0x00000000); /* S5 - enable bits */
+   OUT_RING((2 << S6_DEPTH_TEST_FUNC_SHIFT) |
+	    (2 << S6_CBUF_SRC_BLEND_FACT_SHIFT) |
+	    (1 << S6_CBUF_DST_BLEND_FACT_SHIFT) | S6_COLOR_WRITE_ENABLE |
+	    (2 << S6_TRISTRIP_PV_SHIFT));
+
+   OUT_RING(_3DSTATE_INDEPENDENT_ALPHA_BLEND_CMD |
+	    IAB_MODIFY_ENABLE |
+	    IAB_MODIFY_FUNC | (BLENDFUNC_ADD << IAB_FUNC_SHIFT) |
+	    IAB_MODIFY_SRC_FACTOR | (BLENDFACT_ONE << IAB_SRC_FACTOR_SHIFT) |
+	    IAB_MODIFY_DST_FACTOR | (BLENDFACT_ZERO << IAB_DST_FACTOR_SHIFT));
+
+   OUT_RING(_3DSTATE_CONST_BLEND_COLOR_CMD);
+   OUT_RING(0x00000000);
+
+   OUT_RING(_3DSTATE_DST_BUF_VARS_CMD);
+   if (pI830->cpp == 2)
+      format = COLR_BUF_RGB565;
+   else
+      format = COLR_BUF_ARGB8888 | DEPTH_FRMT_24_FIXED_8_OTHER;
+
+   OUT_RING(LOD_PRECLAMP_OGL |
+     DSTORG_HORT_BIAS(0x80) | DSTORG_VERT_BIAS(0x80) | format);
+
+   OUT_RING(_3DSTATE_STIPPLE);
+   OUT_RING(0x00000000);
+
+   /* front buffer, pitch, offset */
+   OUT_RING(_3DSTATE_BUF_INFO_CMD);
+   OUT_RING(BUF_3D_ID_COLOR_BACK | BUF_3D_USE_FENCE |
+	    (((pI830->displayWidth * pI830->cpp) / 4) << 2));
+   OUT_RING(pI830->bufferOffset);
+   ADVANCE_LP_RING();
+
+   if (!planar) {
+      FS_LOCALS(3);
+
+      BEGIN_LP_RING(10);
+      OUT_RING(_3DSTATE_SAMPLER_STATE | 3);
+      OUT_RING(0x00000001);
+      OUT_RING(SS2_COLORSPACE_CONVERSION |
+	       (FILTER_LINEAR << SS2_MAG_FILTER_SHIFT) |
+	       (FILTER_LINEAR << SS2_MIN_FILTER_SHIFT));
+      OUT_RING((TEXCOORDMODE_CLAMP_EDGE << SS3_TCX_ADDR_MODE_SHIFT) |
+	       (TEXCOORDMODE_CLAMP_EDGE << SS3_TCY_ADDR_MODE_SHIFT));
+      OUT_RING(0x00000000);
+
+      OUT_RING(_3DSTATE_MAP_STATE | 3);
+      OUT_RING(0x00000001);	/* texture map #1 */
+      OUT_RING(pPriv->YBuf0offset);
+      ms3 = MAPSURF_422;
+      switch (id) {
+      case FOURCC_YUY2:
+	 ms3 |= MT_422_YCRCB_NORMAL;
+	 break;
+      case FOURCC_UYVY:
+	 ms3 |= MT_422_YCRCB_SWAPY;
+	 break;
+      }
+      ms3 |= (height - 1) << MS3_HEIGHT_SHIFT;
+      ms3 |= (width - 1) << MS3_WIDTH_SHIFT;
+      if (!pI830->disableTiling)
+	 ms3 |= MS3_USE_FENCE_REGS;
+      OUT_RING(ms3);
+      OUT_RING(((video_pitch / 4) - 1) << 21);
+      ADVANCE_LP_RING();
+
+      FS_BEGIN();
+      i915_fs_dcl(FS_S0);
+      i915_fs_dcl(FS_T0);
+      i915_fs_texld(FS_OC, FS_S0, FS_T0);
+      FS_END();
+   } else {
+      FS_LOCALS(16);
+
+      BEGIN_LP_RING(1 + 18 + 11 + 11);
+      OUT_RING(MI_NOOP);
+      /* For the planar formats, we set up three samplers -- one for each plane,
+       * in a Y8 format.  Because I couldn't get the special PLANAR_TO_PACKED
+       * shader setup to work, I did the manual pixel shader:
+       *
+       * y' = y - .0625
+       * u' = u - .5
+       * v' = v - .5;
+       *
+       * r = 1.1643 * y' + 0.0     * u' + 1.5958  * v'
+       * g = 1.1643 * y' - 0.39173 * u' - 0.81290 * v'
+       * b = 1.1643 * y' + 2.017   * u' + 0.0     * v'
+       *
+       * register assignment:
+       * r0 = (y',u',v',0)
+       * r1 = (y,y,y,y)
+       * r2 = (u,u,u,u)
+       * r3 = (v,v,v,v)
+       * OC = (r,g,b,1)
+       */
+      OUT_RING(_3DSTATE_PIXEL_SHADER_CONSTANTS | 16);
+      OUT_RING(0x000000f);	/* constants 0-3 */
+      /* constant 0: normalization offsets */
+      OUT_RING_F(-0.0625);
+      OUT_RING_F(-0.5);
+      OUT_RING_F(-0.5);
+      OUT_RING_F(0.0);
+      /* constant 1: r coefficients*/
+      OUT_RING_F(1.1643);
+      OUT_RING_F(0.0);
+      OUT_RING_F(1.5958);
+      OUT_RING_F(0.0);
+      /* constant 2: g coefficients */
+      OUT_RING_F(1.1643);
+      OUT_RING_F(-0.39173);
+      OUT_RING_F(-0.81290);
+      OUT_RING_F(0.0);
+      /* constant 3: b coefficients */
+      OUT_RING_F(1.1643);
+      OUT_RING_F(2.017);
+      OUT_RING_F(0.0);
+      OUT_RING_F(0.0);
+
+      OUT_RING(_3DSTATE_SAMPLER_STATE | 9);
+      OUT_RING(0x00000007);
+      /* sampler 0 */
+      OUT_RING(0x00000000);
+      OUT_RING((FILTER_LINEAR << SS2_MAG_FILTER_SHIFT) |
+	       (FILTER_LINEAR << SS2_MIN_FILTER_SHIFT));
+      OUT_RING((TEXCOORDMODE_CLAMP_EDGE << SS3_TCX_ADDR_MODE_SHIFT) |
+	       (TEXCOORDMODE_CLAMP_EDGE << SS3_TCY_ADDR_MODE_SHIFT));
+      /* sampler 1 */
+      OUT_RING(0x00000000);
+      OUT_RING((FILTER_LINEAR << SS2_MAG_FILTER_SHIFT) |
+	       (FILTER_LINEAR << SS2_MIN_FILTER_SHIFT));
+      OUT_RING((TEXCOORDMODE_CLAMP_EDGE << SS3_TCX_ADDR_MODE_SHIFT) |
+	       (TEXCOORDMODE_CLAMP_EDGE << SS3_TCY_ADDR_MODE_SHIFT));
+      /* sampler 2 */
+      OUT_RING(0x00000000);
+      OUT_RING((FILTER_LINEAR << SS2_MAG_FILTER_SHIFT) |
+	       (FILTER_LINEAR << SS2_MIN_FILTER_SHIFT));
+      OUT_RING((TEXCOORDMODE_CLAMP_EDGE << SS3_TCX_ADDR_MODE_SHIFT) |
+	       (TEXCOORDMODE_CLAMP_EDGE << SS3_TCY_ADDR_MODE_SHIFT));
+
+      OUT_RING(_3DSTATE_MAP_STATE | 9);
+      OUT_RING(0x00000007);
+
+      OUT_RING(pPriv->YBuf0offset);
+      ms3 = MAPSURF_8BIT | MT_8BIT_I8;
+      ms3 |= (height - 1) << MS3_HEIGHT_SHIFT;
+      ms3 |= (width - 1) << MS3_WIDTH_SHIFT;
+      OUT_RING(ms3);
+      OUT_RING(((video_pitch * 2 / 4) - 1) << 21);
+
+      OUT_RING(pPriv->UBuf0offset);
+      ms3 = MAPSURF_8BIT | MT_8BIT_I8;
+      ms3 |= (height / 2 - 1) << MS3_HEIGHT_SHIFT;
+      ms3 |= (width / 2 - 1) << MS3_WIDTH_SHIFT;
+      OUT_RING(ms3);
+      OUT_RING(((video_pitch / 4) - 1) << 21);
+
+      OUT_RING(pPriv->VBuf0offset);
+      ms3 = MAPSURF_8BIT | MT_8BIT_I8;
+      ms3 |= (height / 2 - 1) << MS3_HEIGHT_SHIFT;
+      ms3 |= (width / 2 - 1) << MS3_WIDTH_SHIFT;
+      OUT_RING(ms3);
+      OUT_RING(((video_pitch / 4) - 1) << 21);
+      ADVANCE_LP_RING();
+
+      FS_BEGIN();
+      /* Declare samplers */
+      i915_fs_dcl(FS_S0);
+      i915_fs_dcl(FS_S1);
+      i915_fs_dcl(FS_S2);
+      i915_fs_dcl(FS_T0);
+      i915_fs_dcl(FS_T1);
+
+      /* Load samplers to temporaries.  Y (sampler 0) gets the un-halved coords-
+       * from t1.
+       */
+      i915_fs_texld(FS_R1, FS_S0, FS_T1);
+      i915_fs_texld(FS_R2, FS_S1, FS_T0);
+      i915_fs_texld(FS_R3, FS_S2, FS_T0);
+
+      /* Move the sampled YUV data in R[123] to the first 3 channels of R0. */
+      i915_fs_mov_masked(FS_R0, MASK_X, i915_fs_operand_reg(FS_R1));
+      i915_fs_mov_masked(FS_R0, MASK_Y, i915_fs_operand_reg(FS_R2));
+      i915_fs_mov_masked(FS_R0, MASK_Z, i915_fs_operand_reg(FS_R3));
+
+      /* Normalize the YUV data */
+      i915_fs_add(FS_R0, i915_fs_operand_reg(FS_R0),
+                 i915_fs_operand_reg(FS_C0));
+      /* dot-product the YUV data in R0 by the vectors of coefficients for
+       * calculating R, G, and B, storing the results in the R, G, or B channels
+       * of the output color.
+       */
+      i915_fs_dp3_masked(FS_OC, MASK_X | MASK_SATURATE,
+                        i915_fs_operand_reg(FS_R0),
+                        i915_fs_operand_reg(FS_C1));
+      i915_fs_dp3_masked(FS_OC, MASK_Y | MASK_SATURATE,
+                        i915_fs_operand_reg(FS_R0),
+                        i915_fs_operand_reg(FS_C2));
+      i915_fs_dp3_masked(FS_OC, MASK_Z | MASK_SATURATE,
+                        i915_fs_operand_reg(FS_R0),
+                        i915_fs_operand_reg(FS_C3));
+      /* Set alpha of the output to 1.0, by wiring W to 1 and not actually using
+       * the source.
+       */
+      i915_fs_mov_masked(FS_OC, MASK_W, i915_fs_operand_one());
+      FS_END();
+   }
+   
+   {
+      BEGIN_LP_RING(2);
+      OUT_RING(MI_FLUSH | MI_WRITE_DIRTY_STATE | MI_INVALIDATE_MAP_CACHE);
+      OUT_RING(0x00000000);
+      ADVANCE_LP_RING();
+   }
+
+   dxo = dstRegion->extents.x1;
+   dyo = dstRegion->extents.y1;
+
+   pbox = REGION_RECTS(dstRegion);
+   nbox = REGION_NUM_RECTS(dstRegion);
+   while (nbox--)
+   {
+      int box_x1 = pbox->x1;
+      int box_y1 = pbox->y1;
+      int box_x2 = pbox->x2;
+      int box_y2 = pbox->y2;
+      float src_scale_x, src_scale_y;
+      int vert_data_count;
+
+      pbox++;
+
+      src_scale_x = (float)src_w / (float)drw_w;
+      src_scale_y  = (float)src_h / (float)drw_h;
+
+      if (!planar)
+	 vert_data_count = 12;
+      else
+	 vert_data_count = 18;
+
+      BEGIN_LP_RING(vert_data_count + 8);
+      OUT_RING(MI_NOOP);
+      OUT_RING(MI_NOOP);
+      OUT_RING(MI_NOOP);
+      OUT_RING(MI_NOOP);
+      OUT_RING(MI_NOOP);
+      OUT_RING(MI_NOOP);
+      OUT_RING(MI_NOOP);
+
+      /* vertex data - rect list consists of bottom right, bottom left, and top
+       * left vertices.
+       */
+      OUT_RING(PRIM3D_INLINE | PRIM3D_RECTLIST |
+	       (vert_data_count - 1));
+
+      /* bottom right */
+      OUT_RING_F(box_x2);
+      OUT_RING_F(box_y2);
+      if (!planar) {
+	 OUT_RING_F((box_x2 - dxo) * src_scale_x);
+	 OUT_RING_F((box_y2 - dyo) * src_scale_y);
+      } else {
+	 OUT_RING_F((box_x2 - dxo) * src_scale_x / 2.0);
+	 OUT_RING_F((box_y2 - dyo) * src_scale_y / 2.0);
+	 OUT_RING_F((box_x2 - dxo) * src_scale_x);
+	 OUT_RING_F((box_y2 - dyo) * src_scale_y);
+      }
+
+      /* bottom left */
+      OUT_RING_F(box_x1);
+      OUT_RING_F(box_y2);
+      if (!planar) {
+	 OUT_RING_F((box_x1 - dxo) * src_scale_x);
+	 OUT_RING_F((box_y2 - dyo) * src_scale_y);
+      } else {
+	 OUT_RING_F((box_x1 - dxo) * src_scale_x / 2.0);
+	 OUT_RING_F((box_y2 - dyo) * src_scale_y / 2.0);
+	 OUT_RING_F((box_x1 - dxo) * src_scale_x);
+	 OUT_RING_F((box_y2 - dyo) * src_scale_y);
+      }
+
+      /* top left */
+      OUT_RING_F(box_x1);
+      OUT_RING_F(box_y1);
+      if (!planar) {
+	 OUT_RING_F((box_x1 - dxo) * src_scale_x);
+	 OUT_RING_F((box_y1 - dyo) * src_scale_y);
+      } else {
+	 OUT_RING_F((box_x1 - dxo) * src_scale_x / 2.0);
+	 OUT_RING_F((box_y1 - dyo) * src_scale_y / 2.0);
+	 OUT_RING_F((box_x1 - dxo) * src_scale_x);
+	 OUT_RING_F((box_y1 - dyo) * src_scale_y);
+      }
+
+      ADVANCE_LP_RING();
+   }
+
+   if (pI830->AccelInfoRec)
+      pI830->AccelInfoRec->NeedToSync = TRUE;
+}
+



Reply to: