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

xserver-xorg-video-intel: Changes to 'upstream-unstable'



 .gitignore                        |    4 
 Makefile.am                       |    7 
 README                            |  280 -
 README.sgml                       |  133 
 configure.ac                      |   99 
 man/.cvsignore                    |    2 
 man/Makefile.am                   |   13 
 man/i810.man                      |  241 -
 man/intel.man                     |  196 
 src/.gitignore                    |    6 
 src/Makefile.am                   |  149 
 src/bios_reader/.gitignore        |    2 
 src/bios_reader/Makefile.am       |   13 
 src/bios_reader/bios_dumper.c     |   98 
 src/bios_reader/bios_reader.c     |  163 
 src/brw_structs.h                 |    2 
 src/ch7017/Makefile.am            |   15 
 src/ch7017/ch7017.c               |  304 +
 src/ch7017/ch7017_module.c        |   36 
 src/ch7017/ch7017_reg.h           |  150 
 src/ch7xxx/Makefile.am            |   16 
 src/ch7xxx/ch7xxx.c               |  308 +
 src/ch7xxx/ch7xxx.h               |   31 
 src/ch7xxx/ch7xxx_module.c        |   35 
 src/ch7xxx/ch7xxx_reg.h           |   80 
 src/common.h                      |   74 
 src/exa_sf.g4a                    |   45 
 src/exa_sf_mask.g4a               |   78 
 src/exa_sf_mask_prog.h            |   25 
 src/exa_sf_prog.h                 |   17 
 src/exa_sf_rotation.g4a           |   55 
 src/exa_sf_rotation_prog.h        |   20 
 src/exa_wm_maskca.g4a             |  228 +
 src/exa_wm_maskca_prog.h          |   95 
 src/exa_wm_maskca_srcalpha.g4a    |  228 +
 src/exa_wm_maskca_srcalpha_prog.h |   95 
 src/exa_wm_masknoca.g4a           |  228 +
 src/exa_wm_masknoca_prog.h        |   95 
 src/exa_wm_nomask.g4a             |  169 
 src/exa_wm_nomask_prog.h          |   70 
 src/exa_wm_rotation.g4a           |  184 
 src/exa_wm_rotation_prog.h        |   70 
 src/fix.5c                        |   14 
 src/i2c_vid.h                     |   16 
 src/i810.h                        |    5 
 src/i810_accel.c                  |    3 
 src/i810_dri.c                    |   30 
 src/i810_driver.c                 |   91 
 src/i810_reg.h                    | 1130 +++++
 src/i810_video.c                  |    4 
 src/i810_wmark.c                  |   17 
 src/i830.h                        |  657 +--
 src/i830_3d.c                     |   10 
 src/i830_accel.c                  |  705 ---
 src/i830_bios.c                   |  245 +
 src/i830_bios.h                   |  116 
 src/i830_common.h                 |    6 
 src/i830_crt.c                    |  375 +
 src/i830_cursor.c                 |  802 ---
 src/i830_debug.c                  |  837 +++
 src/i830_debug.h                  |   34 
 src/i830_dga.c                    |  442 --
 src/i830_display.c                | 1418 ++++++
 src/i830_display.h                |   42 
 src/i830_dri.c                    |  611 +-
 src/i830_dri.h                    |    4 
 src/i830_driver.c                 | 8232 +++++---------------------------------
 src/i830_dvo.c                    |  328 +
 src/i830_exa.c                    |  527 ++
 src/i830_i2c.c                    |  387 +
 src/i830_lvds.c                   |  532 ++
 src/i830_memory.c                 | 3183 ++++++--------
 src/i830_modes.c                  |  823 ---
 src/i830_randr.c                  |  355 -
 src/i830_reg.h                    |  120 
 src/i830_render.c                 |  633 ++
 src/i830_rotate.c                 | 1246 -----
 src/i830_sdvo.c                   | 1321 ++++++
 src/i830_sdvo.h                   |   35 
 src/i830_sdvo_regs.h              |  329 +
 src/i830_tv.c                     | 1697 +++++++
 src/i830_video.c                  | 1528 +------
 src/i830_video.h                  |   31 
 src/i830_xaa.c                    |  880 ++++
 src/i915_3d.c                     |   38 
 src/i915_3d.h                     |   27 
 src/i915_reg.h                    |   12 
 src/i915_render.c                 |  481 ++
 src/i915_video.c                  |  109 
 src/i965_render.c                 | 1161 +++++
 src/i965_video.c                  |  865 +++
 src/ivch/Makefile.am              |   15 
 src/ivch/ivch.c                   |  234 +
 src/ivch/ivch_module.c            |   64 
 src/ivch/ivch_reg.h               |   97 
 src/local_xf86Rename.h            |   23 
 src/packed_yuv_sf.g4a             |   28 
 src/packed_yuv_wm.g4a             |   28 
 src/reg_dumper/.gitignore         |    1 
 src/reg_dumper/Makefile.am        |   12 
 src/reg_dumper/main.c             |  105 
 src/reg_dumper/reg_dumper.h       |   89 
 src/reg_dumper/xprintf.c          |   60 
 src/sil164/Makefile.am            |   16 
 src/sil164/sil164.c               |  245 +
 src/sil164/sil164.h               |   31 
 src/sil164/sil164_module.c        |   38 
 src/sil164/sil164_reg.h           |   74 
 src/tv.5c                         |  128 
 src/xvmc/.cvsignore               |    6 
 src/xvmc/.gitignore               |    6 
 src/xvmc/I810XvMC.c               |  309 -
 src/xvmc/Makefile.am              |    3 
 113 files changed, 22687 insertions(+), 15578 deletions(-)

New commits:
commit 31bf269afed0a830e79cbbd9d4b1ee9843af326c
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Thu Apr 19 20:03:41 2007 -0700

    Update version to 2.0.0

diff --git a/configure.ac b/configure.ac
index a06d3e4..da9fd3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-intel],
-        1.9.94,
+        2.0.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-intel)
 

commit 60e891915af7d0f522c9c3f966599fa07779f7aa
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Thu Apr 19 14:02:23 2007 -0700

    Eliminate LinearAlloc option and code.
    
    With the fixes to the 2D frame buffer allocation that allows up to 65536
    lines of 2D frame buffer in XAA mode, the old linear allocation hacks are no
    longer necessary.

diff --git a/man/intel.man b/man/intel.man
index 5ce31ea..178ff0a 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -121,12 +121,6 @@ other drivers.
 Disable or enable XVideo support.
 Default: XVideo is enabled for configurations where it is supported.
 .TP
-.BI "Option \*qLinearAlloc\*q \*q" integer \*q
-Allows more memory for the offscreen allocator. This usually helps in
-situations where HDTV movies are required to play but not enough offscreen
-memory is usually available. Set this to 8160 for upto 1920x1080 HDTV support.
-Default 0KB (off).
-.TP
 .BI "Option \*qLegacy3D\*q \*q" boolean \*q
 Enable support for the legacy i915_dri.so 3D driver.
 This will, among other things, make the 2D driver tell libGL to
diff --git a/src/i830.h b/src/i830.h
index 4cb31b6..d81857b 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -298,9 +298,7 @@ typedef struct _I830Rec {
 #ifdef I830_XV
    /* For Xvideo */
    i830_memory *overlay_regs;
-   i830_memory *xaa_linear;
 #endif
-   unsigned long LinearAlloc;
    XF86ModReqInfo shadowReq; /* to test for later libshadow */
    Rotation rotation;
    void (*PointerMoved)(int, int, int);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index e3bf330..2c1e514 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -274,7 +274,6 @@ typedef enum {
    OPTION_VIDEO_KEY,
    OPTION_COLOR_KEY,
    OPTION_CHECKDEVICES,
-   OPTION_LINEARALLOC,
    OPTION_MODEDEBUG,
 #ifdef XF86DRI_MM
    OPTION_INTELTEXPOOL,
@@ -296,7 +295,6 @@ static OptionInfoRec I830Options[] = {
    {OPTION_COLOR_KEY,	"ColorKey",	OPTV_INTEGER,	{0},	FALSE},
    {OPTION_VIDEO_KEY,	"VideoKey",	OPTV_INTEGER,	{0},	FALSE},
    {OPTION_CHECKDEVICES, "CheckDevices",OPTV_BOOLEAN,	{0},	FALSE},
-   {OPTION_LINEARALLOC, "LinearAlloc",  OPTV_INTEGER,   {0},    FALSE},
    {OPTION_MODEDEBUG,	"ModeDebug",	OPTV_BOOLEAN,	{0},	FALSE},
 #ifdef XF86DRI_MM
    {OPTION_INTELTEXPOOL,"Legacy3D",     OPTV_BOOLEAN,	{0},	FALSE},
@@ -1300,13 +1298,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
    
 #endif
 
-   pI830->LinearAlloc = 0;
-   if (xf86GetOptValULong(pI830->Options, OPTION_LINEARALLOC,
-			    &(pI830->LinearAlloc))) {
-      if (pI830->LinearAlloc < 0)
-         pI830->LinearAlloc = 0;
-   }
-
    I830PreInitDDC(pScrn);
    for (i = 0; i < num_pipe; i++) {
        i830_crtc_init(pScrn, i);
@@ -2544,17 +2535,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		       "Failed to init memory manager\n");
 	 }
-
-	 if (pI830->xaa_linear != NULL &&
-	     xf86InitFBManagerLinear(pScreen,
-				     pI830->xaa_linear->offset / pI830->cpp,
-				     pI830->xaa_linear->size / pI830->cpp))
-	 {
-            xf86DrvMsg(scrnIndex, X_INFO,
-		       "Using %ld bytes of offscreen memory for linear "
-		       "(offset=0x%lx)\n", pI830->xaa_linear->size,
-		       pI830->xaa_linear->offset);
-	 }
       } else {
 	 if (!I830InitFBManager(pScreen, &(pI8301->FbMemBox2))) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 20b33bc..15d241b 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -230,7 +230,6 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
     pI830->exa_offscreen = NULL;
     pI830->exa_965_state = NULL;
     pI830->overlay_regs = NULL;
-    pI830->xaa_linear = NULL;
     pI830->logical_context = NULL;
     pI830->back_buffer = NULL;
     pI830->third_buffer = NULL;
@@ -663,16 +662,6 @@ i830_allocate_overlay(ScrnInfoPtr pScrn)
 	}
     }
 
-    if (!pI830->useEXA && pI830->LinearAlloc) {
-	pI830->xaa_linear = i830_allocate_memory(pScrn, "XAA linear memory",
-						 KB(pI830->LinearAlloc),
-						 GTT_PAGE_SIZE, 0);
-	if (pI830->xaa_linear == NULL) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		       "Failed to allocate linear buffer space\n");
-	}
-    }
-
     return TRUE;
 }
 #endif

commit cca389769001c657435f056e1f1c26b0f52a48bd
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Thu Apr 19 13:15:23 2007 -0700

    Clean up 1.2 xserver build support.
    
    Convert relative X server source path to absolute.  Check for local copies
    of needed header files before building, rather than requiring server source.
    Remove extra duplicate -I elements in AM_CFLAGS in sub directories.

diff --git a/configure.ac b/configure.ac
index 2d26553..a06d3e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,19 +131,14 @@ if test "x$XSERVER_SOURCE" = x; then
 	fi
 fi
 	
-if test "x$XMODES" = xyes; then
-	echo built-in mode code
-	AC_DEFINE(XMODES, 1,[X server has built-in mode code])
-	XMODES_CFLAGS=
-else
-	echo symlink mode code
-	if test "x$XSERVER_SOURCE" = x; then
-		AC_MSG_ERROR([Must have X server >= 1.3 source tree for mode setting code. Please specify --with-xserver-source])
-	fi
-	XMODES_CFLAGS='-DXF86_MODES_RENAME -I$(top_srcdir)/src/modes -I$(top_srcdir)/src/parser'
-fi
-
 if test -d "$XSERVER_SOURCE"; then
+	case "$XSERVER_SOURCE" in
+	/*)
+		;;
+	*)
+		XSERVER_SOURCE="`cd $XSERVER_SOURCE && pwd`"
+		;;
+	esac
 	if test -f src/modes/xf86Modes.h; then
 		:
 	else
@@ -156,6 +151,20 @@ if test -d "$XSERVER_SOURCE"; then
 		ln -sf $XSERVER_SOURCE/hw/xfree86/parser src/parser
 	fi
 fi
+
+if test "x$XMODES" = xyes; then
+	AC_MSG_NOTICE([X server has new mode code])
+	AC_DEFINE(XMODES, 1,[X server has built-in mode code])
+	XMODES_CFLAGS=
+else
+	if test -f src/modes/xf86Modes.h -a -f src/parser/xf86Parser.h; then
+		AC_MSG_NOTICE([X server is missing new mode code, using local copy])
+	else
+		AC_MSG_ERROR([Must have X server >= 1.3 source tree for mode setting code. Please specify --with-xserver-source])
+	fi
+	XMODES_CFLAGS='-DXF86_MODES_RENAME -I$(top_srcdir)/src -I$(top_srcdir)/src/modes -I$(top_srcdir)/src/parser'
+fi
+
 AC_SUBST([XMODES_CFLAGS])
 
 dnl Use lots of warning flags with GCC
diff --git a/src/ch7017/Makefile.am b/src/ch7017/Makefile.am
index 9858941..71c5085 100644
--- a/src/ch7017/Makefile.am
+++ b/src/ch7017/Makefile.am
@@ -3,8 +3,7 @@
 # -avoid-version prevents gratuitous .0.0.0 version numbers on the end
 # _ladir passes a dummy rpath to libtool so the thing will actually link
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @WARN_CFLAGS@ @XMODES_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@ \
-	-I$(srcdir)/.. -I$(srcdir)/../modes
+AM_CFLAGS = @WARN_CFLAGS@ @XMODES_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@
 
 ch7017_la_LTLIBRARIES = ch7017.la
 ch7017_la_LDFLAGS = -module -avoid-version
diff --git a/src/ch7xxx/Makefile.am b/src/ch7xxx/Makefile.am
index 49a5aa3..fdf6e9e 100644
--- a/src/ch7xxx/Makefile.am
+++ b/src/ch7xxx/Makefile.am
@@ -3,8 +3,7 @@
 # -avoid-version prevents gratuitous .0.0.0 version numbers on the end
 # _ladir passes a dummy rpath to libtool so the thing will actually link
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @WARN_CFLAGS@ @XMODES_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@ \
-	-I$(srcdir)/.. -I$(srcdir)/../modes
+AM_CFLAGS = @WARN_CFLAGS@ @XMODES_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@
 
 ch7xxx_la_LTLIBRARIES = ch7xxx.la
 ch7xxx_la_LDFLAGS = -module -avoid-version
diff --git a/src/ivch/Makefile.am b/src/ivch/Makefile.am
index cf05c01..1dc9cb3 100644
--- a/src/ivch/Makefile.am
+++ b/src/ivch/Makefile.am
@@ -3,8 +3,7 @@
 # -avoid-version prevents gratuitous .0.0.0 version numbers on the end
 # _ladir passes a dummy rpath to libtool so the thing will actually link
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @WARN_CFLAGS@ @XMODES_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@ \
-	-I$(srcdir)/.. -I$(srcdir)/../modes
+AM_CFLAGS = @WARN_CFLAGS@ @XMODES_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@
 
 ivch_la_LTLIBRARIES = ivch.la
 ivch_la_LDFLAGS = -module -avoid-version
diff --git a/src/sil164/Makefile.am b/src/sil164/Makefile.am
index de17bd0..497ee9f 100644
--- a/src/sil164/Makefile.am
+++ b/src/sil164/Makefile.am
@@ -3,8 +3,7 @@
 # -avoid-version prevents gratuitous .0.0.0 version numbers on the end
 # _ladir passes a dummy rpath to libtool so the thing will actually link
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @WARN_CFLAGS@ @XMODES_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@ \
-	-I$(srcdir)/.. -I$(srcdir)/../modes
+AM_CFLAGS = @WARN_CFLAGS@ @XMODES_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@
 
 sil164_la_LTLIBRARIES = sil164.la
 sil164_la_LDFLAGS = -module -avoid-version

commit 07797fee88d6be0dfb30394a419dd86f8a3c9095
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Thu Apr 19 13:01:37 2007 -0700

    Fix mismatching braces when XF86DRI_MM is not defined.
    
    A closing brace was left inside #ifdef XF86DRI_MM while the matching
    open brace was outside.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index c857498..e3bf330 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1294,8 +1294,8 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
 		    "Will try to reserve %d kiB of AGP aperture space\n"
 		    "\tfor the DRM memory manager.\n",
 		    pI830->mmSize);
-      }
 #endif
+      }
    } 
    
 #endif

commit 163c565527e8cda1f5a47c7fd63f04c80feaf3c7
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Thu Apr 19 13:00:03 2007 -0700

    Use I2C delay function instead of usleep.
    
    usleep isn't always available, and we have an existing delay mechanism
    available to use.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index e1a4a44..43b55a0 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -302,7 +302,7 @@ i830_sdvo_read_response(xf86OutputPtr output, void *response, int response_len)
 	if (status != SDVO_CMD_STATUS_PENDING)
 	    return status;
 
-        usleep(50);
+        intel_output->pI2CBus->I2CUDelay(intel_output->pI2CBus, 50);
     }
 
     return status;

commit 378ceea3d9ddbec7a08ac2f07f9a8cd9cf3cef36
Author: Wang Zhenyu <zhenyu.z.wang@intel.com>
Date:   Thu Apr 19 17:30:28 2007 +0800

    Fix mem list order and remove extra unbind call when free memory

diff --git a/src/i830_memory.c b/src/i830_memory.c
index 315f4ba..20b33bc 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -184,8 +184,6 @@ i830_free_memory(ScrnInfoPtr pScrn, i830_memory *mem)
     if (mem == NULL)
 	return;
 
-    i830_unbind_memory(pScrn, mem);
-
     /* Disconnect from the list of allocations */
     if (mem->prev != NULL)
 	mem->prev->next = mem->next;
@@ -368,7 +366,7 @@ i830_allocate_aperture(ScrnInfoPtr pScrn, const char *name,
     mem->prev = scan;
     mem->next = scan->next;
     scan->next = mem;
-    mem->next->prev = scan;
+    mem->next->prev = mem;
 
     return mem;
 }

commit db4b9e18810990e8900bdf54aa3091b876ea2658
Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
Date:   Wed Apr 18 13:52:08 2007 +0100

    Fix return status

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 53a6ece..e1a4a44 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -305,7 +305,7 @@ i830_sdvo_read_response(xf86OutputPtr output, void *response, int response_len)
         usleep(50);
     }
 
-    return SDVO_CMD_STATUS_SUCCESS;
+    return status;
 }
 
 int

commit 3f5111940e35989d334aa99cd1b0eb26293ebf1b
Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
Date:   Wed Apr 18 13:27:59 2007 +0100

    Update read_response to include the try on PENDING status
    
    and remove it from get attached displays call.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index cf72848..53a6ece 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -271,33 +271,41 @@ i830_sdvo_read_response(xf86OutputPtr output, void *response, int response_len)
     I830OutputPrivatePtr    intel_output = output->driver_private;
     int			    i;
     CARD8		    status;
+    CARD8		    retry = 50;
 
-    /* Read the command response */
-    for (i = 0; i < response_len; i++) {
-	i830_sdvo_read_byte(output, SDVO_I2C_RETURN_0 + i,
+    while (retry--) {
+    	/* Read the command response */
+    	for (i = 0; i < response_len; i++) {
+	    i830_sdvo_read_byte(output, SDVO_I2C_RETURN_0 + i,
 			    &((CARD8 *)response)[i]);
-    }
+    	}
 
-    /* Read the return status */
-    i830_sdvo_read_byte(output, SDVO_I2C_CMD_STATUS, &status);
+    	/* Read the return status */
+    	i830_sdvo_read_byte(output, SDVO_I2C_CMD_STATUS, &status);
 
-    /* Write the SDVO command logging */
-    if (pI830->debug_modes) {
-	xf86DrvMsg(intel_output->pI2CBus->scrnIndex, X_INFO,
+    	/* Write the SDVO command logging */
+    	if (pI830->debug_modes) {
+	    xf86DrvMsg(intel_output->pI2CBus->scrnIndex, X_INFO,
 		   "%s: R: ", SDVO_NAME(SDVO_PRIV(intel_output)));
-	for (i = 0; i < response_len; i++)
-	    LogWrite(1, "%02X ", ((CARD8 *)response)[i]);
-	for (; i < 8; i++)
-	    LogWrite(1, "   ");
-	if (status <= SDVO_CMD_STATUS_SCALING_NOT_SUPP) {
-	    LogWrite(1, "(%s)", cmd_status_names[status]);
-	} else {
-	    LogWrite(1, "(??? %d)", status);
-	}
-	LogWrite(1, "\n");
+	    for (i = 0; i < response_len; i++)
+	    	LogWrite(1, "%02X ", ((CARD8 *)response)[i]);
+	    for (; i < 8; i++)
+	    	LogWrite(1, "   ");
+	    if (status <= SDVO_CMD_STATUS_SCALING_NOT_SUPP) {
+	    	LogWrite(1, "(%s)", cmd_status_names[status]);
+	    } else {
+	    	LogWrite(1, "(??? %d)", status);
+	    }
+	    LogWrite(1, "\n");
+    	}
+
+	if (status != SDVO_CMD_STATUS_PENDING)
+	    return status;
+
+        usleep(50);
     }
 
-    return status;
+    return SDVO_CMD_STATUS_SUCCESS;
 }
 
 int
@@ -1074,19 +1082,12 @@ i830_sdvo_detect(xf86OutputPtr output)
 {
     CARD8 response[2];
     CARD8 status;
-    CARD8 retry = 50;
 
     i830_sdvo_write_cmd(output, SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0);
+    status = i830_sdvo_read_response(output, &response, 2);
 
-    while (retry--) {
-    	status = i830_sdvo_read_response(output, &response, 2);
-
-	if (status == SDVO_CMD_STATUS_SUCCESS)
-	    break;
-    
-    	if (status != SDVO_CMD_STATUS_PENDING)
-	    return XF86OutputStatusUnknown;
-    }
+    if (status != SDVO_CMD_STATUS_SUCCESS)
+	return XF86OutputStatusUnknown;
 
     if (response[0] != 0 || response[1] != 0)
 	return XF86OutputStatusConnected;

commit 902388fa06f85486fe8010807ab53e4926cc979a
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Apr 17 14:21:25 2007 -0700

    Don't try to init the XAA linear region unless we allocated memory for it.
    
    Reported by JM Ibanez

diff --git a/src/i830_driver.c b/src/i830_driver.c
index f0ca973..c857498 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2545,7 +2545,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 		       "Failed to init memory manager\n");
 	 }
 
-	 if (pI830->LinearAlloc &&
+	 if (pI830->xaa_linear != NULL &&
 	     xf86InitFBManagerLinear(pScreen,
 				     pI830->xaa_linear->offset / pI830->cpp,
 				     pI830->xaa_linear->size / pI830->cpp))

commit 8abecae202b609375b6754dbd5ecce3d59036daf
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Apr 17 12:28:43 2007 -0700

    Fix i852 EXA Composite acceleration setup.
    
    Reported by JM Ibanez.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index dfc8f99..1741732 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -487,9 +487,7 @@ I830EXAInit(ScreenPtr pScreen)
     pI830->EXADriverPtr->DoneCopy = I830EXADoneCopy;
 
     /* Composite */
-    if (IS_I865G(pI830) || IS_I855(pI830) ||
-	       IS_845G(pI830) || IS_I830(pI830))
-    {
+    if (!IS_I9XX(pI830)) {
     	pI830->EXADriverPtr->CheckComposite = i830_check_composite;
     	pI830->EXADriverPtr->PrepareComposite = i830_prepare_composite;
     	pI830->EXADriverPtr->Composite = i830_composite;

commit 2dbe8d678b02b724c4f06255383f49bb4c2708b0
Author: Timo Aaltonen <tjaalton@cc.hut.fi>
Date:   Mon Apr 16 14:14:19 2007 -0700

    Fix build against xserver 1.2.

diff --git a/src/ch7017/Makefile.am b/src/ch7017/Makefile.am
index d757b3c..9858941 100644
--- a/src/ch7017/Makefile.am
+++ b/src/ch7017/Makefile.am
@@ -3,9 +3,8 @@
 # -avoid-version prevents gratuitous .0.0.0 version numbers on the end
 # _ladir passes a dummy rpath to libtool so the thing will actually link
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @XMODES_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(srcdir)/.. -I$(srcdir)/../modes
-
-AM_CFLAGS = @WARN_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@ @XMODES_CFLAGS@
+AM_CFLAGS = @WARN_CFLAGS@ @XMODES_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@ \
+	-I$(srcdir)/.. -I$(srcdir)/../modes
 
 ch7017_la_LTLIBRARIES = ch7017.la
 ch7017_la_LDFLAGS = -module -avoid-version

commit a089ac11beb4c801928c17780401e913bc0d5257
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Apr 17 11:01:05 2007 -0700

    Add all the possible ivch slave addresses (still commented out).

diff --git a/src/i830_dvo.c b/src/i830_dvo.c
index 04750e5..0bb25bd 100644
--- a/src/i830_dvo.c
+++ b/src/i830_dvo.c
@@ -68,7 +68,13 @@ struct _I830DVODriver i830_dvo_drivers[] =
      (CH7xxx_ADDR_1<<1), CH7xxxSymbols, NULL , NULL, NULL},
     /*
     {I830_DVO_CHIP_LVDS, "ivch", "ivch_methods",
-     (0x2 << 1), ivch_symbols, NULL, NULL, NULL},
+     0x04, ivch_symbols, NULL, NULL, NULL},
+    {I830_DVO_CHIP_LVDS, "ivch", "ivch_methods",
+     0x44, ivch_symbols, NULL, NULL, NULL},
+    {I830_DVO_CHIP_LVDS, "ivch", "ivch_methods",
+     0x84, ivch_symbols, NULL, NULL, NULL},
+    {I830_DVO_CHIP_LVDS, "ivch", "ivch_methods",
+     0xc4, ivch_symbols, NULL, NULL, NULL},
     */
     /*
     { I830_DVO_CHIP_LVDS, "ch7017", "ch7017_methods",

commit 37ee68a95ca8c86ebe9abafaaf55b060dd2a2f73
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Apr 17 10:50:02 2007 -0700

    Bug #10438: Fix 965 XV when sourcing from less than the full image.
    
    Bob deinterlacing in MythTV, and the zoom options in totem would result in
    attempting to source from outside the video instead of scaling appropriately.

diff --git a/src/i965_video.c b/src/i965_video.c
index 9e96527..17d2006 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -172,6 +172,7 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
     struct brw_instruction *ps_kernel;
     struct brw_instruction *sip_kernel;
     float *vb;
+    float src_scale_x, src_scale_y;
     CARD32 *binding_table;
     Bool first_output = TRUE;
     int dest_surf_offset, src_surf_offset, src_sampler_offset, vs_offset;
@@ -672,6 +673,10 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
     dxo = dstRegion->extents.x1;
     dyo = dstRegion->extents.y1;
 
+    /* Use normalized texture coordinates */
+    src_scale_x = ((float)src_w / width) / (float)drw_w;
+    src_scale_y = ((float)src_h / height) / (float)drw_h;
+
     pbox = REGION_RECTS(dstRegion);
     nbox = REGION_NUM_RECTS(dstRegion);
     while (nbox--) {
@@ -680,7 +685,6 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 	int box_x2 = pbox->x2;
 	int box_y2 = pbox->y2;
 	int i;
-	float src_scale_x, src_scale_y;
 
 	if (!first_output) {
 	    /* Since we use the same little vertex buffer over and over, sync
@@ -691,10 +695,6 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 
 	pbox++;
 
-	/* Use normalized texture coordinates */
-	src_scale_x = (float)1.0 / (float)drw_w;
-	src_scale_y = (float)1.0 / (float)drw_h;
-
 	i = 0;
 	vb[i++] = (box_x2 - dxo) * src_scale_x;
 	vb[i++] = (box_y2 - dyo) * src_scale_y;

commit ac9181c014638dbeb334b40b4029d0ccb2b7a0fc
Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
Date:   Tue Apr 17 16:30:17 2007 +0100

    Check for the PENDING message when reading the attached
    displays. Ensures the command has completed before continuing.
    
    (probably need to check PENDING in other SDVO calls too)

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index f0723a9..cf72848 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1074,12 +1074,19 @@ i830_sdvo_detect(xf86OutputPtr output)
 {
     CARD8 response[2];
     CARD8 status;
+    CARD8 retry = 50;
 
     i830_sdvo_write_cmd(output, SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0);
-    status = i830_sdvo_read_response(output, &response, 2);
 
-    if (status != SDVO_CMD_STATUS_SUCCESS)
-	return XF86OutputStatusUnknown;
+    while (retry--) {
+    	status = i830_sdvo_read_response(output, &response, 2);
+
+	if (status == SDVO_CMD_STATUS_SUCCESS)
+	    break;
+    
+    	if (status != SDVO_CMD_STATUS_PENDING)
+	    return XF86OutputStatusUnknown;
+    }
 
     if (response[0] != 0 || response[1] != 0)
 	return XF86OutputStatusConnected;
diff --git a/src/i830_sdvo_regs.h b/src/i830_sdvo_regs.h
index 437ff50..72e58a0 100644
--- a/src/i830_sdvo_regs.h
+++ b/src/i830_sdvo_regs.h
@@ -38,7 +38,11 @@
 #define SDVO_OUTPUT_SCART0  (1 << 5)
 #define SDVO_OUTPUT_LVDS0   (1 << 6)
 #define SDVO_OUTPUT_TMDS1   (1 << 8)
-#define SDVO_OUTPUT_RGB1    (1 << 13)
+#define SDVO_OUTPUT_RGB1    (1 << 9)
+#define SDVO_OUTPUT_CVBS1   (1 << 10)
+#define SDVO_OUTPUT_SVID1   (1 << 11)
+#define SDVO_OUTPUT_YPRPB1  (1 << 12)
+#define SDVO_OUTPUT_SCART1  (1 << 13)
 #define SDVO_OUTPUT_LVDS1   (1 << 14)
 #define SDVO_OUTPUT_LAST    (14)
 

commit ab5bdee8a62c842ae32aaef57eb841ebcb644d2b
Author: Wang Zhenyu <zhenyu.z.wang@intel.com>
Date:   Tue Apr 17 16:23:46 2007 +0800

    EXA: fix i830 render
    
    Fix tex blend pipeline in case that src/mask pict has no
    alpha. Unmask color buffer write disable bits. These make
    rendercheck run fine on 855GM.

diff --git a/src/i830_render.c b/src/i830_render.c
index ec80c0b..36d41f3 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -83,6 +83,7 @@ struct formatinfo {
 #define TB0C_ARG2_SEL_TEXEL3		(9 << 12)
 #define TB0C_ARG1_REPLICATE_ALPHA 	(1<<11)
 #define TB0C_ARG1_INVERT		(1<<10)
+#define TB0C_ARG1_SEL_ONE		(0 << 6)
 #define TB0C_ARG1_SEL_TEXEL0		(6 << 6)
 #define TB0C_ARG1_SEL_TEXEL1		(7 << 6)
 #define TB0C_ARG1_SEL_TEXEL2		(8 << 6)
@@ -107,6 +108,7 @@ struct formatinfo {
 #define TB0A_ARG2_SEL_TEXEL2		(8 << 12)
 #define TB0A_ARG2_SEL_TEXEL3		(9 << 12)
 #define TB0A_ARG1_INVERT		(1<<10)
+#define TB0A_ARG1_SEL_ONE		(0 << 6)
 #define TB0A_ARG1_SEL_TEXEL0		(6 << 6)
 #define TB0A_ARG1_SEL_TEXEL1		(7 << 6)
 #define TB0A_ARG1_SEL_TEXEL2		(8 << 6)
@@ -418,7 +420,7 @@ i830_prepare_composite(int op, PicturePtr pSrcPicture,
     {
 	CARD32 cblend, ablend, blendctl, vf2;
 
-	BEGIN_LP_RING(26);
+	BEGIN_LP_RING(30);
 
 	/* color buffer */
 	OUT_RING(_3DSTATE_BUF_INFO_CMD);
@@ -455,16 +457,28 @@ i830_prepare_composite(int op, PicturePtr pSrcPicture,
 	OUT_RING(vf2); /* TEXCOORDFMT_2D */
 	OUT_RING(S3_CULLMODE_NONE | S3_VERTEXHAS_XY);
 
-	/* For (src In mask) operation */
-	/* IN operator: Multiply src by mask components or mask alpha.*/
-	/* TEXBLENDOP_MODULE: arg1*arg2 */
+	/* We use two pipes for color and alpha, and do (src In mask)
+	   in one stage. Arg1 is from src pict, and arg2 is from mask pict.
+	   Be sure to force 1.0 when src or mask pict has no alpha channel.
+	 */
 	cblend = TB0C_LAST_STAGE | TB0C_RESULT_SCALE_1X | TB0C_OP_MODULE |
 		 TB0C_OUTPUT_WRITE_CURRENT;
 	ablend = TB0A_RESULT_SCALE_1X | TB0A_OP_MODULE |
 		 TB0A_OUTPUT_WRITE_CURRENT;
 
-	cblend |= TB0C_ARG1_SEL_TEXEL0;
-	ablend |= TB0A_ARG1_SEL_TEXEL0;
+	if (PICT_FORMAT_A(pSrcPicture->format) != 0) {
+	    ablend |= TB0A_ARG1_SEL_TEXEL0;
+	    cblend |= TB0C_ARG1_SEL_TEXEL0;
+	} else {
+	    ablend |= TB0A_ARG1_SEL_ONE;
+	    if (pMask && pMaskPicture->componentAlpha 
+		    && PICT_FORMAT_RGB(pMaskPicture->format)
+		    && i830_blend_op[op].src_alpha)
+		cblend |= TB0C_ARG1_SEL_ONE;
+	    else
+		cblend |= TB0C_ARG1_SEL_TEXEL0;
+	}
+
 	if (pMask) {
 	    if (pMaskPicture->componentAlpha && 
 		    PICT_FORMAT_RGB(pMaskPicture->format)) {
@@ -474,10 +488,16 @@ i830_prepare_composite(int op, PicturePtr pSrcPicture,
 		else 
 		    cblend |= TB0C_ARG2_SEL_TEXEL1;
 	    } else {
-		cblend |= (TB0C_ARG2_SEL_TEXEL1 | 
-			TB0C_ARG2_REPLICATE_ALPHA);
+		if (PICT_FORMAT_A(pMaskPicture->format) != 0)
+		    cblend |= (TB0C_ARG2_SEL_TEXEL1 | 
+			    TB0C_ARG2_REPLICATE_ALPHA);
+		else
+		    cblend |= TB0C_ARG2_SEL_ONE;
 	    }
-	    ablend |= TB0A_ARG2_SEL_TEXEL1;
+	    if (PICT_FORMAT_A(pMaskPicture->format) != 0)
+		ablend |= TB0A_ARG2_SEL_TEXEL1;
+	    else
+		ablend |= TB0A_ARG2_SEL_ONE;
 	} else {
 	    cblend |= TB0C_ARG2_SEL_ONE;
 	    ablend |= TB0A_ARG2_SEL_ONE;
@@ -490,9 +510,14 @@ i830_prepare_composite(int op, PicturePtr pSrcPicture,
 	OUT_RING(0);
 
 	blendctl = i830_get_blend_cntl(op, pMaskPicture, pDstPicture->format);
+	OUT_RING(_3DSTATE_INDPT_ALPHA_BLEND_CMD | DISABLE_INDPT_ALPHA_BLEND);
+	OUT_RING(MI_NOOP);
 	OUT_RING(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(8) | 0);
 	OUT_RING(S8_ENABLE_COLOR_BLEND | S8_BLENDFUNC_ADD | blendctl | 
 		 S8_ENABLE_COLOR_BUFFER_WRITE);
+	/* We have to explicitly say we don't want write disabled */
+	OUT_RING(_3DSTATE_ENABLES_2_CMD | ENABLE_COLOR_MASK);
+	OUT_RING(MI_NOOP); 
 	ADVANCE_LP_RING();
     }
 

commit 1a29750b8dba1371d7d0802744cdf2f3bfa83c13
Author: Wang Zhenyu <zhenyu.z.wang@intel.com>
Date:   Mon Apr 16 16:21:39 2007 +0800

    EXA: fix 830/845G pict format
    
    Fallback in 830/845G when pict format is a8, x8r8g8b8 or
    x8b8g8r8. The hw doesn't support them.

diff --git a/src/i830_render.c b/src/i830_render.c
index 380c808..ec80c0b 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -149,7 +149,7 @@ static struct formatinfo i830_tex_formats[] = {
     {PICT_r5g6b5,   MT_16BIT_RGB565   },
     {PICT_a1r5g5b5, MT_16BIT_ARGB1555 },
     {PICT_x1r5g5b5, MT_16BIT_ARGB1555 },
-    {PICT_a8,       MT_8BIT_A8       },	 /* mesa does I8 */
+    {PICT_a8,       MT_8BIT_A8        },
 };
 
 static Bool i830_get_dest_format(PicturePtr pDstPicture, CARD32 *dst_format)
@@ -220,6 +220,8 @@ static CARD32 i830_get_blend_cntl(int op, PicturePtr pMask, CARD32 dst_format)
 
 static Bool i830_check_composite_texture(PicturePtr pPict, int unit)
 {
+    ScrnInfoPtr pScrn = xf86Screens[pPict->pDrawable->pScreen->myNum];
+    I830Ptr pI830 = I830PTR(pScrn);
     int w = pPict->pDrawable->width;
     int h = pPict->pDrawable->height;
     int i;
@@ -237,6 +239,13 @@ static Bool i830_check_composite_texture(PicturePtr pPict, int unit)
         I830FALLBACK("Unsupported picture format 0x%x\n",
 		     (int)pPict->format);
 
+    if (IS_I830(pI830) || IS_845G(pI830)) {
+	if (pPict->format == PICT_x8r8g8b8 || 
+		pPict->format == PICT_x8b8g8r8 || 
+		pPict->format == PICT_a8)
+	    I830FALLBACK("830/845G don't support a8, x8r8g8b8, x8b8g8r8\n");
+    }
+
     if (pPict->repeat && pPict->repeatType != RepeatNormal)
 	I830FALLBACK("unsupport repeat type\n");
 

commit 3a634bbd198650c1597dec4306d99928374c30f3
Author: Wang Zhenyu <zhenyu.z.wang@intel.com>
Date:   Mon Apr 16 15:14:49 2007 +0800

    EXA: Add i830 supported pict format XRGB8888, XBGR8888

diff --git a/src/i830_reg.h b/src/i830_reg.h
index 989646f..7a8df9f 100644
--- a/src/i830_reg.h
+++ b/src/i830_reg.h
@@ -659,6 +659,8 @@
 #define    MT_16BIT_DIB_RGB565_8888	   (7<<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_BUMP_XLDVDU_8888	   (6<<3)
 #define    MT_32BIT_DIB_8888		   (7<<3)
 #define    MT_411_YUV411		   (0<<3) /* SURFACE_411 */
diff --git a/src/i830_render.c b/src/i830_render.c
index f5e144b..380c808 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -143,10 +143,10 @@ static struct blendinfo i830_blend_op[] = {
 
 static struct formatinfo i830_tex_formats[] = {
     {PICT_a8r8g8b8, MT_32BIT_ARGB8888 },
-    {PICT_x8r8g8b8, MT_32BIT_ARGB8888 },
+    {PICT_x8r8g8b8, MT_32BIT_XRGB8888 },
     {PICT_a8b8g8r8, MT_32BIT_ABGR8888 },
-    {PICT_x8b8g8r8, MT_32BIT_ABGR8888 },
-    {PICT_r5g6b5,   MT_16BIT_RGB565	  },
+    {PICT_x8b8g8r8, MT_32BIT_XBGR8888 },
+    {PICT_r5g6b5,   MT_16BIT_RGB565   },
     {PICT_a1r5g5b5, MT_16BIT_ARGB1555 },
     {PICT_x1r5g5b5, MT_16BIT_ARGB1555 },
     {PICT_a8,       MT_8BIT_A8       },	 /* mesa does I8 */

commit 3bcb9a0b4ba7f3df346b5708617a7aafcbe2490a
Author: Wang Zhenyu <zhenyu.z.wang@intel.com>
Date:   Mon Apr 16 14:27:49 2007 +0800

    EXA: i830 render misc fix and cleanups
    
    Try to map texture stream when setup texture map, and use
    correct order in load_immediate_1 cmd, which fixed crash on
    845GV. Also remove some flush cmds.

diff --git a/src/i830_render.c b/src/i830_render.c
index d587805..f5e144b 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -305,7 +305,7 @@ i830_texture_setup(PicturePtr pPict, PixmapPtr pPix, int unit)
 	else
 	    format |= MAPSURF_32BIT;
 
-	BEGIN_LP_RING(8);
+	BEGIN_LP_RING(10);
 	OUT_RING(_3DSTATE_LOAD_STATE_IMMEDIATE_2 | LOAD_TEXTURE_MAP(unit) | 4);
 	OUT_RING((offset & TM0S0_ADDRESS_MASK) | TM0S0_USE_FENCE); 
 	OUT_RING(((pPix->drawable.height - 1) << TM0S1_HEIGHT_SHIFT) |
@@ -318,7 +318,24 @@ i830_texture_setup(PicturePtr pPict, PixmapPtr pPix, int unit)
 		 TEXCOORDTYPE_CARTESIAN | ENABLE_ADDR_V_CNTL |
 		 TEXCOORD_ADDR_V_MODE(wrap_mode) |
 		 ENABLE_ADDR_U_CNTL | TEXCOORD_ADDR_U_MODE(wrap_mode));
-	OUT_RING(MI_NOOP);
+	/* map texel stream */
+	OUT_RING(_3DSTATE_MAP_COORD_SETBIND_CMD);
+	if (unit == 0)
+	    OUT_RING(TEXBIND_SET0(TEXCOORDSRC_VTXSET_0) |
+		    TEXBIND_SET1(TEXCOORDSRC_KEEP) |
+		    TEXBIND_SET2(TEXCOORDSRC_KEEP) |



Reply to: