xf86-video-intel: Branch 'display-port' - 194 commits - acinclude.m4 configure.ac .gitignore m4/dolt.m4 m4/shave.m4 Makefile.am man/intel.man shave.in shave-libtool.in src/bios_reader/bios_reader.c src/common.h src/drmmode_display.c src/drmmode_display.h src/i810_driver.c src/i810_reg.h src/i830_accel.c src/i830_batchbuffer.c src/i830_batchbuffer.h src/i830_bios.c src/i830_bios.h src/i830_crt.c src/i830_debug.c src/i830_display.c src/i830_display.h src/i830_dp.c src/i830_dri.c src/i830_driver.c src/i830_exa.c src/i830.h src/i830_lvds.c src/i830_memory.c src/i830_quirks.c src/i830_render.c src/i830_ring.h src/i830_sdvo.c src/i830_sdvo_regs.h src/i830_tv.c src/i830_video.c src/i830_video.h src/i830_xaa.c src/i915_render.c src/i915_video.c src/i965_hwmc.c src/i965_render.c src/i965_video.c src/Makefile.am src/xvmc/dual_prime.g4a src/xvmc/dual_prime.g4b src/xvmc/dual_prime_igd.g4a src/xvmc/dual_prime_igd.g4b src/xvmc/i965_xvmc.c src/xvmc/intel_xvmc.c src/xvmc/Makefile.am uxa/uxa-accel.c uxa/uxa.c uxa/uxa-glyphs.c uxa/uxa.h uxa/uxa-priv.h uxa/uxa-render.c uxa/uxa-unaccel.c

Keith Packard keithp at kemper.freedesktop.org
Wed Mar 18 10:15:35 PDT 2009


Rebased ref, commits from common ancestor:
commit 71e91370f329875bce0f7b4874076b5fc5c7902e
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Dec 8 01:54:50 2008 -0800

    Add (broken) DDC support to i830_dp.c

diff --git a/src/i830_dp.c b/src/i830_dp.c
index dd4c493..6a136d1 100644
--- a/src/i830_dp.c
+++ b/src/i830_dp.c
@@ -41,6 +41,9 @@ struct i830_dp_priv {
     uint32_t save_DP;
     uint8_t  save_link_configuration[0x10];
     Bool has_audio;
+    uint16_t i2c_address;
+    uint8_t i2c_put_byte;
+    Bool i2c_has_byte;
 };
 
 static void
@@ -92,35 +95,38 @@ unpack_aux(uint32_t src, uint8_t *dst, int dst_bytes)
 }
 
 static int
-i830_dp_aux_write(ScrnInfoPtr pScrn, uint32_t output_reg,
-		  uint32_t address, uint8_t *send, int send_bytes)
+i830_dp_aux_ch(ScrnInfoPtr pScrn, uint32_t output_reg,
+	       uint8_t *send, int send_bytes,
+	       uint8_t *recv, int recv_size)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     uint32_t	ch_ctl = output_reg + 0x10;
-    uint32_t	ch_cmd = ch_ctl + 4;
-    uint32_t	ch_data = ch_ctl + 8;
+    uint32_t	ch_data = ch_ctl + 4;
     int		i;
+    int		recv_bytes;
     uint32_t	ctl;
-    uint32_t	cmd;
     uint32_t	status;
 
-    cmd = ((0x8 << 28) |
-	   (address << 8) |
-	   (send_bytes));
-    OUTREG(ch_cmd, cmd);
-    for (i = 0; i < send_bytes; i += 4)
-	OUTREG(ch_data + i, pack_aux(send + i, send_bytes - i));
+    for (i = 0; i < send_bytes; i += 4) {
+	uint32_t    d = pack_aux(send + i, send_bytes - i);;
+
+//	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+//		   "aux_ch send[%d] = %08x\n", i/4, d);
+	OUTREG(ch_data + i, d);
+    }
 
     ctl = (DP_AUX_CH_CTL_SEND_BUSY |
 	   DP_AUX_CH_CTL_TIME_OUT_400us |
-	   ((send_bytes + 4) << DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT) |
+	   (send_bytes << DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT) |
 	   (5 << DP_AUX_CH_CTL_PRECHARGE_2US_SHIFT) |
 	   (133 << DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT));
+
     OUTREG(ch_ctl, ctl);
     for (;;) {
 	status = INREG(ch_ctl);
 	if ((status & DP_AUX_CH_CTL_SEND_BUSY) == 0)
 	    break;
+	usleep(100);
     }
 
     /* Clear done status and any errors */
@@ -136,105 +142,208 @@ i830_dp_aux_write(ScrnInfoPtr pScrn, uint32_t output_reg,
 		   status);
 	return -1;
     }
-    return send_bytes;
+    recv_bytes = ((status & DP_AUX_CH_CTL_MESSAGE_SIZE_MASK) >>
+		  DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT);
+
+    if (recv_bytes > recv_size)
+	recv_bytes = recv_size;
+    for (i = 0; i < recv_bytes; i += 4) {
+	uint32_t    d = INREG(ch_data + i);
+
+//	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+//		   "aux_ch recv[%d] = %08x\n", i/4, d);
+	unpack_aux(d, recv + i, recv_bytes - i);
+    }
+
+    return recv_bytes;
 }
 
 static int
-i830_dp_aux_write_1(ScrnInfoPtr pScrn, uint32_t output_reg,
-		    uint32_t address, uint8_t byte)
+i830_dp_aux_native_write(ScrnInfoPtr pScrn, uint32_t output_reg,
+			 uint16_t address, uint8_t *send, int send_bytes)
 {
-    return i830_dp_aux_write(pScrn, output_reg, address, &byte, 1);
+    int		ret;
+    uint8_t	msg[20];
+    int		msg_bytes;
+    uint8_t	ack;
+
+    assert(send_bytes <= 16);
+    msg[0] = AUX_NATIVE_WRITE << 4;
+    msg[1] = address >> 8;
+    msg[2] = address;
+    msg[3] = send_bytes - 1;
+    memcpy(&msg[4], send, send_bytes);
+    msg_bytes = send_bytes + 4;
+    for (;;) {
+	ret = i830_dp_aux_ch(pScrn, output_reg, msg, msg_bytes, &ack, 1);
+	if (ret < 0)
+	    return ret;
+        if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
+	    break;
+	else if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_DEFER)
+	    usleep(100);
+	else {
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "aux ch native write returns %08x\n", ack);
+	    return -1;
+	}
+    }
+    return send_bytes;
 }
 
 static int
-i830_dp_aux_read(ScrnInfoPtr pScrn, uint32_t output_reg,
-		 uint32_t address, uint8_t *recv, int recv_bytes)
+i830_dp_aux_native_write_1(ScrnInfoPtr pScrn, uint32_t output_reg,
+			   uint16_t address, uint8_t byte)
 {
-    I830Ptr pI830 = I830PTR(pScrn);
-    uint32_t	ch_ctl = output_reg + 0x10;
-    uint32_t	ch_cmd = ch_ctl + 4;
-    int		i;
-    uint8_t	header[4];
-    uint8_t	header_bytes;
-    uint32_t	ctl;
-    uint32_t	cmd;
-    uint32_t	status;
-    int		got_bytes;
-    int		tries = 0;
+    return i830_dp_aux_native_write(pScrn, output_reg, address, &byte, 1);
+}
 
-    cmd = ((0x9 << 28) |
-	   (address << 8) |
-	   (recv_bytes-1));
-    ctl = (DP_AUX_CH_CTL_SEND_BUSY |
-	   DP_AUX_CH_CTL_TIME_OUT_400us |
-	   (4 << DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT) |
-	   (5 << DP_AUX_CH_CTL_PRECHARGE_2US_SHIFT) |
-	   (133 << DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT));
+static int
+i830_dp_aux_i2c_address(ScrnInfoPtr pScrn, uint32_t output_reg,
+			uint16_t address)
+{
+    int ret;
+    uint8_t ack;
+    uint8_t msg[3];
+    int msg_bytes;
+
+    msg[0] = (AUX_I2C_WRITE|AUX_I2C_MOT) << 4;
+    msg[1] = address >> 8;
+    msg[2] = address;
+    msg_bytes = 3;
     for (;;) {
-	OUTREG(ch_cmd, cmd);
+	ret = i830_dp_aux_ch(pScrn, output_reg, msg, msg_bytes, &ack, 1);
+	if (ret < 0)
+	    return ret;
+	if ((ack & AUX_I2C_REPLY_MASK) == AUX_I2C_REPLY_ACK)
+	    break;
+	else if ((ack & AUX_I2C_REPLY_MASK) == AUX_I2C_REPLY_DEFER)
+	    usleep(100);
+	else {
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "aux ch i2c address returns %02x\n", ack);
+	    return -1;
+	}
+    }
+    return 0;
+}
 
-	OUTREG(ch_ctl, ctl);
-	for (;;) {
-	    status = INREG(ch_ctl);
-	    if ((status & DP_AUX_CH_CTL_SEND_BUSY) == 0)
-		break;
+static int
+i830_dp_aux_i2c_write_1(ScrnInfoPtr pScrn, uint32_t output_reg,
+			uint16_t address, uint8_t byte, Bool last)
+{
+    int ret;
+    uint8_t ack;
+    uint8_t msg[5];
+    int msg_bytes;
+
+    msg[0] = (AUX_I2C_WRITE) << 4;
+    if (!last)
+	msg[0] |= (AUX_I2C_MOT) << 4;
+    msg[1] = address >> 8;
+    msg[2] = address;
+    msg[3] = 0;
+    msg[4] = byte;
+    msg_bytes = 5;
+    for (;;) {
+	ret = i830_dp_aux_ch(pScrn, output_reg, msg, msg_bytes, &ack, 1);
+	if (ret < 0)
+	    return ret;
+	if ((ack & AUX_I2C_REPLY_MASK) == AUX_I2C_REPLY_ACK)
+	    break;
+	else if ((ack & AUX_I2C_REPLY_MASK) == AUX_I2C_REPLY_DEFER)
+	    usleep(100);
+	else {
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "aux ch i2c write returns %02x\n", ack);
+	    return -1;
 	}
+    }
+    return 1;
+}
 
-	/* Clear done status and any errors */
-	OUTREG(ch_ctl, (ctl |
-			DP_AUX_CH_CTL_DONE |
-			DP_AUX_CH_CTL_TIME_OUT_ERROR |
-			DP_AUX_CH_CTL_RECEIVE_ERROR));
+static int
+i830_dp_aux_native_read(ScrnInfoPtr pScrn, uint32_t output_reg,
+			uint16_t address, uint8_t *recv, int recv_bytes)
+{
+    uint8_t msg[4];
+    int msg_bytes;
+    uint8_t reply[20];
+    int reply_bytes;
+    uint8_t ack;
+    int ret;
 
-	if ((status & DP_AUX_CH_CTL_DONE) == 0)
-	{
+    msg[0] = AUX_NATIVE_READ << 4;
+    msg[1] = address >> 8;
+    msg[2] = address & 0xff;
+    msg[3] = recv_bytes - 1;
+
+    msg_bytes = 4;
+    reply_bytes = recv_bytes + 1;
+
+    for (;;) {
+	ret = i830_dp_aux_ch(pScrn, output_reg, msg, msg_bytes,
+			     reply, reply_bytes);
+	if (ret <= 0)
+	    return ret;
+	ack = reply[0];
+        if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) {
+	    memcpy(recv, reply + 1, ret - 1);
+	    return ret - 1;
+	}
+	else if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_DEFER)
+	    usleep(100);
+	else {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-		       "DisplayPort AUX CH failed to complete: 0x%08x\n",
-		       status);
+		       "aux ch native write returns %08x\n", ack);
 	    return -1;
 	}
+    }
+}
 
-	got_bytes = ((status & DP_AUX_CH_CTL_MESSAGE_SIZE_MASK) >>
-		     DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT);
-	if (got_bytes > 20)
-	    got_bytes = 20;
-	if (got_bytes - 1 < recv_bytes)
-	    recv_bytes = got_bytes - 1;
-	if (got_bytes - 1 > recv_bytes)
-	{
+static int
+i830_dp_aux_i2c_read_1(ScrnInfoPtr pScrn, uint32_t output_reg,
+		       uint16_t address, uint8_t *recv, Bool last)
+{
+    uint8_t msg[4];
+    int msg_bytes;
+    uint8_t reply[2];
+    uint8_t ack;
+    int reply_bytes;
+    int ret;
+
+    msg[0] = AUX_I2C_READ << 4;
+    if (!last)
+	msg[0] |= AUX_I2C_MOT << 4;
+    msg[1] = address >> 8;
+    msg[2] = address;
+    msg[3] = 0;
+    msg_bytes = 4;
+    reply_bytes = 2;
+
+    for (;;) {
+	ret = i830_dp_aux_ch(pScrn, output_reg, msg, msg_bytes,
+			     reply, reply_bytes);
+	if (ret <= 0) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-		       "DisplayPort AUX CH read returns too much: %d > %d\n",
-		       got_bytes, recv_bytes);
+		       "i2c_read: aux_ch error %d\n", ret);
+	    return -1;
 	}
-	header_bytes = 4;
-	if (recv_bytes + 1 < 4)
-	    header_bytes = recv_bytes + 1;
-	unpack_aux(INREG(ch_cmd), header, header_bytes);
-	switch (header[0] & 0x3) {
-	case 0:
-	    break;
-	case 1:
-	case 3:
+	ack = reply[0];
+	if ((ack & AUX_I2C_REPLY_MASK) == AUX_I2C_REPLY_ACK) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-		       "DisplayPort AUX CH %d read fails\n", address);
+		       "i2c_read: %02x\n", reply[1]);
+	    recv[0] = reply[1];
+	    return 1;
+	}
+	else if ((ack & AUX_I2C_REPLY_MASK) == AUX_I2C_REPLY_DEFER)
+	    usleep(100);
+	else {
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "aux ch i2c write returns %02x\n", ack);
 	    return -1;
-	case 2:
-	    tries++;
-	    if (tries > 10) {
-		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-			   "DisplayPort AUX CH read %d gave up after %d retries\n",
-			   address, tries);
-		return -1;
-	    }
-	    usleep(1000);
-	    continue;
 	}
-	break;
     }
-    memcpy(recv, header + 1, header_bytes-1);
-    for (i = 4; i < recv_bytes + 1; i += 4)
-	unpack_aux(INREG(ch_cmd + i), recv + (i-1), recv_bytes - (i-1));
-    return recv_bytes;
 }
 
 static void
@@ -295,8 +404,9 @@ i830_dp_lane_status(xf86OutputPtr output, uint8_t lane_status[3])
     struct i830_dp_priv *dev_priv = intel_output->dev_priv;
     int ret;
 
-    ret = i830_dp_aux_read(pScrn, dev_priv->output_reg, DP_LANE0_1_STATUS,
-			   lane_status, 3);
+    ret = i830_dp_aux_native_read(pScrn,
+				  dev_priv->output_reg, DP_LANE0_1_STATUS,
+				  lane_status, 3);
     xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 	       "lane status(%d) %02x %02x %02x\n",
 	       ret, lane_status[0], lane_status[1], lane_status[2]);
@@ -313,7 +423,7 @@ i830_dp_save(xf86OutputPtr output)
     uint8_t lane_status[3];
 
     dev_priv->save_DP = INREG(dev_priv->output_reg);
-    i830_dp_aux_read(pScrn, dev_priv->output_reg, 0x100,
+    i830_dp_aux_native_read(pScrn, dev_priv->output_reg, 0x100,
 		     dev_priv->save_link_configuration, sizeof (dev_priv->save_link_configuration));
     xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 	       "link configuration: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
@@ -352,24 +462,27 @@ i830_dp_link_train(xf86OutputPtr output, uint32_t DP)
     int tries;
     int i;
 
+    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+	       "i830_dp_link_train dp 0x%08x\n", DP);
     if ((DP & DP_PORT_EN) == 0) {
 	OUTREG(dev_priv->output_reg, DP);
 	return;
     }
     DP &= ~DP_LINK_TRAIN_MASK;
 
-    ret = i830_dp_aux_read(pScrn, dev_priv->output_reg,
+    ret = i830_dp_aux_native_read(pScrn, dev_priv->output_reg,
 			   0x206, adjust_request, 2);
     xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 	       "adjust_request(%d): %02x %02x\n",
 	       ret, adjust_request[0], adjust_request[1]);
     /* main link disabled */
-    i830_dp_aux_write_1(pScrn, dev_priv->output_reg,
-			DP_TRAINING_PATTERN_SET, DP_TRAINING_PATTERN_1);
     OUTREG(dev_priv->output_reg, DP | DP_LINK_TRAIN_PAT_1);
     POSTING_READ(dev_priv->output_reg);
     usleep (15*1000);
-    ret = i830_dp_aux_read(pScrn, dev_priv->output_reg,
+    i830_dp_aux_native_write_1(pScrn, dev_priv->output_reg,
+			DP_TRAINING_PATTERN_SET, DP_TRAINING_PATTERN_1);
+    usleep (15*1000);
+    ret = i830_dp_aux_native_read(pScrn, dev_priv->output_reg,
 			   DP_TRAINING_PATTERN_SET,
 			   training, 1);
     xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -383,7 +496,7 @@ i830_dp_link_train(xf86OutputPtr output, uint32_t DP)
     tries = 0;
     for (i = 0; i < 4; i++) {
 
-	ret = i830_dp_aux_write(pScrn, dev_priv->output_reg,
+	ret = i830_dp_aux_native_write(pScrn, dev_priv->output_reg,
 				DP_TRAINING_LANE0_SET, train_set, 4);
 	if (ret != 4) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -407,12 +520,13 @@ i830_dp_link_train(xf86OutputPtr output, uint32_t DP)
 	}
     }
     /* channel eq pattern */
-    i830_dp_aux_write_1(pScrn, dev_priv->output_reg,
-			DP_TRAINING_PATTERN_SET, DP_TRAINING_PATTERN_2);
     OUTREG(dev_priv->output_reg, DP | DP_LINK_TRAIN_PAT_2);
     POSTING_READ(dev_priv->output_reg);
+    usleep (15*1000);
+    i830_dp_aux_native_write_1(pScrn, dev_priv->output_reg,
+			DP_TRAINING_PATTERN_SET, DP_TRAINING_PATTERN_2);
     usleep(15*1000);
-    ret = i830_dp_aux_read(pScrn, dev_priv->output_reg,
+    ret = i830_dp_aux_native_read(pScrn, dev_priv->output_reg,
 			   DP_TRAINING_PATTERN_SET,
 			   training, 1);
     xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -420,7 +534,7 @@ i830_dp_link_train(xf86OutputPtr output, uint32_t DP)
     for (i = 0; i < 4; i++) {
 	int ret;
 
-	ret = i830_dp_aux_write(pScrn, dev_priv->output_reg,
+	ret = i830_dp_aux_native_write(pScrn, dev_priv->output_reg,
 				DP_TRAINING_LANE0_SET, train_set, 4);
 	if (ret != 4) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -445,11 +559,146 @@ i830_dp_link_train(xf86OutputPtr output, uint32_t DP)
     }
     OUTREG(dev_priv->output_reg, DP | DP_LINK_TRAIN_OFF);
     POSTING_READ(dev_priv->output_reg);
-    i830_dp_aux_write_1(pScrn, dev_priv->output_reg,
+    usleep (15*1000);
+    i830_dp_aux_native_write_1(pScrn, dev_priv->output_reg,
 			DP_TRAINING_PATTERN_SET, DP_TRAINING_PATTERN_DISABLE);
     usleep (15*1000);
 }
 
+/*
+ * I2C over AUX CH
+ */
+
+static Bool
+i830_dp_i2c_flush(I2CBusPtr bus, Bool last)
+{
+    xf86OutputPtr output = bus->DriverPrivate.ptr;
+    ScrnInfoPtr scrn = output->scrn;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_dp_priv *dev_priv = intel_output->dev_priv;
+
+    if (dev_priv->i2c_has_byte) {
+	xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+		   "i2c_flush %02x\n", dev_priv->i2c_put_byte);
+	dev_priv->i2c_has_byte = FALSE;
+	return i830_dp_aux_i2c_write_1(scrn, dev_priv->output_reg,
+				       dev_priv->i2c_address,
+				       dev_priv->i2c_put_byte, last);
+    }
+    return 0;
+}
+
+static Bool
+i830_dp_i2c_address(I2CDevPtr dev, I2CSlaveAddr addr)
+{
+    I2CBusPtr bus = dev->pI2CBus;
+    xf86OutputPtr output = bus->DriverPrivate.ptr;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_dp_priv *dev_priv = intel_output->dev_priv;
+    ScrnInfoPtr scrn = output->scrn;
+
+    if (i830_dp_i2c_flush(bus, TRUE) < 0)
+	return FALSE;
+    xf86DrvMsg(scrn->scrnIndex, X_ERROR, "i2c_address %04x\n", addr);
+    dev_priv->i2c_address = addr;
+    return i830_dp_aux_i2c_address(scrn, dev_priv->output_reg, addr) >= 0;
+}
+
+static Bool
+i830_dp_i2c_start(I2CBusPtr bus, int timeout)
+{
+    xf86OutputPtr output = bus->DriverPrivate.ptr;
+    ScrnInfoPtr scrn = output->scrn;
+
+    (void) i830_dp_i2c_flush(bus, TRUE);
+    xf86DrvMsg(scrn->scrnIndex, X_ERROR, "i2c_start %d\n", timeout);
+    return TRUE;
+}
+
+static void
+i830_dp_i2c_stop(I2CDevPtr dev)
+{
+    I2CBusPtr bus = dev->pI2CBus;
+    xf86OutputPtr output = bus->DriverPrivate.ptr;
+    ScrnInfoPtr scrn = output->scrn;
+
+    xf86DrvMsg(scrn->scrnIndex, X_ERROR, "i2c_stop\n");
+    (void) i830_dp_i2c_flush(bus, TRUE);
+}
+
+static Bool
+i830_dp_i2c_put_byte(I2CDevPtr dev, I2CByte byte)
+{
+    I2CBusPtr bus = dev->pI2CBus;
+    xf86OutputPtr output = bus->DriverPrivate.ptr;
+    ScrnInfoPtr scrn = output->scrn;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_dp_priv *dev_priv = intel_output->dev_priv;
+
+    xf86DrvMsg(scrn->scrnIndex, X_ERROR, "i2c_put_byte 0x%x\n", byte);
+    if (i830_dp_i2c_flush(bus, FALSE) < 0)
+	return FALSE;
+    dev_priv->i2c_put_byte = byte;
+    dev_priv->i2c_has_byte = TRUE;
+    return TRUE;
+}
+
+static Bool
+i830_dp_i2c_get_byte(I2CDevPtr dev, I2CByte *byte_ret, Bool last)
+{
+    I2CBusPtr bus = dev->pI2CBus;
+    xf86OutputPtr output = bus->DriverPrivate.ptr;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_dp_priv *dev_priv = intel_output->dev_priv;
+    ScrnInfoPtr scrn = output->scrn;
+
+    xf86DrvMsg(scrn->scrnIndex, X_ERROR, "i2c_get_byte %d\n", last);
+    return i830_dp_aux_i2c_read_1(scrn, dev_priv->output_reg,
+				  dev_priv->i2c_address,
+				  byte_ret, last) == 1;
+}
+
+
+static Bool
+i830_dp_i2c_init(ScrnInfoPtr pScrn, I2CBusPtr *bus_ptr,
+		 xf86OutputPtr output, char *name)
+{
+    I2CBusPtr pI2CBus;
+
+    pI2CBus = xf86CreateI2CBusRec();
+
+    if (!pI2CBus)
+	return FALSE;
+
+    pI2CBus->BusName = name;
+    pI2CBus->scrnIndex = pScrn->scrnIndex;
+    pI2CBus->I2CGetByte = i830_dp_i2c_get_byte;
+    pI2CBus->I2CPutByte = i830_dp_i2c_put_byte;
+    pI2CBus->I2CAddress = i830_dp_i2c_address;
+    pI2CBus->I2CStart = i830_dp_i2c_start;
+    pI2CBus->I2CStop = i830_dp_i2c_stop;
+    pI2CBus->DriverPrivate.ptr = output;
+
+    /* Assume all busses are used for DDCish stuff */
+
+    /*
+     * These were set incorrectly in the server pre-1.3, Having
+     * duplicate settings is sub-optimal, but this lets the driver
+     * work with older servers
+     */
+    pI2CBus->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */
+    pI2CBus->StartTimeout = 550;
+    pI2CBus->BitTimeout = 40;
+    pI2CBus->AcknTimeout = 40;
+    pI2CBus->RiseFallTime = 20;
+
+    if (!xf86I2CBusInit(pI2CBus))
+	return FALSE;
+
+    *bus_ptr = pI2CBus;
+    return TRUE;
+}
+
 static void
 i830_dp_restore(xf86OutputPtr output)
 {
@@ -457,7 +706,7 @@ i830_dp_restore(xf86OutputPtr output)
     I830OutputPrivatePtr intel_output = output->driver_private;
     struct i830_dp_priv *dev_priv = intel_output->dev_priv;
 
-    i830_dp_aux_write(pScrn, dev_priv->output_reg, 0x100,
+    i830_dp_aux_native_write(pScrn, dev_priv->output_reg, 0x100,
 		     dev_priv->save_link_configuration, sizeof (dev_priv->save_link_configuration));
     i830_dp_link_train(output, dev_priv->save_DP);
 }
@@ -574,6 +823,11 @@ i830_dp_init(ScrnInfoPtr pScrn, int output_reg)
     struct i830_dp_priv *dev_priv;
     uint32_t dp;
     uint8_t dpcd[4];
+#if 0
+    uint8_t edid[0x100];
+    int i;
+    int ret;
+#endif
 
     dp = INREG(output_reg);
     if ((dp & DP_DETECTED) == 0)
@@ -582,12 +836,23 @@ i830_dp_init(ScrnInfoPtr pScrn, int output_reg)
     /* The DP_DETECTED bits are not reliable; see if there's anyone
      * home
      */
-    if (i830_dp_aux_read(pScrn, output_reg,
+    if (i830_dp_aux_native_read(pScrn, output_reg,
 			 0, dpcd, sizeof (dpcd)) != sizeof (dpcd) ||
 	(dpcd[0] == 0))
     {
 	return TRUE;
     }
+#if 0
+    ret = i830_dp_aux_i2c_address(pScrn, output_reg, 0xa1);
+    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "send EDID address %d\n", ret);
+    for (i = 0; i < 16; i++) {
+	ret = i830_dp_aux_i2c_read_1(pScrn, output_reg,
+				     0xa1, &edid[i], i == 15 ? TRUE : FALSE);
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "get(%d) EDID[%d]=%02x\n", ret, i, edid[i]);
+    }
+    return TRUE;
+#endif
+
     output = xf86OutputCreate(pScrn, &i830_dp_output_funcs,
 			      (output_reg == DP_B) ? "DP-1" :
 			      (output_reg == DP_C) ? "DP-2" : "DP-3");
@@ -613,17 +878,10 @@ i830_dp_init(ScrnInfoPtr pScrn, int output_reg)
     intel_output->clone_mask = (1 << I830_OUTPUT_DISPLAYPORT);
 
     /* Set up the DDC bus. */
-    switch (output_reg) {
-    case DP_B:
-	I830I2CInit(pScrn, &intel_output->pDDCBus, GPIOE, "DPDDC_B");
-	break;
-    case DP_C:
-	I830I2CInit(pScrn, &intel_output->pDDCBus, GPIOF, "DPDDC_C");
-	break;
-    case DP_D:
-	I830I2CInit(pScrn, &intel_output->pDDCBus, GPIOG, "DPDDC_D");
-	break;
-    }
+    i830_dp_i2c_init(pScrn, &intel_output->pDDCBus, output,
+		     (output_reg == DP_B) ? "DPDDC-B" :
+		     (output_reg == DP_C) ? "DPDDC-C" : "DPDDC_D");
+
 
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 	       "DP output %d detected\n",
commit 93df29c34cb6ab5f089d7378e30513a02f3b6a8c
Author: Keith Packard <keithp at keithp.com>
Date:   Sun Dec 7 22:34:15 2008 -0800

    Re-train link on dp_restore
    
    Run the link training code when restoring the startup mode. This actually
    appears to work too.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/i830_dp.c b/src/i830_dp.c
index 8b6066d..dd4c493 100644
--- a/src/i830_dp.c
+++ b/src/i830_dp.c
@@ -315,6 +315,25 @@ i830_dp_save(xf86OutputPtr output)
     dev_priv->save_DP = INREG(dev_priv->output_reg);
     i830_dp_aux_read(pScrn, dev_priv->output_reg, 0x100,
 		     dev_priv->save_link_configuration, sizeof (dev_priv->save_link_configuration));
+    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+	       "link configuration: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+	       dev_priv->save_link_configuration[0],
+	       dev_priv->save_link_configuration[1],
+	       dev_priv->save_link_configuration[2],
+	       dev_priv->save_link_configuration[3],
+	       dev_priv->save_link_configuration[4],
+	       dev_priv->save_link_configuration[5],
+	       dev_priv->save_link_configuration[6],
+	       dev_priv->save_link_configuration[7],
+	       dev_priv->save_link_configuration[8],
+	       dev_priv->save_link_configuration[9],
+	       dev_priv->save_link_configuration[10],
+	       dev_priv->save_link_configuration[11],
+	       dev_priv->save_link_configuration[12],
+	       dev_priv->save_link_configuration[13],
+	       dev_priv->save_link_configuration[14],
+	       dev_priv->save_link_configuration[15]);
+
     i830_dp_lane_status(output, lane_status);
 }
 
@@ -345,10 +364,10 @@ i830_dp_link_train(xf86OutputPtr output, uint32_t DP)
 	       "adjust_request(%d): %02x %02x\n",
 	       ret, adjust_request[0], adjust_request[1]);
     /* main link disabled */
-    OUTREG(dev_priv->output_reg, DP | DP_LINK_TRAIN_PAT_1);
-    POSTING_READ(dev_priv->output_reg);
     i830_dp_aux_write_1(pScrn, dev_priv->output_reg,
 			DP_TRAINING_PATTERN_SET, DP_TRAINING_PATTERN_1);
+    OUTREG(dev_priv->output_reg, DP | DP_LINK_TRAIN_PAT_1);
+    POSTING_READ(dev_priv->output_reg);
     usleep (15*1000);
     ret = i830_dp_aux_read(pScrn, dev_priv->output_reg,
 			   DP_TRAINING_PATTERN_SET,
@@ -388,10 +407,10 @@ i830_dp_link_train(xf86OutputPtr output, uint32_t DP)
 	}
     }
     /* channel eq pattern */
-    OUTREG(dev_priv->output_reg, DP | DP_LINK_TRAIN_PAT_2);
-    POSTING_READ(dev_priv->output_reg);
     i830_dp_aux_write_1(pScrn, dev_priv->output_reg,
 			DP_TRAINING_PATTERN_SET, DP_TRAINING_PATTERN_2);
+    OUTREG(dev_priv->output_reg, DP | DP_LINK_TRAIN_PAT_2);
+    POSTING_READ(dev_priv->output_reg);
     usleep(15*1000);
     ret = i830_dp_aux_read(pScrn, dev_priv->output_reg,
 			   DP_TRAINING_PATTERN_SET,
@@ -437,11 +456,10 @@ i830_dp_restore(xf86OutputPtr output)
     ScrnInfoPtr pScrn = output->scrn;
     I830OutputPrivatePtr intel_output = output->driver_private;
     struct i830_dp_priv *dev_priv = intel_output->dev_priv;
-    I830Ptr pI830 = I830PTR(pScrn);
 
-    OUTREG(dev_priv->output_reg, dev_priv->save_DP);
     i830_dp_aux_write(pScrn, dev_priv->output_reg, 0x100,
 		     dev_priv->save_link_configuration, sizeof (dev_priv->save_link_configuration));
+    i830_dp_link_train(output, dev_priv->save_DP);
 }
 
 /*
commit 0a92078acafb170f792d09947260dce04320092b
Author: Keith Packard <keithp at keithp.com>
Date:   Sun Dec 7 01:43:21 2008 -0800

    Add first Display Port code. Fails to train the link.
    
    Includes code to talk over the AUX channel and non-working link training
    code.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/Makefile.am b/src/Makefile.am
index e05dbab..4b5dabf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -105,6 +105,7 @@ intel_drv_la_SOURCES = \
 	 i830_debug.h \
 	 i830_display.c \
 	 i830_display.h \
+	 i830_dp.c \
          i830_quirks.c \
          i830_driver.c \
 	 i830_dvo.c \
diff --git a/src/i810_reg.h b/src/i810_reg.h
index bc462fa..e99d010 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -1241,8 +1241,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define PORT_HOTPLUG_EN		0x61110
 # define HDMIB_HOTPLUG_INT_EN			(1 << 29)
+# define DPB_HOTPLUG_INT_EN			(1 << 29)
 # define HDMIC_HOTPLUG_INT_EN			(1 << 28)
+# define DPC_HOTPLUG_INT_EN			(1 << 28)
 # define HDMID_HOTPLUG_INT_EN			(1 << 27)
+# define DPD_HOTPLUG_INT_EN			(1 << 27)
 # define SDVOB_HOTPLUG_INT_EN			(1 << 26)
 # define SDVOC_HOTPLUG_INT_EN			(1 << 25)
 # define TV_HOTPLUG_INT_EN			(1 << 18)
@@ -1266,8 +1269,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define PORT_HOTPLUG_STAT	0x61114
 # define HDMIB_HOTPLUG_INT_STATUS		(1 << 29)
+# define DPB_HOTPLUG_INT_STATUS			(1 << 29)
 # define HDMIC_HOTPLUG_INT_STATUS		(1 << 28)
+# define DPC_HOTPLUG_INT_STATUS			(1 << 28)
 # define HDMID_HOTPLUG_INT_STATUS		(1 << 27)
+# define DPD_HOTPLUG_INT_STATUS			(1 << 27)
 # define CRT_HOTPLUG_INT_STATUS			(1 << 11)
 # define TV_HOTPLUG_INT_STATUS			(1 << 10)
 # define CRT_HOTPLUG_MONITOR_MASK		(3 << 8)
@@ -1503,7 +1509,76 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 /** @} */
 
 #define DP_B			0x64100
+# define DP_PORT_EN		(1 << 31)
+# define DP_PIPEB_SELECT	(1 << 30)
+
+# define DP_LINK_TRAIN_PAT_1	(0 << 28)
+# define DP_LINK_TRAIN_PAT_2	(1 << 28)
+# define DP_LINK_TRAIN_PAT_IDLE	(2 << 28)
+# define DP_LINK_TRAIN_OFF	(3 << 28)
+# define DP_LINK_TRAIN_MASK	(3 << 28)
+
+# define DP_VOLTAGE_0_4		(0 << 25)
+# define DP_VOLTAGE_0_6		(1 << 25)
+# define DP_VOLTAGE_0_8		(2 << 25)
+# define DP_VOLTAGE_1_2		(3 << 25)
+# define DP_VOLTAGE_MASK	(7 << 25)
+
+# define DP_PRE_EMPHASIS_0	(0 << 22)
+# define DP_PRE_EMPHASIS_3_5	(1 << 22)
+# define DP_PRE_EMPHASIS_6	(2 << 22)
+# define DP_PRE_EMPHASIS_9_5	(3 << 22)
+# define DP_PRE_EMPHASIS_MASK	(7 << 22)
+
+# define DP_PORT_WIDTH_1	(0 << 19)
+# define DP_PORT_WIDTH_2	(1 << 19)
+# define DP_PORT_WIDTH_4	(3 << 19)
+# define DP_PORT_WIDTH_MASK	(7 << 19)
+
+# define DP_ENHANCED_FRAMING	(1 << 18)
+
+/** locked once port is enabled */
+# define DP_PORT_REVERSAL	(1 << 15)
+
+/** sends the clock on lane 15 of the PEG for debug */
+# define DP_CLOCK_OUTPUT_ENABLE	(1 << 13)
+
+# define DP_SCRAMBLING_DISABLE	(1 << 12)
+
+# define DP_COLOR_RANGE_16_235	(1 << 8)
+
+# define DP_AUDIO_OUTPUT_ENABLE	(1 << 6)
+
+/** vs and hs sync polarity */
+# define DP_SYNC_VS_HIGH	(1 << 4)
+# define DP_SYNC_HS_HIGH	(1 << 3)
+
+# define DP_DETECTED		(1 << 2)
+
 #define DPB_AUX_CH_CTL		0x64110
+
+# define DP_AUX_CH_CTL_SEND_BUSY	    (1 << 31)
+# define DP_AUX_CH_CTL_DONE		    (1 << 30)
+# define DP_AUX_CH_CTL_INTERRUPT	    (1 << 29)
+# define DP_AUX_CH_CTL_TIME_OUT_ERROR	    (1 << 28)
+# define DP_AUX_CH_CTL_TIME_OUT_400us	    (0 << 26)
+# define DP_AUX_CH_CTL_TIME_OUT_600us	    (1 << 26)
+# define DP_AUX_CH_CTL_TIME_OUT_800us	    (2 << 26)
+# define DP_AUX_CH_CTL_TIME_OUT_1600us	    (3 << 26)
+# define DP_AUX_CH_CTL_TIME_OUT_MASK	    (3 << 26)
+# define DP_AUX_CH_CTL_RECEIVE_ERROR	    (1 << 25)
+# define DP_AUX_CH_CTL_MESSAGE_SIZE_MASK    (0x1f << 20)
+# define DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT   20
+# define DP_AUX_CH_CTL_PRECHARGE_2US_MASK   (0xf << 16)
+# define DP_AUX_CH_CTL_PRECHARGE_2US_SHIFT  16
+# define DP_AUX_CH_CTL_AUX_AKSV_SELECT	    (1 << 15)
+# define DP_AUX_CH_CTL_MANCHESTER_TEST	    (1 << 14)
+# define DP_AUX_CH_CTL_SYNC_TEST	    (1 << 13)
+# define DP_AUX_CH_CTL_DEGLITCH_TEST	    (1 << 12)
+# define DP_AUX_CH_CTL_PRECHARGE_TEST	    (1 << 11)
+# define DP_AUX_CH_CTL_BIT_CLOCK_2X_MASK    (0x7ff)
+# define DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT   0
+
 #define DPB_AUX_CH_DATA1	0x64114
 #define DPB_AUX_CH_DATA2	0x64118
 #define DPB_AUX_CH_DATA3	0x6411c
diff --git a/src/i830.h b/src/i830.h
index f933917..c8fb8f9 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -231,6 +231,7 @@ typedef struct {
 #define I830_OUTPUT_LVDS 6
 #define I830_OUTPUT_TVOUT 7
 #define I830_OUTPUT_HDMI 8
+#define I830_OUTPUT_DISPLAYPORT 9
 
 struct _I830DVODriver {
    int type;
@@ -876,6 +877,9 @@ i830PipeHasType (xf86CrtcPtr crtc, int type);
 /* i830_crt.c */
 void i830_crt_init(ScrnInfoPtr pScrn);
 
+/* i830_dp.c */
+Bool i830_dp_init(ScrnInfoPtr pScrn, int output_reg);
+
 /* i830_dvo.c */
 void i830_dvo_init(ScrnInfoPtr pScrn);
 
diff --git a/src/i830_debug.c b/src/i830_debug.c
index 86f5f21..cf30dd5 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -530,6 +530,60 @@ DEBUGSTRING(i830_debug_dspclk_gate_d)
 		      OVLUNIT);
 }
 
+DEBUGSTRING(i830_debug_dp)
+{
+    char *enable = val & DP_PORT_EN ? "enabled" : "disabled";
+    char pipe = val & DP_PIPEB_SELECT ? 'B' : 'A';
+    int link_train_v = val & DP_LINK_TRAIN_MASK;
+    char *link_train;
+    int voltage_v = val & DP_VOLTAGE_MASK;
+    char *voltage;
+    int pre_emphasis_v = val & DP_PRE_EMPHASIS_MASK;
+    char *pre_emphasis;
+    int port_width_v = val & DP_PORT_WIDTH_MASK;
+    char *port_width;
+    char *enhanced_framing = val & DP_ENHANCED_FRAMING ? "enhanced" : "normal";
+    char *port_reversal = val & DP_PORT_REVERSAL ? "reversed" : "normal";
+    char *clock_output = val & DP_CLOCK_OUTPUT_ENABLE ? "enabled" : "disabled";
+    char *scrambling = val & DP_SCRAMBLING_DISABLE ? "disabled" : "enabled";
+    char *color_range = val & DP_COLOR_RANGE_16_235 ? "16-235" : "0-255";
+    char *audio_output = val & DP_AUDIO_OUTPUT_ENABLE ? "enabled" : "disabled";
+    char *vs = val & DP_SYNC_VS_HIGH ? "high" : "low";
+    char *hs = val & DP_SYNC_HS_HIGH ? "high" : "low";
+    char *detected = val & DP_DETECTED ? "detected" : "not detected";
+
+    switch (link_train_v) {
+    case DP_LINK_TRAIN_PAT_1: link_train = "pattern 1"; break;
+    case DP_LINK_TRAIN_PAT_2: link_train = "pattern 2"; break;
+    case DP_LINK_TRAIN_PAT_IDLE: link_train = "pattern idle"; break;
+    case DP_LINK_TRAIN_OFF: link_train = "normal pixels"; break;
+    default: link_train = "invalid"; break;
+    }
+    switch (voltage_v) {
+    case DP_VOLTAGE_0_4: voltage = "0.4V"; break;
+    case DP_VOLTAGE_0_6: voltage = "0.6V"; break;
+    case DP_VOLTAGE_0_8: voltage = "0.8V"; break;
+    case DP_VOLTAGE_1_2: voltage = "1.2V"; break;
+    default: voltage = "invalid"; break;
+    }
+    switch (pre_emphasis_v) {
+    case DP_PRE_EMPHASIS_0: pre_emphasis = "0dB"; break;
+    case DP_PRE_EMPHASIS_3_5: pre_emphasis = "3.5dB"; break;
+    case DP_PRE_EMPHASIS_6: pre_emphasis = "6dB"; break;
+    case DP_PRE_EMPHASIS_9_5: pre_emphasis = "9.5dB"; break;
+    default: pre_emphasis = "invalid"; break;
+    }
+    switch (port_width_v) {
+    case DP_PORT_WIDTH_1: port_width = "1"; break;
+    case DP_PORT_WIDTH_2: port_width = "2"; break;
+    case DP_PORT_WIDTH_4: port_width = "4"; break;
+    default: port_width = "invalid"; break;
+    }
+    return XNFprintf ("DisplayPort %s pipe %c train %s voltage %s pre_emphasis %s width %s framing %s port %s clock_debug %s scrambling %s color %s audio %s vsync %s hsync %s %s",
+		      enable, pipe, link_train, voltage, pre_emphasis, port_width, enhanced_framing,
+		      port_reversal, clock_output, scrambling, color_range, audio_output,
+		      vs, hs, detected);
+}
 
 DEBUGSTRING(i810_debug_915_fence)
 {
@@ -745,7 +799,7 @@ static struct i830SnapshotRec {
     DEFINEREG(MI_RDRET_STATE),
     DEFINEREG(ECOSKPD),
 
-    DEFINEREG(DP_B),
+    DEFINEREG2(DP_B, i830_debug_dp),
     DEFINEREG(DPB_AUX_CH_CTL),
     DEFINEREG(DPB_AUX_CH_DATA1),
     DEFINEREG(DPB_AUX_CH_DATA2),
@@ -753,7 +807,7 @@ static struct i830SnapshotRec {
     DEFINEREG(DPB_AUX_CH_DATA4),
     DEFINEREG(DPB_AUX_CH_DATA5),
 
-    DEFINEREG(DP_C),
+    DEFINEREG2(DP_C, i830_debug_dp),
     DEFINEREG(DPC_AUX_CH_CTL),
     DEFINEREG(DPC_AUX_CH_DATA1),
     DEFINEREG(DPC_AUX_CH_DATA2),
@@ -761,7 +815,7 @@ static struct i830SnapshotRec {
     DEFINEREG(DPC_AUX_CH_DATA4),
     DEFINEREG(DPC_AUX_CH_DATA5),
 
-    DEFINEREG(DP_D),
+    DEFINEREG2(DP_D, i830_debug_dp),
     DEFINEREG(DPD_AUX_CH_CTL),
     DEFINEREG(DPD_AUX_CH_DATA1),
     DEFINEREG(DPD_AUX_CH_DATA2),
diff --git a/src/i830_display.c b/src/i830_display.c
index ca55906..55a20be 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1323,6 +1323,7 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
 	    break;
 	case I830_OUTPUT_SDVO:
 	case I830_OUTPUT_HDMI:
+	case I830_OUTPUT_DISPLAYPORT:
 	    is_sdvo = TRUE;
 	    if (intel_output->needs_tv_clock)
 		is_tv = TRUE;
diff --git a/src/i830_dp.c b/src/i830_dp.c
new file mode 100644
index 0000000..8b6066d
--- /dev/null
+++ b/src/i830_dp.c
@@ -0,0 +1,615 @@
+/*
+ * Copyright © 2008 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:
+ *    Keith Packard <keithp at keithp.com>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "xf86.h"
+#include "i830.h"
+#include "xf86Modes.h"
+#include "i830_display.h"
+#include "i830_dp.h"
+#include <unistd.h>
+
+struct i830_dp_priv {
+    uint32_t output_reg;
+    uint32_t save_DP;
+    uint8_t  save_link_configuration[0x10];
+    Bool has_audio;
+};
+
+static void
+i830_dp_link_train(xf86OutputPtr output, uint32_t DP);
+
+static int
+i830_dp_mode_valid(xf86OutputPtr output, DisplayModePtr mode)
+{
+    if (mode->Clock > 250000)
+	return MODE_CLOCK_HIGH;
+
+    if (mode->Clock < 20000)
+	return MODE_CLOCK_LOW;
+
+    return MODE_OK;
+}
+
+static Bool
+i830_dp_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
+		     DisplayModePtr adjusted_mode)
+{
+    /* The DP output doesn't need the pixel multiplication that SDVO does,
+     * so no fixup.
+     */
+    return TRUE;
+}
+
+static uint32_t
+pack_aux(uint8_t *src, int src_bytes)
+{
+    int	i;
+    uint32_t v = 0;
+
+    if (src_bytes > 4)
+	src_bytes = 4;
+    for (i = 0; i < src_bytes; i++)
+	v |= ((uint32_t) src[i]) << ((3-i) * 8);
+    return v;
+}
+
+static void
+unpack_aux(uint32_t src, uint8_t *dst, int dst_bytes)
+{
+    int i;
+    if (dst_bytes > 4)
+	dst_bytes = 4;
+    for (i = 0; i < dst_bytes; i++)
+	dst[i] = src >> ((3-i) * 8);
+}
+
+static int
+i830_dp_aux_write(ScrnInfoPtr pScrn, uint32_t output_reg,
+		  uint32_t address, uint8_t *send, int send_bytes)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    uint32_t	ch_ctl = output_reg + 0x10;
+    uint32_t	ch_cmd = ch_ctl + 4;
+    uint32_t	ch_data = ch_ctl + 8;
+    int		i;
+    uint32_t	ctl;
+    uint32_t	cmd;
+    uint32_t	status;
+
+    cmd = ((0x8 << 28) |
+	   (address << 8) |
+	   (send_bytes));
+    OUTREG(ch_cmd, cmd);
+    for (i = 0; i < send_bytes; i += 4)
+	OUTREG(ch_data + i, pack_aux(send + i, send_bytes - i));
+
+    ctl = (DP_AUX_CH_CTL_SEND_BUSY |
+	   DP_AUX_CH_CTL_TIME_OUT_400us |
+	   ((send_bytes + 4) << DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT) |
+	   (5 << DP_AUX_CH_CTL_PRECHARGE_2US_SHIFT) |
+	   (133 << DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT));
+    OUTREG(ch_ctl, ctl);
+    for (;;) {
+	status = INREG(ch_ctl);
+	if ((status & DP_AUX_CH_CTL_SEND_BUSY) == 0)
+	    break;
+    }
+
+    /* Clear done status and any errors */
+    OUTREG(ch_ctl, (ctl |
+		    DP_AUX_CH_CTL_DONE |
+		    DP_AUX_CH_CTL_TIME_OUT_ERROR |
+		    DP_AUX_CH_CTL_RECEIVE_ERROR));
+
+    if ((status & DP_AUX_CH_CTL_DONE) == 0)
+    {
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		   "DisplayPort AUX CH failed to complete: 0x%08x\n",
+		   status);
+	return -1;
+    }
+    return send_bytes;
+}
+
+static int
+i830_dp_aux_write_1(ScrnInfoPtr pScrn, uint32_t output_reg,
+		    uint32_t address, uint8_t byte)
+{
+    return i830_dp_aux_write(pScrn, output_reg, address, &byte, 1);
+}
+
+static int
+i830_dp_aux_read(ScrnInfoPtr pScrn, uint32_t output_reg,
+		 uint32_t address, uint8_t *recv, int recv_bytes)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    uint32_t	ch_ctl = output_reg + 0x10;
+    uint32_t	ch_cmd = ch_ctl + 4;
+    int		i;
+    uint8_t	header[4];
+    uint8_t	header_bytes;
+    uint32_t	ctl;
+    uint32_t	cmd;
+    uint32_t	status;
+    int		got_bytes;
+    int		tries = 0;
+
+    cmd = ((0x9 << 28) |
+	   (address << 8) |
+	   (recv_bytes-1));
+    ctl = (DP_AUX_CH_CTL_SEND_BUSY |
+	   DP_AUX_CH_CTL_TIME_OUT_400us |
+	   (4 << DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT) |
+	   (5 << DP_AUX_CH_CTL_PRECHARGE_2US_SHIFT) |
+	   (133 << DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT));
+    for (;;) {
+	OUTREG(ch_cmd, cmd);
+
+	OUTREG(ch_ctl, ctl);
+	for (;;) {
+	    status = INREG(ch_ctl);
+	    if ((status & DP_AUX_CH_CTL_SEND_BUSY) == 0)
+		break;
+	}
+
+	/* Clear done status and any errors */
+	OUTREG(ch_ctl, (ctl |
+			DP_AUX_CH_CTL_DONE |
+			DP_AUX_CH_CTL_TIME_OUT_ERROR |
+			DP_AUX_CH_CTL_RECEIVE_ERROR));
+
+	if ((status & DP_AUX_CH_CTL_DONE) == 0)
+	{
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "DisplayPort AUX CH failed to complete: 0x%08x\n",
+		       status);
+	    return -1;
+	}
+
+	got_bytes = ((status & DP_AUX_CH_CTL_MESSAGE_SIZE_MASK) >>
+		     DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT);
+	if (got_bytes > 20)
+	    got_bytes = 20;
+	if (got_bytes - 1 < recv_bytes)
+	    recv_bytes = got_bytes - 1;
+	if (got_bytes - 1 > recv_bytes)
+	{
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "DisplayPort AUX CH read returns too much: %d > %d\n",
+		       got_bytes, recv_bytes);
+	}
+	header_bytes = 4;
+	if (recv_bytes + 1 < 4)
+	    header_bytes = recv_bytes + 1;
+	unpack_aux(INREG(ch_cmd), header, header_bytes);
+	switch (header[0] & 0x3) {
+	case 0:
+	    break;
+	case 1:
+	case 3:
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "DisplayPort AUX CH %d read fails\n", address);
+	    return -1;
+	case 2:
+	    tries++;
+	    if (tries > 10) {
+		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+			   "DisplayPort AUX CH read %d gave up after %d retries\n",
+			   address, tries);
+		return -1;
+	    }
+	    usleep(1000);
+	    continue;
+	}
+	break;
+    }
+    memcpy(recv, header + 1, header_bytes-1);
+    for (i = 4; i < recv_bytes + 1; i += 4)
+	unpack_aux(INREG(ch_cmd + i), recv + (i-1), recv_bytes - (i-1));
+    return recv_bytes;
+}
+
+static void
+i830_dp_mode_set(xf86OutputPtr output, DisplayModePtr mode,
+		   DisplayModePtr adjusted_mode)
+{
+    ScrnInfoPtr pScrn = output->scrn;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_dp_priv *dev_priv = intel_output->dev_priv;
+    I830Ptr pI830 = I830PTR(pScrn);
+    xf86CrtcPtr crtc = output->crtc;
+    I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
+    uint32_t dp;
+
+    dp = (DP_PORT_EN |
+	  DP_LINK_TRAIN_OFF |
+	  DP_VOLTAGE_0_4 |
+	  DP_PRE_EMPHASIS_0 |
+	  DP_PORT_WIDTH_4 |
+	  DP_ENHANCED_FRAMING |
+	  DP_SYNC_VS_HIGH |
+	  DP_SYNC_HS_HIGH);
+
+    if (dev_priv->has_audio)
+	    dp |= DP_AUDIO_OUTPUT_ENABLE;
+
+    if (intel_crtc->pipe == 1)
+	dp |= DP_PIPEB_SELECT;
+
+    OUTREG(dev_priv->output_reg, dp);
+    POSTING_READ(dev_priv->output_reg);
+}
+
+static void
+i830_dp_dpms(xf86OutputPtr output, int mode)
+{
+    ScrnInfoPtr pScrn = output->scrn;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_dp_priv *dev_priv = intel_output->dev_priv;
+    I830Ptr pI830 = I830PTR(pScrn);
+    uint32_t  temp;
+
+    if (mode == DPMSModeOff) {
+	temp = INREG(dev_priv->output_reg);
+	OUTREG(dev_priv->output_reg, temp & ~DP_PORT_EN);
+    } else {
+	temp = INREG(dev_priv->output_reg);
+	temp |= DP_PORT_EN;
+	i830_dp_link_train(output, temp);
+    }
+}
+
+static int
+i830_dp_lane_status(xf86OutputPtr output, uint8_t lane_status[3])
+{
+    ScrnInfoPtr pScrn = output->scrn;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_dp_priv *dev_priv = intel_output->dev_priv;
+    int ret;
+
+    ret = i830_dp_aux_read(pScrn, dev_priv->output_reg, DP_LANE0_1_STATUS,
+			   lane_status, 3);
+    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+	       "lane status(%d) %02x %02x %02x\n",
+	       ret, lane_status[0], lane_status[1], lane_status[2]);
+    return ret;
+}
+
+static void
+i830_dp_save(xf86OutputPtr output)
+{
+    ScrnInfoPtr pScrn = output->scrn;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_dp_priv *dev_priv = intel_output->dev_priv;
+    I830Ptr pI830 = I830PTR(pScrn);
+    uint8_t lane_status[3];
+
+    dev_priv->save_DP = INREG(dev_priv->output_reg);
+    i830_dp_aux_read(pScrn, dev_priv->output_reg, 0x100,
+		     dev_priv->save_link_configuration, sizeof (dev_priv->save_link_configuration));
+    i830_dp_lane_status(output, lane_status);
+}
+
+static void
+i830_dp_link_train(xf86OutputPtr output, uint32_t DP)
+{
+    ScrnInfoPtr pScrn = output->scrn;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_dp_priv *dev_priv = intel_output->dev_priv;
+    I830Ptr pI830 = I830PTR(pScrn);
+    uint8_t	training[10];
+    uint8_t	train_set[4];
+    uint8_t lane_status[3];
+    uint8_t adjust_request[10];
+    int ret;
+    int tries;
+    int i;
+
+    if ((DP & DP_PORT_EN) == 0) {
+	OUTREG(dev_priv->output_reg, DP);
+	return;
+    }
+    DP &= ~DP_LINK_TRAIN_MASK;
+
+    ret = i830_dp_aux_read(pScrn, dev_priv->output_reg,
+			   0x206, adjust_request, 2);
+    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+	       "adjust_request(%d): %02x %02x\n",
+	       ret, adjust_request[0], adjust_request[1]);
+    /* main link disabled */
+    OUTREG(dev_priv->output_reg, DP | DP_LINK_TRAIN_PAT_1);
+    POSTING_READ(dev_priv->output_reg);
+    i830_dp_aux_write_1(pScrn, dev_priv->output_reg,
+			DP_TRAINING_PATTERN_SET, DP_TRAINING_PATTERN_1);
+    usleep (15*1000);
+    ret = i830_dp_aux_read(pScrn, dev_priv->output_reg,
+			   DP_TRAINING_PATTERN_SET,
+			   training, 1);
+    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+	       "training pattern 1: %02x\n", training[0]);
+    memset(train_set, '\0', sizeof (train_set));
+    train_set[0] = (3 << 3) | (0 << 0);
+    train_set[1] = (3 << 3) | (0 << 0);
+    train_set[2] = (3 << 3) | (0 << 0);
+    train_set[3] = (3 << 3) | (0 << 0);
+    /* clock recovery pattern */
+    tries = 0;
+    for (i = 0; i < 4; i++) {
+
+	ret = i830_dp_aux_write(pScrn, dev_priv->output_reg,
+				DP_TRAINING_LANE0_SET, train_set, 4);
+	if (ret != 4) {
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "voltage swing set failed\n");
+	    break;
+	}
+
+	usleep (15*1000);
+	ret = i830_dp_lane_status(output, lane_status);
+	if (ret != 3)
+	    break;
+	if ((lane_status[0] & DP_LANE_CR_DONE) &&
+	    (lane_status[0] & (DP_LANE_CR_DONE << 4)) &&
+	    (lane_status[1] & DP_LANE_CR_DONE) &&
+	    (lane_status[1] & (DP_LANE_CR_DONE << 4)))
+	    break;
+	if (i == 3) {
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "clock recovery failed\n");
+	    break;
+	}
+    }
+    /* channel eq pattern */
+    OUTREG(dev_priv->output_reg, DP | DP_LINK_TRAIN_PAT_2);
+    POSTING_READ(dev_priv->output_reg);
+    i830_dp_aux_write_1(pScrn, dev_priv->output_reg,
+			DP_TRAINING_PATTERN_SET, DP_TRAINING_PATTERN_2);
+    usleep(15*1000);
+    ret = i830_dp_aux_read(pScrn, dev_priv->output_reg,
+			   DP_TRAINING_PATTERN_SET,
+			   training, 1);
+    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+	       "training pattern 2: %02x\n", training[0]);
+    for (i = 0; i < 4; i++) {
+	int ret;
+
+	ret = i830_dp_aux_write(pScrn, dev_priv->output_reg,
+				DP_TRAINING_LANE0_SET, train_set, 4);
+	if (ret != 4) {
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "voltage swing set failed\n");
+	    break;
+	}
+
+	usleep(15*1000);
+	ret = i830_dp_lane_status(output, lane_status);
+	if (ret != 3)
+	    break;
+	if ((lane_status[0] & DP_LANE_CHANNEL_EQ_DONE) &&
+	    (lane_status[0] & (DP_LANE_CHANNEL_EQ_DONE<<4)) &&
+	    (lane_status[1] & DP_LANE_CHANNEL_EQ_DONE) &&
+	    (lane_status[1] & (DP_LANE_CHANNEL_EQ_DONE<<4)))
+	    break;
+	if (i == 3) {
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "channel eq failed\n");
+	    break;
+	}
+    }
+    OUTREG(dev_priv->output_reg, DP | DP_LINK_TRAIN_OFF);
+    POSTING_READ(dev_priv->output_reg);
+    i830_dp_aux_write_1(pScrn, dev_priv->output_reg,
+			DP_TRAINING_PATTERN_SET, DP_TRAINING_PATTERN_DISABLE);
+    usleep (15*1000);
+}
+
+static void
+i830_dp_restore(xf86OutputPtr output)
+{
+    ScrnInfoPtr pScrn = output->scrn;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_dp_priv *dev_priv = intel_output->dev_priv;
+    I830Ptr pI830 = I830PTR(pScrn);
+
+    OUTREG(dev_priv->output_reg, dev_priv->save_DP);
+    i830_dp_aux_write(pScrn, dev_priv->output_reg, 0x100,
+		     dev_priv->save_link_configuration, sizeof (dev_priv->save_link_configuration));
+}
+
+/*
+ * According to DP spec
+ * 5.1.2:
+ *  1. Read DPCD
+ *  2. Configure link according to Receiver Capabilities
+ *  3. Use Link Training from 2.5.3.3 and 3.5.1.3
+ *  4. Check link status on receipt of hot-plug interrupt
+*/
+
+/**
+ * Uses CRT_HOTPLUG_EN and CRT_HOTPLUG_STAT to detect DP connection.
+ *
+ * \return TRUE if DP port is connected.
+ * \return FALSE if DP port is disconnected.
+ */
+static xf86OutputStatus
+i830_dp_detect(xf86OutputPtr output)
+{
+    ScrnInfoPtr	pScrn = output->scrn;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_dp_priv *dev_priv = intel_output->dev_priv;
+    I830Ptr pI830 = I830PTR(pScrn);
+    uint32_t temp, bit;
+
+    dev_priv->has_audio = FALSE;
+
+    /* For G4X desktop chip, PEG_BAND_GAP_DATA 3:0 must first be written 0xd.
+     * Failure to do so will result in spurious interrupts being
+     * generated on the port when a cable is not attached.
+     */
+    if (IS_G4X(pI830) && !IS_GM45(pI830)) {
+	temp = INREG(PEG_BAND_GAP_DATA);
+	OUTREG(PEG_BAND_GAP_DATA, (temp & ~0xf) | 0xd);
+    }
+
+    temp = INREG(PORT_HOTPLUG_EN);
+
+    OUTREG(PORT_HOTPLUG_EN,
+	   temp |
+	   DPB_HOTPLUG_INT_EN |
+	   DPC_HOTPLUG_INT_EN |
+	   DPD_HOTPLUG_INT_EN);
+
+    POSTING_READ(PORT_HOTPLUG_EN);
+
+    switch (dev_priv->output_reg) {
+    case DP_B:
+	bit = DPB_HOTPLUG_INT_STATUS;
+	break;
+    case DP_C:
+	bit = DPC_HOTPLUG_INT_STATUS;
+	break;
+    case DP_D:
+	bit = DPD_HOTPLUG_INT_STATUS;
+	break;
+    default:
+	return XF86OutputStatusUnknown;
+    }
+
+    temp = INREG(PORT_HOTPLUG_STAT);
+
+    if ((temp & bit) == 0)
+	return XF86OutputStatusDisconnected;
+
+    if (pI830->debug_modes)
+	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		   "DisplayPort monitor detected on DP-%d\n",
+		   (dev_priv->output_reg == DP_B) ? 1 :
+		   (dev_priv->output_reg == DP_C) ? 2 : 3);
+
+    return XF86OutputStatusConnected;
+}
+
+static void
+i830_dp_destroy (xf86OutputPtr output)
+{
+    I830OutputPrivatePtr intel_output = output->driver_private;
+
+    if (intel_output != NULL) {
+	xf86DestroyI2CBusRec(intel_output->pDDCBus, FALSE, FALSE);
+	xfree(intel_output);
+    }
+}
+
+static const xf86OutputFuncsRec i830_dp_output_funcs = {
+    .dpms = i830_dp_dpms,
+    .save = i830_dp_save,
+    .restore = i830_dp_restore,
+    .mode_valid = i830_dp_mode_valid,
+    .mode_fixup = i830_dp_mode_fixup,
+    .prepare = i830_output_prepare,
+    .mode_set = i830_dp_mode_set,
+    .commit = i830_output_commit,
+    .detect = i830_dp_detect,
+    .get_modes = i830_ddc_get_modes,
+    .destroy = i830_dp_destroy
+};
+
+/*
+ * Returns whether the SDVO/HDMI/DP port is used
+ * by DP, this prevents it from detection attempts
+ * for SDVO or HDMI
+ */
+Bool
+i830_dp_init(ScrnInfoPtr pScrn, int output_reg)
+{
+    xf86OutputPtr output;
+    I830Ptr pI830 = I830PTR(pScrn);
+    I830OutputPrivatePtr intel_output;
+    struct i830_dp_priv *dev_priv;
+    uint32_t dp;
+    uint8_t dpcd[4];
+
+    dp = INREG(output_reg);
+    if ((dp & DP_DETECTED) == 0)
+	return FALSE;
+
+    /* The DP_DETECTED bits are not reliable; see if there's anyone
+     * home
+     */
+    if (i830_dp_aux_read(pScrn, output_reg,
+			 0, dpcd, sizeof (dpcd)) != sizeof (dpcd) ||
+	(dpcd[0] == 0))
+    {
+	return TRUE;
+    }
+    output = xf86OutputCreate(pScrn, &i830_dp_output_funcs,
+			      (output_reg == DP_B) ? "DP-1" :
+			      (output_reg == DP_C) ? "DP-2" : "DP-3");
+    if (!output)
+	return TRUE;
+    intel_output = xnfcalloc(sizeof (I830OutputPrivateRec) +
+			     sizeof (struct i830_dp_priv), 1);
+    if (intel_output == NULL) {
+	xf86OutputDestroy(output);
+	return TRUE;
+    }
+    output->driver_private = intel_output;
+    output->interlaceAllowed = FALSE;
+    output->doubleScanAllowed = FALSE;
+
+    dev_priv = (struct i830_dp_priv *)(intel_output + 1);
+    dev_priv->output_reg = output_reg;
+    dev_priv->has_audio = FALSE;
+
+    intel_output->dev_priv = dev_priv;
+    intel_output->type = I830_OUTPUT_DISPLAYPORT;
+    intel_output->pipe_mask = ((1 << 0) | (1 << 1));
+    intel_output->clone_mask = (1 << I830_OUTPUT_DISPLAYPORT);
+
+    /* Set up the DDC bus. */
+    switch (output_reg) {
+    case DP_B:
+	I830I2CInit(pScrn, &intel_output->pDDCBus, GPIOE, "DPDDC_B");
+	break;
+    case DP_C:
+	I830I2CInit(pScrn, &intel_output->pDDCBus, GPIOF, "DPDDC_C");
+	break;
+    case DP_D:
+	I830I2CInit(pScrn, &intel_output->pDDCBus, GPIOG, "DPDDC_D");
+	break;
+    }
+
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+	       "DP output %d detected\n",
+	       (output_reg == DP_B) ? 1 :
+	       (output_reg == DP_C) ? 2 : 3);
+    return TRUE;
+}
diff --git a/src/i830_driver.c b/src/i830_driver.c
index c19fcc6..4ec892c 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -905,21 +905,32 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
       i830_lvds_init(pScrn);
 
    if (IS_I9XX(pI830)) {
-      Bool found = FALSE;
-      if ((INREG(SDVOB) & SDVO_DETECTED)) {
-	 found = i830_sdvo_init(pScrn, SDVOB);
-
-	 if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
-	    i830_hdmi_init(pScrn, SDVOB);
+      if (IS_G4X(pI830) && i830_dp_init(pScrn, DP_B))
+	;
+      else {
+	 Bool found = FALSE;
+	 if ((INREG(SDVOB) & SDVO_DETECTED)) {
+	    found = i830_sdvo_init(pScrn, SDVOB);
+
+	    if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
+	       i830_hdmi_init(pScrn, SDVOB);
+	 }
       }
 
-      if ((INREG(SDVOB) & SDVO_DETECTED))
-	 found = i830_sdvo_init(pScrn, SDVOC);
+      if (IS_G4X(pI830) && i830_dp_init(pScrn, DP_C))
+	;
+      else {
+	 Bool found = FALSE;
+	 if ((INREG(SDVOB) & SDVO_DETECTED))
+	    found = i830_sdvo_init(pScrn, SDVOC);
 
-      if ((INREG(SDVOC) & SDVO_DETECTED) &&
-	    !found && SUPPORTS_INTEGRATED_HDMI(pI830))
-	 i830_hdmi_init(pScrn, SDVOC);
+	 if ((INREG(SDVOC) & SDVO_DETECTED) &&
+	     !found && SUPPORTS_INTEGRATED_HDMI(pI830))
+	    i830_hdmi_init(pScrn, SDVOC);
+      }
 
+      if (IS_GM45(pI830))
+	 i830_dp_init(pScrn, DP_D);
    } else {
       i830_dvo_init(pScrn);
    }
commit 78a60e1b66fe2e8449702dd43d9b062d279af8f1
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Mar 16 08:41:52 2009 -0700

    Revert EXA_DRIVER_KNOWN_MAJOR bump
    
    This was mistakenly added in the unrelated change in revision
    fe08b81d0f5d6f96e0124e6286bd24aba6e140ad

diff --git a/src/i830.h b/src/i830.h
index b145edb..f933917 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -77,7 +77,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "i915_drm.h"
 
 #ifdef I830_USE_EXA
-#define EXA_DRIVER_KNOWN_MAJOR 3
 #include "exa.h"
 Bool I830EXAInit(ScreenPtr pScreen);
 unsigned long long I830TexOffsetStart(PixmapPtr pPix);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index f104c5f..c19fcc6 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1939,17 +1939,12 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
       int errmaj, errmin;
 
       memset(&req, 0, sizeof(req));
-#if EXA_VERSION_MAJOR == 3
-      req.majorversion = 3;
-      req.minorversion = 0;
-#else
       req.majorversion = 2;
 #if EXA_VERSION_MINOR >= 2
       req.minorversion = 2;
 #else
       req.minorversion = 1;
 #endif
-#endif
       if (!LoadSubModule(pScrn->module, "exa", NULL, NULL, NULL, &req,
 		&errmaj, &errmin)) {
 	 LoaderErrorMsg(NULL, "exa", errmaj, errmin);
commit 1a6e70cd98abc63f24f710819961c24601afb59b
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Mar 16 10:19:39 2009 +0800

    TV: fix contrast and saturation for 945G
    
    Bug #20670.

diff --git a/src/i830_tv.c b/src/i830_tv.c
index 42d9e90..8eb3e26 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1079,7 +1079,7 @@ i830_tv_update_contrast(I830Ptr pI830, uint8_t contrast)
 	c = float_to_fix_2_6(con);
     } else {
 	/* 2.6 floating point */
-	con = 8.875 * ((float) contrast / 255);
+	con = 2.65625 * ((float) contrast / 255);
 	c = float_to_float_2_6(con);
     }
     val |= (c << TV_CONTRAST_SHIFT) & TV_CONTRAST_MASK;
@@ -1098,7 +1098,7 @@ i830_tv_update_saturation(I830Ptr pI830, uint8_t saturation)
 	sat = 3.0 * ((float) saturation / 255);
 	s = float_to_fix_2_6(sat);
     } else {
-	sat = 8.875 * ((float) saturation / 255);
+	sat = 2.65625 * ((float) saturation / 255);
 	s = float_to_float_2_6(sat);
     }
     val |= (s << TV_SATURATION_SHIFT) & TV_SATURATION_MASK;
commit 4e95327323e3d081b565147f7738eb49c28542bc
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Mar 16 09:30:22 2009 +0800

    TV: force TV as connected with TV_Connector option
    
    In order to bypass failure in TV load detect, TV_Connector option
    will always force TV as connected with user specified connector type.

diff --git a/man/intel.man b/man/intel.man
index b6f89b6..ffe69a1 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -313,7 +313,7 @@ This property allows you to control the output standard used on your TV output p
 .B TV_Connector
 - connector type
 .TP 2
-This config option should be added to xorg.conf TV monitor's section, it allows you to control the TV output connector type, which bypass load detect. You can select between S-Video, Composite and Component.
+This config option should be added to xorg.conf TV monitor's section, it allows you to force the TV output connector type, which bypass load detect and TV will always be taken as connected. You can select between S-Video, Composite and Component.
 
 .SS "TMDS-1"
 First DVI SDVO output
diff --git a/src/i830_tv.c b/src/i830_tv.c
index 1e3cf7b..42d9e90 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1458,6 +1458,10 @@ i830_tv_detect(xf86OutputPtr output)
     int			    dpms_mode;
     int			    type = dev_priv->type;
 
+    /* If TV connector type set by user, always return connected */
+    if (dev_priv->force_type)
+	return XF86OutputStatusConnected;
+
     mode = reported_modes[0];
     xf86SetModeCrtc (&mode, INTERLACE_HALVE_V);
     crtc = i830GetLoadDetectPipe (output, &mode, &dpms_mode);
@@ -1467,13 +1471,6 @@ i830_tv_detect(xf86OutputPtr output)
         i830ReleaseLoadDetectPipe (output, dpms_mode);
     }
 
-    if (dev_priv->force_type) {
-	if (type == TV_TYPE_NONE)
-	    return XF86OutputStatusDisconnected;
-	else
-	    return XF86OutputStatusConnected;
-    }
-
     if (type != dev_priv->type)
     {
 	dev_priv->type = type;
commit d9dbdb325543bd747cd1bfb3e1142ea6daf2b637
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Mar 13 15:48:40 2009 -0700

    Add shave support, enabled by default.
    
    This cuts down build system noise so that warnings are more visible.  The
    old style output can be reenabled for build system debugging using
    "make V=1", or --disable-shave at configure time.

diff --git a/.gitignore b/.gitignore
index 2198dd9..0479eb8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,8 @@ install-sh
 libtool
 ltmain.sh
 missing
+shave
+shave-libtool
 stamp-h1
 i810.4
 intel.4
diff --git a/configure.ac b/configure.ac
index 3f6f1b8..88059bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,11 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
+AC_CONFIG_FILES([
+	shave
+	shave-libtool
+])
+
 # Checks for programs.
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
@@ -259,6 +264,8 @@ XORG_RELEASE_VERSION
 
 XORG_CHECK_LINUXDOC
 
+SHAVE_INIT([.], [enable])
+
 AC_OUTPUT([
 	Makefile
 	uxa/Makefile
diff --git a/m4/shave.m4 b/m4/shave.m4
new file mode 100644
index 0000000..0c2c9f5
--- /dev/null
+++ b/m4/shave.m4
@@ -0,0 +1,73 @@
+dnl Make automake/libtool output more friendly to humans
+dnl
+dnl SHAVE_INIT([shavedir],[default_mode])
+dnl
+dnl shavedir: the directory where the shave scripts are, it defaults to
+dnl           $(top_builddir)
+dnl default_mode: (enable|disable) default shave mode.  This parameter
+dnl               controls shave's behaviour when no option has been
+dnl               given to configure.  It defaults to disable.
+dnl
+dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
+dnl   before AC_CONFIG_FILE/AC_OUTPUT is perfect.  This macro rewrites CC and
+dnl   LIBTOOL, you don't want the configure tests to have these variables
+dnl   re-defined.
+dnl * This macro requires GNU make's -s option.
+
+AC_DEFUN([_SHAVE_ARG_ENABLE],
+[
+  AC_ARG_ENABLE([shave],
+    AS_HELP_STRING(
+      [--enable-shave],
+      [use shave to make the build pretty [[default=$1]]]),,
+      [enable_shave=$1]
+    )
+])
+
+AC_DEFUN([SHAVE_INIT],
+[
+  dnl you can tweak the default value of enable_shave
+  m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
+
+  if test x"$enable_shave" = xyes; then
+    dnl where can we find the shave scripts?
+    m4_if([$1],,
+      [shavedir="$ac_pwd"],
+      [shavedir="$ac_pwd/$1"])
+    AC_SUBST(shavedir)
+
+    dnl make is now quiet
+    AC_SUBST([MAKEFLAGS], [-s])
+    AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
+
+    dnl we need sed
+    AC_CHECK_PROG(SED,sed,sed,false)
+
+    dnl substitute libtool
+    SHAVE_SAVED_LIBTOOL=$LIBTOOL
+    LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
+    AC_SUBST(LIBTOOL)
+
+    dnl substitute cc/cxx
+    SHAVE_SAVED_CC=$CC
+    SHAVE_SAVED_CXX=$CXX
+    SHAVE_SAVED_FC=$FC
+    SHAVE_SAVED_F77=$F77
+    CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
+    CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
+    FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
+    F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
+    AC_SUBST(CC)
+    AC_SUBST(CXX)
+    AC_SUBST(FC)
+    AC_SUBST(F77)
+
+    V=@
+  else
+    V=1
+  fi
+  Q='$(V:1=)'
+  AC_SUBST(V)
+  AC_SUBST(Q)
+])
+
diff --git a/shave-libtool.in b/shave-libtool.in
new file mode 100644
index 0000000..1f3a720
--- /dev/null
+++ b/shave-libtool.in
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# we need sed
+SED=@SED@
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
+}
+
+# the real libtool to use
+LIBTOOL="$1"
+shift
+
+# if 1, don't print anything, the underlaying wrapper will do it
+pass_though=0
+
+# scan the arguments, keep the right ones for libtool, and discover the mode
+preserved_args=
+while test "$#" -gt 0; do
+    opt="$1"
+    shift
+
+    case $opt in
+    --mode=*)
+        mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+        preserved_args="$preserved_args $opt"
+        ;;
+    -o)
+        lt_output="$1"
+        preserved_args="$preserved_args $opt"
+	;;
+    *)
+        preserved_args="$preserved_args $opt"
+        ;;
+      esac
+done
+
+case "$mode" in
+compile)
+    # shave will be called and print the actual CC/CXX/LINK line
+    preserved_args="$preserved_args --shave-mode=$mode"
+    pass_though=1
+    ;;
+link)
+    preserved_args="$preserved_args --shave-mode=$mode"
+    Q="  LINK  "
+    ;;
+*)
+    # let's u
+    # echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
+    ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+if test -z $V; then
+    if test $pass_though -eq 0; then
+        echo "$Q$output"
+    fi
+    $LIBTOOL --silent $preserved_args
+else
+    echo $LIBTOOL $preserved_args
+    $LIBTOOL $preserved_args
+fi
diff --git a/shave.in b/shave.in
new file mode 100644
index 0000000..174641e
--- /dev/null
+++ b/shave.in
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# we need sed
+SED=@SED@
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
+}
+
+# the tool to wrap (cc, cxx, ar, ranlib, ..)
+tool="$1"
+shift
+
+# the reel tool (to call)
+REEL_TOOL="$1"
+shift
+
+pass_through=0
+preserved_args=
+while test "$#" -gt 0; do
+    opt="$1"
+    shift
+
+    case $opt in
+    --shave-mode=*)
+        mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+	;;
+    -o)
+        lt_output="$1"
+        preserved_args="$preserved_args $opt"
+	;;
+    *)
+        preserved_args="$preserved_args $opt"
+        ;;
+      esac
+done
+
+# mode=link is handled in the libtool wrapper
+case "$mode,$tool" in
+link,*)
+    pass_through=1
+    ;;
+*,cxx)
+    Q="  CXX   "
+    ;;
+*,cc)
+    Q="  CC    "
+    ;;
+*,fc)
+    Q="  FC    "
+    ;;
+*,f77)
+    Q="  F77   "
+    ;;
+*,*)
+    # should not happen
+    Q="  CC    "
+    ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+if test -z $V; then
+    if test $pass_through -eq 0; then
+        echo "$Q$output"
+    fi
+    $REEL_TOOL $preserved_args
+else
+    echo $REEL_TOOL $preserved_args
+    $REEL_TOOL $preserved_args
+fi
commit c3a82106a1a1a94c9e1e465c7dc0d828c1cbf50d
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Mar 13 15:29:45 2009 -0700

    Move contributed m4 (dolt) to a subdirectory so we can include it with others.

diff --git a/.gitignore b/.gitignore
index ff1cb3b..2198dd9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,7 @@ configure
 configure.lineno
 depcomp
 doltcompile
+doltlibtool
 install-sh
 libtool
 ltmain.sh
diff --git a/Makefile.am b/Makefile.am
index d1118fe..45b0c42 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,7 @@
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 AUTOMAKE_OPTIONS = foreign
+ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS = uxa src man
 
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644
index 254b352..0000000
--- a/acinclude.m4
+++ /dev/null
@@ -1,140 +0,0 @@
-dnl dolt, a replacement for libtool
-dnl Copyright © 2007-2008 Josh Triplett <josh at freedesktop.org>
-dnl Copying and distribution of this file, with or without modification,
-dnl are permitted in any medium without royalty provided the copyright
-dnl notice and this notice are preserved.
-dnl
-dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
-dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
-dnl installed when running autoconf on your project.
-dnl
-dnl git snapshot: d91f2b4e9041538400e2703a2a6fbeecdb8ee27d
-AC_DEFUN([DOLT], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-# dolt, a replacement for libtool
-# Josh Triplett <josh at freedesktop.org>
-AC_PATH_PROG(DOLT_BASH, bash)
-AC_MSG_CHECKING([if libtool sucks])
-AC_MSG_RESULT([yup, it does])
-AC_MSG_CHECKING([if dolt supports this host])
-dolt_supported=yes
-if test x$DOLT_BASH = x; then
-    dolt_supported=no
-fi
-if test x$GCC != xyes; then
-    dolt_supported=no
-fi
-case $host in
-i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*) ;;
-amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*) ;;
-*) dolt_supported=no ;;
-esac
-if test x$dolt_supported = xno ; then
-    AC_MSG_RESULT([no, falling back to libtool])
-    LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
-    LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
-else
-    AC_MSG_RESULT([yes, replacing libtool])
-
-dnl Start writing out doltcompile.
-    cat <<__DOLTCOMPILE__EOF__ >doltcompile
-#!$DOLT_BASH
-__DOLTCOMPILE__EOF__
-    cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-args=("$[]@")
-for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do
-    if test x"${args@<:@$arg@:>@}" = x-o ; then
-        objarg=$((arg+1))
-        break
-    fi
-done
-if test x$objarg = x ; then
-    echo 'Error: no -o on compiler command line' 1>&2
-    exit 1
-fi
-lo="${args@<:@$objarg@:>@}"
-obj="${lo%.lo}"
-if test x"$lo" = x"$obj" ; then
-    echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2
-    exit 1
-fi
-objbase="${obj##*/}"
-__DOLTCOMPILE__EOF__
-
-dnl Write out shared compilation code.
-    if test x$enable_shared = xyes; then
-        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-libobjdir="${obj%$objbase}.libs"
-if test ! -d "$libobjdir" ; then
-    mkdir_out="$(mkdir "$libobjdir" 2>&1)"
-    mkdir_ret=$?
-    if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
-	echo "$mkdir_out" 1>&2
-        exit $mkdir_ret
-    fi
-fi
-pic_object="$libobjdir/$objbase.o"
-args@<:@$objarg@:>@="$pic_object"
-"${args@<:@@@:>@}" -fPIC -DPIC || exit $?
-__DOLTCOMPILE__EOF__
-    fi
-
-dnl Write out static compilation code.
-dnl Avoid duplicate compiler output if also building shared objects.
-    if test x$enable_static = xyes; then
-        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-non_pic_object="$obj.o"
-args@<:@$objarg@:>@="$non_pic_object"
-__DOLTCOMPILE__EOF__
-        if test x$enable_shared = xyes; then
-            cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $?
-__DOLTCOMPILE__EOF__
-        else
-            cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-"${args@<:@@@:>@}" || exit $?
-__DOLTCOMPILE__EOF__
-        fi
-    fi
-
-dnl Write out the code to write the .lo file.
-dnl The second line of the .lo file must match "^# Generated by .*libtool"
-    cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-{
-echo "# $lo - a libtool object file"
-echo "# Generated by doltcompile, not libtool"
-__DOLTCOMPILE__EOF__
-
-    if test x$enable_shared = xyes; then
-        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-echo "pic_object='$pic_object'"
-__DOLTCOMPILE__EOF__
-    else
-        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-echo pic_object=none
-__DOLTCOMPILE__EOF__
-    fi
-
-    if test x$enable_static = xyes; then
-        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-echo "non_pic_object='$non_pic_object'"
-__DOLTCOMPILE__EOF__
-    else
-        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-echo non_pic_object=none
-__DOLTCOMPILE__EOF__
-    fi
-
-    cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-} > "$lo"
-__DOLTCOMPILE__EOF__
-
-dnl Done writing out doltcompile; substitute it for libtool compilation.
-    chmod +x doltcompile
-    LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
-    LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
-fi
-AC_SUBST(LTCOMPILE)
-AC_SUBST(LTCXXCOMPILE)
-# end dolt
-])
diff --git a/m4/dolt.m4 b/m4/dolt.m4
new file mode 100644
index 0000000..1109bdb
--- /dev/null
+++ b/m4/dolt.m4
@@ -0,0 +1,178 @@
+dnl dolt, a replacement for libtool
+dnl Copyright © 2007-2008 Josh Triplett <josh at freedesktop.org>
+dnl Copying and distribution of this file, with or without modification,
+dnl are permitted in any medium without royalty provided the copyright
+dnl notice and this notice are preserved.
+dnl
+dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
+dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
+dnl installed when running autoconf on your project.
+
+AC_DEFUN([DOLT], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+# dolt, a replacement for libtool
+# Josh Triplett <josh at freedesktop.org>
+AC_PATH_PROG(DOLT_BASH, bash)
+AC_MSG_CHECKING([if dolt supports this host])
+dolt_supported=yes
+if test x$DOLT_BASH = x; then
+    dolt_supported=no
+fi
+if test x$GCC != xyes; then
+    dolt_supported=no
+fi
+case $host in
+i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux* \
+|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*)
+    pic_options='-fPIC'
+    ;;
+i?86-apple-darwin*)
+    pic_options='-fno-common'
+    ;;
+*)
+    dolt_supported=no
+    ;;
+esac
+if test x$dolt_supported = xno ; then
+    AC_MSG_RESULT([no, falling back to libtool])
+    LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
+    LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
+else
+    AC_MSG_RESULT([yes, replacing libtool])
+
+dnl Start writing out doltcompile.
+    cat <<__DOLTCOMPILE__EOF__ >doltcompile
+#!$DOLT_BASH
+__DOLTCOMPILE__EOF__
+    cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+args=("$[]@")
+for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do
+    if test x"${args@<:@$arg@:>@}" = x-o ; then
+        objarg=$((arg+1))
+        break
+    fi
+done
+if test x$objarg = x ; then
+    echo 'Error: no -o on compiler command line' 1>&2
+    exit 1
+fi
+lo="${args@<:@$objarg@:>@}"
+obj="${lo%.lo}"
+if test x"$lo" = x"$obj" ; then
+    echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2
+    exit 1
+fi
+objbase="${obj##*/}"
+__DOLTCOMPILE__EOF__
+
+dnl Write out shared compilation code.
+    if test x$enable_shared = xyes; then
+        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+libobjdir="${obj%$objbase}.libs"
+if test ! -d "$libobjdir" ; then
+    mkdir_out="$(mkdir "$libobjdir" 2>&1)"
+    mkdir_ret=$?
+    if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
+	echo "$mkdir_out" 1>&2
+        exit $mkdir_ret
+    fi
+fi
+pic_object="$libobjdir/$objbase.o"
+args@<:@$objarg@:>@="$pic_object"
+__DOLTCOMPILE__EOF__
+    cat <<__DOLTCOMPILE__EOF__ >>doltcompile
+"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$?
+__DOLTCOMPILE__EOF__
+    fi
+
+dnl Write out static compilation code.
+dnl Avoid duplicate compiler output if also building shared objects.
+    if test x$enable_static = xyes; then
+        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+non_pic_object="$obj.o"
+args@<:@$objarg@:>@="$non_pic_object"
+__DOLTCOMPILE__EOF__
+        if test x$enable_shared = xyes; then
+            cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $?
+__DOLTCOMPILE__EOF__
+        else
+            cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+"${args@<:@@@:>@}" || exit $?
+__DOLTCOMPILE__EOF__
+        fi
+    fi
+
+dnl Write out the code to write the .lo file.
+dnl The second line of the .lo file must match "^# Generated by .*libtool"
+    cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+{
+echo "# $lo - a libtool object file"
+echo "# Generated by doltcompile, not libtool"
+__DOLTCOMPILE__EOF__
+
+    if test x$enable_shared = xyes; then
+        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+echo "pic_object='.libs/${objbase}.o'"
+__DOLTCOMPILE__EOF__
+    else
+        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+echo pic_object=none
+__DOLTCOMPILE__EOF__
+    fi
+
+    if test x$enable_static = xyes; then
+        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+echo "non_pic_object='${objbase}.o'"
+__DOLTCOMPILE__EOF__
+    else
+        cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+echo non_pic_object=none
+__DOLTCOMPILE__EOF__
+    fi
+
+    cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
+} > "$lo"
+__DOLTCOMPILE__EOF__
+
+dnl Done writing out doltcompile; substitute it for libtool compilation.
+    chmod +x doltcompile
+    LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
+    LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
+
+dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for
+dnl a target, so write out a libtool wrapper to handle that case.
+dnl Note that doltlibtool does not handle inferred tags or option arguments
+dnl without '=', because automake does not use them.
+    cat <<__DOLTLIBTOOL__EOF__ > doltlibtool
+#!$DOLT_BASH
+__DOLTLIBTOOL__EOF__
+    cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool
+top_builddir_slash="${0%%doltlibtool}"
+: ${top_builddir_slash:=./}
+args=()
+modeok=false
+tagok=false
+for arg in "$[]@"; do
+    case "$arg" in
+        --silent) ;;
+        --mode=compile) modeok=true ;;
+        --tag=CC|--tag=CXX) tagok=true ;;
+        *) args@<:@${#args[@]}@:>@="$arg" ;;
+    esac
+done
+if $modeok && $tagok ; then
+    . ${top_builddir_slash}doltcompile "${args@<:@@@:>@}"
+else
+    exec ${top_builddir_slash}libtool "$[]@"
+fi
+__DOLTLIBTOOL__EOF__
+
+dnl Done writing out doltlibtool; substitute it for libtool.
+    chmod +x doltlibtool
+    LIBTOOL='$(top_builddir)/doltlibtool'
+fi
+AC_SUBST(LTCOMPILE)
+AC_SUBST(LTCXXCOMPILE)
+# end dolt
+])
commit e0aba04da0323efc079ce0a2b78139c4d0d49fa5
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Mar 13 13:37:35 2009 -0700

    Add DCC register dumping.

diff --git a/src/i810_reg.h b/src/i810_reg.h
index 3114b42..bc462fa 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -114,6 +114,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define BITBLT_STATUS          0x01
 
 #define CHDECMISC	0x10111
+#define DCC			0x10200
 #define C0DRB0			0x10200
 #define C0DRB1			0x10202
 #define C0DRB2			0x10204
diff --git a/src/i830_debug.c b/src/i830_debug.c
index 4693cf9..86f5f21 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -53,6 +53,33 @@ DEBUGSTRING(i830_16bit_func)
     return XNFprintf("0x%04x", (uint16_t)val);
 }
 
+DEBUGSTRING(i830_debug_dcc)
+{
+    char *addressing = NULL;
+
+    if (!IS_MOBILE(pI830))
+	return NULL;
+
+    if (IS_I965G(pI830)) {
+	if (val & (1 << 1))
+	    addressing = "dual channel interleaved";
+	else
+	    addressing = "single or dual channel asymmetric";
+    } else {
+	switch (val & 3) {
+	case 0: addressing = "single channel"; break;
+	case 1: addressing = "dual channel asymmetric"; break;
+	case 2: addressing = "dual channel interleaved"; break;
+	case 3: addressing = "unknown channel layout"; break;
+	}
+    }
+
+    return XNFprintf("%s, XOR randomization: %sabled, XOR bit: %d",
+		     addressing,
+		     (val & (1 << 10)) ? "dis" : "en",
+		     (val & (1 << 9)) ? 17 : 11);
+}
+
 DEBUGSTRING(i830_debug_chdecmisc)
 {
     char *enhmodesel = NULL;
@@ -559,6 +586,7 @@ static struct i830SnapshotRec {
     char *(*debug_output)(I830Ptr pI830, int reg, uint32_t val);
     uint32_t val;
 } i830_snapshot[] = {
+    DEFINEREG2(DCC, i830_debug_dcc),
     DEFINEREG2(CHDECMISC, i830_debug_chdecmisc),
     DEFINEREG_16BIT(C0DRB0),
     DEFINEREG_16BIT(C0DRB1),
commit a57814cc13f4287eccaf1906963b80c9205c680c
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Mar 13 13:20:35 2009 -0700

    Add dumping of 915 and 945 fence registers.
    
    The debug dumper functions can now return NULL to indicate no output, so
    we get appropriate results on 915, 945, and 965.

diff --git a/src/i830_debug.c b/src/i830_debug.c
index a67af7c..4693cf9 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -503,24 +503,48 @@ DEBUGSTRING(i830_debug_dspclk_gate_d)
 		      OVLUNIT);
 }
 
-#if 1
-DEBUGSTRING(i810_debug_fence_start)
+
+DEBUGSTRING(i810_debug_915_fence)
+{
+    char *enable = (val & 1) ? " enabled" : "disabled";
+    char format = (val & 1 << 12) ? 'Y' : 'X';
+    int pitch = 1 << (((val & 0x70) >> 4) - 1);
+    unsigned int offset = val & 0x0ff00000;
+    int size = (1024 * 1024) << (((val & 0x700) >> 8) - 1);
+
+    if (IS_I965G(pI830) || ((IS_I915G(pI830) || IS_I915GM(pI830)) && reg >= FENCE_NEW))
+	return NULL;
+
+    if (format == 'X')
+      pitch *= 4;
+
+    return XNFprintf("%s, %c tiled, %4d pitch, 0x%08x - 0x%08x (%dkb)",
+		     enable, format, pitch, offset, offset + size, size / 1024);
+}
+
+DEBUGSTRING(i810_debug_965_fence_start)
 {
     char *enable = (val & FENCE_VALID) ? " enabled" : "disabled";
     char format = (val & I965_FENCE_Y_MAJOR) ? 'Y' : 'X';
     int pitch = ((val & 0xffc) >> 2) * 128;
     unsigned int offset = val & 0xfffff000;
 
+    if (!IS_I965G(pI830))
+	return NULL;
+
     return XNFprintf("%s, %c tile walk, %4d pitch, 0x%08x start",
 		     enable, format, pitch, offset);
 }
-DEBUGSTRING(i810_debug_fence_end)
+
+DEBUGSTRING(i810_debug_965_fence_end)
 {
     unsigned int end = val & 0xfffff000;
 
+    if (!IS_I965G(pI830))
+	return NULL;
+
     return XNFprintf("                                   0x%08x end", end);
 }
-#endif
 
 #define DEFINEREG(reg) \
 	{ reg, #reg, NULL, 0 }
@@ -717,27 +741,48 @@ static struct i830SnapshotRec {
     DEFINEREG(DPD_AUX_CH_DATA4),
     DEFINEREG(DPD_AUX_CH_DATA5),
 
-#define DEFINEFENCE(i) \
-	{ FENCE_NEW+i*8, "FENCE START " #i, i810_debug_fence_start, 0 }, \
-	{ FENCE_NEW+i*8+4, "FENCE END " #i, i810_debug_fence_end, 0 }
-#if 1
-    DEFINEFENCE(0),
-    DEFINEFENCE(1),
-    DEFINEFENCE(2),
-    DEFINEFENCE(3),
-    DEFINEFENCE(4),
-    DEFINEFENCE(5),
-    DEFINEFENCE(6),
-    DEFINEFENCE(7),
-    DEFINEFENCE(8),
-    DEFINEFENCE(9),
-    DEFINEFENCE(10),
-    DEFINEFENCE(11),
-    DEFINEFENCE(12),
-    DEFINEFENCE(13),
-    DEFINEFENCE(14),
-    DEFINEFENCE(15),
-#endif
+#define DEFINEFENCE_915(i) \
+	{ FENCE+i*4, "FENCE  " #i, i810_debug_915_fence, 0 }
+#define DEFINEFENCE_945(i)						\
+	{ FENCE_NEW+(i - 8) * 4, "FENCE  " #i, i810_debug_915_fence, 0 }
+
+    DEFINEFENCE_915(0),
+    DEFINEFENCE_915(1),
+    DEFINEFENCE_915(2),
+    DEFINEFENCE_915(3),
+    DEFINEFENCE_915(4),
+    DEFINEFENCE_915(5),
+    DEFINEFENCE_915(6),
+    DEFINEFENCE_915(7),
+    DEFINEFENCE_945(8),
+    DEFINEFENCE_945(9),
+    DEFINEFENCE_945(10),
+    DEFINEFENCE_945(11),
+    DEFINEFENCE_945(12),
+    DEFINEFENCE_945(13),
+    DEFINEFENCE_945(14),
+    DEFINEFENCE_945(15),
+
+#define DEFINEFENCE_965(i) \
+	{ FENCE_NEW+i*8, "FENCE START " #i, i810_debug_965_fence_start, 0 }, \
+	{ FENCE_NEW+i*8+4, "FENCE END " #i, i810_debug_965_fence_end, 0 }
+
+    DEFINEFENCE_965(0),
+    DEFINEFENCE_965(1),
+    DEFINEFENCE_965(2),
+    DEFINEFENCE_965(3),
+    DEFINEFENCE_965(4),
+    DEFINEFENCE_965(5),
+    DEFINEFENCE_965(6),
+    DEFINEFENCE_965(7),
+    DEFINEFENCE_965(8),
+    DEFINEFENCE_965(9),
+    DEFINEFENCE_965(10),
+    DEFINEFENCE_965(11),
+    DEFINEFENCE_965(12),
+    DEFINEFENCE_965(13),
+    DEFINEFENCE_965(14),
+    DEFINEFENCE_965(15),
 };
 #undef DEFINEREG
 #define NUM_I830_SNAPSHOTREGS (sizeof(i830_snapshot) / sizeof(i830_snapshot[0]))
@@ -855,9 +900,11 @@ void i830DumpRegs (ScrnInfoPtr pScrn)
 	    char *debug = i830_snapshot[i].debug_output(pI830,
 							i830_snapshot[i].reg,
 							val);
-	    xf86DrvMsg (pScrn->scrnIndex, X_INFO, "%20.20s: 0x%08x (%s)\n",
-			i830_snapshot[i].name, (unsigned int)val, debug);
-	    xfree(debug);
+	    if (debug != NULL) {
+		xf86DrvMsg (pScrn->scrnIndex, X_INFO, "%20.20s: 0x%08x (%s)\n",
+			    i830_snapshot[i].name, (unsigned int)val, debug);
+		xfree(debug);
+	    }
 	} else {
 	    xf86DrvMsg (pScrn->scrnIndex, X_INFO, "%20.20s: 0x%08x\n",
 			i830_snapshot[i].name, (unsigned int)val);
commit 8166a7ff5c2c1e3736dd06a8453c4e4d769d8b75
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Mar 13 13:12:33 2009 -0700

    Add PGETBL_CTL to the debug output.
    
    It's nice to know when it gets stomped on.

diff --git a/src/i830_debug.c b/src/i830_debug.c
index ed8843e..a67af7c 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -549,6 +549,8 @@ static struct i830SnapshotRec {
     DEFINEREG_16BIT(C1DRA01),
     DEFINEREG_16BIT(C1DRA23),
 
+    DEFINEREG(PGETBL_CTL),
+
     DEFINEREG2(VCLK_DIVISOR_VGA0, i830_debug_fp),
     DEFINEREG2(VCLK_DIVISOR_VGA1, i830_debug_fp),
     DEFINEREG2(VCLK_POST_DIV, i830_debug_vga_pd),
commit fe08b81d0f5d6f96e0124e6286bd24aba6e140ad
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Mar 2 07:39:41 2009 -0800

    Use CopyArea to load glyphs from per-glyph pixmap to cache pixmap
    
    With glyphs sitting in per-glyph pixmaps, there's no reason to use the CPU
    to move them to the cache pixmap, and lots of reasons to use the accelerator.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/i830.h b/src/i830.h
index f933917..b145edb 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -77,6 +77,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "i915_drm.h"
 
 #ifdef I830_USE_EXA
+#define EXA_DRIVER_KNOWN_MAJOR 3
 #include "exa.h"
 Bool I830EXAInit(ScreenPtr pScreen);
 unsigned long long I830TexOffsetStart(PixmapPtr pPix);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index c19fcc6..f104c5f 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1939,12 +1939,17 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
       int errmaj, errmin;
 
       memset(&req, 0, sizeof(req));
+#if EXA_VERSION_MAJOR == 3
+      req.majorversion = 3;
+      req.minorversion = 0;
+#else
       req.majorversion = 2;
 #if EXA_VERSION_MINOR >= 2
       req.minorversion = 2;
 #else
       req.minorversion = 1;
 #endif
+#endif
       if (!LoadSubModule(pScrn->module, "exa", NULL, NULL, NULL, &req,
 		&errmaj, &errmin)) {
 	 LoaderErrorMsg(NULL, "exa", errmaj, errmin);
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 0a22486..18d8cde 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -675,6 +675,10 @@ I830EXAInit(ScreenPtr pScreen)
     memset(pI830->EXADriverPtr, 0, sizeof(*pI830->EXADriverPtr));
 
     pI830->bufferOffset = 0;
+#if EXA_VERSION_MAJOR > 2
+    pI830->EXADriverPtr->exa_major = 3;
+    pI830->EXADriverPtr->exa_minor = 0;
+#else
     pI830->EXADriverPtr->exa_major = 2;
     /* If compiled against EXA 2.2, require 2.2 so we can use the
      * PixmapIsOffscreen hook.
@@ -687,6 +691,7 @@ I830EXAInit(ScreenPtr pScreen)
 	       "EXA compatibility mode.  Output rotation rendering "
 	       "performance may suffer\n");
 #endif
+#endif
     if (!pI830->use_drm_mode) {
 	pI830->EXADriverPtr->memoryBase = pI830->FbBase;
 	if (pI830->exa_offscreen) {
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index 5abd001..3cb03f5 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -353,9 +353,7 @@ uxa_glyph_cache_hash_remove(uxa_glyph_cache_t *cache,
 #define CACHE_Y(pos) (cache->yOffset + ((pos) / cache->columns) * cache->glyphHeight)
 
 /* The most efficient thing to way to upload the glyph to the screen
- * is to use the UploadToScreen() driver hook; this allows us to
- * pipeline glyph uploads and to avoid creating offscreen pixmaps for
- * glyphs that we'll never use again.
+ * is to use CopyArea; uxa pixmaps are always offscreen.
  */
 static Bool
 uxa_glyph_cache_upload_glyph(ScreenPtr		    pScreen,
@@ -363,37 +361,23 @@ uxa_glyph_cache_upload_glyph(ScreenPtr		    pScreen,
 			     int		    pos,
 			     GlyphPtr		    pGlyph)
 {
-    uxa_screen_t    *uxa_screen = uxa_get_screen(pScreen);
     PicturePtr	    pGlyphPicture = GlyphPicture(pGlyph)[pScreen->myNum];
     PixmapPtr	    pGlyphPixmap = (PixmapPtr)pGlyphPicture->pDrawable;
     PixmapPtr	    pCachePixmap = (PixmapPtr)cache->picture->pDrawable;
-    int		    cacheXoff, cacheYoff;
-
-    if (!uxa_screen->info->put_image || uxa_screen->swappedOut)
-	return FALSE;
-
-    /* If the glyph pixmap is already uploaded, no point in doing
-     * things this way */
-    if (uxa_pixmap_is_offscreen(pGlyphPixmap))
-	return FALSE;
+    GCPtr	    pGC;
 
     /* UploadToScreen only works if bpp match */
     if (pGlyphPixmap->drawable.bitsPerPixel != pCachePixmap->drawable.bitsPerPixel)
 	return FALSE;
 
-    pCachePixmap = uxa_get_offscreen_pixmap ((DrawablePtr)pCachePixmap, &cacheXoff, &cacheYoff);
-    if (!pCachePixmap)
-	return FALSE;
-
-    if (!uxa_screen->info->put_image(pCachePixmap,
-				     CACHE_X(pos) + cacheXoff,
-				     CACHE_Y(pos) + cacheYoff,
-				     pGlyph->info.width,
-				     pGlyph->info.height,
-				     (char *)pGlyphPixmap->devPrivate.ptr,
-				     pGlyphPixmap->devKind))
-	return FALSE;
-
+    pGC = GetScratchGC(pCachePixmap->drawable.depth, pScreen);
+    ValidateGC(&pCachePixmap->drawable, pGC);
+    (void) uxa_copy_area (&pGlyphPixmap->drawable,
+			  &pCachePixmap->drawable,
+			  pGC,
+			  0, 0, pGlyph->info.width, pGlyph->info.height,
+			  CACHE_X(pos), CACHE_Y(pos));
+    FreeScratchGC (pGC);
     return TRUE;
 }
 
commit 2026c57cf0a352d9e6f9d208cfb7d4d550614477
Author: Kalev Lember <kalev at smartlink.ee>
Date:   Fri Mar 13 21:32:08 2009 +0200

    Fix Xv crash with overlay video.
    
    Bug #20585.

diff --git a/src/i830_video.c b/src/i830_video.c
index daa2411..3c6fbf3 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -1382,7 +1382,7 @@ I830CopyPlanarData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 	dst_base = pPriv->buf->virtual;
     } else {
 	drm_intel_gem_bo_start_gtt_access(pPriv->buf, TRUE);
-	dst_base = pI830->FbBase + pPriv->buf->offset;
+	dst_base = pI830->FbBase;
     }
 
     if (pPriv->currentBuf == 0)
commit 3ef9d85371a97ea5baee0c47787b3bb3cdaf5135
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Fri Mar 13 12:21:34 2009 -0700

    Use UXA when KMS is active
    
    EXA doesn't support KMS, so force UXA on if KMS is detected.  And warn
    the user if they've specified something other than UXA in their
    xorg.conf.
    
    Fixes bug #20620.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 3c77147..c19fcc6 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1703,12 +1703,8 @@ I830DrmModeInit(ScrnInfoPtr pScrn)
     pI830->accel = ACCEL_UXA;
 
     if ((s = (char *)xf86GetOptValString(pI830->Options, OPTION_ACCELMETHOD))) {
-	if (!xf86NameCmp(s, "EXA"))
-	    pI830->accel = ACCEL_EXA;
-	else if (!xf86NameCmp(s, "UXA"))
-	    pI830->accel = ACCEL_UXA;
-	else
-	    pI830->accel = ACCEL_UXA;
+	if (xf86NameCmp(s, "UXA"))
+	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "kernel mode setting active,overridding accelmethod and using UXA\n");
     }
 
     pI830->can_resize = FALSE;
commit dc3ff0b514b609448025680778f0e95e1980a5d8
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Thu Mar 12 16:32:02 2009 +0800

    Revert "SDVO: Switch control bus only before DDC access"
    
    This reverts commit ddedf19f889da2ce6d69a3afce4665e2245682fa.
    
    After i2c STOP, control bus will return back to internal
    registers. So this brings back to origin code that we switch
    to DDC bus before START. But it's ideal to only issue DDC
    bus switch after STOP, not before every START, which might eliminate
    some complains from SDVO device, that will be another patch later.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 004d5c4..254b866 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1390,7 +1390,9 @@ i830_sdvo_ddc_i2c_start(I2CBusPtr b, int timeout)
     xf86OutputPtr	    output = b->DriverPrivate.ptr;
     I830OutputPrivatePtr    intel_output = output->driver_private;
     I2CBusPtr		    i2cbus = intel_output->pI2CBus;
+    struct i830_sdvo_priv   *dev_priv = intel_output->dev_priv;
 
+    i830_sdvo_set_control_bus_switch(output, dev_priv->ddc_bus);
     return i2cbus->I2CStart(i2cbus, timeout);
 }
 
@@ -1718,11 +1720,9 @@ i830_sdvo_get_ddc_modes(xf86OutputPtr output)
     xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
     DisplayModePtr modes = NULL;
     xf86OutputPtr crt;
-    I830OutputPrivatePtr intel_output = output->driver_private;
+    I830OutputPrivatePtr intel_output;
     xf86MonPtr edid_mon = NULL;
-    struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
-
-    i830_sdvo_set_control_bus_switch(output, dev_priv->ddc_bus);
+    struct i830_sdvo_priv *dev_priv;
 
     modes = i830_ddc_get_modes(output);
     if (modes != NULL)
commit c6b0135d209bdad3dbc641d0e264596eaf6f99d3
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Thu Mar 12 16:31:01 2009 +0800

    SDVO: reset privates before output setup
    
    For multifunction encoder, forget to reset these values
    will cause wrong output type in later mode setting
    operations.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index baba007..004d5c4 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1544,6 +1544,10 @@ i830_sdvo_output_setup (xf86OutputPtr output, uint16_t flag)
     else
 	name_suffix = "-2";
 
+    /* clear up privates */
+    dev_priv->is_tv = FALSE;
+    intel_output->needs_tv_clock = FALSE;
+
     if (flag & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
     {
 	if (flag & SDVO_OUTPUT_TMDS0)
commit 28e7f0d71fa09e15a68ab4f0de169474b6235093
Author: Dan Nicholson <dbn.lists at gmail.com>
Date:   Tue Mar 10 20:16:03 2009 -0700

    Fix dist of xvmc sources
    
    The XVMC AM_CONDITIONAL is only needed around the library expression.
    None of the other definitons will cause anything to be built without
    libXvMC, but they're needed for 'make dist'.
    
    Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>

diff --git a/src/xvmc/Makefile.am b/src/xvmc/Makefile.am
index 9e62683..a376eb7 100644
--- a/src/xvmc/Makefile.am
+++ b/src/xvmc/Makefile.am
@@ -1,5 +1,6 @@
 if XVMC
 lib_LTLIBRARIES=libI810XvMC.la libIntelXvMC.la
+endif
 
 libI810XvMC_la_SOURCES = I810XvMC.c \
 			 I810XvMC.h
@@ -123,4 +124,3 @@ BUILT_SOURCES= $(INTEL_G4B)
 clean-local:
 	-rm -f $(INTEL_G4B)
 endif
-endif
commit 73db44e7ac524e84e5f0fda2d60069a9e954ad1b
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Wed Mar 11 11:10:57 2009 -0400

    Drop Legacy3D option, only use fixed texture space with non-gem.
    
    With this change, we always expect the 3D driver to use GEM textures
    when the 2D driver uses GEM.  When GEM is not available or disabled,
    we fall back to legacy fixed textures.

diff --git a/man/intel.man b/man/intel.man
index ee237f8..b6f89b6 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -146,15 +146,6 @@ have options for selecting adaptors.
 .IP
 Default: Textured video adaptor is preferred.
 .TP
-.BI "Option \*qLegacy3D\*q \*q" boolean \*q
-Enable support for the non-GEM mode of the 3D driver on i830 and newer.
-This will allocate a large static area for older Mesa to use for its texture
-pool.  On systems with a working GEM environment, this can be disabled to
-increase the memory pool available to other graphics tasks.
-.IP
-Default for i830 and newer: Enabled.
-.IP
-Default for i810: this option is not used.
 .BI "Option \*qAccelMethod\*q \*q" string \*q
 Choose acceleration architecture, either "XAA", "EXA", or "UXA".  XAA is the old
 XFree86 based acceleration architecture.  EXA is a simpler
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 6ec1a48..3c77147 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -311,7 +311,6 @@ typedef enum {
    OPTION_LVDS24BITMODE,
    OPTION_FBC,
    OPTION_TILING,
-   OPTION_LEGACY3D,
    OPTION_LVDSFIXEDMODE,
    OPTION_FORCEENABLEPIPEA,
 #ifdef INTEL_XVMC
@@ -332,9 +331,6 @@ static OptionInfoRec I830Options[] = {
    {OPTION_LVDS24BITMODE, "LVDS24Bit",	OPTV_BOOLEAN,	{0},	FALSE},
    {OPTION_FBC,		"FramebufferCompression", OPTV_BOOLEAN, {0}, TRUE},
    {OPTION_TILING,	"Tiling",	OPTV_BOOLEAN,	{0},	TRUE},
-#ifdef XF86DRI
-   {OPTION_LEGACY3D,	"Legacy3D",     OPTV_BOOLEAN,	{0},	FALSE},
-#endif
    {OPTION_LVDSFIXEDMODE, "LVDSFixedMode", OPTV_BOOLEAN,	{0},	FALSE},
    {OPTION_FORCEENABLEPIPEA, "ForceEnablePipeA", OPTV_BOOLEAN,	{0},	FALSE},
 #ifdef INTEL_XVMC
@@ -3019,11 +3015,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     */
    if (!pI830->can_resize && pI830->directRenderingType == DRI_NONE && I830DRIScreenInit(pScreen))
        pI830->directRenderingType = DRI_XF86DRI;
-
-   if (pI830->directRenderingType == DRI_XF86DRI) {
-       pI830->allocate_classic_textures =
-	   xf86ReturnOptValBool(pI830->Options, OPTION_LEGACY3D, TRUE);
-   }
 #endif
 
    /* Enable tiling by default */
diff --git a/src/i830_memory.c b/src/i830_memory.c
index e98c914..96e1763 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -504,9 +504,6 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
 	    mmsize -= ROUND_TO_PAGE(3 * pScrn->displayWidth * pI830->cpp *
 				    pScrn->virtualY);
 	}
-	/* Classic textures are fixed. */
-	if (pI830->allocate_classic_textures)
-	    mmsize -= MB(32);
 	/* Overlay and cursors, if physical, need to be allocated outside
 	 * of the kernel memory manager.
 	 */
@@ -566,6 +563,8 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
 	    i830_free_memory(pScrn, pI830->memory_manager);
 	    pI830->memory_manager = NULL;
 	}
+    } else {
+	pI830->allocate_classic_textures = TRUE;
     }
 #endif /* XF86DRI */
 
commit 2fcf4fcccfe7cfa1425985d21a144137eca07f4e
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Tue Mar 10 14:21:36 2009 +0800

    SDVO: fix pixel multiplier setting for TV
    
    We should use preferred input timing's clock for correct
    pixel multiplier setting, otherwise we might get inconsistent
    multiplier setting on pipe and SDVO device for some modes.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 1f2578e..baba007 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1039,8 +1039,13 @@ i830_sdvo_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
 
 	    ErrorF("input modeline:\n");
 	    xf86PrintModeline(0, adjusted_mode);
+
+	    /* adjust origin mode's clock for current input,
+	       for correct pixel mulitiplier setting. */
+	    mode->Clock = adjusted_mode->Clock;
+
 	    /* Clock range is required to be in 100-200Mhz */
-	    adjusted_mode->Clock *= i830_sdvo_get_pixel_multiplier(adjusted_mode);
+	    adjusted_mode->Clock *= i830_sdvo_get_pixel_multiplier(mode);
 	} else {
 	    return FALSE;
 	}
commit fb6e00f40f713a87c760fc7603159ed11ea9b0d5
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Mar 9 20:06:30 2009 -0700

    Fix XV with non-GEM kernels by allocating a larger fake bufmgr.
    
    Ideally we'd not be using the EXA offscreen memory manager and just hand all
    that memory to the fake bufmgr for non-GEM, but the fake bufmgr's too slow for
    that, at least currently.  So compromise and take enough memory that it will
    succeed at XV allocations but hopefully not anger tiny-aperture systems too
    much.
    
    Bug #20563.

diff --git a/src/i830_memory.c b/src/i830_memory.c
index 361fff7..e98c914 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1445,7 +1445,7 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 
     if (pI830->memory_manager == NULL) {
 	pI830->fake_bufmgr_mem = i830_allocate_memory(pScrn, "fake bufmgr",
-						      MB(1), PITCH_NONE, GTT_PAGE_SIZE, 0,
+						      MB(8), PITCH_NONE, GTT_PAGE_SIZE, 0,
 						      TILE_NONE);
 	if (pI830->fake_bufmgr_mem == NULL) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
commit dc12c4b3eb297b2f225409eacf1f3cd521453ab6
Author: Eric Anholt <eric at anholt.net>
Date:   Sat Mar 7 23:22:54 2009 -0800

    Flip the update_dri_buffers test around to only run when DRI1 is active.
    
    Fixes segfaults at startup with DRI2 and load detection, or with DRI disabled
    entirely.

diff --git a/src/i830_dri.c b/src/i830_dri.c
index f61c564..6a32492 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1448,7 +1448,7 @@ i830_update_dri_buffers(ScrnInfoPtr pScrn)
    drmI830Sarea *sarea;
    Bool success;
 
-   if (pI830->directRenderingType == DRI_DRI2)
+   if (pI830->directRenderingType != DRI_XF86DRI)
        return TRUE;
 
    sarea = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
commit 646e12a9783d1d48ef21841f0909287a876731a4
Author: Xiang, Haihao <haihao.xiang at intel.com>
Date:   Mon Mar 9 10:59:36 2009 +0800

    typo in intel.man

diff --git a/man/intel.man b/man/intel.man
index cf1cf40..ee237f8 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -461,7 +461,7 @@ You can use the "xvattr" tool to query/set those attributes at runtime.
 .SS "XV_SYNC_TO_VBLANK"
 XV_SYNC_TO_VBLANK is used to control whether textured adapter synchronizes 
 the screen update to the vblank to eliminate tearing. It has three 
-values 'auto'(-1), 'off'(0) and 'auto'(1). 'off' means never sync, 'on' means 
+values 'auto'(-1), 'off'(0) and 'on(1). 'off' means never sync, 'on' means 
 always sync, no matter what size, and 'auto' means sync if the Xv image is 
 more than quarter of the pixels on the screen. The default is 'auto'(-1).
 
commit 73aa23d9150121a4e4b70a78cab910acd164abf5
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Dec 5 13:06:05 2008 -0800

    DRI1: Update sarea (and other information) when CRTC configuration changes.
    
    Bug #14423.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/src/i830_display.c b/src/i830_display.c
index 3139d40..ca55906 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1085,6 +1085,11 @@ i830_crtc_commit (xf86CrtcPtr crtc)
     /* Reenable FB compression if possible */
     if (i830_use_fb_compression(crtc))
 	i830_enable_fb_compression(crtc);
+
+#ifdef XF86DRI
+    /* Tell DRI1 the news about new output config */
+    i830_update_dri_buffers(crtc->scrn);
+#endif
 }
 
 void
diff --git a/src/i830_dri.c b/src/i830_dri.c
index b7ebd92..f61c564 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1387,9 +1387,6 @@ i830_update_dri_mappings(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
 {
    I830Ptr pI830 = I830PTR(pScrn);
 
-   if (pI830->directRenderingType == DRI_DRI2)
-       return TRUE;
-
    if (!i830_do_addmap(pScrn, pI830->front_buffer, &sarea->front_handle,
 		       &sarea->front_size, &sarea->front_offset)) {
        xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Disabling DRI.\n");
@@ -1447,9 +1444,15 @@ Bool
 i830_update_dri_buffers(ScrnInfoPtr pScrn)
 {
    ScreenPtr pScreen = pScrn->pScreen;
-   drmI830Sarea *sarea = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
+   I830Ptr pI830 = I830PTR(pScrn);
+   drmI830Sarea *sarea;
    Bool success;
 
+   if (pI830->directRenderingType == DRI_DRI2)
+       return TRUE;
+
+   sarea = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
+
    success = i830_update_dri_mappings(pScrn, sarea);
    if (!success)
        return FALSE;
commit abb213d933ac0d808fc10d4f8d88d7b8cef76346
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Mar 6 14:33:46 2009 -0800

    Document the UXA AccelMethod.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/man/intel.man b/man/intel.man
index 413f63a..cf1cf40 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -156,9 +156,12 @@ Default for i830 and newer: Enabled.
 .IP
 Default for i810: this option is not used.
 .BI "Option \*qAccelMethod\*q \*q" string \*q
-Choose acceleration architecture, either "XAA" or "EXA".  XAA is the old
-XFree86 based acceleration architecture.  EXA is a newer and simpler
+Choose acceleration architecture, either "XAA", "EXA", or "UXA".  XAA is the old
+XFree86 based acceleration architecture.  EXA is a simpler
 acceleration architecture designed to better accelerate the X Render extension.
+UXA is a newer acceleration architecture built from the EXA acceleration
+code but taking advantage of kernel memory management to provide simpler,
+faster code.
 .IP
 Default: "EXA".
 .TP
commit 568297d327cc321f1186afc54b38d08db3f2914d
Author: Eric Anholt <eric at anholt.net>
Date:   Thu Jan 22 17:08:19 2009 -0800

    Don't allocate the render power saving context in KMS mode.
    
    That would be the kernel's job if it chooses to do it.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/src/i830_memory.c b/src/i830_memory.c
index 3fa6a7c..361fff7 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1688,6 +1688,9 @@ i830_allocate_pwrctx(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
 
+    if (pI830->use_drm_mode)
+	return TRUE;
+
     pI830->power_context = i830_allocate_memory(pScrn, "power context",
 						PWRCTX_SIZE, PITCH_NONE,
 						GTT_PAGE_SIZE,
commit 4e1144108424a4525bbd97c3d5a56de06760bdd9
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Mar 6 14:30:05 2009 -0800

    unused variable warning fix.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/src/i830_video.c b/src/i830_video.c
index f22fe85..daa2411 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2138,7 +2138,6 @@ i830_clip_video_helper (ScrnInfoPtr pScrn,
      */
     if (crtc_ret)
     {
-	I830Ptr		pI830 = I830PTR(pScrn);
 	BoxRec		crtc_box;
 	xf86CrtcPtr	crtc = i830_covering_crtc (pScrn, dst,
 						   pPriv->desired_crtc,
commit 043a76a040d4576b7a8397dca805466a99bfcdd6
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Mar 6 14:29:22 2009 -0800

    clean up arguments to i830_allocate_framebuffer since zaphod removal.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index d9ca16c..141c027 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -632,7 +632,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 	drmmode_ptr drmmode = drmmode_crtc->drmmode;
 	I830Ptr     pI830 = I830PTR(scrn);
 	i830_memory *old_front = NULL;
-	BoxRec	    mem_box;
 	Bool	    tiled, ret;
 	ScreenPtr   screen = screenInfo.screens[scrn->scrnIndex];
 	uint32_t    old_fb_id;
@@ -659,8 +658,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 	scrn->virtualX = width;
 	scrn->virtualY = height;
 	scrn->displayWidth = pitch;
-	pI830->front_buffer =
-		i830_allocate_framebuffer(scrn, pI830, &mem_box, FALSE);
+	pI830->front_buffer = i830_allocate_framebuffer(scrn);
 	if (!pI830->front_buffer)
 		goto fail;
 
diff --git a/src/i830.h b/src/i830.h
index 2408ea9..f933917 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -372,7 +372,6 @@ typedef struct _I830Rec {
 
    unsigned int bufferOffset;		/* for I830SelectBuffer */
    BoxRec FbMemBox;
-   BoxRec FbMemBox2;
    int CacheLines;
 
    /* These are set in PreInit and never changed. */
@@ -900,8 +899,7 @@ Bool I830BindAGPMemory(ScrnInfoPtr pScrn);
 Bool I830UnbindAGPMemory(ScrnInfoPtr pScrn);
 
 i830_memory *
-i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
-			  Bool secondary);
+i830_allocate_framebuffer(ScrnInfoPtr pScrn);
 
 /* i830_modes.c */
 DisplayModePtr i830_ddc_get_modes(xf86OutputPtr output);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 16f68dc..6ec1a48 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1132,7 +1132,6 @@ i830_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
     if (i830->can_resize && i830->front_buffer)
     {
 	i830_memory *new_front, *old_front;
-	BoxRec	    mem_box;
 	Bool	    tiled;
 	ScreenPtr   screen = screenInfo.screens[scrn->scrnIndex];
 
@@ -1142,7 +1141,7 @@ i830_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 		   width, height, scrn->displayWidth);
 	I830Sync(scrn);
 	i830WaitForVblank(scrn);
-	new_front = i830_allocate_framebuffer(scrn, i830, &mem_box, FALSE);
+	new_front = i830_allocate_framebuffer(scrn);
 	if (!new_front) {
 	    scrn->virtualX = old_x;
 	    scrn->virtualY = old_y;
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 84262af..3fa6a7c 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1159,30 +1159,22 @@ IsTileable(ScrnInfoPtr pScrn, int pitch)
  *
  * Used once for each X screen, so once with RandR 1.2 and twice with classic
  * dualhead.
- *
- * \param pScrn ScrnInfoPtr for the screen being allocated
- * \param pI830 I830Ptr for the screen being allocated.
- * \param FbMemBox
  */
 i830_memory *
-i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
-			  Bool secondary)
+i830_allocate_framebuffer(ScrnInfoPtr pScrn)
 {
+    I830Ptr pI830 = I830PTR(pScrn);
     unsigned int pitch = pScrn->displayWidth * pI830->cpp;
     unsigned long minspace, avail;
     int cacheLines, maxCacheLines;
     int align;
     long size, fb_height;
-    char *name;
     int flags;
     i830_memory *front_buffer = NULL;
     enum tile_format tile_format = TILE_NONE;
 
     flags = ALLOW_SHARING;
 
-    /* Clear everything first. */
-    memset(FbMemBox, 0, sizeof(*FbMemBox));
-
     /* We'll allocate the fb such that the root window will fit regardless of
      * rotation.
      */
@@ -1195,10 +1187,10 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
 	    fb_height = pScrn->virtualY;
     }
 
-    FbMemBox->x1 = 0;
-    FbMemBox->x2 = pScrn->displayWidth;
-    FbMemBox->y1 = 0;
-    FbMemBox->y2 = fb_height;
+    pI830->FbMemBox.x1 = 0;
+    pI830->FbMemBox.x2 = pScrn->displayWidth;
+    pI830->FbMemBox.y1 = 0;
+    pI830->FbMemBox.y2 = fb_height;
 
     /* Calculate how much framebuffer memory to allocate.  For the
      * initial allocation, calculate a reasonable minimum.  This is
@@ -1233,7 +1225,7 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
 	if (cacheLines > maxCacheLines)
 	    cacheLines = maxCacheLines;
 
-	FbMemBox->y2 += cacheLines;
+	pI830->FbMemBox.y2 += cacheLines;
 
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 		   "Allocating %d scanlines for pixmap cache\n",
@@ -1248,8 +1240,6 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
     size = pitch * (fb_height + cacheLines);
     size = ROUND_TO_PAGE(size);
 
-    name = secondary ? "secondary front buffer" : "front buffer";
-
     /* Front buffer tiling has to be disabled with G965 XAA because some of the
      * acceleration operations (non-XY COLOR_BLT) can't be done to tiled
      * buffers.
@@ -1279,14 +1269,13 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
 	    align = KB(512);
     } else
 	align = KB(64);
-    front_buffer = i830_allocate_memory(pScrn, name, size,
+    front_buffer = i830_allocate_memory(pScrn, "front buffer", size,
 					pitch, align, flags,
 					tile_format);
 
     if (front_buffer == NULL) {
-	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to allocate "
-		   "%sframebuffer. Is your VideoRAM set too low?\n",
-		   secondary ? "secondary " : "");
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		   "Failed to allocate framebuffer.\n");
 	return NULL;
     }
 
@@ -1473,8 +1462,7 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 	i830_allocate_overlay(pScrn);
 #endif
 
-    pI830->front_buffer =
-	i830_allocate_framebuffer(pScrn, pI830, &pI830->FbMemBox, FALSE);
+    pI830->front_buffer = i830_allocate_framebuffer(pScrn);
     if (pI830->front_buffer == NULL)
 	return FALSE;
 
commit b23f57b310b693f56af273526383221a4f8b96f5
Author: Eric Anholt <eric at anholt.net>
Date:   Thu Jan 22 17:17:09 2009 -0800

    Use REGION_EQUAL in place of a local implementation.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/src/i830_video.c b/src/i830_video.c
index 9826e14..f22fe85 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -1032,34 +1032,6 @@ I830SetupImageVideoTextured(ScreenPtr pScreen)
     return adapt;
 }
 
-static Bool
-RegionsEqual(RegionPtr A, RegionPtr B)
-{
-    int *dataA, *dataB;
-    int num;
-
-    num = REGION_NUM_RECTS(A);
-    if (num != REGION_NUM_RECTS(B))
-	return FALSE;
-
-    if ((A->extents.x1 != B->extents.x1) ||
-	(A->extents.x2 != B->extents.x2) ||
-	(A->extents.y1 != B->extents.y1) || (A->extents.y2 != B->extents.y2))
-	return FALSE;
-
-    dataA = (int *)REGION_RECTS(A);
-    dataB = (int *)REGION_RECTS(B);
-
-    while (num--) {
-	if ((dataA[0] != dataB[0]) || (dataA[1] != dataB[1]))
-	    return FALSE;
-	dataA += 2;
-	dataB += 2;
-    }
-
-    return TRUE;
-}
-
 static void
 I830StopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
 {
@@ -2528,7 +2500,7 @@ I830PutImage(ScrnInfoPtr pScrn,
 			   drw_w, drw_h);
 	
 	/* update cliplist */
-	if (!RegionsEqual(&pPriv->clip, clipBoxes)) {
+	if (!REGION_EQUAL(pScrn->pScreen, &pPriv->clip, clipBoxes)) {
 	    REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes);
 	    i830_fill_colorkey (pScreen, pPriv->colorKey, clipBoxes);
 	}
commit 6b61f9945f54df7469f2b2d702b621d4d6064c3f
Author: Eric Anholt <eric at anholt.net>
Date:   Thu Jan 22 17:19:04 2009 -0800

    nuke unused define.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/src/i830_video.c b/src/i830_video.c
index b4f8890..9826e14 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -81,10 +81,6 @@
 #include "i915_hwmc.h"
 #endif
 
-#ifndef USE_USLEEP_FOR_VIDEO
-#define USE_USLEEP_FOR_VIDEO 0
-#endif
-
 #define OFF_DELAY 	250		/* milliseconds */
 #define FREE_DELAY 	15000
 
commit c3a747cb54acc1b037b559313e6a2113ae2ac4c7
Author: Dan Nicholson <dbn.lists at gmail.com>
Date:   Wed Nov 26 09:57:24 2008 -0800

    man: Put option defaults on separate indented line
    
    The groff .IP macro is used to put the option defaults in a new indented
    paragraph so they are separated from the explanations.
    
    Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
    [anholt: hand-applied due to conflicts.  mistakes are my own]
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/man/intel.man b/man/intel.man
index b5f8791..413f63a 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -57,10 +57,13 @@ The following driver
 are supported
 .TP
 .BI "Option \*qNoAccel\*q \*q" boolean \*q
-Disable or enable acceleration.  Default: acceleration is enabled.
+Disable or enable acceleration.
+.IP
+Default: acceleration is enabled.
 .TP
 .BI "Option \*qColorKey\*q \*q" integer \*q
 This sets the default pixel value for the YUV video overlay key.
+.IP
 Default: undefined.
 .TP
 .BI "Option \*qCacheLines\*q \*q" integer \*q
@@ -68,6 +71,7 @@ This allows the user to change the amount of graphics memory used for
 2D acceleration and video when XAA acceleration is enabled.  Decreasing this
 amount leaves more for 3D textures.  Increasing it can improve 2D performance
 at the expense of 3D performance.
+.IP
 Default: depends on the resolution, depth, and available video memory.  The
 driver attempts to allocate space for at 3 screenfuls of pixmaps plus an
 HD-sized XV video.  The default used for a specific configuration can be found
@@ -78,16 +82,19 @@ This option controls whether the framebuffer compression feature is enabled.
 If possible, the front buffer will be allocated in a tiled format and compressed
 periodically to save memory bandwidth and power.
 This option is only available on mobile chipsets.
+.IP
 Default: enabled on supported configurations.
 .TP
 .BI "Option \*qTiling\*q \*q" boolean \*q
 This option controls whether memory buffers are allocated in tiled mode.  In
 most cases (especially for complex rendering), tiling dramatically improves
 performance.
+.IP
 Default: enabled.
 .TP
 .BI "Option \*qDRI\*q \*q" boolean \*q
 Disable or enable DRI support.
+.IP
 Default: DRI is enabled for configurations where it is supported.
 
 .PP
@@ -97,19 +104,23 @@ are supported for the i810 and i815 chipsets:
 .TP
 .BI "Option \*qDDC\*q \*q" boolean \*q
 Disable or enable DDC support.
+.IP
 Default: enabled.
 .TP
 .BI "Option \*qDac6Bit\*q \*q" boolean \*q
 Enable or disable 6-bits per RGB for 8-bit modes.
+.IP
 Default: 8-bits per RGB for 8-bit modes.
 .TP
 .BI "Option \*qXvMCSurfaces\*q \*q" integer \*q
 This option enables XvMC.  The integer parameter specifies the number of
 surfaces to use.  Valid values are 6 and 7.
+.IP
 Default: XvMC is disabled.
 .TP
 .BI "VideoRam " integer
 This option specifies the amount of system memory to use for graphics, in KB.
+.IP
 The default is 8192 if AGP allocable memory is < 128 MB, 16384 if < 192 MB,
 24576 if higher. DRI require at least a value of 16384. Higher values may give
 better 3D performance, at expense of available system memory.
@@ -132,6 +143,7 @@ it due to it syncing to vblank in the absence of compositing.  While most
 XV-using applications have options to select which XV adaptor to use, this
 option can be used to place the overlay first for applications which don't
 have options for selecting adaptors.
+.IP
 Default: Textured video adaptor is preferred.
 .TP
 .BI "Option \*qLegacy3D\*q \*q" boolean \*q
@@ -139,22 +151,27 @@ Enable support for the non-GEM mode of the 3D driver on i830 and newer.
 This will allocate a large static area for older Mesa to use for its texture
 pool.  On systems with a working GEM environment, this can be disabled to
 increase the memory pool available to other graphics tasks.
+.IP
 Default for i830 and newer: Enabled.
+.IP
 Default for i810: this option is not used.
 .BI "Option \*qAccelMethod\*q \*q" string \*q
 Choose acceleration architecture, either "XAA" or "EXA".  XAA is the old
 XFree86 based acceleration architecture.  EXA is a newer and simpler
 acceleration architecture designed to better accelerate the X Render extension.
+.IP
 Default: "EXA".
 .TP
 .BI "Option \*qModeDebug\*q \*q" boolean \*q
 Enable printing of additional debugging information about modesetting to
 the server log.
+.IP
 Default: Disabled
 .TP
 .BI "Option \*qFallbackDebug\*q \*q" boolean \*q
 Enable printing of debugging information on acceleration fallbacks to the
 server log.
+.IP
 Default: Disabled
 .TP
 .BI "Option \*qForceEnablePipeA\*q \*q" boolean \*q
@@ -174,7 +191,9 @@ within the X server.  This option instead selects the physical format
 / sequencing of the digital bits sent to the display.  Setting the
 frame buffer color depth is really a matter of preference by the user,
 while setting the pixel format here is a requirement of the connected
-hardware.  Leaving this unset implies the default value of false,
+hardware.
+.IP
+Leaving this unset implies the default value of false,
 which is almost always going to be right choice.  If your
 LVDS-connected display on the other hand is extremely washed out
 (e.g. white on a lighter white), trying this option might clear the
@@ -182,7 +201,9 @@ problem.
 .TP
 .BI "Option \*qLVDSFixedMode\*q \*q" boolean \*q
 Use a fixed set of timings for the LVDS output, independent of normal
-xorg specified timings.  The default value if left unspecified is
+xorg specified timings.
+.IP
+The default value if left unspecified is
 true, which is what you want for a normal LVDS-connected LCD type of
 panel.  If you are not sure about this, leave it at its default, which
 allows the driver to automatically figure out the correct fixed panel
@@ -192,6 +213,7 @@ information.
 .BI "Option \*qXvMC\*q \*q" boolean \*q
 Enable XvMC driver. Current support MPEG2 MC on 915/945 and G33 series.
 User should provide absolute path to libIntelXvMC.so in XvMCConfig file.
+.IP
 Default: Disabled.
 
 .SH OUTPUT CONFIGURATION
commit d2af21a66d7e1d1dd62c6aa8fb41d3fd6045bcd7
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 27 23:38:00 2009 -0800

    Remove configurable support for disabling XV.
    
    google shows one instance of this being used a year and a half ago.

diff --git a/man/intel.man b/man/intel.man
index a8bf579..b5f8791 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -125,10 +125,6 @@ This is the same as the
 option described above.  It is provided for compatibility with most
 other drivers.
 .TP
-.BI "Option \*qXVideo\*q \*q" boolean \*q
-Disable or enable XVideo support.
-Default: XVideo is enabled for configurations where it is supported.
-.TP
 .BI "Option \*qXvPreferOverlay\*q \*q" boolean \*q
 Make hardware overlay be the first XV adaptor.
 The overlay behaves incorrectly in the presence of compositing, but some prefer
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 60a0076..16f68dc 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -304,7 +304,6 @@ typedef enum {
    OPTION_NOACCEL,
    OPTION_CACHE_LINES,
    OPTION_DRI,
-   OPTION_XVIDEO,
    OPTION_VIDEO_KEY,
    OPTION_COLOR_KEY,
    OPTION_MODEDEBUG,
@@ -326,7 +325,6 @@ static OptionInfoRec I830Options[] = {
    {OPTION_NOACCEL,	"NoAccel",	OPTV_BOOLEAN,	{0},	FALSE},
    {OPTION_CACHE_LINES,	"CacheLines",	OPTV_INTEGER,	{0},	FALSE},
    {OPTION_DRI,		"DRI",		OPTV_BOOLEAN,	{0},	TRUE},
-   {OPTION_XVIDEO,	"XVideo",	OPTV_BOOLEAN,	{0},	TRUE},
    {OPTION_COLOR_KEY,	"ColorKey",	OPTV_INTEGER,	{0},	FALSE},
    {OPTION_VIDEO_KEY,	"VideoKey",	OPTV_INTEGER,	{0},	FALSE},
    {OPTION_MODEDEBUG,	"ModeDebug",	OPTV_BOOLEAN,	{0},	FALSE},
@@ -1763,9 +1761,6 @@ I830XvInit(ScrnInfoPtr pScrn)
     I830Ptr pI830 = I830PTR(pScrn);
     MessageType from = X_PROBED;
 
-    pI830->XvDisabled =
-	!xf86ReturnOptValBool(pI830->Options, OPTION_XVIDEO, TRUE);
-
    pI830->XvPreferOverlay = xf86ReturnOptValBool(pI830->Options, OPTION_PREFER_OVERLAY, FALSE);
 
 #ifdef I830_XV
@@ -3076,7 +3071,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
      * Set this so that the overlay allocation is factored in when
      * appropriate.
      */
-    pI830->XvEnabled = !pI830->XvDisabled;
+    pI830->XvEnabled = TRUE;
 #endif
 
 
@@ -3105,13 +3100,10 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
       return FALSE;
 
 #ifdef I830_XV
-   pI830->XvEnabled = !pI830->XvDisabled;
-   if (pI830->XvEnabled) {
-      if (pI830->accel == ACCEL_NONE) {
-	 xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Xv is disabled because it "
-		    "needs 2D acceleration.\n");
-	 pI830->XvEnabled = FALSE;
-      }
+   if (pI830->accel == ACCEL_NONE) {
+      xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Xv is disabled because it "
+		 "needs 2D acceleration.\n");
+      pI830->XvEnabled = FALSE;
    }
 #else
    pI830->XvEnabled = FALSE;
@@ -3126,16 +3118,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
       }
    }
 
-#ifdef I830_XV
-   if (pI830->XvEnabled) {
-      if (pI830->accel == ACCEL_NONE) {
-	 xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Disabling Xv because it "
-		    "needs 2D acceleration.\n");
-	 pI830->XvEnabled = FALSE;
-      }
-   }
-#endif
-
    if (!pI830->use_drm_mode) {
       DPRINTF(PFX, "assert( if(!I830MapMem(pScrn)) )\n");
       if (!I830MapMem(pScrn))
commit 755757669f0cad670cfa084d33d7c3e928d27855
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 27 22:57:15 2009 -0800

    Remove configured SW cursor support.
    
    Any time we actually need SW cursors, it gets enabled automatically.

diff --git a/man/intel.man b/man/intel.man
index 01f1505..a8bf579 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -59,11 +59,6 @@ are supported
 .BI "Option \*qNoAccel\*q \*q" boolean \*q
 Disable or enable acceleration.  Default: acceleration is enabled.
 .TP
-.BI "Option \*qSWCursor\*q \*q" boolean \*q
-Disable or enable software cursor.  Default: software cursor is disable
-and a hardware cursor is used for configurations where the hardware cursor
-is available.
-.TP
 .BI "Option \*qColorKey\*q \*q" integer \*q
 This sets the default pixel value for the YUV video overlay key.
 Default: undefined.
diff --git a/src/i830.h b/src/i830.h
index ffb2732..2408ea9 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -497,7 +497,6 @@ typedef struct _I830Rec {
    Bool fence_used[FENCE_NEW_NR];
 
    accel_method_t accel;
-   Bool SWCursor;
 #ifdef I830_USE_XAA
    XAAInfoRecPtr AccelInfoRec;
 
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 908614a..60a0076 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -302,7 +302,6 @@ static PciChipsets I830PciChipsets[] = {
 typedef enum {
    OPTION_ACCELMETHOD,
    OPTION_NOACCEL,
-   OPTION_SW_CURSOR,
    OPTION_CACHE_LINES,
    OPTION_DRI,
    OPTION_XVIDEO,
@@ -325,7 +324,6 @@ typedef enum {
 static OptionInfoRec I830Options[] = {
    {OPTION_ACCELMETHOD,	"AccelMethod",	OPTV_ANYSTR,	{0},	FALSE},
    {OPTION_NOACCEL,	"NoAccel",	OPTV_BOOLEAN,	{0},	FALSE},
-   {OPTION_SW_CURSOR,	"SWcursor",	OPTV_BOOLEAN,	{0},	FALSE},
    {OPTION_CACHE_LINES,	"CacheLines",	OPTV_INTEGER,	{0},	FALSE},
    {OPTION_DRI,		"DRI",		OPTV_BOOLEAN,	{0},	TRUE},
    {OPTION_XVIDEO,	"XVideo",	OPTV_BOOLEAN,	{0},	TRUE},
@@ -1503,6 +1501,10 @@ I830LoadSyms(ScrnInfoPtr pScrn)
 	return FALSE;
     xf86LoaderReqSymLists(I810vgahwSymbols, NULL);
 
+    if (!xf86LoadSubModule(pScrn, "ramdac"))
+       return FALSE;
+    xf86LoaderReqSymLists(I810ramdacSymbols, NULL);
+
     return TRUE;
 }
 
@@ -1622,10 +1624,6 @@ I830AccelMethodInit(ScrnInfoPtr pScrn)
 		   accel_name[pI830->accel]);
     }
 
-    if (xf86ReturnOptValBool(pI830->Options, OPTION_SW_CURSOR, FALSE)) {
-	pI830->SWCursor = TRUE;
-    }
-
     pI830->directRenderingType = DRI_NONE;
     if (!xf86ReturnOptValBool(pI830->Options, OPTION_DRI, TRUE))
 	pI830->directRenderingType = DRI_DISABLED;
@@ -1974,13 +1972,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
    default:
       break;
    }
-   if (!pI830->SWCursor) {
-      if (!xf86LoadSubModule(pScrn, "ramdac")) {
-	 PreInitCleanup(pScrn);
-	 return FALSE;
-      }
-      xf86LoaderReqSymLists(I810ramdacSymbols, NULL);
-   }
 
    if (!pI830->use_drm_mode) {
        i830CompareRegsToSnapshot(pScrn, "After PreInit");
@@ -3032,8 +3023,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    /* If DRI hasn't been explicitly disabled, try to initialize it.
     * It will be used by the memory allocator.
     */
-   if (pI830->directRenderingType == DRI_NONE && pI830->SWCursor)
-       pI830->directRenderingType = DRI_DISABLED;
    if (!pI830->can_resize && pI830->directRenderingType == DRI_NONE && I830DRIScreenInit(pScreen))
        pI830->directRenderingType = DRI_XF86DRI;
 
@@ -3162,9 +3151,9 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     * InitGLXVisuals call back.
     */
    if (pI830->directRenderingType == DRI_XF86DRI) {
-      if (pI830->accel == ACCEL_NONE || pI830->SWCursor) {
+      if (pI830->accel == ACCEL_NONE) {
 	 xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "DRI is disabled because it "
-		    "needs HW cursor and 2D accel.\n");
+		    "needs 2D acceleration.\n");
 	 pI830->directRenderingType = DRI_NONE;
       }
    }
@@ -3257,13 +3246,10 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    xf86SetSilkenMouse(pScreen);
    miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
 
-   if (!pI830->SWCursor) {
-      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing HW Cursor\n");
-      if (!I830CursorInit(pScreen))
-	 xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-		    "Hardware cursor initialization failed\n");
-   } else
-      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing SW Cursor!\n");
+   xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing HW Cursor\n");
+   if (!I830CursorInit(pScreen))
+      xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		 "Hardware cursor initialization failed\n");
 
 #ifdef XF86DRI
    /* Must be called before EnterVT, so we can acquire the DRI lock when
@@ -3571,8 +3557,7 @@ I830EnterVT(int scrnIndex, int flags)
 	   i830_stop_ring(pScrn, FALSE);
 	   i830_start_ring(pScrn);
        }
-       if (!pI830->SWCursor)
-	   I830InitHWCursor(pScrn);
+       I830InitHWCursor(pScrn);
 
        /* Tell the BIOS that we're in control of mode setting now. */
        i830_init_bios_control(pScrn);
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 0fd5d5b..84262af 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1448,11 +1448,10 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 	i830_setup_fb_compression(pScrn);
 
     /* Next, allocate other fixed-size allocations we have. */
-    if (!pI830->SWCursor && !i830_allocate_cursor_buffers(pScrn)) {
-	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		   "Disabling HW cursor because the cursor memory "
-		   "allocation failed.\n");
-	pI830->SWCursor = TRUE;
+    if (!i830_allocate_cursor_buffers(pScrn)) {
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		   "Failed to allocate HW cursor space.\n");
+	return FALSE;
     }
 
     if (pI830->memory_manager == NULL) {
@@ -1997,7 +1996,7 @@ i830_bind_all_memory(ScrnInfoPtr pScrn)
 		FatalError("Couldn't bind memory for BO %s\n", mem->name);
 	}
     }
-    if (!pI830->SWCursor && !pI830->use_drm_mode)
+    if (!pI830->use_drm_mode)
 	i830_update_cursor_offsets(pScrn);
 
     return TRUE;
commit 917b20ead3cacf1e88314f20edde6a02b97b96d7
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 27 23:01:28 2009 -0800

    Remove StolenOnly support.
    
    We rely on having AGPGART present to successfully allocate video memory as
    we configure it by default.  Admit that fact, and remove support for
    non-AGPGART/KMS setups.

diff --git a/src/i830.h b/src/i830.h
index 3d1a30a..ffb2732 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -609,8 +609,6 @@ typedef struct _I830Rec {
 
    Bool tv_present; /* TV connector present (from VBIOS) */
 
-   Bool StolenOnly;
-
    /* Driver phase/state information */
    Bool preinit;
    Bool starting;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index da560d8..908614a 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1915,17 +1915,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
        return FALSE;
    }
 
-   /*
-    * XXX If we knew the pre-initialised GTT format for certain, we could
-    * probably figure out the physical address even in the StolenOnly case.
-    */
-   if (pI830->StolenOnly && pI830->CursorNeedsPhysical &&
-	      !pI830->SWCursor) {
-      xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-		 "HW Cursor disabled because it needs agpgart memory.\n");
-      pI830->SWCursor = TRUE;
-   }
-
    if (pScrn->modes == NULL) {
       xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No modes.\n");
       PreInitCleanup(pScrn);
@@ -2874,25 +2863,19 @@ I830AdjustMemory(ScreenPtr pScreen)
    /* Limit videoRam to how much we might be able to allocate from AGP */
    sys_mem = I830CheckAvailableMemory(pScrn);
    if (sys_mem == -1) {
-      if (pScrn->videoRam > pI830->stolen_size / KB(1)) {
+      xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		 "/dev/agpgart is either not available, or no memory "
+		 "is available\nfor allocation.  Please enable agpgart\n.");
+      pScrn->videoRam = pI830->stolen_size / KB(1);
+   }
+   if (sys_mem + (pI830->stolen_size / 1024) < pScrn->videoRam) {
+      pScrn->videoRam = sys_mem + (pI830->stolen_size / 1024);
+      from = X_PROBED;
+      if (sys_mem + (pI830->stolen_size / 1024) <
+	  pI830->pEnt->device->videoRam) {
 	 xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		    "/dev/agpgart is either not available, or no memory "
-		    "is available\nfor allocation.  "
-		    "Using pre-allocated memory only.\n");
-	 pScrn->videoRam = pI830->stolen_size / KB(1);
-      }
-      pI830->StolenOnly = TRUE;
-   } else {
-      if (sys_mem + (pI830->stolen_size / 1024) < pScrn->videoRam) {
-	 pScrn->videoRam = sys_mem + (pI830->stolen_size / 1024);
-	 from = X_PROBED;
-	 if (sys_mem + (pI830->stolen_size / 1024) <
-	     pI830->pEnt->device->videoRam)
-	 {
-	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		       "VideoRAM reduced to %d kByte "
-		       "(limited to available sysmem)\n", pScrn->videoRam);
-	 }
+		    "VideoRAM reduced to %d kByte "
+		    "(limited to available sysmem)\n", pScrn->videoRam);
       }
    }
 
@@ -3135,9 +3118,9 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 #ifdef I830_XV
    pI830->XvEnabled = !pI830->XvDisabled;
    if (pI830->XvEnabled) {
-      if (pI830->accel == ACCEL_NONE || pI830->StolenOnly) {
+      if (pI830->accel == ACCEL_NONE) {
 	 xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Xv is disabled because it "
-		    "needs 2D accel and AGPGART.\n");
+		    "needs 2D acceleration.\n");
 	 pI830->XvEnabled = FALSE;
       }
    }
@@ -3179,9 +3162,9 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     * InitGLXVisuals call back.
     */
    if (pI830->directRenderingType == DRI_XF86DRI) {
-      if (pI830->accel == ACCEL_NONE || pI830->SWCursor || pI830->StolenOnly) {
+      if (pI830->accel == ACCEL_NONE || pI830->SWCursor) {
 	 xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "DRI is disabled because it "
-		    "needs HW cursor, 2D accel and AGPGART.\n");
+		    "needs HW cursor and 2D accel.\n");
 	 pI830->directRenderingType = DRI_NONE;
       }
    }
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 96f4008..0fd5d5b 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1431,8 +1431,7 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
     long size;
 
     if (!pI830->use_drm_mode) {
-	if (!pI830->StolenOnly &&
-	    (!xf86AgpGARTSupported() || !xf86AcquireGART(pScrn->scrnIndex))) {
+	if (!xf86AgpGARTSupported() || !xf86AcquireGART(pScrn->scrnIndex)) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		       "AGP GART support is either not available or cannot "
 		       "be used.\n"
@@ -1970,7 +1969,7 @@ i830_bind_all_memory(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
 
-    if (pI830->StolenOnly == TRUE || pI830->memory_list == NULL)
+    if (pI830->memory_list == NULL)
 	return TRUE;
 
     if (pI830->use_drm_mode || (xf86AgpGARTSupported() &&
@@ -2010,9 +2009,6 @@ i830_unbind_all_memory(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
 
-    if (pI830->StolenOnly == TRUE)
-	return TRUE;
-
     if (pI830->use_drm_mode || (xf86AgpGARTSupported() &&
 				pI830->gtt_acquired)) {
 	i830_memory *mem;
commit 73b7190421132ad73179c3fb7bb0e06c427dce5c
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 27 22:51:22 2009 -0800

    intel: Nuke shared-entity support (zaphod mode).
    
    It's been broken for years now, and KMS offers a much better chance of getting
    this working sensibly without making a mess of the 2D driver.

diff --git a/src/i810_driver.c b/src/i810_driver.c
index c10e15b..6ae388d 100644
--- a/src/i810_driver.c
+++ b/src/i810_driver.c
@@ -620,8 +620,6 @@ static Bool intel_pci_probe (DriverPtr		driver,
 {
     ScrnInfoPtr	    scrn = NULL;
     EntityInfoPtr   entity;
-    I830EntPtr	    i830_ent = NULL;
-    DevUnion	    *private;
 
     scrn = xf86ConfigPciEntity (scrn, 0, entity_num, I810PciChipsets,
 				NULL,
@@ -651,44 +649,7 @@ static Bool intel_pci_probe (DriverPtr		driver,
 	    scrn->ValidMode = I810ValidMode;
 	    break;
 #endif
-	case PCI_CHIP_845_G:
-	case PCI_CHIP_I865_G:
-	    /*
-	     * These two chips have only one pipe, and
-	     * cannot do dual-head
-	     */
-	    I830InitpScrn(scrn);
-	    break;
 	default:
-	    /*
-	     * Everything else is an i830-ish dual-pipe chip
-	     */
-	    xf86SetEntitySharable(entity_num);
-
-	    /* Allocate an entity private if necessary */		
-	    if (I830EntityIndex < 0)					
-		I830EntityIndex = xf86AllocateEntityPrivateIndex();	
-
-	    private = xf86GetEntityPrivate(scrn->entityList[0],
-					   I830EntityIndex);	
-	    i830_ent = private->ptr;
-	    if (!i830_ent)
-	    {
-		private->ptr = xnfcalloc(sizeof(I830EntRec), 1);
-		i830_ent = private->ptr;
-		i830_ent->lastInstance = -1;
-	    }
-
-	    /*
-	     * Set the entity instance for this instance of the driver.
-	     * For dual head per card, instance 0 is the "master"
-	     * instance, driving the primary head, and instance 1 is
-	     * the "slave".
-	     */
-	    i830_ent->lastInstance++;
-	    xf86SetEntityInstanceForScreen(scrn,			
-					   scrn->entityList[0],
-					   i830_ent->lastInstance);	
 	    I830InitpScrn(scrn);
 	    break;
 	}
@@ -708,7 +669,6 @@ static Bool
 I810Probe(DriverPtr drv, int flags)
 {
    int i, numUsed, numDevSections, *usedChips;
-   I830EntPtr pI830Ent = NULL;					
    DevUnion *pPriv;						
    GDevPtr *devSections;
    Bool foundScreen = FALSE;
@@ -790,8 +750,6 @@ I810Probe(DriverPtr drv, int flags)
 	    switch (pEnt->chipset) {
 	    case PCI_CHIP_845_G:
 	    case PCI_CHIP_I865_G:
-	       I830InitpScrn(pScrn);
-               break;
 	    case PCI_CHIP_I830_M:
 	    case PCI_CHIP_I855_GM:
 	    case PCI_CHIP_I915_G:
@@ -816,31 +774,6 @@ I810Probe(DriverPtr drv, int flags)
 	    case PCI_CHIP_G45_G:
 	    case PCI_CHIP_Q45_G:
 	    case PCI_CHIP_G41_G:
-    	       xf86SetEntitySharable(usedChips[i]);
-
-    	       /* Allocate an entity private if necessary */		
-    	       if (I830EntityIndex < 0)					
-		  I830EntityIndex = xf86AllocateEntityPrivateIndex();	
-
-    	       pPriv = xf86GetEntityPrivate(pScrn->entityList[0],
-						I830EntityIndex);	
-    	       if (!pPriv->ptr) {
-		  pPriv->ptr = xnfcalloc(sizeof(I830EntRec), 1);
-		  pI830Ent = pPriv->ptr;
-		  pI830Ent->lastInstance = -1;
-    	       } else {
-		   pI830Ent = pPriv->ptr;
-    	       }
-
-    	       /*
-		* Set the entity instance for this instance of the driver.
-     	        * For dual head per card, instance 0 is the "master"
-     	        * instance, driving the primary head, and instance 1 is
-     	        * the "slave".
-     	        */
-    	       pI830Ent->lastInstance++;
-               xf86SetEntityInstanceForScreen(pScrn,			
-			pScrn->entityList[0], pI830Ent->lastInstance);	
 	       I830InitpScrn(pScrn);
 	       break;
 #ifndef I830_ONLY
diff --git a/src/i830.h b/src/i830.h
index cd9c38a..3d1a30a 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -212,17 +212,6 @@ typedef struct {
    int space;
 } I830RingBuffer;
 
-typedef struct {
-   int            lastInstance;
-   int            refCount;
-   ScrnInfoPtr    pScrn_1;
-   ScrnInfoPtr    pScrn_2;
-   int            RingRunning;
-#ifdef I830_XV
-   int            XvInUse;
-#endif
-} I830EntRec, *I830EntPtr;
-
 /* store information about an Ixxx DVO */
 /* The i830->i865 use multiple DVOs with multiple i2cs */
 /* the i915, i945 have a single sDVO i2c bus - which is different */
@@ -381,9 +370,6 @@ typedef struct _I830Rec {
    unsigned char *FbBase;
    int cpp;
 
-   I830EntPtr entityPrivate;	
-   int init;
-
    unsigned int bufferOffset;		/* for I830SelectBuffer */
    BoxRec FbMemBox;
    BoxRec FbMemBox2;
@@ -404,7 +390,6 @@ typedef struct _I830Rec {
    int gtt_acquired;		/**< whether we currently own the AGP */
 
    i830_memory *front_buffer;
-   i830_memory *front_buffer_2;
    i830_memory *compressed_front_buffer;
    i830_memory *compressed_ll_buffer;
    /* One big buffer for all cursors for kernels that support this */
@@ -413,14 +398,13 @@ typedef struct _I830Rec {
    i830_memory *cursor_mem_classic[2];
    i830_memory *cursor_mem_argb[2];
    i830_memory *xaa_scratch;
-   i830_memory *xaa_scratch_2;
 #ifdef I830_USE_EXA
    i830_memory *exa_offscreen;
 #endif
    i830_memory *fake_bufmgr_mem;
 
    /* Regions allocated either from the above pools, or from agpgart. */
-   I830RingBuffer *LpRing;
+   I830RingBuffer ring;
 
    /** Number of bytes being emitted in the current BEGIN_LP_RING */
    unsigned int ring_emitting;
@@ -562,7 +546,7 @@ typedef struct _I830Rec {
    int colorKey;
    XF86VideoAdaptorPtr adaptor;
    ScreenBlockHandlerProcPtr BlockHandler;
-   Bool *overlayOn;
+   Bool overlayOn;
 
    struct {
       drm_intel_bo *gen4_vs_bo;
@@ -723,7 +707,7 @@ typedef struct _I830Rec {
    uint32_t saveRAMCLK_GATE_D;
    uint32_t savePWRCTXA;
 
-   enum last_3d *last_3d;
+   enum last_3d last_3d;
 
    Bool use_drm_mode;
    Bool kernel_exec_fencing;
@@ -875,7 +859,6 @@ Bool i830_allocate_xvmc_buffer(ScrnInfoPtr pScrn, const char *name,
 extern void i830_update_front_offset(ScrnInfoPtr pScrn);
 extern uint32_t i830_create_new_fb(ScrnInfoPtr pScrn, int width, int height,
 				   int *pitch);
-extern Bool I830IsPrimary(ScrnInfoPtr pScrn);
 
 Bool
 i830_tiled_width(I830Ptr i830, int *width, int cpp);
@@ -985,7 +968,7 @@ i830_wait_ring_idle(ScrnInfoPtr pScrn)
    I830Ptr pI830 = I830PTR(pScrn);
 
    if (pI830->accel != ACCEL_NONE)
-       I830WaitLpRing(pScrn, pI830->LpRing->mem->size - 8, 0);
+       I830WaitLpRing(pScrn, pI830->ring.mem->size - 8, 0);
 }
 
 static inline int i830_fb_compression_supported(I830Ptr pI830)
diff --git a/src/i830_accel.c b/src/i830_accel.c
index 9155c92..9f5bcb5 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -96,7 +96,7 @@ int
 I830WaitLpRing(ScrnInfoPtr pScrn, int n, int timeout_millis)
 {
    I830Ptr pI830 = I830PTR(pScrn);
-   I830RingBuffer *ring = pI830->LpRing;
+   I830RingBuffer *ring = &pI830->ring;
    int iters = 0;
    unsigned int start = 0;
    unsigned int now = 0;
@@ -188,8 +188,6 @@ I830Sync(ScrnInfoPtr pScrn)
    }
 #endif
 
-   if (pI830->entityPrivate && !pI830->entityPrivate->RingRunning) return;
-
    I830EmitFlush(pScrn);
 
    intel_batch_flush(pScrn, TRUE);
diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index 33da43e..ff5f0c2 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -122,7 +122,7 @@ intel_next_batch(ScrnInfoPtr pScrn)
      * so we have to reinitialize our 3D state per batch.
      */
     if (pI830->directRenderingType == DRI_DRI2)
-	*pI830->last_3d = LAST_3D_OTHER;
+	pI830->last_3d = LAST_3D_OTHER;
 }
 
 void
diff --git a/src/i830_debug.c b/src/i830_debug.c
index d99af57..ed8843e 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -1481,9 +1481,9 @@ i830_valid_chain (ScrnInfoPtr pScrn, unsigned int ring, unsigned int end)
     
     head = (INREG (LP_RING + RING_HEAD)) & I830_HEAD_MASK;
     tail = INREG (LP_RING + RING_TAIL) & I830_TAIL_MASK;
-    mask = pI830->LpRing->tail_mask;
+    mask = pI830->ring.tail_mask;
     
-    virt = pI830->LpRing->virtual_start;
+    virt = pI830->ring.virtual_start;
     ErrorF ("Ring at virtual %p head 0x%x tail 0x%x count %d\n",
 	    virt, head, tail, (((tail + mask + 1) - head) & mask) >> 2);
 
@@ -1581,9 +1581,9 @@ i830_dump_ring(ScrnInfoPtr pScrn, uint32_t acthd)
     
     head = (INREG (LP_RING + RING_HEAD)) & I830_HEAD_MASK;
     tail = INREG (LP_RING + RING_TAIL) & I830_TAIL_MASK;
-    mask = pI830->LpRing->tail_mask;
+    mask = pI830->ring.tail_mask;
     
-    virt = pI830->LpRing->virtual_start;
+    virt = pI830->ring.virtual_start;
     ErrorF ("Ring at virtual %p head 0x%x tail 0x%x count %d acthd 0x%x\n",
 	    virt, head, tail, (((tail + mask + 1) - head) & mask) >> 2, acthd);
 
@@ -1729,8 +1729,6 @@ i830_check_error_state(ScrnInfoPtr pScrn)
     int errors = 0;
     unsigned long temp, head, tail;
 
-    if (!I830IsPrimary(pScrn)) return TRUE;
-
     temp = INREG16(ESR);
     if (temp != 0) {
 	Bool vertex_max = !IS_I965G(pI830) && (temp & ERR_VERTEX_MAX);
diff --git a/src/i830_display.c b/src/i830_display.c
index e243bfd..3139d40 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -469,11 +469,8 @@ i830PipeSetBase(xf86CrtcPtr crtc, int x, int y)
 	Start = (char *)crtc->rotatedData - (char *)pI830->FbBase;
 	Offset = 0;
 	Stride = intel_crtc->rotate_mem->pitch;
-    } else if (I830IsPrimary(pScrn)) {
-	Start = pI830->front_buffer->offset;
     } else {
-	I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
-	Start = pI8301->front_buffer_2->offset;
+	Start = pI830->front_buffer->offset;
     }
 
     crtc->x = x;
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 96c711e..b7ebd92 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -146,7 +146,7 @@ static Bool
 I830InitDma(ScrnInfoPtr pScrn)
 {
    I830Ptr pI830 = I830PTR(pScrn);
-   I830RingBuffer *ring = pI830->LpRing;
+   I830RingBuffer *ring = &pI830->ring;
    I830DRIPtr pI830DRI = (I830DRIPtr) pI830->pDRIInfo->devPrivate;
    drmI830Init info;
 
@@ -773,9 +773,9 @@ I830DRIMapHW(ScreenPtr pScreen)
 
    if (!pI830->memory_manager) {
        if (drmAddMap(pI830->drmSubFD,
-		     (drm_handle_t)pI830->LpRing->mem->offset +
+		     (drm_handle_t)pI830->ring.mem->offset +
 		     pI830->LinearAddr,
-		     pI830->LpRing->mem->size, DRM_AGP, 0,
+		     pI830->ring.mem->size, DRM_AGP, 0,
 		     (drmAddress) &pI830->ring_map) < 0) {
 	   xf86DrvMsg(pScreen->myNum, X_ERROR,
 		      "[drm] drmAddMap(ring_map) failed. Disabling DRI\n");
@@ -1004,7 +1004,7 @@ I830DRISwapContext(ScreenPtr pScreen, DRISyncType syncType,
       if (I810_DEBUG & DEBUG_VERBOSE_DRI)
 	 ErrorF("i830DRISwapContext (in)\n");
 
-      *pI830->last_3d = LAST_3D_OTHER;
+      pI830->last_3d = LAST_3D_OTHER;
 
       if (!pScrn->vtSema)
      	 return;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 5504025..da560d8 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -711,9 +711,8 @@ I830MapMem(ScrnInfoPtr pScrn)
       return FALSE;
 #endif
 
-   if (I830IsPrimary(pScrn) && pI830->LpRing->mem != NULL) {
-      pI830->LpRing->virtual_start =
-	 pI830->FbBase + pI830->LpRing->mem->offset;
+   if (pI830->ring.mem != NULL) {
+      pI830->ring.virtual_start = pI830->FbBase + pI830->ring.mem->offset;
    }
 
    return TRUE;
@@ -1062,32 +1061,11 @@ PreInitCleanup(ScrnInfoPtr pScrn)
 {
    I830Ptr pI830 = I830PTR(pScrn);
 
-   if (I830IsPrimary(pScrn)) {
-      if (pI830->entityPrivate)
-	 pI830->entityPrivate->pScrn_1 = NULL;
-   } else {
-      if (pI830->entityPrivate)
-         pI830->entityPrivate->pScrn_2 = NULL;
-   }
    if (pI830->MMIOBase)
       I830UnmapMMIO(pScrn);
    I830FreeRec(pScrn);
 }
 
-Bool
-I830IsPrimary(ScrnInfoPtr pScrn)
-{
-   I830Ptr pI830 = I830PTR(pScrn);
-
-   if (xf86IsEntityShared(pScrn->entityList[0])) {
-	if (pI830->init == 0) return TRUE;
-	else return FALSE;
-   }
-
-   return TRUE;
-}
-
-
 /*
  * Adjust *width to allow for tiling if possible
  */
@@ -1825,7 +1803,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
    I830Ptr pI830;
    rgb defaultWeight = { 0, 0, 0 };
    EntityInfoPtr pEnt;
-   I830EntPtr pI830Ent = NULL;
    int flags24;
    Gamma zeros = { 0.0, 0.0, 0.0 };
    int drm_mode_setting;
@@ -1871,43 +1848,11 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
 			  pI830->PciInfo->func);
 #endif
 
-    /* Allocate an entity private if necessary */
-    if (xf86IsEntityShared(pScrn->entityList[0])) {
-	pI830Ent = xf86GetEntityPrivate(pScrn->entityList[0],
-					I830EntityIndex)->ptr;
-        pI830->entityPrivate = pI830Ent;
-    } else
-        pI830->entityPrivate = NULL;
-
    if (xf86RegisterResources(pI830->pEnt->index, NULL, ResNone)) {
       PreInitCleanup(pScrn);
       return FALSE;
    }
 
-   if (xf86IsEntityShared(pScrn->entityList[0])) {
-      if (xf86IsPrimInitDone(pScrn->entityList[0])) {
-	 pI830->init = 1;
-
-         if (!pI830Ent->pScrn_1) {
-            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- 		 "Failed to setup second head due to primary head failure.\n");
-	    return FALSE;
-         }
-      } else {
-         xf86SetPrimInitDone(pScrn->entityList[0]);
-	 pI830->init = 0;
-      }
-   }
-
-   if (xf86IsEntityShared(pScrn->entityList[0])) {
-      if (!I830IsPrimary(pScrn)) {
-         pI830Ent->pScrn_2 = pScrn;
-      } else {
-         pI830Ent->pScrn_1 = pScrn;
-         pI830Ent->pScrn_2 = NULL;
-      }
-   }
-
    pScrn->racMemFlags = RAC_FB | RAC_COLORMAP;
    pScrn->monitor = pScrn->confScreen->monitor;
    pScrn->progClock = TRUE;
@@ -1974,14 +1919,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
     * XXX If we knew the pre-initialised GTT format for certain, we could
     * probably figure out the physical address even in the StolenOnly case.
     */
-   if (!I830IsPrimary(pScrn)) {
-        I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
-	if (!pI8301->SWCursor) {
-          xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-		 "Using HW Cursor because it's enabled on primary head.\n");
-          pI830->SWCursor = FALSE;
-        }
-   } else if (pI830->StolenOnly && pI830->CursorNeedsPhysical &&
+   if (pI830->StolenOnly && pI830->CursorNeedsPhysical &&
 	      !pI830->SWCursor) {
       xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 		 "HW Cursor disabled because it needs agpgart memory.\n");
@@ -2103,11 +2041,6 @@ i830_stop_ring(ScrnInfoPtr pScrn, Bool flush)
 
    DPRINTF(PFX, "ResetState: flush is %s\n", BOOLTOSTRING(flush));
 
-   if (!I830IsPrimary(pScrn)) return;
-
-   if (pI830->entityPrivate)
-      pI830->entityPrivate->RingRunning = 0;
-
    /* Flush the ring buffer (if enabled), then disable it. */
    if (pI830->accel != ACCEL_NONE) {
       temp = INREG(LP_RING + RING_LEN);
@@ -2134,31 +2067,26 @@ i830_start_ring(ScrnInfoPtr pScrn)
    if (pI830->accel == ACCEL_NONE)
       return;
 
-   if (!I830IsPrimary(pScrn)) return;
-
-   if (pI830->entityPrivate)
-      pI830->entityPrivate->RingRunning = 1;
-
    OUTREG(LP_RING + RING_LEN, 0);
    OUTREG(LP_RING + RING_TAIL, 0);
    OUTREG(LP_RING + RING_HEAD, 0);
 
-   assert((pI830->LpRing->mem->offset & I830_RING_START_MASK) ==
-	   pI830->LpRing->mem->offset);
+   assert((pI830->ring.mem->offset & I830_RING_START_MASK) ==
+	   pI830->ring.mem->offset);
 
    /* Don't care about the old value.  Reserved bits must be zero anyway. */
-   itemp = pI830->LpRing->mem->offset;
+   itemp = pI830->ring.mem->offset;
    OUTREG(LP_RING + RING_START, itemp);
 
-   if (((pI830->LpRing->mem->size - 4096) & I830_RING_NR_PAGES) !=
-       pI830->LpRing->mem->size - 4096) {
+   if (((pI830->ring.mem->size - 4096) & I830_RING_NR_PAGES) !=
+       pI830->ring.mem->size - 4096) {
       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		 "I830SetRingRegs: Ring buffer size - 4096 (%lx) violates its "
-		 "mask (%x)\n", pI830->LpRing->mem->size - 4096,
+		 "mask (%x)\n", pI830->ring.mem->size - 4096,
 		 I830_RING_NR_PAGES);
    }
    /* Don't care about the old value.  Reserved bits must be zero anyway. */
-   itemp = (pI830->LpRing->mem->size - 4096) & I830_RING_NR_PAGES;
+   itemp = (pI830->ring.mem->size - 4096) & I830_RING_NR_PAGES;
    itemp |= (RING_NO_REPORT | RING_VALID);
    OUTREG(LP_RING + RING_LEN, itemp);
    i830_refresh_ring(pScrn);
@@ -2172,14 +2100,14 @@ i830_refresh_ring(ScrnInfoPtr pScrn)
    /* If we're reaching RefreshRing as a result of grabbing the DRI lock
     * before we've set up the ringbuffer, don't bother.
     */
-   if (pI830->LpRing->mem == NULL)
+   if (pI830->ring.mem == NULL)
        return;
 
-   pI830->LpRing->head = INREG(LP_RING + RING_HEAD) & I830_HEAD_MASK;
-   pI830->LpRing->tail = INREG(LP_RING + RING_TAIL);
-   pI830->LpRing->space = pI830->LpRing->head - (pI830->LpRing->tail + 8);
-   if (pI830->LpRing->space < 0)
-      pI830->LpRing->space += pI830->LpRing->mem->size;
+   pI830->ring.head = INREG(LP_RING + RING_HEAD) & I830_HEAD_MASK;
+   pI830->ring.tail = INREG(LP_RING + RING_TAIL);
+   pI830->ring.space = pI830->ring.head - (pI830->ring.tail + 8);
+   if (pI830->ring.space < 0)
+      pI830->ring.space += pI830->ring.mem->size;
    i830MarkSync(pScrn);
 }
 
@@ -2695,7 +2623,7 @@ IntelEmitInvarientState(ScrnInfoPtr pScrn)
    /* If we've emitted our state since the last clobber by another client,
     * skip it.
     */
-   if (*pI830->last_3d != LAST_3D_OTHER)
+   if (pI830->last_3d != LAST_3D_OTHER)
       return;
 
    if (!IS_I965G(pI830))
@@ -3051,7 +2979,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    vgaHWPtr hwp = NULL;
    I830Ptr pI830;
    VisualPtr visual;
-   I830Ptr pI8301 = NULL;
    MessageType from;
 
    pScrn = xf86Screens[pScreen->myNum];
@@ -3169,31 +3096,8 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Tiling %sabled\n", pI830->tiling ?
 	      "en" : "dis");
 
-   if (I830IsPrimary(pScrn)) {
-      /* Alloc our pointers for the primary head */
-      if (!pI830->LpRing)
-         pI830->LpRing = xcalloc(1, sizeof(I830RingBuffer));
-      if (!pI830->overlayOn)
-         pI830->overlayOn = xalloc(sizeof(Bool));
-      if (!pI830->last_3d)
-         pI830->last_3d = xalloc(sizeof(enum last_3d));
-      if (!pI830->LpRing || !pI830->overlayOn || !pI830->last_3d) {
-         xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-		 "Could not allocate primary data structures.\n");
-         return FALSE;
-      }
-      *pI830->last_3d = LAST_3D_OTHER;
-      *pI830->overlayOn = FALSE;
-      if (pI830->entityPrivate)
-         pI830->entityPrivate->XvInUse = -1;
-   } else {
-      /* Make our second head point to the first heads structures */
-      pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
-      pI830->LpRing = pI8301->LpRing;
-      pI830->overlay_regs = pI8301->overlay_regs;
-      pI830->overlayOn = pI8301->overlayOn;
-      pI830->last_3d = pI8301->last_3d;
-   }
+   pI830->last_3d = LAST_3D_OTHER;
+   pI830->overlayOn = FALSE;
 
 #ifdef I830_XV
     /*
@@ -3231,12 +3135,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 #ifdef I830_XV
    pI830->XvEnabled = !pI830->XvDisabled;
    if (pI830->XvEnabled) {
-      if (!I830IsPrimary(pScrn)) {
-         if (!pI8301->XvEnabled || pI830->accel == ACCEL_NONE) {
-            pI830->XvEnabled = FALSE;
-	    xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Xv is disabled.\n");
-         }
-      } else
       if (pI830->accel == ACCEL_NONE || pI830->StolenOnly) {
 	 xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Xv is disabled because it "
 		    "needs 2D accel and AGPGART.\n");
@@ -3248,7 +3146,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 #endif
 
    if (pI830->accel != ACCEL_NONE && !pI830->use_drm_mode) {
-      if (pI830->memory_manager == NULL && pI830->LpRing->mem->size == 0) {
+      if (pI830->memory_manager == NULL && pI830->ring.mem->size == 0) {
 	  xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 		     "Disabling acceleration because the ring buffer "
 		      "allocation failed.\n");
@@ -3281,7 +3179,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     * InitGLXVisuals call back.
     */
    if (pI830->directRenderingType == DRI_XF86DRI) {
-      if (pI830->accel == ACCEL_NONE || pI830->SWCursor || (pI830->StolenOnly && I830IsPrimary(pScrn))) {
+      if (pI830->accel == ACCEL_NONE || pI830->SWCursor || pI830->StolenOnly) {
 	 xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "DRI is disabled because it "
 		    "needs HW cursor, 2D accel and AGPGART.\n");
 	 pI830->directRenderingType = DRI_NONE;
@@ -3301,11 +3199,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
        I830SwapPipes(pScrn);
 #endif
 
-   if (I830IsPrimary(pScrn)) {
-        pScrn->fbOffset = pI830->front_buffer->offset;
-   } else {
-       pScrn->fbOffset = pI8301->front_buffer_2->offset;
-   }
+   pScrn->fbOffset = pI830->front_buffer->offset;
 
    pI830->xoffset = (pScrn->fbOffset / pI830->cpp) % pScrn->displayWidth;
    pI830->yoffset = (pScrn->fbOffset / pI830->cpp) / pScrn->displayWidth;
@@ -3321,16 +3215,9 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    DPRINTF(PFX, "assert( if(!I830EnterVT(scrnIndex, 0)) )\n");
 
    if (pI830->accel <= ACCEL_XAA) {
-      if (I830IsPrimary(pScrn)) {
-	 if (!I830InitFBManager(pScreen, &(pI830->FbMemBox))) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-		       "Failed to init memory manager\n");
-	 }
-      } else {
-	 if (!I830InitFBManager(pScreen, &(pI8301->FbMemBox2))) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-		       "Failed to init memory manager\n");
-	 }
+      if (!I830InitFBManager(pScreen, &(pI830->FbMemBox))) {
+	 xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		    "Failed to init memory manager\n");
       }
    }
 
@@ -3550,13 +3437,6 @@ I830LeaveVT(int scrnIndex, int flags)
 
    i830SetHotkeyControl(pScrn, HOTKEY_BIOS_SWITCH);
 
-   if (!I830IsPrimary(pScrn)) {
-   	I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
-	if (!pI8301->gtt_acquired) {
-		return;
-	}
-   }
-
 #ifdef XF86DRI
    if (pI830->directRenderingOpen &&
        pI830->directRenderingType == DRI_XF86DRI) {
@@ -3607,8 +3487,7 @@ I830LeaveVT(int scrnIndex, int flags)
 
    intel_batch_teardown(pScrn);
 
-   if (I830IsPrimary(pScrn))
-      i830_unbind_all_memory(pScrn);
+   i830_unbind_all_memory(pScrn);
 
 #ifdef XF86DRI
    if (pI830->memory_manager && !pI830->use_drm_mode) {
@@ -3684,9 +3563,8 @@ I830EnterVT(int scrnIndex, int flags)
    }
 #endif /* XF86DRI */
 
-   if (I830IsPrimary(pScrn))
-      if (!i830_bind_all_memory(pScrn))
-         return FALSE;
+   if (!i830_bind_all_memory(pScrn))
+      return FALSE;
 
    i830_describe_allocations(pScrn, 1, "");
 
@@ -3793,7 +3671,7 @@ I830EnterVT(int scrnIndex, int flags)
    i830SetHotkeyControl(pScrn, HOTKEY_DRIVER_NOTIFY);
 
    /* Mark 3D state as being clobbered and setup the basics */
-   *pI830->last_3d = LAST_3D_OTHER;
+   pI830->last_3d = LAST_3D_OTHER;
    IntelEmitInvarientState(pScrn);
 
    return TRUE;
@@ -3885,16 +3763,7 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
    }
 #endif
 
-   if (I830IsPrimary(pScrn)) {
-      xf86GARTCloseScreen(scrnIndex);
-
-      xfree(pI830->LpRing);
-      pI830->LpRing = NULL;
-      xfree(pI830->overlayOn);
-      pI830->overlayOn = NULL;
-      xfree(pI830->last_3d);
-      pI830->last_3d = NULL;
-   }
+   xf86GARTCloseScreen(scrnIndex);
 
    pScrn->PointerMoved = pI830->PointerMoved;
    pScrn->vtSema = FALSE;
@@ -3972,9 +3841,6 @@ I830PMEvent(int scrnIndex, pmEvent event, Bool undo)
       break;
    /* This is currently used for ACPI */
    case XF86_APM_CAPABILITY_CHANGED:
-      if (!I830IsPrimary(pScrn))
-         return TRUE;
-
       ErrorF("I830PMEvent: Capability change\n");
 
       SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset);
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 62765d6..96f4008 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -377,9 +377,7 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
 	pI830->cursor_mem_argb[p] = NULL;
     }
     pI830->front_buffer = NULL;
-    pI830->front_buffer_2 = NULL;
     pI830->xaa_scratch = NULL;
-    pI830->xaa_scratch_2 = NULL;
     pI830->exa_offscreen = NULL;
     pI830->overlay_regs = NULL;
     pI830->power_context = NULL;
@@ -388,7 +386,7 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
     pI830->depth_buffer = NULL;
     pI830->textures = NULL;
 #endif
-    pI830->LpRing->mem = NULL;
+    pI830->ring.mem = NULL;
     pI830->fake_bufmgr_mem = NULL;
 }
 
@@ -1054,23 +1052,23 @@ i830_allocate_ringbuffer(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
 
-    if (pI830->accel == ACCEL_NONE || pI830->memory_manager || pI830->LpRing->mem != NULL)
+    if (pI830->accel == ACCEL_NONE || pI830->memory_manager || pI830->ring.mem != NULL)
 	return TRUE;
 
     /* We don't have any mechanism in the DRM yet to alert it that we've moved
      * the ringbuffer since init time, so allocate it fixed for its lifetime.
      */
-    pI830->LpRing->mem = i830_allocate_memory(pScrn, "ring buffer",
-					      PRIMARY_RINGBUFFER_SIZE, PITCH_NONE,
-					      GTT_PAGE_SIZE,
-					      NEED_LIFETIME_FIXED, TILE_NONE);
-    if (pI830->LpRing->mem == NULL) {
+    pI830->ring.mem = i830_allocate_memory(pScrn, "ring buffer",
+					   PRIMARY_RINGBUFFER_SIZE, PITCH_NONE,
+					   GTT_PAGE_SIZE,
+					   NEED_LIFETIME_FIXED, TILE_NONE);
+    if (pI830->ring.mem == NULL) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		   "Failed to allocate Ring Buffer space\n");
 	return FALSE;
     }
 
-    pI830->LpRing->tail_mask = pI830->LpRing->mem->size - 1;
+    pI830->ring.tail_mask = pI830->ring.mem->size - 1;
     return TRUE;
 }
 
@@ -1473,20 +1471,10 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
     /* Allocate overlay register space and optional XAA linear allocator
      * space.  The second head in zaphod mode will share the space.
      */
-    if (I830IsPrimary(pScrn) && !pI830->use_drm_mode)
+    if (!pI830->use_drm_mode)
 	i830_allocate_overlay(pScrn);
 #endif
 
-    if (pI830->entityPrivate && pI830->entityPrivate->pScrn_2) {
-	I830EntPtr pI830Ent = pI830->entityPrivate;
-	I830Ptr pI8302 = I830PTR(pI830Ent->pScrn_2);
-
-	pI830->front_buffer_2 =
-	    i830_allocate_framebuffer(pI830Ent->pScrn_2, pI8302,
-				      &pI830->FbMemBox2, TRUE);
-	if (pI830->front_buffer_2 == NULL)
-	    return FALSE;
-    }
     pI830->front_buffer =
 	i830_allocate_framebuffer(pScrn, pI830, &pI830->FbMemBox, FALSE);
     if (pI830->front_buffer == NULL)
@@ -1543,30 +1531,6 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 		return FALSE;
 	    }
 	}
-
-	/* Let's allocate another scratch buffer for the second head */
-	/* Again, this code won't execute on the dry run pass */
-	if (pI830->entityPrivate && pI830->entityPrivate->pScrn_2)
-	{
-	    pI830->xaa_scratch_2 =
-		i830_allocate_memory(pScrn, "xaa scratch 2",
-				     MAX_SCRATCH_BUFFER_SIZE, PITCH_NONE,
-				     GTT_PAGE_SIZE, NEED_LIFETIME_FIXED,
-				     TILE_NONE);
-	    if (pI830->xaa_scratch_2 == NULL) {
-		pI830->xaa_scratch_2 =
-		    i830_allocate_memory(pScrn, "xaa scratch 2",
-					 MIN_SCRATCH_BUFFER_SIZE, PITCH_NONE,
-					 GTT_PAGE_SIZE, NEED_LIFETIME_FIXED,
-					 TILE_NONE);
-		if (pI830->xaa_scratch_2 == NULL) {
-		    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-			       "Failed to allocate secondary scratch "
-			       "buffer space\n");
-		    return FALSE;
-		}
-	    }
-	}
     }
 
     return TRUE;
diff --git a/src/i830_render.c b/src/i830_render.c
index d3b0f7c..5696fa3 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -404,7 +404,7 @@ i830_prepare_composite(int op, PicturePtr pSrcPicture,
     i830_exa_check_pitch_3d(pDst);
 
     IntelEmitInvarientState(pScrn);
-    *pI830->last_3d = LAST_3D_RENDER;
+    pI830->last_3d = LAST_3D_RENDER;
 
     if (!i830_get_dest_format(pDstPicture, &dst_format))
 	return FALSE;
diff --git a/src/i830_ring.h b/src/i830_ring.h
index c296d41..062b7ea 100644
--- a/src/i830_ring.h
+++ b/src/i830_ring.h
@@ -34,12 +34,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     if (I810_DEBUG & DEBUG_VERBOSE_RING)				\
 	ErrorF("OUT_RING 0x%08x: 0x%08x, (mask %x)\n",			\
 	       pI830->ring_next, (unsigned int)(n),			\
-	       pI830->LpRing->tail_mask);				\
-    *(volatile uint32_t *)(pI830->LpRing->virtual_start +		\
+	       pI830->ring.tail_mask);					\
+    *(volatile uint32_t *)(pI830->ring.virtual_start +			\
 			   pI830->ring_next) = n;			\
     pI830->ring_used += 4;						\
     pI830->ring_next += 4;						\
-    pI830->ring_next &= pI830->LpRing->tail_mask;			\
+    pI830->ring_next &= pI830->ring.tail_mask;				\
 } while (0)
 
 #define OUT_RING_F(x) do {			\
@@ -60,8 +60,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 	FatalError("%s: ADVANCE_LP_RING: under-used allocation %d/%d\n ", \
 		   __FUNCTION__, pI830->ring_used,			\
 		   pI830->ring_emitting);				\
-    pI830->LpRing->tail = pI830->ring_next;				\
-    pI830->LpRing->space -= pI830->ring_used;				\
+    pI830->ring.tail = pI830->ring_next;				\
+    pI830->ring.space -= pI830->ring_used;				\
     if (pI830->ring_next & 0x07)					\
 	FatalError("%s: ADVANCE_LP_RING: "				\
 		   "ring_next (0x%x) isn't on a QWord boundary\n",	\
@@ -80,9 +80,9 @@ do {									\
     pI830->ring_emitting = (n) * 4;					\
     if ((n) & 1)							\
 	pI830->ring_emitting += 4;					\
-    if (pI830->LpRing->space < pI830->ring_emitting)			\
+    if (pI830->ring.space < pI830->ring_emitting)			\
 	WaitRingFunc(pScrn, pI830->ring_emitting, 0);			\
-    pI830->ring_next = pI830->LpRing->tail;				\
+    pI830->ring_next = pI830->ring.tail;				\
     if (I810_DEBUG & DEBUG_VERBOSE_RING)				\
 	ErrorF( "BEGIN_LP_RING %d in %s\n", n, FUNCTION_NAME);		\
     pI830->ring_used = 0;						\
diff --git a/src/i830_video.c b/src/i830_video.c
index 0199747..b4f8890 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -448,7 +448,7 @@ i830_overlay_on(ScrnInfoPtr pScrn)
     I830PortPrivPtr	pPriv = pI830->adaptor->pPortPrivates[0].ptr;
     Bool		deactivate = FALSE;
     
-    if (*pI830->overlayOn)
+    if (pI830->overlayOn)
 	return;
 
     /*
@@ -482,7 +482,7 @@ i830_overlay_on(ScrnInfoPtr pScrn)
 	i830_pipe_a_require_deactivate (pScrn);
 
     OVERLAY_DEBUG("overlay_on\n");
-    *pI830->overlayOn = TRUE;
+    pI830->overlayOn = TRUE;
 
     overlay->OCMD |= OVERLAY_ENABLE;
 }
@@ -494,7 +494,7 @@ i830_overlay_continue(ScrnInfoPtr pScrn, Bool update_filter)
     uint32_t		flip_addr;
     I830OverlayRegPtr	overlay = I830OVERLAYREG(pI830);
 
-    if (!*pI830->overlayOn)
+    if (!pI830->overlayOn)
 	return;
 
     if (OVERLAY_NOPHYSICAL(pI830))
@@ -520,7 +520,7 @@ i830_overlay_off(ScrnInfoPtr pScrn)
     I830Ptr pI830 = I830PTR(pScrn);
     I830OverlayRegPtr	overlay = I830OVERLAYREG(pI830);
 
-    if (!*pI830->overlayOn)
+    if (!pI830->overlayOn)
 	return;
 
     /*
@@ -558,7 +558,7 @@ i830_overlay_off(ScrnInfoPtr pScrn)
 	ADVANCE_BATCH();
 	i830WaitSync(pScrn);
     }
-    *pI830->overlayOn = FALSE;
+    pI830->overlayOn = FALSE;
     OVERLAY_DEBUG("overlay_off\n");
 }
 
@@ -1068,7 +1068,6 @@ static void
 I830StopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
 {
     I830PortPrivPtr pPriv = (I830PortPrivPtr) data;
-    I830Ptr pI830 = I830PTR(pScrn);
 
     if (pPriv->textured)
 	return;
@@ -1080,8 +1079,6 @@ I830StopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
     if (shutdown) {
 	if (pPriv->videoStatus & CLIENT_VIDEO_ON) {
 	    i830_overlay_off(pScrn);
-	    if (pI830->entityPrivate)
-		pI830->entityPrivate->XvInUse = -1;
 	}
 	if (!pPriv->textured)
 	    drm_intel_bo_unpin(pPriv->buf);
@@ -1197,7 +1194,7 @@ I830SetPortAttribute(ScrnInfoPtr pScrn,
 	if ((value < 0) || (value > 1))
 	    return BadValue;
 	/* Do not allow buffer change while playing video */
-	if(!*pI830->overlayOn)
+	if(!pI830->overlayOn)
 	    pPriv->doubleBuffer = value;
     } else
 	return BadMatch;
@@ -2277,22 +2274,6 @@ I830PutImage(ScrnInfoPtr pScrn,
 	   drw_w, drw_h, width, height);
 #endif
 
-    if (pI830->entityPrivate) {
-	if (pI830->entityPrivate->XvInUse != -1 &&
-	    pI830->entityPrivate->XvInUse != i830_crtc_pipe (pPriv->current_crtc)) {
-#ifdef PANORAMIX
-	    if (!noPanoramiXExtension) {
-		return Success; /* faked for trying to share it */
-	    } else
-#endif
-	    {
-		return BadAlloc;
-	    }
-	}
-
-	pI830->entityPrivate->XvInUse = i830_crtc_pipe (pPriv->current_crtc);;
-    }
-
     if (!pPriv->textured) {
         /* If dst width and height are less than 1/8th the src size, the
          * src/dst scale factor becomes larger than 8 and doesn't fit in
@@ -2485,7 +2466,7 @@ I830PutImage(ScrnInfoPtr pScrn,
 #endif
 
     /* Pick the idle buffer */
-    if (!pPriv->textured && *pI830->overlayOn && pPriv->doubleBuffer)
+    if (!pPriv->textured && pI830->overlayOn && pPriv->doubleBuffer)
 	pPriv->currentBuf = !((INREG(DOVSTA) & OC_BUF) >> 20);
 
     /* copy data */
@@ -2761,9 +2742,6 @@ I830VideoBlockHandler(int i, pointer blockData, pointer pTimeout,
 
 		pPriv->videoStatus = FREE_TIMER;
 		pPriv->freeTime = now + FREE_DELAY;
-
-		if (pI830->entityPrivate)
-		    pI830->entityPrivate->XvInUse = -1;
 	    }
 	} else {				/* FREE_TIMER */
 	    if (pPriv->freeTime < now) {
@@ -2847,15 +2825,10 @@ I830StopSurface(XF86SurfacePtr surface)
     ScrnInfoPtr pScrn = surface->pScrn;
 
     if (pPriv->isOn) {
-	I830Ptr pI830 = I830PTR(pScrn);
-
 	OVERLAY_DEBUG("StopSurface\n");
 
 	i830_overlay_off (pScrn);
 
-	if (pI830->entityPrivate)
-	    pI830->entityPrivate->XvInUse = -1;
-
 	pPriv->isOn = FALSE;
     }
 
@@ -2903,22 +2876,6 @@ I830DisplaySurface(XF86SurfacePtr surface,
 
     OVERLAY_DEBUG("I830DisplaySurface\n");
 
-    if (pI830->entityPrivate) {
-	if (pI830->entityPrivate->XvInUse != -1 &&
-	    pI830->entityPrivate->XvInUse != i830_crtc_pipe (pI830Priv->current_crtc)) {
-#ifdef PANORAMIX
-	    if (!noPanoramiXExtension) {
-		return Success; /* faked for trying to share it */
-	    } else
-#endif
-	    {
-		return BadAlloc;
-	    }
-	}
-
-	pI830->entityPrivate->XvInUse = i830_crtc_pipe (pI830Priv->current_crtc);
-    }
-
     x1 = src_x;
     x2 = src_x + src_w;
     y1 = src_y;
@@ -2939,7 +2896,7 @@ I830DisplaySurface(XF86SurfacePtr surface,
     pI830Priv->YBuf1offset = pI830Priv->YBuf0offset;
 
     /* Pick the idle buffer */
-    if (!pI830Priv->textured && *pI830->overlayOn && pI830Priv->doubleBuffer) 
+    if (!pI830Priv->textured && pI830->overlayOn && pI830Priv->doubleBuffer)
 	pI830Priv->currentBuf = !((INREG(DOVSTA) & OC_BUF) >> 20);
 
     i830_display_video(pScrn, crtc, surface->id, surface->width, surface->height,
diff --git a/src/i830_xaa.c b/src/i830_xaa.c
index 7684978..1f82840 100644
--- a/src/i830_xaa.c
+++ b/src/i830_xaa.c
@@ -91,7 +91,6 @@ static void I830SubsequentScanlineImageWriteRect(ScrnInfoPtr pScrn,
 						 int skipleft);
 static void I830SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno);
 #endif
-static void I830RestoreAccelState(ScrnInfoPtr pScrn);
 
 void
 i830_xaa_composite(CARD8	op,
@@ -160,23 +159,10 @@ I830XAAInit(ScreenPtr pScreen)
 
     }
 
-    /* On the primary screen */
-    if (pI830->init == 0) {
-	if (pI830->xaa_scratch->size != 0) {
-	    width = ((pScrn->displayWidth + 31) & ~31) / 8;
-	    nr_buffers = pI830->xaa_scratch->size / width;
-	    ptr = pI830->FbBase + pI830->xaa_scratch->offset;
-	}
-    } else {
-	/* On the secondary screen */
-	I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
-	if (pI8301->xaa_scratch_2->size != 0) {
-	    width = ((pScrn->displayWidth + 31) & ~31) / 8;
-	    nr_buffers = pI8301->xaa_scratch_2->size / width;
-	    /* We have to use the primary screen's FbBase, as that's where
-	     * we allocated xaa_scratch_2, so we get the correct pointer */
-	    ptr = pI8301->FbBase + pI8301->xaa_scratch_2->offset;
-	}
+    if (pI830->xaa_scratch->size != 0) {
+	width = ((pScrn->displayWidth + 31) & ~31) / 8;
+	nr_buffers = pI830->xaa_scratch->size / width;
+	ptr = pI830->FbBase + pI830->xaa_scratch->offset;
     }
 
     if (nr_buffers) {
@@ -223,17 +209,6 @@ I830XAAInit(ScreenPtr pScreen)
 #endif
     }
 
-    {
-	Bool shared_accel = FALSE;
-
-	for(i = 0; i < pScrn->numEntities; i++) {
-	    if(xf86IsEntityShared(pScrn->entityList[i]))
-		shared_accel = TRUE;
-	}
-	if(shared_accel == TRUE)
-	    infoPtr->RestoreAccelState = I830RestoreAccelState;
-    }
-
     /* Set up pI830->bufferOffset */
     I830SelectBuffer(pScrn, I830_SELECT_FRONT);
 
@@ -607,17 +582,8 @@ I830SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno)
     I830Ptr pI830 = I830PTR(pScrn);
     unsigned int tiled = I830CheckTiling(pScrn);
 
-    if (pI830->init == 0) {
-	pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
-			 pI830->FbBase);
-    } else {
-	I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
-
-	/* We have to use the primary screen's FbBase, as that's where
-	 * we allocated xaa_scratch_2, so we get the correct pointer */
-	pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
-			 pI8301->FbBase);
-    }
+    pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
+		     pI830->FbBase);
 
     if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
 	ErrorF("I830SubsequentColorExpandScanline %d (addr %x)\n",
@@ -707,17 +673,8 @@ I830SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno)
     I830Ptr pI830 = I830PTR(pScrn);
     unsigned int tiled = I830CheckTiling(pScrn);
 
-    if (pI830->init == 0) {
-	pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
-			 pI830->FbBase);
-    } else {
-	I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
-
-	/* We have to use the primary screen's FbBase, as that's where
-	 * we allocated xaa_scratch_2, so we get the correct pointer */
-	pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
-			 pI8301->FbBase);
-    }
+    pI830->BR[12] = (pI830->AccelInfoRec->ScanlineColorExpandBuffers[0] -
+		     pI830->FbBase);
 
     if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
 	ErrorF("I830SubsequentImageWriteScanline %d (addr %x)\n",
@@ -870,13 +827,3 @@ fallback:
     pI830->saved_composite = ps->Composite;
     ps->Composite = i830_xaa_composite;
 }
-
-static void
-I830RestoreAccelState(ScrnInfoPtr pScrn)
-{
-#if 0
-   /* might be needed, but everything is on a ring, so I don't think so */
-   I830Sync(pScrn);
-#endif
-}
-
diff --git a/src/i915_render.c b/src/i915_render.c
index 4190808..268dd8a 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -383,7 +383,7 @@ i915_emit_composite_setup(ScrnInfoPtr pScrn)
     pI830->i915_render_state.needs_emit = FALSE;
 
     IntelEmitInvarientState(pScrn);
-    *pI830->last_3d = LAST_3D_RENDER;
+    pI830->last_3d = LAST_3D_RENDER;
 
     dst_pitch = intel_get_pixmap_pitch(pDst);
 
diff --git a/src/i915_video.c b/src/i915_video.c
index 81a0f87..93e0c86 100644
--- a/src/i915_video.c
+++ b/src/i915_video.c
@@ -76,7 +76,7 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
    intel_batch_start_atomic(pScrn, 200 + 20 * nbox);
 
    IntelEmitInvarientState(pScrn);
-   *pI830->last_3d = LAST_3D_VIDEO;
+   pI830->last_3d = LAST_3D_VIDEO;
 
    BEGIN_BATCH(20);
 
diff --git a/src/i965_render.c b/src/i965_render.c
index ab7f7d2..c123a36 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1012,7 +1012,7 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
     render_state->needs_state_emit = FALSE;
 
     IntelEmitInvarientState(pScrn);
-    *pI830->last_3d = LAST_3D_RENDER;
+    pI830->last_3d = LAST_3D_RENDER;
 
     urb_vs_start = 0;
     urb_vs_size = URB_VS_ENTRIES * URB_VS_ENTRY_SIZE;
diff --git a/src/i965_video.c b/src/i965_video.c
index 0fc9c42..f6020d4 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -718,7 +718,7 @@ i965_emit_video_setup(ScrnInfoPtr pScrn, drm_intel_bo *bind_bo, int n_src_surf)
     int urb_cs_start, urb_cs_size;
 
     IntelEmitInvarientState(pScrn);
-    *pI830->last_3d = LAST_3D_VIDEO;
+    pI830->last_3d = LAST_3D_VIDEO;
 
     urb_vs_start = 0;
     urb_vs_size = URB_VS_ENTRIES * URB_VS_ENTRY_SIZE;
commit e9d6bbbe0b41e29c58a79844decd81771da85dd4
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Mar 3 16:45:03 2009 -0800

    remove more page flipping leftovers.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index f80ca69..5504025 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -305,7 +305,6 @@ typedef enum {
    OPTION_SW_CURSOR,
    OPTION_CACHE_LINES,
    OPTION_DRI,
-   OPTION_PAGEFLIP,
    OPTION_XVIDEO,
    OPTION_VIDEO_KEY,
    OPTION_COLOR_KEY,
@@ -316,7 +315,6 @@ typedef enum {
    OPTION_TILING,
    OPTION_LEGACY3D,
    OPTION_LVDSFIXEDMODE,
-   OPTION_TRIPLEBUFFER,
    OPTION_FORCEENABLEPIPEA,
 #ifdef INTEL_XVMC
    OPTION_XVMC,
@@ -2877,7 +2875,7 @@ i830_memory_init(ScrnInfoPtr pScrn)
 	}
     }
 
-    /* If tiling fails we have to disable page flipping & FBC */
+    /* If tiling fails we have to disable FBC */
     pScrn->displayWidth = savedDisplayWidth;
     if (pI830->fb_compression)
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
commit 1cc9b1423c5df591c615ef9588b6eefd81448f80
Author: Lukáš Hejtmánek <xhejtman at ics.muni.cz>
Date:   Fri Mar 6 14:44:03 2009 -0500

    Fix another VT switch leak
    
    The batch_bo buffer object is reallocated on enter VT, so we need to
    unref it on leave vt.
    
    Signed-off-by: Lukas Hejtmanek <xhejtman at ics.muni.cz>

diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index 671e8c8..33da43e 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -159,6 +159,7 @@ intel_batch_teardown(ScrnInfoPtr pScrn)
 
     if (pI830->batch_ptr != NULL) {
 	dri_bo_unmap(pI830->batch_bo);
+	dri_bo_unreference(pI830->batch_bo);
 	pI830->batch_ptr = NULL;
     }
 }
commit 67fef27f4b76490be085d232aba0ca9cbb3c5e59
Author: Xiang, Haihao <haihao.xiang at intel.com>
Date:   Fri Mar 6 09:40:07 2009 +0800

    Xv: free tearing on textured video
    
    Add an Xv attribute XV_SYNC_TO_VBLANK which has three values -1(auto), 0(off)
    and 1(on) to control whether textured adapter synchronizes the screen
    update to the vblank. The default value is -1(auto).

diff --git a/man/intel.man b/man/intel.man
index e38cc54..01f1505 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -438,6 +438,21 @@ builtin laptop screen, both running at 1024x768.
 .BI "  Option \*qmonitor-VGA\*q \*qSome Random CRT\*q"
 .B "EndSection"
 
+.SH TEXTURED VIDEO ATTRIBUTES
+The driver supports the following X11 Xv attributes for Textured Video.
+You can use the "xvattr" tool to query/set those attributes at runtime.
+
+.SS "XV_SYNC_TO_VBLANK"
+XV_SYNC_TO_VBLANK is used to control whether textured adapter synchronizes 
+the screen update to the vblank to eliminate tearing. It has three 
+values 'auto'(-1), 'off'(0) and 'auto'(1). 'off' means never sync, 'on' means 
+always sync, no matter what size, and 'auto' means sync if the Xv image is 
+more than quarter of the pixels on the screen. The default is 'auto'(-1).
+
+.SS "XV_BRIGHTNESS"
+        
+.SS "XV_CONTRAST"
+        
 .SH REPORTING BUGS
 
 The xf86-video-intel driver is part of the X.Org and Freedesktop.org
diff --git a/src/i810_reg.h b/src/i810_reg.h
index 51970c1..3114b42 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -2436,7 +2436,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 /* Wait for Events */
 #define MI_WAIT_FOR_EVENT		(0x03<<23)
+#define MI_WAIT_FOR_PIPEB_SVBLANK	(1<<18)
+#define MI_WAIT_FOR_PIPEA_SVBLANK	(1<<17)
 #define MI_WAIT_FOR_OVERLAY_FLIP	(1<<16)
+#define MI_WAIT_FOR_PIPEB_VBLANK	(1<<7)
+#define MI_WAIT_FOR_PIPEA_VBLANK	(1<<3)
 
 /* Flush */
 #define MI_FLUSH			(0x04<<23)
diff --git a/src/i830_video.c b/src/i830_video.c
index cdb1072..0199747 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -117,6 +117,7 @@ static int I830QueryImageAttributesTextured(ScrnInfoPtr, int, unsigned short *,
 
 static Atom xvBrightness, xvContrast, xvSaturation, xvColorKey, xvPipe, xvDoubleBuffer;
 static Atom xvGamma0, xvGamma1, xvGamma2, xvGamma3, xvGamma4, xvGamma5;
+static Atom xvSyncToVblank;
 
 /* Limits for the overlay/textured video source sizes.  The documented hardware
  * limits are 2048x2048 or better for overlay and both of our textured video
@@ -247,10 +248,11 @@ static XF86AttributeRec Attributes[NUM_ATTRIBUTES] = {
     {XvSettable | XvGettable, 0, 1, "XV_DOUBLE_BUFFER"}
 };
 
-#define NUM_TEXTURED_ATTRIBUTES 2
-static XF86AttributeRec TexturedAttributes[NUM_ATTRIBUTES] = {
+#define NUM_TEXTURED_ATTRIBUTES 3
+static XF86AttributeRec TexturedAttributes[NUM_TEXTURED_ATTRIBUTES] = {
     {XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"},
     {XvSettable | XvGettable, 0, 255, "XV_CONTRAST"},
+    {XvSettable | XvGettable, -1, 1, "XV_SYNC_TO_VBLANK"},
 };
 
 #define GAMMA_ATTRIBUTES 6
@@ -1021,6 +1023,7 @@ I830SetupImageVideoTextured(ScreenPtr pScreen)
 	pPriv->doubleBuffer = 0;
 
 	pPriv->rotation = RR_Rotate_0;
+	pPriv->SyncToVblank = -1;
 
 	/* gotta uninit this someplace, XXX: shouldn't be necessary for textured */
 	REGION_NULL(pScreen, &pPriv->clip);
@@ -1028,6 +1031,8 @@ I830SetupImageVideoTextured(ScreenPtr pScreen)
 	adapt->pPortPrivates[i].ptr = (pointer) (pPriv);
     }
 
+    xvSyncToVblank = MAKE_ATOM("XV_SYNC_TO_VBLANK");
+
     return adapt;
 }
 
@@ -1108,6 +1113,12 @@ I830SetPortAttributeTextured(ScrnInfoPtr pScrn,
 	    return BadValue;
 	pPriv->contrast = value;
 	return Success;
+    } else if (attribute == xvSyncToVblank) {
+        if ((value < -1) || (value > 1))
+            return BadValue;
+        
+        pPriv->SyncToVblank = value;
+        return Success;
     } else {
 	return BadMatch;
     }
@@ -1243,7 +1254,9 @@ I830GetPortAttribute(ScrnInfoPtr pScrn,
 	*value = pPriv->colorKey;
     } else if (attribute == xvDoubleBuffer) {
 	*value = pPriv->doubleBuffer;
-    } else 
+    } else if (attribute == xvSyncToVblank) {
+        *value = pPriv->SyncToVblank;
+    } else
 	return BadMatch;
 
     return Success;
@@ -2139,6 +2152,7 @@ i830_display_video(ScrnInfoPtr pScrn, xf86CrtcPtr crtc,
 
 static Bool
 i830_clip_video_helper (ScrnInfoPtr pScrn,
+			I830PortPrivPtr pPriv,
 			xf86CrtcPtr *crtc_ret,
 			BoxPtr	    dst,
 			INT32	    *xa,
@@ -2160,7 +2174,6 @@ i830_clip_video_helper (ScrnInfoPtr pScrn,
     if (crtc_ret)
     {
 	I830Ptr		pI830 = I830PTR(pScrn);
-	I830PortPrivPtr pPriv = pI830->adaptor->pPortPrivates[0].ptr;
 	BoxRec		crtc_box;
 	xf86CrtcPtr	crtc = i830_covering_crtc (pScrn, dst,
 						   pPriv->desired_crtc,
@@ -2303,7 +2316,8 @@ I830PutImage(ScrnInfoPtr pScrn,
     dstBox.y2 = drw_y + drw_h;
 
     if (!i830_clip_video_helper(pScrn, 
-				pPriv->textured ? NULL : &crtc,
+				pPriv,
+				&crtc,
 				&dstBox, &x1, &x2, &y1, &y2, clipBoxes,
 				width, height))
 	return Success;
@@ -2541,22 +2555,70 @@ I830PutImage(ScrnInfoPtr pScrn,
 	    REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes);
 	    i830_fill_colorkey (pScreen, pPriv->colorKey, clipBoxes);
 	}
-    } else if (IS_I965G(pI830)) {
+    } else {
+        Bool sync = TRUE;
+        
+        if (crtc == NULL) {
+            sync = FALSE;
+        } else if (pPriv->SyncToVblank == 0) {
+            sync = FALSE;
+        } else if (pPriv->SyncToVblank == -1) {
+            BoxRec crtc_box;
+            BoxPtr pbox;
+            int nbox, crtc_area, coverage = 0;
+
+            i830_crtc_box(crtc, &crtc_box);
+            crtc_area = i830_box_area(&crtc_box);
+            pbox = REGION_RECTS(clipBoxes);
+            nbox = REGION_NUM_RECTS(clipBoxes);
+            
+            while (nbox--) {
+                coverage += i830_box_area(pbox);
+                pbox++;
+            }
+
+            if ((coverage << 2) < crtc_area)
+                sync = FALSE;
+        }
+
+        if (sync) {
+            I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
+            int event;
+
+            if (IS_I965G(pI830)) {
+                if (intel_crtc->pipe == 0)
+                    event = MI_WAIT_FOR_PIPEA_SVBLANK;
+                else
+                    event = MI_WAIT_FOR_PIPEB_SVBLANK;
+            } else {
+                if (intel_crtc->pipe == 0)
+                    event = MI_WAIT_FOR_PIPEA_VBLANK;
+                else
+                    event = MI_WAIT_FOR_PIPEB_VBLANK;
+            }
+
+            BEGIN_BATCH(2);
+            OUT_BATCH(MI_WAIT_FOR_EVENT | event);
+            OUT_BATCH(MI_NOOP);
+            ADVANCE_BATCH();
+        }
 
+        if (IS_I965G(pI830)) {
 #ifdef INTEL_XVMC
-	if (id == FOURCC_XVMC && pPriv->rotation == RR_Rotate_0) {
-	    pPriv->YBuf0offset = buf -  pI830->FbBase;
-	    pPriv->UBuf0offset = pPriv->YBuf0offset + height*width; 
-	    pPriv->VBuf0offset = pPriv->UBuf0offset + height*width/4; 
-	}
+            if (id == FOURCC_XVMC && pPriv->rotation == RR_Rotate_0) {
+                pPriv->YBuf0offset = buf -  pI830->FbBase;
+                pPriv->UBuf0offset = pPriv->YBuf0offset + height*width; 
+                pPriv->VBuf0offset = pPriv->UBuf0offset + height*width/4; 
+            }
 #endif
-	I965DisplayVideoTextured(pScrn, pPriv, destId, clipBoxes, width, height,
-				 dstPitch, x1, y1, x2, y2,
-				 src_w, src_h, drw_w, drw_h, pPixmap);
-    } else {
-	I915DisplayVideoTextured(pScrn, pPriv, destId, clipBoxes, width, height,
-				 dstPitch, dstPitch2, x1, y1, x2, y2,
-				 src_w, src_h, drw_w, drw_h, pPixmap);
+            I965DisplayVideoTextured(pScrn, pPriv, destId, clipBoxes, width, height,
+                                     dstPitch, x1, y1, x2, y2,
+                                     src_w, src_h, drw_w, drw_h, pPixmap);
+        } else {
+            I915DisplayVideoTextured(pScrn, pPriv, destId, clipBoxes, width, height,
+                                     dstPitch, dstPitch2, x1, y1, x2, y2,
+                                     src_w, src_h, drw_w, drw_h, pPixmap);
+        }
     }
     if (pPriv->textured) {
 	DamageDamageRegion(pDraw, clipBoxes);
@@ -2867,7 +2929,7 @@ I830DisplaySurface(XF86SurfacePtr surface,
     dstBox.y1 = drw_y;
     dstBox.y2 = drw_y + drw_h;
 
-    if (!i830_clip_video_helper (pScrn, &crtc, &dstBox,
+    if (!i830_clip_video_helper (pScrn, pI830Priv, &crtc, &dstBox,
 				 &x1, &x2, &y1, &y2, clipBoxes,
 				 surface->width, surface->height))
 	return Success;
diff --git a/src/i830_video.h b/src/i830_video.h
index 254ee32..03e2ba9 100644
--- a/src/i830_video.h
+++ b/src/i830_video.h
@@ -65,6 +65,8 @@ typedef struct {
    int scaleRatio;
    Bool textured;
    Rotation rotation; /* should remove I830->rotation later*/
+
+   int SyncToVblank; /* -1: auto, 0: off, 1: on */
 } I830PortPrivRec, *I830PortPrivPtr;
 
 #define GET_PORT_PRIVATE(pScrn) \
commit 0d20bbbc2005a51f427a9ae6b6a66dbbb101dbab
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Thu Feb 19 14:24:24 2009 +0800

    SDVO: handle multifunction encoder (try 2)
    
    For SDVO encoder that advertise multiple functions,
    we have to get attached display to determine current
    output, and update output's name according with
    current type.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index efdd691..1f2578e 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -66,6 +66,14 @@ struct i830_sdvo_priv {
      */
     struct i830_sdvo_caps caps;
 
+    /**
+     * For multiple function SDVO device, this is for current attached outputs.
+     */
+    uint16_t attached_output;
+
+    /* Current output type name */
+    char *name;
+
     /** Pixel clock limitations reported by the SDVO device, in kHz */
     int pixel_clock_min, pixel_clock_max;
 
@@ -1516,6 +1524,135 @@ i830_sdvo_check_hdmi_encode (xf86OutputPtr output)
 	return FALSE;
 }
 
+static void i830_sdvo_select_ddc_bus(struct i830_sdvo_priv *dev_priv);
+
+static Bool
+i830_sdvo_output_setup (xf86OutputPtr output, uint16_t flag)
+{
+    I830OutputPrivatePtr  intel_output = output->driver_private;
+    struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
+    char                  *name_prefix;
+    char                  *name_suffix;
+
+    if (dev_priv->output_device == SDVOB)
+	name_suffix = "-1";
+    else
+	name_suffix = "-2";
+
+    if (flag & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
+    {
+	if (flag & SDVO_OUTPUT_TMDS0)
+	    dev_priv->controlled_output = SDVO_OUTPUT_TMDS0;
+	else
+	    dev_priv->controlled_output = SDVO_OUTPUT_TMDS1;
+	output->subpixel_order = SubPixelHorizontalRGB;
+	name_prefix="TMDS";
+
+	if (i830_sdvo_check_hdmi_encode (output))
+	    name_prefix = "HDMI";
+    }
+    else if (flag & SDVO_OUTPUT_SVID0)
+    {
+	dev_priv->controlled_output = SDVO_OUTPUT_SVID0;
+	output->subpixel_order = SubPixelHorizontalRGB; /* XXX */
+	name_prefix="TV";
+	dev_priv->is_tv = TRUE;
+	intel_output->needs_tv_clock = TRUE;
+    }
+    else if (flag & SDVO_OUTPUT_RGB0)
+    {
+	dev_priv->controlled_output = SDVO_OUTPUT_RGB0;
+	output->subpixel_order = SubPixelHorizontalRGB;
+	name_prefix="VGA";
+    }
+    else if (flag & SDVO_OUTPUT_RGB1)
+    {
+	dev_priv->controlled_output = SDVO_OUTPUT_RGB1;
+	output->subpixel_order = SubPixelHorizontalRGB;
+	name_prefix="VGA";
+    } else if (flag & SDVO_OUTPUT_LVDS0) {
+	dev_priv->controlled_output = SDVO_OUTPUT_LVDS0;
+	output->subpixel_order = SubPixelHorizontalRGB;
+	name_prefix="LVDS";
+    } else if (flag & SDVO_OUTPUT_LVDS1) {
+	dev_priv->controlled_output = SDVO_OUTPUT_LVDS1;
+	output->subpixel_order = SubPixelHorizontalRGB;
+	name_prefix="LVDS";
+    } else {
+	unsigned char	bytes[2];
+
+	dev_priv->controlled_output = 0;
+	memcpy (bytes, &flag, 2);
+	xf86DrvMsg(intel_output->pI2CBus->scrnIndex, X_WARNING,
+		   "%s: Unknown SDVO output type (0x%02x%02x)\n",
+		   SDVO_NAME(dev_priv),
+		   bytes[0], bytes[1]);
+	name_prefix="Unknown";
+    }
+
+    /* if exist origin name it will be freed in xf86OutputRename() */
+    dev_priv->name = xalloc(strlen(name_prefix) + strlen(name_suffix) + 1);
+    strcpy (dev_priv->name, name_prefix);
+    strcat (dev_priv->name, name_suffix);
+
+    if (!xf86OutputRename (output, dev_priv->name))
+    {
+	xf86DrvMsg(intel_output->pI2CBus->scrnIndex, X_WARNING,
+		"%s: Failed to rename output to %s\n",
+		SDVO_NAME(dev_priv), dev_priv->name);
+	xf86OutputDestroy (output);
+	return FALSE;
+    }
+
+    /* update randr_output's name */
+    if (output->randr_output) {
+	int nameLength = strlen(dev_priv->name);
+	RROutputPtr randr_output = output->randr_output;
+	char *name = xalloc(nameLength + 1);
+
+	if (name) {
+	    if (randr_output->name != (char *) (randr_output + 1))
+		xfree(randr_output->name);
+	    randr_output->name = name;
+	    randr_output->nameLength = nameLength;
+	    memcpy(randr_output->name, dev_priv->name, nameLength);
+	    randr_output->name[nameLength] = '\0';
+	} else
+	    xf86DrvMsg(intel_output->pI2CBus->scrnIndex, X_WARNING,
+		   "%s: Failed to update RandR output name to %s\n",
+		   SDVO_NAME(dev_priv), dev_priv->name);
+    }
+
+    i830_sdvo_select_ddc_bus(dev_priv);
+
+    return TRUE;
+}
+
+static Bool
+i830_sdvo_multifunc_encoder(xf86OutputPtr output)
+{
+    I830OutputPrivatePtr  intel_output = output->driver_private;
+    struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
+    int caps = 0;
+
+    if (dev_priv->caps.output_flags & (SDVO_OUTPUT_TMDS0 |
+		SDVO_OUTPUT_TMDS1))
+	caps++;
+    if (dev_priv->caps.output_flags & (SDVO_OUTPUT_RGB0 |
+		SDVO_OUTPUT_RGB1))
+	caps++;
+    if (dev_priv->caps.output_flags & (SDVO_OUTPUT_CVBS0 |
+		SDVO_OUTPUT_SVID0 | SDVO_OUTPUT_YPRPB0 |
+		SDVO_OUTPUT_SCART0 | SDVO_OUTPUT_CVBS1 |
+		SDVO_OUTPUT_SVID1 | SDVO_OUTPUT_YPRPB1 |
+		SDVO_OUTPUT_SCART1))
+	caps++;
+    if (dev_priv->caps.output_flags & (SDVO_OUTPUT_LVDS0 |
+		SDVO_OUTPUT_LVDS1))
+	caps++;
+    return (caps > 1);
+}
+
 /**
  * Asks the SDVO device if any displays are currently connected.
  *
@@ -1542,6 +1679,14 @@ i830_sdvo_detect(xf86OutputPtr output)
     if (response == 0)
 	return XF86OutputStatusDisconnected;
 
+    if (i830_sdvo_multifunc_encoder(output)) {
+	if (dev_priv->attached_output != response) {
+	    if (!i830_sdvo_output_setup(output, response))
+		return XF86OutputStatusUnknown;
+	    dev_priv->attached_output = response;
+	}
+    }
+
     if (response & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
     {
 	xf86MonPtr edid_mon;
@@ -1735,10 +1880,18 @@ i830_sdvo_destroy (xf86OutputPtr output)
     if (intel_output)
     {
 	struct i830_sdvo_priv	*dev_priv = intel_output->dev_priv;
-	
+
 	xf86DestroyI2CBusRec (intel_output->pDDCBus, FALSE, FALSE);
 	xf86DestroyI2CDevRec (&dev_priv->d, FALSE);
 	xf86DestroyI2CBusRec (dev_priv->d.pI2CBus, TRUE, TRUE);
+
+	if (output->randr_output) {
+	    RROutputPtr	randr_output = output->randr_output;
+	    if (randr_output->name &&
+		    randr_output->name != (char *) (randr_output + 1))
+		xfree(randr_output->name);
+	}
+
 	xfree (intel_output);
     }
 }
@@ -1838,9 +1991,6 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
     int			    i;
     unsigned char	    ch[0x40];
     I2CBusPtr		    i2cbus = NULL, ddcbus;
-    char		    name[60];
-    char		    *name_prefix;
-    char		    *name_suffix;
 
     output = xf86OutputCreate (pScrn, &i830_sdvo_output_funcs,NULL);
     if (!output)
@@ -1880,11 +2030,9 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
     if (output_device == SDVOB) {
 	dev_priv->d.DevName = "SDVO Controller B";
 	dev_priv->d.SlaveAddr = 0x70;
-	name_suffix="-1";
     } else {
 	dev_priv->d.DevName = "SDVO Controller C";
 	dev_priv->d.SlaveAddr = 0x72;
-	name_suffix="-2";
     }
     dev_priv->d.pI2CBus = i2cbus;
     dev_priv->d.DriverPrivate.ptr = output;
@@ -1945,70 +2093,17 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
     intel_output->pDDCBus = ddcbus;
     intel_output->dev_priv = dev_priv;
 
-    i830_sdvo_get_capabilities(output, &dev_priv->caps);
-
-    if (dev_priv->caps.output_flags & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
-    {
-	if (dev_priv->caps.output_flags & SDVO_OUTPUT_TMDS0)
-	    dev_priv->controlled_output = SDVO_OUTPUT_TMDS0;
-	else
-	    dev_priv->controlled_output = SDVO_OUTPUT_TMDS1;
-        output->subpixel_order = SubPixelHorizontalRGB;
-	name_prefix="TMDS";
-
-	if (i830_sdvo_check_hdmi_encode (output))
-	    name_prefix = "HDMI";
-    }
-    else if (dev_priv->caps.output_flags & SDVO_OUTPUT_SVID0)
-    {
-	dev_priv->controlled_output = SDVO_OUTPUT_SVID0;
-        output->subpixel_order = SubPixelHorizontalRGB; /* XXX */
-	name_prefix="TV";
-	dev_priv->is_tv = TRUE;
-	intel_output->needs_tv_clock = TRUE;
-    }
-    else if (dev_priv->caps.output_flags & SDVO_OUTPUT_RGB0)
-    {
-	dev_priv->controlled_output = SDVO_OUTPUT_RGB0;
-        output->subpixel_order = SubPixelHorizontalRGB;
-	name_prefix="VGA";
-    }
-    else if (dev_priv->caps.output_flags & SDVO_OUTPUT_RGB1)
-    {
-	dev_priv->controlled_output = SDVO_OUTPUT_RGB1;
-        output->subpixel_order = SubPixelHorizontalRGB;
-	name_prefix="VGA";
-    } else if (dev_priv->caps.output_flags & SDVO_OUTPUT_LVDS0) {
-	dev_priv->controlled_output = SDVO_OUTPUT_LVDS0;
-        output->subpixel_order = SubPixelHorizontalRGB;
-	name_prefix="LVDS";
-    } else if (dev_priv->caps.output_flags & SDVO_OUTPUT_LVDS1) {
-	dev_priv->controlled_output = SDVO_OUTPUT_LVDS1;
-        output->subpixel_order = SubPixelHorizontalRGB;
-	name_prefix="LVDS";
-    }
-    else
-    {
-	unsigned char	bytes[2];
-
-	dev_priv->controlled_output = 0;
-	memcpy (bytes, &dev_priv->caps.output_flags, 2);
-	xf86DrvMsg(intel_output->pI2CBus->scrnIndex, X_WARNING,
-		   "%s: Unknown SDVO output type (0x%02x%02x)\n",
-		   SDVO_NAME(dev_priv),
-		   bytes[0], bytes[1]);
-	name_prefix="Unknown";
-    }
-
-    strcpy (name, name_prefix);
-    strcat (name, name_suffix);
-    if (!xf86OutputRename (output, name))
+    if (!i830_sdvo_get_capabilities(output, &dev_priv->caps))
     {
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		   "Failed to get %s capabilities\n",
+		   SDVO_NAME(dev_priv));
 	xf86OutputDestroy (output);
 	return FALSE;
     }
 
-    i830_sdvo_select_ddc_bus(dev_priv);
+    if (!i830_sdvo_output_setup (output, dev_priv->caps.output_flags))
+	return FALSE;
 
     /* Set the input timing to the screen. Assume always input 0. */
     i830_sdvo_set_target_input(output, TRUE, FALSE);
commit d4c64f01b9429a8fb314e43f40d1f02bb8aab30f
Author: Lukas Hejtmanek <xhejtman at ics.muni.cz>
Date:   Wed Mar 4 17:33:27 2009 -0500

    Fix serious memory leak at Enter/LeaveVT
    
    This fixes huge memory leak at each VT switch (about 600 BOs + 6MB
    of RSS of Xserver).

diff --git a/src/i965_render.c b/src/i965_render.c
index de1c8b3..ab7f7d2 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1715,7 +1715,7 @@ gen4_render_state_cleanup(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     struct gen4_render_state *render_state= pI830->gen4_render_state;
-    int i;
+    int i, j, k, l, m;
 
     if (render_state->vertex_buffer_bo) {
 	dri_bo_unreference (render_state->vertex_buffer_bo);
@@ -1728,12 +1728,23 @@ gen4_render_state_cleanup(ScrnInfoPtr pScrn)
     render_state->sf_state_bo = NULL;
     drm_intel_bo_unreference(render_state->sf_mask_state_bo);
     render_state->sf_mask_state_bo = NULL;
-    drm_intel_bo_unreference(render_state->cc_state_bo);
-    render_state->cc_state_bo = NULL;
+
     for (i = 0; i < WM_KERNEL_COUNT; i++) {
 	drm_intel_bo_unreference(render_state->wm_kernel_bo[i]);
 	render_state->wm_kernel_bo[i] = NULL;
     }
+
+    for (i = 0; i < SAMPLER_STATE_FILTER_COUNT; i++)
+	for (j = 0; j < SAMPLER_STATE_EXTEND_COUNT; j++)
+	    for (k = 0; k < SAMPLER_STATE_FILTER_COUNT; k++)
+		for (l = 0; l < SAMPLER_STATE_EXTEND_COUNT; l++)
+		    for (m = 0; m < WM_KERNEL_COUNT; m++) {
+			drm_intel_bo_unreference(render_state->wm_state_bo[m][i][j][k][l]);
+			render_state->wm_state_bo[m][i][j][k][l] = NULL;
+		    }
+
+    drm_intel_bo_unreference(render_state->cc_state_bo);
+    render_state->cc_state_bo = NULL;
     drm_intel_bo_unreference(render_state->sip_kernel_bo);
     render_state->sip_kernel_bo = NULL;
 }
commit 095a001f755201d3c19335b67a84c57b1d080a83
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Wed Mar 4 17:10:24 2009 -0500

    Use drmSetMaster() and drmDropMaster() in enter/leave VT
    
    This allows multiple X server to use DRI and makes it possible to run
    multiple X servers under KMS.  This requires a 2.6.29 kernel to work.
    On older kernels it will just log a warning and DRI will fail to
    initialize for the second X server.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 342a059..f80ca69 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3536,6 +3536,7 @@ I830LeaveVT(int scrnIndex, int flags)
 {
    ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
    I830Ptr pI830 = I830PTR(pScrn);
+   int ret;
 #ifndef HAVE_FREE_SHADOW
    xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
    int o;
@@ -3629,6 +3630,13 @@ I830LeaveVT(int scrnIndex, int flags)
 
    if (pI830->AccelInfoRec)
       pI830->AccelInfoRec->NeedToSync = FALSE;
+
+#ifdef XF86DRI
+   ret = drmDropMaster(pI830->drmSubFD);
+   if (ret)
+      xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+		 "drmDropMaster failed: %s\n", strerror(ret));
+#endif
 }
 
 /*
@@ -3639,9 +3647,17 @@ I830EnterVT(int scrnIndex, int flags)
 {
    ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
    I830Ptr  pI830 = I830PTR(pScrn);
+   int ret;
 
    DPRINTF(PFX, "Enter VT\n");
 
+#ifdef XF86DRI
+   ret = drmSetMaster(pI830->drmSubFD);
+   if (ret)
+      xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+		 "drmDropMaster failed: %s\n", strerror(ret));
+#endif
+
    /*
     * Only save state once per server generation since that's what most
     * drivers do.  Could change this to save state at each VT enter.
commit 14bb61e0c2e28725a2f6167d3263649bc845be18
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Mar 2 16:55:45 2009 +0800

    SDVO: only check digital monitor when EDID exists

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 4b98a9b..efdd691 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1548,7 +1548,7 @@ i830_sdvo_detect(xf86OutputPtr output)
 	/* Check EDID in DVI-I case */
 	i830_sdvo_set_control_bus_switch(output, dev_priv->ddc_bus);
 	edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
-	if (!edid_mon || !DIGITAL(edid_mon->features.input_type)) {
+	if (edid_mon && !DIGITAL(edid_mon->features.input_type)) {
 	    xfree(edid_mon);
 	    return XF86OutputStatusDisconnected;
 	}
commit 42e34e90e2e4048b38481cab61cef46f932eada7
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Tue Mar 3 22:55:35 2009 +0800

    TV: add property control for TV attributes
    
    This is based on Jesse's origin patch for bug #12763.
    But export integer range to user instead of hardware float
    point format, and fix different real format on 965G and 945G
    for contrast and saturation.

diff --git a/man/intel.man b/man/intel.man
index 22d998a..e38cc54 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -273,6 +273,30 @@ Integrated TV output.  Available properties include:
 Adjusting these properties allows you to control the placement of your TV output buffer on the screen. The options with the same name can also be set in xorg.conf with integer value.
 
 .PP
+.B BRIGHTNESS
+- TV brightness, range 0-255
+.TP 2
+Adjust TV brightness, default value is 128.
+
+.PP
+.B CONTRAST
+- TV contrast, range 0-255
+.TP 2
+Adjust TV contrast, default value is 1.0 in chipset specific format.
+
+.PP
+.B SATURATION
+- TV saturation, range 0-255
+.TP 2
+Adjust TV saturation, default value is 1.0 in chipset specific format.
+
+.PP
+.B HUE
+- TV hue, range 0-255
+.TP 2
+Adjust TV hue, default value is 0.
+
+.PP
 .B TV_FORMAT
 - output standard
 .TP 2
diff --git a/src/i830_tv.c b/src/i830_tv.c
index e776651..1e3cf7b 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -59,6 +59,10 @@ struct i830_tv_priv {
     Bool force_type;
     char *tv_format;
     int margin[4];
+    uint8_t brightness;
+    uint8_t contrast;
+    uint8_t saturation;
+    uint8_t hue;
     uint32_t save_TV_H_CTL_1;
     uint32_t save_TV_H_CTL_2;
     uint32_t save_TV_H_CTL_3;
@@ -1020,6 +1024,96 @@ i830_float_to_luma (float f)
     return ret;
 }
 
+static uint8_t
+float_to_float_2_6(float fin)
+{
+    uint8_t exp;
+    uint8_t mant;
+    float f = fin;
+    uint32_t tmp;
+
+    if (f < 0) f = -f;
+
+    tmp = f;
+    for (exp = 0; exp <= 3 && tmp > 0; exp++)
+	tmp /= 2;
+
+    mant = (f * (1 << 6) + 0.5);
+    mant >>= exp;
+    if (mant > (1 << 6))
+	mant = (1 << 6) - 1;
+
+    return (exp << 6) | mant;
+}
+
+static uint8_t
+float_to_fix_2_6(float f)
+{
+    uint8_t ret;
+
+    ret = f * (1 << 6);
+    return ret;
+}
+
+static void
+i830_tv_update_brightness(I830Ptr pI830, uint8_t brightness)
+{
+    /* brightness in 2's comp value */
+    uint32_t val = INREG(TV_CLR_KNOBS) & ~TV_BRIGHTNESS_MASK;
+    int8_t bri = brightness - 128; /* remove bias */
+
+    val |= (bri << TV_BRIGHTNESS_SHIFT) & TV_BRIGHTNESS_MASK;
+    OUTREG(TV_CLR_KNOBS, val);
+}
+
+static void
+i830_tv_update_contrast(I830Ptr pI830, uint8_t contrast)
+{
+    uint32_t val = INREG(TV_CLR_KNOBS) & ~TV_CONTRAST_MASK;;
+    float con;
+    uint8_t c;
+
+    if (IS_I965G(pI830)) {
+	/* 2.6 fixed point */
+	con = 3.0 * ((float) contrast / 255);
+	c = float_to_fix_2_6(con);
+    } else {
+	/* 2.6 floating point */
+	con = 8.875 * ((float) contrast / 255);
+	c = float_to_float_2_6(con);
+    }
+    val |= (c << TV_CONTRAST_SHIFT) & TV_CONTRAST_MASK;
+    OUTREG(TV_CLR_KNOBS, val);
+}
+
+static void
+i830_tv_update_saturation(I830Ptr pI830, uint8_t saturation)
+{
+    uint32_t val = INREG(TV_CLR_KNOBS) & ~TV_SATURATION_MASK;
+    float sat;
+    uint8_t s;
+
+    /* same as contrast */
+    if (IS_I965G(pI830)) {
+	sat = 3.0 * ((float) saturation / 255);
+	s = float_to_fix_2_6(sat);
+    } else {
+	sat = 8.875 * ((float) saturation / 255);
+	s = float_to_float_2_6(sat);
+    }
+    val |= (s << TV_SATURATION_SHIFT) & TV_SATURATION_MASK;
+    OUTREG(TV_CLR_KNOBS, val);
+}
+
+static void
+i830_tv_update_hue(I830Ptr pI830, uint8_t hue)
+{
+    uint32_t val = INREG(TV_CLR_KNOBS) & ~TV_HUE_MASK;
+
+    val |= (hue << TV_HUE_SHIFT) & TV_HUE_MASK;
+    OUTREG(TV_CLR_KNOBS, val);
+}
+
 static void
 i830_tv_mode_set(xf86OutputPtr output, DisplayModePtr mode,
 		DisplayModePtr adjusted_mode)
@@ -1181,14 +1275,6 @@ i830_tv_mode_set(xf86OutputPtr output, DisplayModePtr mode,
 	    (i830_float_to_csc(color_conversion->bv) << 16) |
 	    (i830_float_to_luma(color_conversion->av)));
 
-    if (IS_I965G(pI830)) {
-	/* 2.6 fixed point value for contrast and saturation modifier,
-	   use 1 as default */
-	OUTREG(TV_CLR_KNOBS, 0x00404000);
-    } else {
-	/* 915/945 uses 2 bits exponent and 6 bits mantissa format */
-	OUTREG(TV_CLR_KNOBS, 0x00606000);
-    }
     OUTREG(TV_CLR_LEVEL, ((video_levels->black << TV_BLACK_LEVEL_SHIFT) |
 		(video_levels->blank << TV_BLANK_LEVEL_SHIFT)));
     {
@@ -1496,6 +1582,26 @@ static char *margin_names[4] = {
     "LEFT", "TOP", "RIGHT", "BOTTOM"
 };
 
+/**
+ *  contrast and saturation has different format on 915/945 with 965.
+ *  On 915/945, it's 2.6 floating point number.
+ *  On 965, it's 2.6 fixed point number.
+ */
+#define TV_BRIGHTNESS_NAME "BRIGHTNESS"
+#define TV_BRIGHTNESS_DEFAULT 128	/* bias */
+static Atom brightness_atom;
+#define TV_CONTRAST_NAME "CONTRAST"
+#define TV_CONTRAST_DEFAULT 0x40
+#define TV_CONTRAST_DEFAULT_945G 0x60
+static Atom contrast_atom;
+#define TV_SATURATION_NAME "SATURATION"
+#define TV_SATURATION_DEFAULT 0x40
+#define TV_SATURATION_DEFAULT_945G 0x60
+static Atom saturation_atom;
+#define TV_HUE_NAME "HUE"
+#define TV_HUE_DEFAULT 0
+static Atom hue_atom;
+
 static Bool
 i830_tv_format_set_property (xf86OutputPtr output)
 {
@@ -1541,6 +1647,62 @@ i830_tv_format_configure_property (xf86OutputPtr output)
 				     num_atoms, (INT32 *) current_atoms);
 }
 
+static void
+i830_tv_color_set_property(xf86OutputPtr output, Atom property,
+			   uint8_t val)
+{
+    ScrnInfoPtr		    pScrn = output->scrn;
+    I830Ptr		    pI830 = I830PTR(pScrn);
+    I830OutputPrivatePtr    intel_output = output->driver_private;
+    struct i830_tv_priv	    *dev_priv = intel_output->dev_priv;
+
+    if (property == brightness_atom) {
+	dev_priv->brightness = val;
+	i830_tv_update_brightness(pI830, val);
+    } else if (property == contrast_atom) {
+	dev_priv->contrast = val;
+	i830_tv_update_contrast(pI830, val);
+    } else if (property == saturation_atom) {
+	dev_priv->saturation = val;
+	i830_tv_update_saturation(pI830, val);
+    } else if (property == hue_atom) {
+	dev_priv->hue = val;
+	i830_tv_update_hue(pI830, val);
+    }
+}
+
+static void
+i830_tv_color_create_property(xf86OutputPtr output, Atom *property,
+			      char *name, int name_len, uint8_t val)
+{
+    ScrnInfoPtr	pScrn = output->scrn;
+    INT32 range[2];
+    int err = 0;
+
+    *property = MakeAtom(name, name_len - 1, TRUE);
+    range[0] = 0;
+    range[1] = 255;
+    err = RRConfigureOutputProperty(output->randr_output, *property,
+				    FALSE, TRUE, FALSE, 2, range);
+    if (err != 0) {
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		   "RRConfigureOutputProperty error, %d\n", err);
+	goto out;
+    }
+    /* Set the current value */
+    i830_tv_color_set_property(output, *property, val);
+
+    err = RRChangeOutputProperty(output->randr_output, *property,
+				 XA_INTEGER, 32, PropModeReplace, 1, &val,
+				 FALSE, FALSE);
+    if (err != 0) {
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		   "RRChangeOutputProperty error, %d\n", err);
+    }
+out:
+    return;
+}
+
 #endif /* RANDR_12_INTERFACE */
 
 static void
@@ -1548,10 +1710,10 @@ i830_tv_create_resources(xf86OutputPtr output)
 {
 #ifdef RANDR_12_INTERFACE
     ScrnInfoPtr		    pScrn = output->scrn;
+    I830Ptr		    pI830 = I830PTR(pScrn);
     I830OutputPrivatePtr    intel_output = output->driver_private;
     struct i830_tv_priv	    *dev_priv = intel_output->dev_priv;
-    int			    err;
-    int			    i;
+    int			    err, i;
 
     /* Set up the tv_format property, which takes effect on mode set
      * and accepts strings that match exactly
@@ -1599,6 +1761,23 @@ i830_tv_create_resources(xf86OutputPtr output)
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		       "RRChangeOutputProperty error, %d\n", err);
     }
+
+    i830_tv_color_create_property(output, &brightness_atom,
+				  TV_BRIGHTNESS_NAME,
+				  sizeof(TV_BRIGHTNESS_NAME),
+				  TV_BRIGHTNESS_DEFAULT);
+    i830_tv_color_create_property(output, &contrast_atom,
+				  TV_CONTRAST_NAME,
+				  sizeof(TV_CONTRAST_NAME),
+				  IS_I965G(pI830) ? TV_CONTRAST_DEFAULT :
+						TV_CONTRAST_DEFAULT_945G);
+    i830_tv_color_create_property(output, &saturation_atom,
+				  TV_SATURATION_NAME,
+				  sizeof(TV_SATURATION_NAME),
+				  IS_I965G(pI830) ? TV_SATURATION_DEFAULT :
+						TV_SATURATION_DEFAULT_945G);
+    i830_tv_color_create_property(output, &hue_atom, TV_HUE_NAME,
+				  sizeof(TV_HUE_NAME), TV_HUE_DEFAULT);
 #endif /* RANDR_12_INTERFACE */
 }
 
@@ -1703,6 +1882,18 @@ i830_tv_set_property(xf86OutputPtr output, Atom property,
 	    return TRUE;
 	}
     }
+    if (property == brightness_atom || property == contrast_atom ||
+	property == saturation_atom || property == hue_atom) {
+	uint8_t val;
+
+	/* Make sure value is sane */
+	if (value->type != XA_INTEGER || value->format != 32 ||
+	    value->size != 1)
+	    return FALSE;
+
+	memcpy (&val, value->data, 1);
+	i830_tv_color_set_property(output, property, val);
+    }
 
     return TRUE;
 }
commit aa9da5e393c804019720503fe58bdd247fe1eabd
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Tue Mar 3 20:26:19 2009 +0800

    TV: add option to set TV connector type
    
    This can let user override non-stable driver TV load detect,
    and set connector type manually, e.g for s-video to component
    converter, this patch seems must needed to use HD modes.

diff --git a/man/intel.man b/man/intel.man
index c7a3c61..22d998a 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -278,6 +278,12 @@ Adjusting these properties allows you to control the placement of your TV output
 .TP 2
 This property allows you to control the output standard used on your TV output port.  You can select between NTSC-M, NTSC-443, NTSC-J, PAL-M, PAL-N, and PAL.
 
+.PP
+.B TV_Connector
+- connector type
+.TP 2
+This config option should be added to xorg.conf TV monitor's section, it allows you to control the TV output connector type, which bypass load detect. You can select between S-Video, Composite and Component.
+
 .SS "TMDS-1"
 First DVI SDVO output
 
diff --git a/src/i830_tv.c b/src/i830_tv.c
index 210070c..e776651 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -56,6 +56,7 @@ enum tv_margin {
 /** Private structure for the integrated TV support */
 struct i830_tv_priv {
     int type;
+    Bool force_type;
     char *tv_format;
     int margin[4];
     uint32_t save_TV_H_CTL_1;
@@ -1380,6 +1381,13 @@ i830_tv_detect(xf86OutputPtr output)
         i830ReleaseLoadDetectPipe (output, dpms_mode);
     }
 
+    if (dev_priv->force_type) {
+	if (type == TV_TYPE_NONE)
+	    return XF86OutputStatusDisconnected;
+	else
+	    return XF86OutputStatusConnected;
+    }
+
     if (type != dev_priv->type)
     {
 	dev_priv->type = type;
@@ -1743,6 +1751,7 @@ i830_tv_init(ScrnInfoPtr pScrn)
     uint32_t		    tv_dac_on, tv_dac_off, save_tv_dac;
     XF86OptionPtr	    mon_option_lst = NULL;
     char		    *tv_format = NULL;
+    char		    *tv_type = NULL;
 
     if (pI830->quirk_flag & QUIRK_IGNORE_TV)
 	return;
@@ -1810,12 +1819,32 @@ i830_tv_init(ScrnInfoPtr pScrn)
     dev_priv->margin[TV_MARGIN_BOTTOM] = xf86SetIntOption (mon_option_lst,
 	    "Bottom", 37);
 
-    tv_format = xf86findOptionValue (mon_option_lst, "TV Format");
+    tv_format = xf86findOptionValue (mon_option_lst, "TV_Format");
     if (tv_format)
 	dev_priv->tv_format = xstrdup (tv_format);
     else
 	dev_priv->tv_format = xstrdup (tv_modes[0].name);
 
+    tv_type = xf86findOptionValue (mon_option_lst, "TV_Connector");
+    if (tv_type) {
+	dev_priv->force_type = TRUE;
+	if (strcasecmp(tv_type, "S-Video") == 0)
+	    dev_priv->type = TV_TYPE_SVIDEO;
+	else if (strcasecmp(tv_type, "Composite") == 0)
+	    dev_priv->type = TV_TYPE_COMPOSITE;
+	else if (strcasecmp(tv_type, "Component") == 0)
+	    dev_priv->type = TV_TYPE_COMPONENT;
+	else {
+	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+		    "Unknown TV Connector type %s\n", tv_type);
+	    dev_priv->force_type = FALSE;
+	}
+    }
+
+    if (dev_priv->force_type)
+	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		"Force TV Connector type as %s\n", tv_type);
+
     output->driver_private = intel_output;
     output->interlaceAllowed = FALSE;
     output->doubleScanAllowed = FALSE;
commit ab1ef05cc0fd5ba9768c26cc51bc2c7b52baa45f
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Thu Feb 19 20:23:02 2009 +0800

    TV: update output and crtc modes when TV format change (try 3)
    
    This is to fix bug #16566, change TV format will cause BadMatch
    error when crtc config apply. Everytime when we change TV format,
    we may generate a new list of modelines as TV clock changed. After
    randr get info request, new modelines will be probed and randr output's
    modes will be renewed too. But crtc's mode failed to be updated,
    as it never can find a matching mode now within new modes list.
    So get info will return an invalid crtc's mode, later set crtc
    config will pass that info, and xserver catches a bad match.
    
    This patch trys to refresh output modes and setup crtc's mode
    with new modelines in TV format change. So get info would be
    sure to turn valid crtc mode that reference in current new modelines.

diff --git a/src/i830_tv.c b/src/i830_tv.c
index 267da3b..210070c 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1605,9 +1605,14 @@ i830_tv_set_property(xf86OutputPtr output, Atom property,
     {
 	I830OutputPrivatePtr    intel_output = output->driver_private;
 	struct i830_tv_priv	*dev_priv = intel_output->dev_priv;
+	I830Ptr			pI830 = I830PTR(output->scrn);
 	Atom			atom;
 	const char		*name;
 	char			*val;
+	RRCrtcPtr		randr_crtc;
+	xRRModeInfo		modeinfo;
+	RRModePtr		mode;
+	DisplayModePtr		crtc_mode;
 
 	if (value->type != XA_ATOM || value->format != 32 || value->size != 1)
 	    return FALSE;
@@ -1626,6 +1631,51 @@ i830_tv_set_property(xf86OutputPtr output, Atom property,
 	}
 	xfree (dev_priv->tv_format);
 	dev_priv->tv_format = val;
+
+	if (pI830->starting)
+	    return TRUE;
+
+	/* TV format change will generate new modelines, try
+	   to probe them and update outputs. */
+	xf86ProbeOutputModes(output->scrn, 0, 0);
+	 /* Mirror output modes to scrn mode list */
+	xf86SetScrnInfoModes (output->scrn);
+
+	for (crtc_mode = output->probed_modes; crtc_mode;
+		crtc_mode = crtc_mode->next)
+	{
+	    if (output->crtc->mode.HDisplay == crtc_mode->HDisplay &&
+		    output->crtc->mode.VDisplay == crtc_mode->VDisplay)
+		break;
+	}
+	if (!crtc_mode)
+	    crtc_mode = output->probed_modes;
+
+	xf86CrtcSetMode(output->crtc, crtc_mode, output->crtc->rotation,
+		output->crtc->x, output->crtc->y);
+
+	xf86RandR12TellChanged(output->scrn->pScreen);
+
+	modeinfo.width = crtc_mode->HDisplay;
+	modeinfo.height = crtc_mode->VDisplay;
+	modeinfo.dotClock = crtc_mode->Clock * 1000;
+	modeinfo.hSyncStart = crtc_mode->HSyncStart;
+	modeinfo.hSyncEnd = crtc_mode->HSyncEnd;
+	modeinfo.hTotal = crtc_mode->HTotal;
+	modeinfo.hSkew = crtc_mode->HSkew;
+	modeinfo.vSyncStart = crtc_mode->VSyncStart;
+	modeinfo.vSyncEnd = crtc_mode->VSyncEnd;
+	modeinfo.vTotal = crtc_mode->VTotal;
+	modeinfo.nameLength = strlen(crtc_mode->name);
+	modeinfo.modeFlags = crtc_mode->Flags;
+
+	mode = RRModeGet(&modeinfo, crtc_mode->name);
+	randr_crtc = output->crtc->randr_crtc;
+	if (mode != randr_crtc->mode) {
+	    if (randr_crtc->mode)
+		RRModeDestroy(randr_crtc->mode);
+	    randr_crtc->mode = mode;
+	}
 	return TRUE;
     }
     for (i = 0; i < 4; i++)
commit a67a911a93ff3c0b3d2e6f6fb20c0787b9d4d41d
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Thu Feb 19 01:00:33 2009 +0800

    TV: sort input mode lines

diff --git a/src/i830_tv.c b/src/i830_tv.c
index b13abd4..267da3b 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1405,10 +1405,10 @@ static struct input_res {
 {
 	{"640x480", 640, 480},
 	{"800x600", 800, 600},
-	{"1024x768", 1024, 768},
-	{"1280x1024", 1280, 1024},
 	{"848x480", 848, 480},
+	{"1024x768", 1024, 768},
 	{"1280x720", 1280, 720},
+	{"1280x1024", 1280, 1024},
 	{"1920x1080", 1920, 1080},
 };
 
commit bd360e7517835626bee54bec968cdc78908c6545
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Mar 2 10:33:35 2009 -0500

    KMS: Wire up output DPMS.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 8128004..d9ca16c 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -506,7 +506,27 @@ drmmode_output_destroy(xf86OutputPtr output)
 static void
 drmmode_output_dpms(xf86OutputPtr output, int mode)
 {
-	return;
+	drmmode_output_private_ptr drmmode_output = output->driver_private;
+	drmModeConnectorPtr koutput = drmmode_output->mode_output;
+	drmmode_ptr drmmode = drmmode_output->drmmode;
+	int i;
+	drmModePropertyPtr props;
+
+	for (i = 0; i < koutput->count_props; i++) {
+		props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
+		if (!props)
+			continue;
+
+		if (!strcmp(props->name, "DPMS")) {
+                        drmModeConnectorSetProperty(drmmode->fd,
+                                drmmode_output->output_id,
+                                props->prop_id,
+                                mode);
+                        drmModeFreeProperty(props);
+                        return;
+		}
+		drmModeFreeProperty(props);
+	}
 }
 
 static const xf86OutputFuncsRec drmmode_output_funcs = {
commit 2d0aa553609a0e64fa4b2e755b9b1e244e5c3fa1
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Mar 2 15:26:44 2009 +0800

    Skip LVDS config parsing on pre-9xx chips.
    
    855GM laptops seems pretty broken when parsing this block.

diff --git a/src/i830_bios.c b/src/i830_bios.c
index a990ebe..7f20553 100644
--- a/src/i830_bios.c
+++ b/src/i830_bios.c
@@ -174,9 +174,13 @@ parse_driver_feature(I830Ptr pI830, struct bdb_header *bdb)
     struct bdb_driver_feature *feature;
 
     /* For mobile chip, set default as true */
-    if (IS_MOBILE(pI830))
+    if (IS_MOBILE(pI830) && !IS_I830(pI830))
 	pI830->integrated_lvds = TRUE;
 
+    /* skip pre-9xx chips which is broken to parse this block. */
+    if (!IS_I9XX(pI830))
+	return;
+
     feature = find_section(bdb, BDB_DRIVER_FEATURES);
     if (!feature)
 	return;
commit 55359ef9ab0a2be42a55e0279835f76a191d6c74
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Fri Feb 27 09:02:30 2009 +0800

    Update driver feature block definition for missed fields

diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index 41908a3..fc51821 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -416,6 +416,10 @@ static void dump_driver_feature(void)
 	    printf("Embedded DisplayPort\n");
 	    break;
     }
+    printf("\tDefine Display statically: %s\n", YESNO(feature->static_display));
+    printf("\tLegacy CRT max X: %d\n", feature->legacy_crt_max_x);
+    printf("\tLegacy CRT max Y: %d\n", feature->legacy_crt_max_y);
+    printf("\tLegacy CRT max refresh: %d\n", feature->legacy_crt_max_refresh);
     free(block);
 }
 
diff --git a/src/i830_bios.h b/src/i830_bios.h
index ec8bd8f..78af830 100644
--- a/src/i830_bios.h
+++ b/src/i830_bios.h
@@ -428,6 +428,12 @@ struct bdb_driver_feature {
     uint16_t	crt_hotplug:1;
     uint16_t	lvds_config:2;
     uint16_t	reserved:3;
+
+    uint8_t	static_display:1;
+    uint8_t	reserved2:7;
+    uint16_t	legacy_crt_max_x;
+    uint16_t	legacy_crt_max_y;
+    uint8_t	legacy_crt_max_refresh;
 } __attribute__((packed));
 
 #ifndef REG_DUMPER
commit 38a7683561cee7fffab174c2a166bfd51b51ba27
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 27 22:55:44 2009 -0800

    warnings cleanup

diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index 2b98e1f..41908a3 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -205,6 +205,7 @@ static void dump_general_definitions(void)
     free(block);
 }
 
+#if 0
 static void dump_child_devices(void)
 {
     struct bdb_block *block;
@@ -238,6 +239,7 @@ static void dump_child_devices(void)
 
     free(block);
 }
+#endif
 
 static void dump_lvds_options(void)
 {
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 63533cd..7569e99 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -1059,7 +1059,7 @@ static Atom panel_fitting_name_atoms[NUM_PANEL_FITTING_TYPES];
 
 
 static int
-i830_backlight_control_lookup(char *name)
+i830_backlight_control_lookup(const char *name)
 {
     int i;
 
@@ -1116,7 +1116,7 @@ i830_lvds_set_backlight_control(xf86OutputPtr output)
 }
 
 static int
-i830_panel_fitting_lookup(char *name)
+i830_panel_fitting_lookup(const char *name)
 {
     int i;
 
@@ -1258,7 +1258,7 @@ i830_lvds_set_property(xf86OutputPtr output, Atom property,
     } else if (property == backlight_control_atom) {
 	INT32		    	backlight_range[2];
 	Atom			atom;
-	char			*name;
+	const char		*name;
 	int			ret, data;
 
 	if (value->type != XA_ATOM || value->format != 32 || value->size != 1)
@@ -1300,7 +1300,7 @@ i830_lvds_set_property(xf86OutputPtr output, Atom property,
 	return TRUE;
     } else if (property == panel_fitting_atom) {
 	Atom			atom;
-	char			*name;
+	const char		*name;
 	int			ret;
 
 	if (value->type != XA_ATOM || value->format != 32 || value->size != 1)
diff --git a/src/i830_tv.c b/src/i830_tv.c
index 72d2bd8..b13abd4 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1606,7 +1606,7 @@ i830_tv_set_property(xf86OutputPtr output, Atom property,
 	I830OutputPrivatePtr    intel_output = output->driver_private;
 	struct i830_tv_priv	*dev_priv = intel_output->dev_priv;
 	Atom			atom;
-	char			*name;
+	const char		*name;
 	char			*val;
 
 	if (value->type != XA_ATOM || value->format != 32 || value->size != 1)
diff --git a/src/i965_hwmc.c b/src/i965_hwmc.c
index 99e86f5..d9b4f0d 100644
--- a/src/i965_hwmc.c
+++ b/src/i965_hwmc.c
@@ -44,6 +44,7 @@
 
 static PutImageFuncPtr XvPutImage;
 
+#if 0
 static int alloc_drm_memory_tiled(ScrnInfoPtr pScrn, 
 	struct drm_memory_block *mem,
 	char *name, size_t size, unsigned long pitch, unsigned long alignment)
@@ -69,6 +70,8 @@ static int alloc_drm_memory_tiled(ScrnInfoPtr pScrn,
     mem->offset = mem->buffer->offset;
     return Success;
 }
+#endif
+
 static int alloc_drm_memory(ScrnInfoPtr pScrn, 
 	struct drm_memory_block *mem, 
 	char *name, size_t size)
commit 5bfd73cd31ba197a62f549cdbad1a1270b571027
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 27 19:09:49 2009 -0800

    Only allocate pixmaps aligned for tiling when requested by DRI2 GetBuffers.
    
    This saves massive quantities of memory on pre-965 since the DRI2 tiling
    enable caused the minimum size of any pixmap to be 1MB.

diff --git a/src/i830.h b/src/i830.h
index a0ae571..cd9c38a 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -1090,4 +1090,15 @@ extern const int I830CopyROP[16];
 #define QUIRK_BROKEN_ACPI_LID		0x00000100
 extern void i830_fixup_devices(ScrnInfoPtr);
 
+/**
+ * Hints to CreatePixmap to tell the driver how the pixmap is going to be
+ * used.
+ *
+ * Compare to CREATE_PIXMAP_USAGE_* in the server.
+ */
+enum {
+    INTEL_CREATE_PIXMAP_TILING_X = 0x10000000,
+    INTEL_CREATE_PIXMAP_TILING_Y,
+};
+
 #endif /* _I830_H_ */
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 540bf5e..96c711e 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1561,36 +1561,33 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
 	    pPixmap = pDepthPixmap;
 	    pPixmap->refcnt++;
 	} else {
-	    uint32_t tiling = I915_TILING_NONE;
+	    unsigned int hint = 0;
 
-	    pPixmap = (*pScreen->CreatePixmap)(pScreen,
-					       pDraw->width,
-					       pDraw->height,
-					       pDraw->depth, 0);
 	    switch (attachments[i]) {
 	    case DRI2BufferDepth:
 		if (SUPPORTS_YTILING(pI830))
-		    tiling = I915_TILING_Y;
+		    hint = INTEL_CREATE_PIXMAP_TILING_Y;
 		else
-		    tiling = I915_TILING_X;
+		    hint = INTEL_CREATE_PIXMAP_TILING_X;
 		break;
 	    case DRI2BufferFakeFrontLeft:
 	    case DRI2BufferFakeFrontRight:
 	    case DRI2BufferBackLeft:
 	    case DRI2BufferBackRight:
-		    tiling = I915_TILING_X;
+		    hint = INTEL_CREATE_PIXMAP_TILING_X;
 		break;
 	    }
 
 	    if (!pI830->tiling ||
 		(!IS_I965G(pI830) && !pI830->kernel_exec_fencing))
-		tiling = I915_TILING_NONE;
+		hint = 0;
+
+	    pPixmap = (*pScreen->CreatePixmap)(pScreen,
+					       pDraw->width,
+					       pDraw->height,
+					       pDraw->depth,
+					       hint);
 
-	    if (tiling != I915_TILING_NONE) {
-		bo = i830_get_pixmap_bo(pPixmap);
-		drm_intel_bo_set_tiling(bo, &tiling,
-					intel_get_pixmap_pitch(pPixmap));
-	    }
 	}
 
 	if (attachments[i] == DRI2BufferDepth)
diff --git a/src/i830_exa.c b/src/i830_exa.c
index b9d6c64..0a22486 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -935,29 +935,38 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
     if (w && h)
     {
 	unsigned int size;
+	uint32_t tiling = I915_TILING_NONE;
 
 	stride = ROUND_TO((w * pixmap->drawable.bitsPerPixel + 7) / 8,
 			  i830->accel_pixmap_pitch_alignment);
 
-	/* Use the I915_FENCE_TILING_X even if it may end up being TILING_Y,
-	 * as it just results in larger alignment.  Really, we need to use the
-	 * usage hint to tell what the pixmap's going to be.
-	 */
-	stride = i830_get_fence_pitch(i830, stride, I915_TILING_X);
-	/* Round the object up to the size of the fence it will live in
-	 * if necessary.  We could potentially make the kernel allocate
-	 * a larger aperture space and just bind the subset of pages in,
-	 * but this is easier and also keeps us out of trouble (as much)
-	 * with drm_intel_bufmgr_check_aperture().
-	 */
-	size = i830_get_fence_size(i830, stride * h);
+	if (usage == INTEL_CREATE_PIXMAP_TILING_X)
+	    tiling = I915_TILING_X;
+	else if (usage == INTEL_CREATE_PIXMAP_TILING_Y)
+	    tiling = I915_TILING_Y;
+
+	if (tiling == I915_TILING_NONE) {
+	    size = stride * h;
+	} else {
+	    stride = i830_get_fence_pitch(i830, stride, tiling);
+	    /* Round the object up to the size of the fence it will live in
+	     * if necessary.  We could potentially make the kernel allocate
+	     * a larger aperture space and just bind the subset of pages in,
+	     * but this is easier and also keeps us out of trouble (as much)
+	     * with drm_intel_bufmgr_check_aperture().
+	     */
+	    size = i830_get_fence_size(i830, stride * h);
+	}
 
 	bo = drm_intel_bo_alloc_for_render(i830->bufmgr, "pixmap", size, 0);
 	if (!bo) {
 	    fbDestroyPixmap (pixmap);
 	    return NullPixmap;
 	}
-	
+
+	if (tiling != I915_TILING_NONE)
+	    drm_intel_bo_set_tiling(bo, &tiling, stride);
+
 	screen->ModifyPixmapHeader (pixmap, w, h, 0, 0, stride, NULL);
     
 	i830_uxa_set_pixmap_bo (pixmap, bo);
@@ -971,6 +980,9 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
 static PixmapPtr
 i830_uxa_server_14_create_pixmap (ScreenPtr screen, int w, int h, int depth)
 {
+    /* For server pre-1.6, we're never allocating DRI2 buffers, so no need for
+     * a hint.
+     */
     return i830_uxa_create_pixmap(screen, w, h, depth, 0);
 }
 #endif
commit f53bdad1412f841075232455837578f00709c6ef
Author: Shaohua Li <shaohua.li at intel.com>
Date:   Mon Feb 23 15:19:23 2009 +0800

    Intel video driver patch
    
    This is the intel video driver patch for a new chip, which is G33-like
    and has some clocking setting related register changes. This patch adds
    the pci id and DPLx/FPx register changes.
    
    The gtt tool should just work to me, as the chip hasn't any changes
    against G33 on this side.
    
    Signed-off-by: Shaohua Li <shaohua.li at intel.com>
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/src/common.h b/src/common.h
index be222df..8b32a66 100644
--- a/src/common.h
+++ b/src/common.h
@@ -241,6 +241,13 @@ extern int I810_DEBUG;
 #define PCI_CHIP_I945_GME_BRIDGE 0x27AC
 #endif
 
+#ifndef PCI_CHIP_IGD_GM
+#define PCI_CHIP_IGD_GM		0xA011
+#define PCI_CHIP_IGD_GM_BRIDGE	0xA010
+#define PCI_CHIP_IGD_G		0xA001
+#define PCI_CHIP_IGD_G_BRIDGE	0xA000
+#endif
+
 #ifndef PCI_CHIP_G35_G
 #define PCI_CHIP_G35_G		0x2982
 #define PCI_CHIP_G35_G_BRIDGE 	0x2980
@@ -342,6 +349,9 @@ extern int I810_DEBUG;
 #define IS_I915GM(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I915_GM)
 #define IS_I945G(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I945_G)
 #define IS_I945GM(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I945_GM || DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I945_GME)
+#define IS_IGDGM(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_IGD_GM)
+#define IS_IGDG(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_IGD_G)
+#define IS_IGD(pI810) (IS_IGDG(pI810) || IS_IGDGM(pI810))
 #define IS_GM45(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_GM45_GM)
 #define IS_G4X(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_IGD_E_G || DEVICE_ID(pI810->PciInfo) == PCI_CHIP_G45_G || DEVICE_ID(pI810->PciInfo) == PCI_CHIP_Q45_G || DEVICE_ID(pI810->PciInfo) == PCI_CHIP_G41_G || IS_GM45(pI810))
 #define IS_I965GM(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I965_GM || DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I965_GME)
@@ -349,11 +359,12 @@ extern int I810_DEBUG;
 #define IS_I965G(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I965_G || DEVICE_ID(pI810->PciInfo) == PCI_CHIP_G35_G || DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I965_Q || DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I946_GZ || DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I965_GM || DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I965_GME || IS_G4X(pI810))
 #define IS_G33CLASS(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_G33_G ||\
  			    DEVICE_ID(pI810->PciInfo) == PCI_CHIP_Q35_G ||\
- 			    DEVICE_ID(pI810->PciInfo) == PCI_CHIP_Q33_G)
+			    DEVICE_ID(pI810->PciInfo) == PCI_CHIP_Q33_G || \
+			    IS_IGD(pI810))
 #define IS_I9XX(pI810) (IS_I915G(pI810) || IS_I915GM(pI810) || IS_I945G(pI810) || IS_I945GM(pI810) || IS_I965G(pI810) || IS_G33CLASS(pI810))
 #define IS_I915(pI810) (IS_I915G(pI810) || IS_I915GM(pI810) || IS_I945G(pI810) || IS_I945GM(pI810) || IS_G33CLASS(pI810))
 
-#define IS_MOBILE(pI810) (IS_I830(pI810) || IS_I85X(pI810) || IS_I915GM(pI810) || IS_I945GM(pI810) || IS_I965GM(pI810) || IS_GM45(pI810))
+#define IS_MOBILE(pI810) (IS_I830(pI810) || IS_I85X(pI810) || IS_I915GM(pI810) || IS_I945GM(pI810) || IS_I965GM(pI810) || IS_GM45(pI810) || IS_IGD(pI810))
 /* mark chipsets for using gfx VM offset for overlay */
 #define OVERLAY_NOPHYSICAL(pI810) (IS_G33CLASS(pI810) || IS_I965G(pI810))
 /* mark chipsets without overlay hw */
diff --git a/src/i810_driver.c b/src/i810_driver.c
index cc28ad8..c10e15b 100644
--- a/src/i810_driver.c
+++ b/src/i810_driver.c
@@ -143,6 +143,8 @@ static const struct pci_id_match intel_device_match[] = {
    INTEL_DEVICE_MATCH (PCI_CHIP_I945_G, 0 ),
    INTEL_DEVICE_MATCH (PCI_CHIP_I945_GM, 0 ),
    INTEL_DEVICE_MATCH (PCI_CHIP_I945_GME, 0 ),
+   INTEL_DEVICE_MATCH (PCI_CHIP_IGD_GM, 0 ),
+   INTEL_DEVICE_MATCH (PCI_CHIP_IGD_G, 0 ),
    INTEL_DEVICE_MATCH (PCI_CHIP_I965_G, 0 ),
    INTEL_DEVICE_MATCH (PCI_CHIP_G35_G, 0 ),
    INTEL_DEVICE_MATCH (PCI_CHIP_I965_Q, 0 ),
@@ -200,6 +202,8 @@ static SymTabRec I810Chipsets[] = {
    {PCI_CHIP_I945_G,		"945G"},
    {PCI_CHIP_I945_GM,		"945GM"},
    {PCI_CHIP_I945_GME,		"945GME"},
+   {PCI_CHIP_IGD_GM,		"IGD_GM"},
+   {PCI_CHIP_IGD_G,		"IGD_G"},
    {PCI_CHIP_I965_G,		"965G"},
    {PCI_CHIP_G35_G,		"G35"},
    {PCI_CHIP_I965_Q,		"965Q"},
@@ -234,6 +238,8 @@ static PciChipsets I810PciChipsets[] = {
    {PCI_CHIP_I945_G,		PCI_CHIP_I945_G,	RES_SHARED_VGA},
    {PCI_CHIP_I945_GM,		PCI_CHIP_I945_GM,	RES_SHARED_VGA},
    {PCI_CHIP_I945_GME,		PCI_CHIP_I945_GME,	RES_SHARED_VGA},
+   {PCI_CHIP_IGD_GM,		PCI_CHIP_IGD_GM,	RES_SHARED_VGA},
+   {PCI_CHIP_IGD_G,		PCI_CHIP_IGD_G,		RES_SHARED_VGA},
    {PCI_CHIP_I965_G,		PCI_CHIP_I965_G,	RES_SHARED_VGA},
    {PCI_CHIP_G35_G,		PCI_CHIP_G35_G,		RES_SHARED_VGA},
    {PCI_CHIP_I965_Q,		PCI_CHIP_I965_Q,	RES_SHARED_VGA},
@@ -794,6 +800,8 @@ I810Probe(DriverPtr drv, int flags)
 	    case PCI_CHIP_I945_G:
 	    case PCI_CHIP_I945_GM:
 	    case PCI_CHIP_I945_GME:
+	    case PCI_CHIP_IGD_GM:
+	    case PCI_CHIP_IGD_G:
 	    case PCI_CHIP_I965_G:
 	    case PCI_CHIP_G35_G:
 	    case PCI_CHIP_I965_Q:
diff --git a/src/i810_reg.h b/src/i810_reg.h
index e2ffba1..51970c1 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -969,6 +969,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 # define DPLLB_LVDS_P2_CLOCK_DIV_7		(1 << 24) /* i915 */
 # define DPLL_P2_CLOCK_DIV_MASK			0x03000000 /* i915 */
 # define DPLL_FPA01_P1_POST_DIV_MASK		0x00ff0000 /* i915 */
+# define DPLL_FPA01_P1_POST_DIV_MASK_IGD	0x00ff8000 /* IGD */
 /**
  *  The i830 generation, in DAC/serial mode, defines p1 as two plus this
  * bitfield, or just 2 if PLL_P1_DIVIDE_BY_TWO is set.
@@ -980,6 +981,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 # define DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS	0x003f0000
 # define DPLL_FPA01_P1_POST_DIV_SHIFT		16
+# define DPLL_FPA01_P1_POST_DIV_SHIFT_IGD	15
 # define PLL_P2_DIVIDE_BY_4			(1 << 23) /* i830, required in DVO non-gang */
 # define PLL_P1_DIVIDE_BY_TWO			(1 << 21) /* i830 */
 # define PLL_REF_INPUT_DREFCLK			(0 << 13)
@@ -1228,10 +1230,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define FPB0		0x06048
 #define FPB1		0x0604c
 # define FP_N_DIV_MASK				0x003f0000
+# define FP_N_IGD_DIV_MASK			0x00ff0000
 # define FP_N_DIV_SHIFT				16
 # define FP_M1_DIV_MASK				0x00003f00
 # define FP_M1_DIV_SHIFT			8
 # define FP_M2_DIV_MASK				0x0000003f
+# define FP_M2_IGD_DIV_MASK			0x000000ff
 # define FP_M2_DIV_SHIFT			0
 
 #define PORT_HOTPLUG_EN		0x61110
diff --git a/src/i830_debug.c b/src/i830_debug.c
index dc3712b..d99af57 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -189,6 +189,12 @@ DEBUGSTRING(i830_debug_vgacntrl)
 
 DEBUGSTRING(i830_debug_fp)
 {
+    if (IS_IGD(pI830)) {
+	return XNFprintf("n = %d, m1 = %d, m2 = %d",
+			 ffs((val & FP_N_IGD_DIV_MASK) >> FP_N_DIV_SHIFT) - 1,
+			 ((val & FP_M1_DIV_MASK) >> FP_M1_DIV_SHIFT),
+			 ((val & FP_M2_IGD_DIV_MASK) >> FP_M2_DIV_SHIFT));
+    }
     return XNFprintf("n = %d, m1 = %d, m2 = %d",
 		     ((val & FP_N_DIV_MASK) >> FP_N_DIV_SHIFT),
 		     ((val & FP_M1_DIV_MASK) >> FP_M1_DIV_SHIFT),
@@ -256,8 +262,13 @@ DEBUGSTRING(i830_debug_dpll)
     int p1, p2 = 0;
 
     if (IS_I9XX(pI830)) {
-	p1 = ffs((val & DPLL_FPA01_P1_POST_DIV_MASK) >>
-		 DPLL_FPA01_P1_POST_DIV_SHIFT);
+	if (IS_IGD(pI830)) {
+	    p1 = ffs((val & DPLL_FPA01_P1_POST_DIV_MASK_IGD) >>
+		     DPLL_FPA01_P1_POST_DIV_SHIFT_IGD);
+	} else {
+	    p1 = ffs((val & DPLL_FPA01_P1_POST_DIV_MASK) >>
+		     DPLL_FPA01_P1_POST_DIV_SHIFT);
+	}
 	switch (val & DPLL_MODE_MASK) {
 	case DPLLB_MODE_DAC_SERIAL:
 	    mode = "DAC/serial";
@@ -893,7 +904,11 @@ void i830DumpRegs (ScrnInfoPtr pScrn)
 		    break;
 		}
 	    }
-	    switch ((dpll >> 16) & 0xff) {
+	    if (IS_IGD(pI830))
+		i = (dpll >> DPLL_FPA01_P1_POST_DIV_SHIFT_IGD) & 0x1ff;
+	    else
+		i = (dpll >> DPLL_FPA01_P1_POST_DIV_SHIFT) & 0xff;
+	    switch (i) {
 	    case 1:
 		p1 = 1; break;
 	    case 2:
@@ -910,6 +925,11 @@ void i830DumpRegs (ScrnInfoPtr pScrn)
 		p1 = 7; break;
 	    case 128:
 		p1 = 8; break;
+            case 256:
+		if (IS_IGD(pI830)) {
+		    p1 = 9;
+		    break;
+		} /* fallback */
 	    default:
 		p1 = 1;
 		xf86DrvMsg (pScrn->scrnIndex, X_WARNING, "p1 out of range\n");
@@ -999,11 +1019,19 @@ void i830DumpRegs (ScrnInfoPtr pScrn)
 			"fp select out of range\n");
 	    break;
 	}
-	n = ((fp >> 16) & 0x3f);
 	m1 = ((fp >> 8) & 0x3f);
-	m2 = ((fp >> 0) & 0x3f);
-	m = 5 * (m1 + 2) + (m2 + 2);
-	dot = (ref * (5 * (m1 + 2) + (m2 + 2)) / (n + 2)) / (p1 * p2);
+	if (IS_IGD(pI830)) {
+	    n = ffs((fp & FP_N_IGD_DIV_MASK) >> FP_N_DIV_SHIFT) - 1;
+	    m2 = (fp & FP_M2_IGD_DIV_MASK) >> FP_M2_DIV_SHIFT;
+	    m = m2 + 2;
+	    dot = (ref * m) / n / (p1 * p2);
+	} else {
+	    n = ((fp >> 16) & 0x3f);
+	    m2 = ((fp >> 0) & 0x3f);
+	    m = 5 * (m1 + 2) + (m2 + 2);
+	    dot = (ref * (5 * (m1 + 2) + (m2 + 2)) / (n + 2)) / (p1 * p2);
+	}
+
 	xf86DrvMsg (pScrn->scrnIndex, X_INFO, "pipe %s dot %d n %d m1 %d m2 %d p1 %d p2 %d\n",
 		    pipe == 0 ? "A" : "B", dot, n, m1, m2, p1, p2);
     }
diff --git a/src/i830_display.c b/src/i830_display.c
index 16908c6..e243bfd 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -100,6 +100,8 @@ typedef struct {
 #define I9XX_DOT_MAX		 400000
 #define I9XX_VCO_MIN		1400000
 #define I9XX_VCO_MAX		2800000
+#define IGD_VCO_MIN		1700000
+#define IGD_VCO_MAX		3500000
 
 /* Haven't found any reason to go this fast, but newer chips support it */
 #define I96X_VCO_MAX		3200000
@@ -111,19 +113,31 @@ typedef struct {
  */
 #define I9XX_N_MIN		      1
 #define I9XX_N_MAX		      6
+/* IGD's Ncounter is a ring counter */
+#define IGD_N_MIN		      3
+#define IGD_N_MAX		      6
 #define I9XX_M_MIN		     70
 #define I9XX_M_MAX		    120
+#define IGD_M_MIN		      2
+#define IGD_M_MAX		    256
 
 /* these two come from the calm1 macro */
 #define I9XX_M1_MIN		     10
 #define I9XX_M1_MAX		     22
 #define I9XX_M2_MIN		      5
 #define I9XX_M2_MAX		      9
+/* IGD M1 is reserved, and must be 0 */
+#define IGD_M1_MIN		      0
+#define IGD_M1_MAX		      0
+#define IGD_M2_MIN		      0
+#define IGD_M2_MAX		      254
 
 #define I9XX_P_SDVO_DAC_MIN	      5
 #define I9XX_P_SDVO_DAC_MAX	     80
 #define I9XX_P_LVDS_MIN		      7
 #define I9XX_P_LVDS_MAX		     98
+#define IGD_P_LVDS_MIN		      7
+#define IGD_P_LVDS_MAX		     112
 #define I9XX_P1_MIN		      1
 #define I9XX_P1_MAX		      8
 #define I9XX_P2_SDVO_DAC_SLOW		     10
@@ -137,6 +151,8 @@ typedef struct {
 #define INTEL_LIMIT_I8XX_LVDS	    1
 #define INTEL_LIMIT_I9XX_SDVO_DAC   2
 #define INTEL_LIMIT_I9XX_LVDS	    3
+#define INTEL_LIMIT_IGD_SDVO_DAC    4
+#define INTEL_LIMIT_IGD_LVDS	    5
 
 static const intel_limit_t intel_limits[] = {
     { /* INTEL_LIMIT_I8XX_DVO_DAC */
@@ -190,6 +206,31 @@ static const intel_limit_t intel_limits[] = {
 	.p2  = { .dot_limit = I9XX_P2_LVDS_SLOW_LIMIT,
 		 .p2_slow = I9XX_P2_LVDS_SLOW,	.p2_fast = I9XX_P2_LVDS_FAST },
     },
+    { /* INTEL_LIMIT_IGD_SDVO */
+        .dot = { .min = I9XX_DOT_MIN,		.max = I9XX_DOT_MAX},
+        .vco = { .min = IGD_VCO_MIN,		.max = IGD_VCO_MAX },
+        .n   = { .min = IGD_N_MIN,		.max = IGD_N_MAX },
+        .m   = { .min = IGD_M_MIN,		.max = IGD_M_MAX },
+        .m1  = { .min = IGD_M1_MIN,		.max = IGD_M1_MAX },
+        .m2  = { .min = IGD_M2_MIN,		.max = IGD_M2_MAX },
+        .p   = { .min = I9XX_P_SDVO_DAC_MIN,    .max = I9XX_P_SDVO_DAC_MAX },
+        .p1  = { .min = I9XX_P1_MIN,		.max = I9XX_P1_MAX },
+	.p2  = { .dot_limit = I9XX_P2_SDVO_DAC_SLOW_LIMIT,
+		 .p2_slow = I9XX_P2_SDVO_DAC_SLOW,	.p2_fast = I9XX_P2_SDVO_DAC_FAST },
+    },
+    { /* INTEL_LIMIT_IGD_LVDS */
+        .dot = { .min = I9XX_DOT_MIN,		.max = I9XX_DOT_MAX },
+        .vco = { .min = IGD_VCO_MIN,		.max = IGD_VCO_MAX },
+        .n   = { .min = IGD_N_MIN,		.max = IGD_N_MAX },
+        .m   = { .min = IGD_M_MIN,		.max = IGD_M_MAX },
+        .m1  = { .min = IGD_M1_MIN,		.max = IGD_M1_MAX },
+        .m2  = { .min = IGD_M2_MIN,		.max = IGD_M2_MAX },
+        .p   = { .min = IGD_P_LVDS_MIN,	.max = IGD_P_LVDS_MAX },
+        .p1  = { .min = I9XX_P1_MIN,		.max = I9XX_P1_MAX },
+	/* IGD only supports single-channel mode. */
+	.p2  = { .dot_limit = I9XX_P2_LVDS_SLOW_LIMIT,
+		 .p2_slow = I9XX_P2_LVDS_SLOW,	.p2_fast = I9XX_P2_LVDS_SLOW },
+    },
 };
 
 static const intel_limit_t *intel_limit (xf86CrtcPtr crtc)
@@ -198,11 +239,16 @@ static const intel_limit_t *intel_limit (xf86CrtcPtr crtc)
     I830Ptr	pI830 = I830PTR(pScrn);
     const intel_limit_t *limit;
 
-    if (IS_I9XX(pI830)) {
+    if (IS_I9XX(pI830) && !IS_IGD(pI830)) {
 	if (i830PipeHasType (crtc, I830_OUTPUT_LVDS))
 	    limit = &intel_limits[INTEL_LIMIT_I9XX_LVDS];
 	else
 	    limit = &intel_limits[INTEL_LIMIT_I9XX_SDVO_DAC];
+    } else if (IS_IGD(pI830)) {
+	if (i830PipeHasType (crtc, I830_OUTPUT_LVDS))
+	    limit = &intel_limits[INTEL_LIMIT_IGD_LVDS];
+	else
+	    limit = &intel_limits[INTEL_LIMIT_IGD_SDVO_DAC];
     } else {
 	if (i830PipeHasType (crtc, I830_OUTPUT_LVDS))
 	    limit = &intel_limits[INTEL_LIMIT_I8XX_LVDS];
@@ -233,11 +279,23 @@ static void i9xx_clock(int refclk, intel_clock_t *clock)
     clock->dot = clock->vco / clock->p;
 }
 
+/* m1 is reserved as 0 in IGD, n is a ring counter */
+static void igd_clock(int refclk, intel_clock_t *clock)
+{
+    clock->m = clock->m2 + 2;
+    clock->p = clock->p1 * clock->p2;
+    clock->vco = refclk * clock->m / clock->n;
+    clock->dot = clock->vco / clock->p;
+}
+
 static void intel_clock(I830Ptr pI830, int refclk, intel_clock_t *clock)
 {
-    if (IS_I9XX(pI830))
-	i9xx_clock (refclk, clock);
-    else
+    if (IS_I9XX(pI830)) {
+	if (IS_IGD(pI830))
+	    igd_clock(refclk, clock);
+	else
+	    i9xx_clock (refclk, clock);
+    } else
 	i8xx_clock (refclk, clock);
 }
 
@@ -286,6 +344,8 @@ static Bool
 i830PllIsValid(xf86CrtcPtr crtc, intel_clock_t *clock)
 {
     const intel_limit_t *limit = intel_limit (crtc);
+    ScrnInfoPtr pScrn = crtc->scrn;
+    I830Ptr pI830 = I830PTR(pScrn);
 
     if (clock->p1  < limit->p1.min  || limit->p1.max  < clock->p1)
 	i830PllInvalid ("p1 out of range\n");
@@ -295,7 +355,7 @@ i830PllIsValid(xf86CrtcPtr crtc, intel_clock_t *clock)
 	i830PllInvalid ("m2 out of range\n");
     if (clock->m1  < limit->m1.min  || limit->m1.max  < clock->m1)
 	i830PllInvalid ("m1 out of range\n");
-    if (clock->m1 <= clock->m2)
+    if (clock->m1 <= clock->m2 && !IS_IGD(pI830))
 	i830PllInvalid ("m1 <= m2\n");
     if (clock->m   < limit->m.min   || limit->m.max   < clock->m)
 	i830PllInvalid ("m out of range\n");
@@ -347,8 +407,11 @@ i830FindBestPLL(xf86CrtcPtr crtc, int target, int refclk, intel_clock_t *best_cl
 
     for (clock.m1 = limit->m1.min; clock.m1 <= limit->m1.max; clock.m1++) 
     {
-	for (clock.m2 = limit->m2.min; clock.m2 < clock.m1 && clock.m2 <= limit->m2.max; clock.m2++) 
+	for (clock.m2 = limit->m2.min; clock.m2 <= limit->m2.max; clock.m2++)
 	{
+	    /* m1 is always 0 in IGD */
+	    if (clock.m2 >= clock.m1 && !IS_IGD(pI830))
+		break;
 	    for (clock.n = limit->n.min; clock.n <= limit->n.max; clock.n++) 
 	    {
 		for (clock.p1 = limit->p1.min; clock.p1 <= limit->p1.max; clock.p1++) 
@@ -1055,11 +1118,11 @@ i830_get_core_clock_speed(ScrnInfoPtr pScrn)
     /* Core clock values taken from the published datasheets.
      * The 830 may go up to 166 Mhz, which we should check.
      */
-    if (IS_I945G(pI830) || IS_G33CLASS(pI830))
+    if (IS_I945G(pI830) || (IS_G33CLASS(pI830) && !IS_IGDGM(pI830)))
 	return 400000;
     else if (IS_I915G(pI830))
 	return 333000;
-    else if (IS_I945GM(pI830) || IS_845G(pI830))
+    else if (IS_I945GM(pI830) || IS_845G(pI830) || IS_IGDGM(pI830))
 	return 200000;
     else if (IS_I915GM(pI830)) {
 	uint16_t gcfgc;
@@ -1324,7 +1387,10 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
 	}
     }
 
-    fp = clock.n << 16 | clock.m1 << 8 | clock.m2;
+    if (IS_IGD(pI830))
+	fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2;
+    else
+	fp = clock.n << 16 | clock.m1 << 8 | clock.m2;
 
     dpll = DPLL_VGA_MODE_DIS;
     if (IS_I9XX(pI830)) {
@@ -1343,7 +1409,10 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
 	}
 	
 	/* compute bitmask from p1 value */
-	dpll |= (1 << (clock.p1 - 1)) << 16;
+	if (IS_IGD(pI830))
+	    dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT_IGD;
+	else
+	    dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT;
 	switch (clock.p2) {
 	case 5:
 	    dpll |= DPLL_DAC_SERIAL_P2_CLOCK_DIV_5;
@@ -1915,11 +1984,20 @@ i830_crtc_clock_get(ScrnInfoPtr pScrn, xf86CrtcPtr crtc)
 	fp = INREG((pipe == 0) ? FPA1 : FPB1);
 
     clock.m1 = (fp & FP_M1_DIV_MASK) >> FP_M1_DIV_SHIFT;
-    clock.m2 = (fp & FP_M2_DIV_MASK) >> FP_M2_DIV_SHIFT;
-    clock.n = (fp & FP_N_DIV_MASK) >> FP_N_DIV_SHIFT;
+    if (IS_IGD(pI830)) {
+	clock.n = ffs((fp & FP_N_IGD_DIV_MASK) >> FP_N_DIV_SHIFT) - 1;
+	clock.m2 = (fp & FP_M2_IGD_DIV_MASK) >> FP_M2_DIV_SHIFT;
+    } else {
+	clock.n = (fp & FP_N_DIV_MASK) >> FP_N_DIV_SHIFT;
+	clock.m2 = (fp & FP_M2_DIV_MASK) >> FP_M2_DIV_SHIFT;
+    }
     if (IS_I9XX(pI830)) {
-	clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK) >>
-		       DPLL_FPA01_P1_POST_DIV_SHIFT);
+	if (IS_IGD(pI830))
+	    clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK_IGD) >>
+			   DPLL_FPA01_P1_POST_DIV_SHIFT_IGD);
+	else
+	    clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK) >>
+			   DPLL_FPA01_P1_POST_DIV_SHIFT);
 
 	switch (dpll & DPLL_MODE_MASK) {
 	case DPLLB_MODE_DAC_SERIAL:
@@ -1936,9 +2014,9 @@ i830_crtc_clock_get(ScrnInfoPtr pScrn, xf86CrtcPtr crtc)
 	}
 
 	if ((dpll & PLL_REF_INPUT_MASK) == PLLB_REF_INPUT_SPREADSPECTRUMIN)
-	    i9xx_clock(100000, &clock);
+	    intel_clock(pI830, 100000, &clock);
 	else
-	    i9xx_clock(96000, &clock);
+	    intel_clock(pI830, 96000, &clock);
     } else {
 	Bool is_lvds = (pipe == 1) && (INREG(LVDS) & LVDS_PORT_EN);
 
@@ -1953,9 +2031,9 @@ i830_crtc_clock_get(ScrnInfoPtr pScrn, xf86CrtcPtr crtc)
 		clock.p2 = 14;
 
 	    if ((dpll & PLL_REF_INPUT_MASK) == PLLB_REF_INPUT_SPREADSPECTRUMIN)
-		i8xx_clock(66000, &clock); /* XXX: might not be 66MHz */
+		intel_clock(pI830, 66000, &clock); /* XXX: might not be 66MHz */
 	    else
-		i8xx_clock(48000, &clock);		
+		intel_clock(pI830, 48000, &clock);
 	} else {
 	    if (dpll & PLL_P1_DIVIDE_BY_TWO) {
 		clock.p1 = 2;
@@ -1968,7 +2046,7 @@ i830_crtc_clock_get(ScrnInfoPtr pScrn, xf86CrtcPtr crtc)
 	    else
 		clock.p2 = 2;
 
-	    i8xx_clock(48000, &clock);
+	    intel_clock(pI830, 48000, &clock);
 	}
     }
 
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 1e4da65..342a059 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -244,6 +244,8 @@ static SymTabRec I830Chipsets[] = {
    {PCI_CHIP_I945_G,		"945G"},
    {PCI_CHIP_I945_GM,		"945GM"},
    {PCI_CHIP_I945_GME,		"945GME"},
+   {PCI_CHIP_IGD_GM,		"IGD"},
+   {PCI_CHIP_IGD_G,		"IGD"},
    {PCI_CHIP_I965_G,		"965G"},
    {PCI_CHIP_G35_G,		"G35"},
    {PCI_CHIP_I965_Q,		"965Q"},
@@ -272,6 +274,8 @@ static PciChipsets I830PciChipsets[] = {
    {PCI_CHIP_I945_G,		PCI_CHIP_I945_G,	RES_SHARED_VGA},
    {PCI_CHIP_I945_GM,		PCI_CHIP_I945_GM,	RES_SHARED_VGA},
    {PCI_CHIP_I945_GME,		PCI_CHIP_I945_GME,	RES_SHARED_VGA},
+   {PCI_CHIP_IGD_GM,		PCI_CHIP_IGD_GM,	RES_SHARED_VGA},
+   {PCI_CHIP_IGD_G,		PCI_CHIP_IGD_G,		RES_SHARED_VGA},
    {PCI_CHIP_I965_G,		PCI_CHIP_I965_G,	RES_SHARED_VGA},
    {PCI_CHIP_G35_G,		PCI_CHIP_G35_G,		RES_SHARED_VGA},
    {PCI_CHIP_I965_Q,		PCI_CHIP_I965_Q,	RES_SHARED_VGA},
@@ -501,7 +505,7 @@ I830DetectMemory(ScrnInfoPtr pScrn)
    range = gtt_size + 4;
 
    /* new 4 series hardware has seperate GTT stolen with GFX stolen */
-   if (IS_G4X(pI830))
+   if (IS_G4X(pI830) || IS_IGD(pI830))
        range = 4;
 
    if (IS_I85X(pI830) || IS_I865G(pI830) || IS_I9XX(pI830)) {
@@ -1330,6 +1334,12 @@ i830_detect_chipset(ScrnInfoPtr pScrn)
     case PCI_CHIP_I945_GME:
 	chipname = "945GME";
 	break;
+    case PCI_CHIP_IGD_GM:
+	chipname = "IGD";
+	break;
+    case PCI_CHIP_IGD_G:
+	chipname = "IGD";
+	break;
     case PCI_CHIP_I965_G:
 	chipname = "965G";
 	break;
commit 22dc9a5580d77cc4707bfb8e19474e611a06ae9a
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb 24 18:22:20 2009 -0800

    Fix UXA for server 1.4.

diff --git a/Makefile.am b/Makefile.am
index 896427f..d1118fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,11 +20,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-if BUILD_UXA
-UXA_DIR = uxa
-endif
-
-SUBDIRS = $(UXA_DIR) src man
+SUBDIRS = uxa src man
 
 EXTRA_DIST = README
 DISTCLEANFILES = doltcompile
diff --git a/configure.ac b/configure.ac
index a6ced67..3f6f1b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,7 +84,13 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
-PKG_CHECK_MODULES(UXA, [xorg-server >= 1.5], [BUILD_UXA=yes], [BUILD_UXA=no])
+
+PKG_CHECK_MODULES(SERVER_1_5, [xorg-server >= 1.5],
+			      [SERVER_1_5=yes], [SERVER_1_5=no])
+
+if test "$SERVER_1_5" = yes; then
+   AC_DEFINE(SERVER_1_5, 1, [Building against server 1.5])
+fi
 
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 drm_cflags=$(pkg-config --cflags libdrm)
@@ -118,11 +124,6 @@ if test x$DRI = xauto; then
 fi
 AC_MSG_RESULT([$DRI])
 
-AM_CONDITIONAL(BUILD_UXA, test $BUILD_UXA = yes)
-if test "$BUILD_UXA" = yes; then
-	AC_DEFINE(I830_USE_UXA, 1, [UMA Acceleration Architecture support])
-fi
-
 AC_CHECK_HEADER(xf86Modes.h,[XMODES=yes],[XMODES=no],[#include "xorg-server.h"])
 AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
 	      [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
@@ -182,8 +183,6 @@ else
 fi
 
 AC_SUBST([XMODES_CFLAGS])
-UXA_CFLAGS='-I$(top_srcdir)/uxa'
-AC_SUBST([UXA_CFLAGS])
 
 SAVE_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
@@ -215,9 +214,9 @@ if test "$DRI" = yes; then
         AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
 fi
 
-dnl exaGetPixmapDriverPrivate required for DRM_MODE.
+dnl Server 1.5's set_mode_major required for DRM_MODE.
 PKG_CHECK_MODULES(DRM_MODE, [xorg-server >= 1.5],
-		  [DRM_MODE=yes], [DRM_MODE=no])
+		 [DRM_MODE=yes], [DRM_MODE=no])
 if test "x$DRM_MODE" = xyes; then
 	AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting])
 fi
diff --git a/src/Makefile.am b/src/Makefile.am
index cbe9fb1..e05dbab 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,16 +31,13 @@ SUBDIRS = xvmc bios_reader ch7017 ch7xxx ivch sil164 tfp410 $(REGDUMPER)
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
 
 AM_CFLAGS = @WARN_CFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ \
-	@PCIACCESS_CFLAGS@ @UXA_CFLAGS@ \
-	@XMODES_CFLAGS@ -DI830_XV -DI830_USE_XAA -DI830_USE_EXA
+	@PCIACCESS_CFLAGS@ -I$(top_srcdir)/uxa \
+	@XMODES_CFLAGS@ -DI830_XV -DI830_USE_XAA -DI830_USE_EXA -DI830_USE_UXA
 
 intel_drv_la_LTLIBRARIES = intel_drv.la
 intel_drv_la_LDFLAGS = -module -avoid-version
 intel_drv_ladir = @moduledir@/drivers
-intel_drv_la_LIBADD = -lm @DRM_LIBS@ -ldrm_intel
-if BUILD_UXA
-intel_drv_la_LIBADD += ../uxa/libuxa.la
-endif
+intel_drv_la_LIBADD = -lm @DRM_LIBS@ -ldrm_intel ../uxa/libuxa.la
 if XSERVER_LIBPCIACCESS
 intel_drv_la_LIBADD += @PCIACCESS_LIBS@
 endif
diff --git a/src/i830.h b/src/i830.h
index 3f10892..a0ae571 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -975,6 +975,10 @@ i830_get_transformed_coordinates_3d(int x, int y, PictTransformPtr transform,
 
 void i830_enter_render(ScrnInfoPtr);
 
+#ifndef SERVER_1_5
+Bool xf86MonitorIsHDMI(xf86MonPtr mon);
+#endif
+
 static inline void
 i830_wait_ring_idle(ScrnInfoPtr pScrn)
 {
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 1506ea7..1e4da65 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1140,10 +1140,12 @@ i830_pad_drawable_width(int width, int cpp)
 static Bool
 i830_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 {
+#ifdef DRI2
     I830Ptr	i830 = I830PTR(scrn);
+    int		old_width = scrn->displayWidth;
+#endif
     int		old_x = scrn->virtualX;
     int		old_y = scrn->virtualY;
-    int		old_width = scrn->displayWidth;
 
     if (old_x == width && old_y == height)
 	return TRUE;
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 20e7a13..b9d6c64 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -81,6 +81,22 @@ const int I830PatternROP[16] =
     ROP_1
 };
 
+#ifdef I830_USE_UXA
+static int uxa_pixmap_index;
+#endif
+
+#ifndef SERVER_1_5
+static inline void *dixLookupPrivate(DevUnion **privates, int *key)
+{
+    return (*privates)[*key].ptr;
+}
+
+static inline void dixSetPrivate(DevUnion **privates, int *key, void *val)
+{
+    (*privates)[*key].ptr = val;
+}
+#endif
+
 /**
  * Returns whether a given pixmap is tiled or not.
  *
@@ -761,10 +777,6 @@ I830EXAInit(ScreenPtr pScreen)
     return TRUE;
 }
 
-#ifdef I830_USE_UXA
-static int uxa_pixmap_index;
-#endif
-
 dri_bo *
 i830_get_pixmap_bo(PixmapPtr pixmap)
 {
@@ -841,7 +853,7 @@ i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access)
 	    i830->need_sync = FALSE;
 	}
 
-	if (pScrn->vtSema && !pI830->use_drm_mode) {
+	if (pScrn->vtSema && !pI830->use_drm_mode && pI830->memory_manager) {
 	    if (drm_intel_bo_pin(bo, 4096) != 0)
 		return FALSE;
 	    drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW);
@@ -867,7 +879,7 @@ i830_uxa_finish_access (PixmapPtr pixmap)
 	ScrnInfoPtr scrn = xf86Screens[screen->myNum];
 	I830Ptr i830 = I830PTR(scrn);
 
-	if (pScrn->vtSema && !pI830->use_drm_mode)
+	if (pScrn->vtSema && !pI830->use_drm_mode && pI830->memory_manager)
 	    drm_intel_bo_unpin(bo);
 	else
 	    dri_bo_unmap(bo);
@@ -914,8 +926,12 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
     if (w > 32767 || h > 32767)
 	return NullPixmap;
 
+#ifdef SERVER_1_5
     pixmap = fbCreatePixmap (screen, 0, 0, depth, usage);
-    
+#else
+    pixmap = fbCreatePixmap (screen, 0, 0, depth);
+#endif
+
     if (w && h)
     {
 	unsigned int size;
@@ -950,6 +966,15 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
     return pixmap;
 }
 
+
+#ifndef SERVER_1_5
+static PixmapPtr
+i830_uxa_server_14_create_pixmap (ScreenPtr screen, int w, int h, int depth)
+{
+    return i830_uxa_create_pixmap(screen, w, h, depth, 0);
+}
+#endif
+
 static Bool
 i830_uxa_destroy_pixmap (PixmapPtr pixmap)
 {
@@ -982,9 +1007,14 @@ i830_uxa_init (ScreenPtr pScreen)
     ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
     I830Ptr i830 = I830PTR(scrn);
 
+#ifdef SERVER_1_5
     if (!dixRequestPrivate(&uxa_pixmap_index, 0))
 	return FALSE;
-    
+#else
+    if (!AllocatePixmapPrivate(pScreen, uxa_pixmap_index, 0))
+	return FALSE;
+#endif
+
     i830->uxa_driver = uxa_driver_alloc();
     if (i830->uxa_driver == NULL) {
 	i830->accel = ACCEL_NONE;
@@ -1038,7 +1068,11 @@ i830_uxa_init (ScreenPtr pScreen)
 	return FALSE;
     }
 
+#ifdef SERVER_1_5
     pScreen->CreatePixmap = i830_uxa_create_pixmap;
+#else
+    pScreen->CreatePixmap = i830_uxa_server_14_create_pixmap;
+#endif
     pScreen->DestroyPixmap = i830_uxa_destroy_pixmap;
 
     I830SelectBuffer(scrn, I830_SELECT_FRONT);
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index 1b0af9c..e322054 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -977,6 +977,68 @@ out:
     return ret;
 }
 
+#ifndef SERVER_1_5
+void
+uxa_paint_window(WindowPtr pWin, RegionPtr pRegion, int what)
+{
+    ScreenPtr       screen = pWin->drawable.pScreen;
+    uxa_screen_t    *uxa_screen = uxa_get_screen(screen);
+    DDXPointRec     zeros = { 0, 0 };
+
+    if (REGION_NIL(pRegion))
+	return;
+
+    if (uxa_screen->swappedOut) {
+	uxa_check_paint_window(pWin, pRegion, what);
+	return;
+    }
+
+    switch (what) {
+    case PW_BACKGROUND:
+	switch (pWin->backgroundState) {
+	case None:
+	    return;
+	case ParentRelative:
+	    do {
+		pWin = pWin->parent;
+	    } while (pWin->backgroundState == ParentRelative);
+	    (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
+							     what);
+	    return;
+	case BackgroundPixel:
+	    if (uxa_fill_region_solid(&pWin->drawable, pRegion,
+				      pWin->background.pixel,
+				      FB_ALLONES, GXcopy))
+		return;
+	    break;
+	case BackgroundPixmap:
+	    if (uxa_fill_region_tiled(&pWin->drawable, pRegion,
+				      pWin->background.pixmap,
+				      &zeros, FB_ALLONES, GXcopy))
+		return;
+	    break;
+	}
+	break;
+    case PW_BORDER:
+	if (pWin->borderIsPixel) {
+	    if (uxa_fill_region_solid(&pWin->drawable, pRegion,
+				      pWin->border.pixel,
+				      FB_ALLONES, GXcopy))
+		return;
+	    break;
+	} else {
+	    if (uxa_fill_region_tiled(&pWin->drawable, pRegion,
+				      pWin->border.pixmap,
+				      &zeros, FB_ALLONES, GXcopy))
+		return;
+	    break;
+	}
+	break;
+    }
+
+    uxa_check_paint_window(pWin, pRegion, what);
+}
+#endif /* !SERVER_1_5 */
 
 /**
  * Accelerates GetImage for solid ZPixmap downloads from framebuffer memory.
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index 1c06e6d..5abd001 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -50,6 +50,8 @@
 
 #include "mipict.h"
 
+#ifdef SERVER_1_5
+
 #if DEBUG_GLYPH_CACHE
 #define DBG_GLYPH_CACHE(a) ErrorF a
 #else
@@ -887,3 +889,5 @@ uxa_glyphs (CARD8 	 op,
 	(*pScreen->DestroyPixmap) (pMaskPixmap);
     }
 }
+
+#endif /* SERVER_1_5 */
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
index bdc6e82..d1cd341 100644
--- a/uxa/uxa-priv.h
+++ b/uxa/uxa-priv.h
@@ -26,6 +26,9 @@
 #ifndef UXAPRIV_H
 #define UXAPRIV_H
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #else
@@ -126,6 +129,10 @@ typedef struct {
     CloseScreenProcPtr 		 SavedCloseScreen;
     GetImageProcPtr 		 SavedGetImage;
     GetSpansProcPtr 		 SavedGetSpans;
+#ifndef SERVER_1_5
+    PaintWindowBackgroundProcPtr SavedPaintWindowBackground;
+    PaintWindowBorderProcPtr	 SavedPaintWindowBorder;
+#endif
     CreatePixmapProcPtr 	 SavedCreatePixmap;
     DestroyPixmapProcPtr 	 SavedDestroyPixmap;
     CopyWindowProcPtr 		 SavedCopyWindow;
@@ -161,7 +168,16 @@ typedef struct {
 #endif
 
 extern int uxa_screen_index;
-#define uxa_get_screen(s) ((uxa_screen_t *)dixLookupPrivate(&(s)->devPrivates, &uxa_screen_index))
+static inline uxa_screen_t *
+uxa_get_screen(ScreenPtr screen)
+{
+#ifdef SERVER_1_5
+    return (uxa_screen_t *)dixLookupPrivate(&screen->devPrivates,
+					    &uxa_screen_index);
+#else
+    return screen->devPrivates[uxa_screen_index].ptr;
+#endif
+}
 
 /** Align an offset to an arbitrary alignment */
 #define UXA_ALIGN(offset, align) (((offset) + (align) - 1) - \
@@ -262,6 +278,8 @@ uxa_check_get_spans (DrawablePtr pDrawable,
 		 int nspans,
 		 char *pdstStart);
 
+void uxa_check_paint_window (WindowPtr pWin, RegionPtr pRegion, int what);
+
 void
 uxa_check_add_traps (PicturePtr	pPicture,
 		  INT16		x_off,
@@ -292,6 +310,8 @@ uxa_shm_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, unsigned int form
 	       int w, int h, int sx, int sy, int sw, int sh, int dx, int dy,
 	       char *data);
 
+void uxa_paint_window(WindowPtr pWin, RegionPtr pRegion, int what);
+
 void
 uxa_get_image (DrawablePtr pDrawable, int x, int y, int w, int h,
 	     unsigned int format, unsigned long planeMask, char *d);
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index b377bf5..edbf0d8 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -818,8 +818,13 @@ uxa_create_alpha_picture (ScreenPtr     pScreen,
 	    return 0;
     }
 
+#ifdef SERVER_1_5
     pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
 					pPictFormat->depth, 0);
+#else
+    pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
+					pPictFormat->depth);
+#endif
     if (!pPixmap)
 	return 0;
     pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
diff --git a/uxa/uxa-unaccel.c b/uxa/uxa-unaccel.c
index 8f86468..f63c03b 100644
--- a/uxa/uxa-unaccel.c
+++ b/uxa/uxa-unaccel.c
@@ -336,6 +336,24 @@ uxa_check_get_spans (DrawablePtr pDrawable,
     }
 }
 
+#ifndef SERVER_1_5
+void
+uxa_check_paint_window (WindowPtr pWin, RegionPtr pRegion, int what)
+{
+    ScreenPtr screen = pWin->drawable.pScreen;
+
+    UXA_FALLBACK(("from %p (%c)\n", pWin,
+		  uxa_drawable_location (&pWin->drawable)));
+    if (uxa_prepare_access (&pWin->drawable, UXA_ACCESS_RW)) {
+	if (uxa_prepare_access_window (pWin)) {
+	    fbPaintWindow (pWin, pRegion, what);
+	    uxa_finish_access_window (pWin);
+	}
+	uxa_finish_access(&pWin->drawable);
+    }
+}
+#endif
+
 void
 uxa_check_composite (CARD8      op,
                    PicturePtr pSrc,
diff --git a/uxa/uxa.c b/uxa/uxa.c
index 0de408c..b51a282 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -40,6 +40,9 @@
 #include "uxa.h"
 
 int uxa_screen_index;
+#ifndef SERVER_1_5
+static int uxa_generation;
+#endif
 
 /**
  * uxa_get_drawable_pixmap() returns a backing pixmap for a given drawable.
@@ -367,12 +370,18 @@ uxa_close_screen(int i, ScreenPtr pScreen)
     PictureScreenPtr	ps = GetPictureScreenIfSet(pScreen);
 #endif
 
+#ifdef SERVER_1_5
     uxa_glyphs_fini(pScreen);
+#endif
 
     pScreen->CreateGC = uxa_screen->SavedCreateGC;
     pScreen->CloseScreen = uxa_screen->SavedCloseScreen;
     pScreen->GetImage = uxa_screen->SavedGetImage;
     pScreen->GetSpans = uxa_screen->SavedGetSpans;
+#ifndef SERVER_1_5
+    pScreen->PaintWindowBackground = uxa_screen->SavedPaintWindowBackground;
+    pScreen->PaintWindowBorder = uxa_screen->SavedPaintWindowBorder;
+#endif
     pScreen->CreatePixmap = uxa_screen->SavedCreatePixmap;
     pScreen->DestroyPixmap = uxa_screen->SavedDestroyPixmap;
     pScreen->CopyWindow = uxa_screen->SavedCopyWindow;
@@ -469,7 +478,15 @@ uxa_driver_init(ScreenPtr screen, uxa_driver_t *uxa_driver)
 
     uxa_screen->info = uxa_driver;
 
+#ifdef SERVER_1_5
     dixSetPrivate(&screen->devPrivates, &uxa_screen_index, uxa_screen);
+#else
+    if (uxa_generation != serverGeneration) {
+	uxa_screen_index = AllocateScreenPrivateIndex();
+	uxa_generation = serverGeneration;
+    }
+    screen->devPrivates[uxa_screen_index].ptr = uxa_screen;
+#endif
 
 //    exaDDXDriverInit(screen);
 
@@ -488,6 +505,14 @@ uxa_driver_init(ScreenPtr screen, uxa_driver_t *uxa_driver)
     uxa_screen->SavedGetSpans = screen->GetSpans;
     screen->GetSpans = uxa_check_get_spans;
 
+#ifndef SERVER_1_5
+    uxa_screen->SavedPaintWindowBackground = screen->PaintWindowBackground;
+    screen->PaintWindowBackground = uxa_paint_window;
+
+    uxa_screen->SavedPaintWindowBorder = screen->PaintWindowBorder;
+    screen->PaintWindowBorder = uxa_paint_window;
+#endif /* !SERVER_1_5 */
+
     uxa_screen->SavedCopyWindow = screen->CopyWindow;
     screen->CopyWindow = uxa_copy_window;
 
@@ -505,9 +530,11 @@ uxa_driver_init(ScreenPtr screen, uxa_driver_t *uxa_driver)
         uxa_screen->SavedComposite = ps->Composite;
 	ps->Composite = uxa_composite;
 
+#ifdef SERVER_1_5
 	uxa_screen->SavedGlyphs = ps->Glyphs;
 	ps->Glyphs = uxa_glyphs;
-	
+#endif
+
 	uxa_screen->SavedTriangles = ps->Triangles;
 	ps->Triangles = uxa_triangles;
 
@@ -527,7 +554,9 @@ uxa_driver_init(ScreenPtr screen, uxa_driver_t *uxa_driver)
     ShmRegisterFuncs(screen, &uxa_shm_funcs);
 #endif
 
+#ifdef SERVER_1_5
     uxa_glyphs_init(screen);
+#endif
 
     LogMessage(X_INFO, "UXA(%d): Driver registered support for the following"
 	       " operations:\n", screen->myNum);
commit cb1f7ec0876746c1b52b63cdb508544e9e4e32e3
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb 24 21:23:59 2009 -0800

    uxa: Fix composite fallback debug printing of main memory versus bo info.
    
    It was just printing whether it was a pixmap (it is), instead of whether the
    pixmap was offscreen.

diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 60022cc..b377bf5 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -69,7 +69,7 @@ static void uxa_composite_fallback_pict_desc(PicturePtr pict, char *string, int
 	break;
     }
 
-    loc = uxa_get_drawable_pixmap(pict->pDrawable) ? 's' : 'm';
+    loc = uxa_drawable_is_offscreen(pict->pDrawable) ? 's' : 'm';
 
     snprintf(size, 20, "%dx%d%s", pict->pDrawable->width,
 	     pict->pDrawable->height, pict->repeat ?
commit 635eaa511f28fb673fe306e46ed5370e78a8a534
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb 24 21:48:11 2009 -0800

    Regard the screen pixmap as suitable for acceleration.
    
    With UXA on the fake bufmgr, the screen pixmap doesn't have a BO and so
    no acceleration was occurring.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index d691f3d..20e7a13 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -893,6 +893,12 @@ i830_uxa_block_handler (ScreenPtr screen)
 static Bool
 i830_uxa_pixmap_is_offscreen(PixmapPtr pixmap)
 {
+    ScreenPtr screen = pixmap->drawable.pScreen;
+
+    /* The front buffer is always in memory and pinned */
+    if (screen->GetScreenPixmap(screen) == pixmap)
+	return TRUE;
+
     return i830_get_pixmap_bo (pixmap) != NULL;
 }
 
commit 70e0261208654c6c875ad462da2734c6aa9eeb96
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb 24 20:54:05 2009 -0800

    Disable fb resizing for DRI1-only server so that DRI1 can initialize.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 2461e8a..1506ea7 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1684,6 +1684,10 @@ I830AccelMethodInit(ScrnInfoPtr pScrn)
     pI830->can_resize = FALSE;
     if (pI830->accel == ACCEL_UXA && pI830->directRenderingType != DRI_XF86DRI)
 	pI830->can_resize = TRUE;
+#if !defined(DRI2) && defined(XF86DRI)
+    /* Disable resizing so that DRI1 can initialize and give us GEM support. */
+    pI830->can_resize = FALSE;
+#endif
 
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 	       "Resizable framebuffer: %s (%d %d)\n",
commit d7aa330db31100b7cb54d8165f9a4b94329ece32
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb 24 20:34:10 2009 -0800

    Fix up i915 composite and common solid/copy code to use check_aperture.
    
    This could fix complaints about binding BOs and resulting failure to render.

diff --git a/src/i830.h b/src/i830.h
index eb686ae..3f10892 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -87,6 +87,8 @@ unsigned long long I830TexOffsetStart(PixmapPtr pPix);
 Bool i830_uxa_init(ScreenPtr pScreen);
 void i830_uxa_create_screen_resources(ScreenPtr pScreen);
 void i830_uxa_block_handler (ScreenPtr pScreen);
+Bool i830_get_aperture_space(ScrnInfoPtr pScrn, drm_intel_bo **bo_table,
+			     int num_bos);
 #endif
 
 #if defined(I830_USE_UXA) || defined(I830_USE_EXA)
diff --git a/src/i830_exa.c b/src/i830_exa.c
index b878402..d691f3d 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -121,6 +121,21 @@ i830_pixmap_tiled(PixmapPtr pPixmap)
     return FALSE;
 }
 
+Bool
+i830_get_aperture_space(ScrnInfoPtr pScrn, drm_intel_bo **bo_table, int num_bos)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+
+    bo_table[0] = pI830->batch_bo;
+    if (drm_intel_bufmgr_check_aperture_space(bo_table, num_bos) != 0) {
+	intel_batch_flush(pScrn, FALSE);
+	bo_table[0] = pI830->batch_bo;
+	if (drm_intel_bufmgr_check_aperture_space(bo_table, num_bos) != 0)
+	    I830FALLBACK("Couldn't get aperture space for BOs\n");
+    }
+    return TRUE;
+}
+
 static unsigned long
 i830_pixmap_pitch(PixmapPtr pixmap)
 {
@@ -178,6 +193,10 @@ I830EXAPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg)
     ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum];
     I830Ptr pI830 = I830PTR(pScrn);
     unsigned long pitch;
+    drm_intel_bo *bo_table[] = {
+	NULL, /* batch_bo */
+	i830_get_pixmap_bo(pPixmap),
+    };
 
     if (!EXA_PM_IS_SOLID(&pPixmap->drawable, planemask))
 	I830FALLBACK("planemask is not solid");
@@ -195,6 +214,9 @@ I830EXAPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg)
     if (!i830_pixmap_pitch_is_aligned(pPixmap))
 	I830FALLBACK("pixmap pitch not aligned");
 
+    if (!i830_get_aperture_space(pScrn, bo_table, ARRAY_SIZE(bo_table)))
+	return FALSE;
+
     pI830->BR[13] = (I830PatternROP[alu] & 0xff) << 16 ;
     switch (pPixmap->drawable.bitsPerPixel) {
 	case 8:
@@ -272,6 +294,11 @@ I830EXAPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
 {
     ScrnInfoPtr pScrn = xf86Screens[pDstPixmap->drawable.pScreen->myNum];
     I830Ptr pI830 = I830PTR(pScrn);
+    drm_intel_bo *bo_table[] = {
+	NULL, /* batch_bo */
+	i830_get_pixmap_bo(pSrcPixmap),
+	i830_get_pixmap_bo(pDstPixmap),
+    };
 
     if (!EXA_PM_IS_SOLID(&pSrcPixmap->drawable, planemask))
 	I830FALLBACK("planemask is not solid");
@@ -279,6 +306,9 @@ I830EXAPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
     if (pDstPixmap->drawable.bitsPerPixel < 8)
 	I830FALLBACK("under 8bpp pixmaps unsupported\n");
 
+    if (!i830_get_aperture_space(pScrn, bo_table, ARRAY_SIZE(bo_table)))
+	return FALSE;
+
     i830_exa_check_pitch_2d(pSrcPixmap);
     i830_exa_check_pitch_2d(pDstPixmap);
 
diff --git a/src/i915_render.c b/src/i915_render.c
index 5dd97e6..4190808 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -315,6 +315,12 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture,
 {
     ScrnInfoPtr pScrn = xf86Screens[pSrcPicture->pDrawable->pScreen->myNum];
     I830Ptr pI830 = I830PTR(pScrn);
+    drm_intel_bo *bo_table[] = {
+	NULL, /* batch_bo */
+	i830_get_pixmap_bo(pSrc),
+	pMask ? i830_get_pixmap_bo(pMask) : NULL,
+	i830_get_pixmap_bo(pDst),
+    };
 
     i830_exa_check_pitch_3d(pSrc);
     if (pMask)
@@ -325,6 +331,9 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture,
 			      &pI830->i915_render_state.dst_format))
 	return FALSE;
 
+    if (!i830_get_aperture_space(pScrn, bo_table, ARRAY_SIZE(bo_table)))
+	return FALSE;
+
     pI830->i915_render_state.is_nearest = FALSE;
     if (!i915_texture_setup(pSrcPicture, pSrc, 0))
 	I830FALLBACK("fail to setup src texture\n");
commit a625a07022ea7f6757b288fcc2ffb9e27c7f8341
Author: Xiang, Haihao <haihao.xiang at intel.com>
Date:   Wed Feb 25 16:48:22 2009 +0800

    XvMC: fix broken xvmc on 965

diff --git a/src/i830_video.c b/src/i830_video.c
index 76b5189..cdb1072 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2409,18 +2409,31 @@ I830PutImage(ScrnInfoPtr pScrn,
 	pPriv->buf = NULL;
     }
 
-    if (pPriv->buf == NULL) {
-	pPriv->buf = drm_intel_bo_alloc(pI830->bufmgr,
-					"xv buffer", alloc_size, 4096);
-	if (pPriv->buf == NULL)
-	    return BadAlloc;
-	if (!pPriv->textured && drm_intel_bo_pin(pPriv->buf, 4096) != 0) {
-	    drm_intel_bo_unreference(pPriv->buf);
-	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-		       "Failed to pin xv buffer\n");
-	    return BadAlloc;
-	}
+#ifdef INTEL_XVMC
+    if (id == FOURCC_XVMC && 
+        pPriv->rotation == RR_Rotate_0) {
+        if (pPriv->buf) {
+            assert(pPriv->textured);
+            drm_intel_bo_unreference(pPriv->buf);
+            pPriv->buf = NULL;
+        }
+    } else {
+#endif
+        if (pPriv->buf == NULL) {
+            pPriv->buf = drm_intel_bo_alloc(pI830->bufmgr,
+                                         "xv buffer", alloc_size, 4096);
+            if (pPriv->buf == NULL)
+                return BadAlloc;
+            if (!pPriv->textured && drm_intel_bo_pin(pPriv->buf, 4096) != 0) {
+                drm_intel_bo_unreference(pPriv->buf);
+                xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                           "Failed to pin xv buffer\n");
+                return BadAlloc;
+            }
+        }
+#ifdef INTEL_XVMC
     }
+#endif
 
     /* fixup pointers */
 #ifdef INTEL_XVMC
diff --git a/src/i965_video.c b/src/i965_video.c
index 72a55d6..0fc9c42 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -431,11 +431,15 @@ i965_create_src_surface_state(ScrnInfoPtr scrn,
     src_surf_state->ss2.render_target_rotation = 0;
     src_surf_state->ss3.pitch = src_pitch - 1;
 
-    src_surf_state->ss1.base_addr =
-	intel_emit_reloc(surface_bo,
-			 offsetof(struct brw_surface_state, ss1),
-			 src_bo, src_offset,
-			 I915_GEM_DOMAIN_SAMPLER, 0);
+    if (src_bo) {
+        src_surf_state->ss1.base_addr =
+            intel_emit_reloc(surface_bo,
+                             offsetof(struct brw_surface_state, ss1),
+                             src_bo, src_offset,
+                             I915_GEM_DOMAIN_SAMPLER, 0);
+    } else {
+        src_surf_state->ss1.base_addr = src_offset;
+    }
 
     drm_intel_bo_unmap(surface_bo);
     return surface_bo;
commit f6d8ae69b0f97e696c142f06c8038f336ed024f9
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Feb 25 09:57:00 2009 +0800

    Use LVDS config in Driver feature BDB for integrated LVDS check
    
    The LVDS config bits in VBT driver feature block is used by vendor
    to identify the board implement of integrated LVDS/eDP or SDVO LVDS.
    And video bios uses these bits for LVDS enabling or not. So check
    these bits for integrated LVDS might eliminate more quirks.

diff --git a/src/i830.h b/src/i830.h
index 7904b9f..eb686ae 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -619,6 +619,7 @@ typedef struct _I830Rec {
    Bool lvds_dither;
    DisplayModePtr lvds_fixed_mode;
    Bool skip_panel_detect;
+   Bool integrated_lvds; /* LVDS config from driver feature BDB */
 
    Bool tv_present; /* TV connector present (from VBIOS) */
 
diff --git a/src/i830_bios.c b/src/i830_bios.c
index 6baacd4..a990ebe 100644
--- a/src/i830_bios.c
+++ b/src/i830_bios.c
@@ -168,6 +168,23 @@ parse_general_features(I830Ptr pI830, struct bdb_header *bdb)
     }
 }
 
+static void
+parse_driver_feature(I830Ptr pI830, struct bdb_header *bdb)
+{
+    struct bdb_driver_feature *feature;
+
+    /* For mobile chip, set default as true */
+    if (IS_MOBILE(pI830))
+	pI830->integrated_lvds = TRUE;
+
+    feature = find_section(bdb, BDB_DRIVER_FEATURES);
+    if (!feature)
+	return;
+
+    if (feature->lvds_config != BDB_DRIVER_INT_LVDS)
+	pI830->integrated_lvds = FALSE;
+}
+
 #define INTEL_VBIOS_SIZE (64 * 1024)	/* XXX */
 
 /**
@@ -246,6 +263,7 @@ i830_bios_init(ScrnInfoPtr pScrn)
 
     parse_general_features(pI830, bdb);
     parse_panel_data(pI830, bdb);
+    parse_driver_feature(pI830, bdb);
 
     xfree(bios);
 
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 027bb5d..63533cd 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -1415,6 +1415,13 @@ i830_lvds_init(ScrnInfoPtr pScrn)
     DisplayModePtr	    lvds_ddc_mode = NULL;
     struct i830_lvds_priv   *dev_priv;
 
+    if (!pI830->integrated_lvds) {
+	if (pI830->debug_modes)
+	    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		   "Skipping LVDS from driver feature BDB's LVDS config info.\n");
+	return;
+    }
+
     if (pI830->quirk_flag & QUIRK_IGNORE_LVDS)
 	return;
 
commit 8718551f14e064b461e80a583597f0ea9fb8ca9f
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Feb 25 09:54:03 2009 +0800

    Update LVDS config bits definition in driver feature block
    
    ALL_LVDS is actually not defined before and include GM45.
    Embedded DP bit will be used for newer chips.

diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index db8f364..2b98e1f 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -404,14 +404,14 @@ static void dump_driver_feature(void)
 	case BDB_DRIVER_NO_LVDS:
 	    printf("No LVDS\n");
 	    break;
-	case BDB_DRIVER_INTER_LVDS:
+	case BDB_DRIVER_INT_LVDS:
 	    printf("Integrated LVDS\n");
 	    break;
 	case BDB_DRIVER_SDVO_LVDS:
 	    printf("SDVO LVDS\n");
 	    break;
-	case BDB_DRIVER_ALL_LVDS:
-	    printf("Both Integrated LVDS and SDVO LVDS\n");
+	case BDB_DRIVER_EDP:
+	    printf("Embedded DisplayPort\n");
 	    break;
     }
     free(block);
diff --git a/src/i830_bios.h b/src/i830_bios.h
index 2dcc092..ec8bd8f 100644
--- a/src/i830_bios.h
+++ b/src/i830_bios.h
@@ -396,9 +396,9 @@ struct vch_bdb_22 {
 } __attribute__((packed));
 
 #define BDB_DRIVER_NO_LVDS	0
-#define BDB_DRIVER_INTER_LVDS	1
+#define BDB_DRIVER_INT_LVDS	1
 #define BDB_DRIVER_SDVO_LVDS	2
-#define BDB_DRIVER_ALL_LVDS	3
+#define BDB_DRIVER_EDP		3
 
 struct bdb_driver_feature {
     uint8_t	boot_dev_algorithm:1;
commit 9d8e5c21a1688b915bf39261d4c3b0bf2906daef
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb 24 14:05:15 2009 -0800

    Fix distcheck from drmmode_display.h deletion.

diff --git a/src/Makefile.am b/src/Makefile.am
index 3fb30ff..cbe9fb1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -136,8 +136,7 @@ intel_drv_la_SOURCES = \
 	 i830_render.c \
 	 i915_render.c \
 	 i965_render.c \
-	 drmmode_display.c \
-	 drmmode_display.h
+	 drmmode_display.c
 
 INTEL_G4A =				\
 	packed_yuv_sf.g4a		\
commit f4e2f522a5c5b03ea530b9eb67e9d1a9a96274ce
Author: Eric Anholt <eric at anholt.net>
Date:   Sat Feb 21 20:36:58 2009 -0800

    Don't do AdjustFrame in KMS mode.
    
    This was hit by xv86vm's SwitchMode path, and for that the CRTC offsets
    get set at mode setting time anyway.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 0a8a9c6..2461e8a 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3488,6 +3488,9 @@ i830AdjustFrame(int scrnIndex, int x, int y, int flags)
    DPRINTF(PFX, "i830AdjustFrame: y = %d (+ %d), x = %d (+ %d)\n",
 	   x, pI830->xoffset, y, pI830->yoffset);
 
+   if (pI830->use_drm_mode)
+      return;
+
    if (crtc && crtc->enabled)
    {
       /* Sync the engine before adjust frame */
commit 170f00e161931fdaa8c2812fc710649e1d6d977a
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Tue Feb 24 14:07:23 2009 -0500

    Remove a handful of unused variable warnings.

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 105bb10..540bf5e 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1080,7 +1080,6 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
 {
    ScreenPtr pScreen = pParent->drawable.pScreen;
    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-   I830Ptr pI830 = I830PTR(pScrn);
    BoxPtr pboxTmp, pboxNext, pboxBase;
    DDXPointPtr pptTmp, pptNew2 = NULL;
    int xdir, ydir;
@@ -1253,7 +1252,6 @@ I830DRITransitionTo2d(ScreenPtr pScreen)
 {
    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
    I830Ptr pI830 = I830PTR(pScrn);
-   drmI830Sarea *sPriv = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
 
    pI830->want_vblank_interrupts = FALSE;
    I830DRISetVBlankInterrupt(pScrn, FALSE);
@@ -1679,7 +1677,7 @@ Bool I830DRI2ScreenInit(ScreenPtr pScreen)
     I830Ptr pI830 = I830PTR(pScrn);
     DRI2InfoRec info;
     char *p, buf[64];
-    int fd, i, cmp;
+    int i;
     struct stat sbuf;
     dev_t d;
 
diff --git a/src/i830_video.c b/src/i830_video.c
index c9a0181..76b5189 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2790,9 +2790,6 @@ I830StopSurface(XF86SurfacePtr surface)
 static int
 I830FreeSurface(XF86SurfacePtr surface)
 {
-    ScrnInfoPtr pScrn = surface->pScrn;
-    OffscreenPrivPtr pPriv = (OffscreenPrivPtr) surface->devPrivate.ptr;
-
     I830StopSurface(surface);
     xfree(surface->pitches);
     xfree(surface->offsets);
commit a6b31f38ebf470c61de0e10b0ce2af0d7ee1684b
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Tue Feb 24 13:58:20 2009 -0500

    Update kms to work with drmModeModeInfo API update.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index f0e4f1e..8128004 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -61,7 +61,7 @@ typedef struct {
 
 static void
 drmmode_ConvertFromKMode(ScrnInfoPtr scrn,
-			 struct drm_mode_modeinfo *kmode,
+			 drmModeModeInfoPtr kmode,
 			 DisplayModePtr	mode)
 {
 	memset(mode, 0, sizeof(DisplayModeRec));
@@ -93,7 +93,7 @@ drmmode_ConvertFromKMode(ScrnInfoPtr scrn,
 
 static void
 drmmode_ConvertToKMode(ScrnInfoPtr scrn,
-		       struct drm_mode_modeinfo *kmode,
+		       drmModeModeInfoPtr kmode,
 		       DisplayModePtr mode)
 {
 	memset(kmode, 0, sizeof(*kmode));
@@ -141,7 +141,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 	int ret = TRUE;
 	int i;
 	int fb_id;
-	struct drm_mode_modeinfo kmode;
+	drmModeModeInfo kmode;
 	unsigned int pitch = pScrn->displayWidth * pI830->cpp;
 
 	if (drmmode->fb_id == 0) {
commit 13ee9402e9822d6f57e3ebcc5ae658ce8322118e
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Feb 23 15:44:26 2009 -0500

    Limit CRT DAC speed better.
    
    Verified against the public docs for i8xx parts, although not 9xx yet.

diff --git a/src/i830_crt.c b/src/i830_crt.c
index 605ecf9..d8e4a76 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -84,11 +84,23 @@ i830_crt_restore (xf86OutputPtr output)
 static int
 i830_crt_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
 {
+    ScrnInfoPtr pScrn = output->scrn;
+    I830Ptr	pI830 = I830PTR(pScrn);
+    int		maxclock;
+
     if (pMode->Flags & V_DBLSCAN)
 	return MODE_NO_DBLESCAN;
 
-    if (pMode->Clock > 400000 || pMode->Clock < 25000)
-	return MODE_CLOCK_RANGE;
+    if (pMode->Clock < 25000)
+	return MODE_CLOCK_LOW;
+
+    if (!IS_I9XX(pI830))
+	maxclock = 350000;
+    else
+	maxclock = 400000;
+
+    if (pMode->Clock > maxclock)
+	return MODE_CLOCK_HIGH;
 
     return MODE_OK;
 }
commit 668b2352a47bcfba75fe0492a5805726222755eb
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Feb 23 13:31:51 2009 -0800

    Revert "Limit CRT DAC speed better."
    
    This reverts commit 8fd0e46571c7ba15c05f0a759113f8ca842c76a2.
    
    This doesn't even build. Please try again.

diff --git a/src/i830_crt.c b/src/i830_crt.c
index 984e77c..605ecf9 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -84,23 +84,11 @@ i830_crt_restore (xf86OutputPtr output)
 static int
 i830_crt_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
 {
-    ScrnInfoPtr pScrn = output->scrn;
-    I830Ptr	pI830 = I830Ptr(pScrn);
-    int		maxclock;
-
     if (pMode->Flags & V_DBLSCAN)
 	return MODE_NO_DBLESCAN;
 
-    if (pMode->Clock < 25000)
-	return MODE_CLOCK_LOW;
-
-    if (!IS_I9XX(pI830))
-	maxclock = 350000;
-    else
-	maxclock = 400000;
-
-    if (pMode->Clock > maxclock)
-	return MODE_CLOCK_HIGH;
+    if (pMode->Clock > 400000 || pMode->Clock < 25000)
+	return MODE_CLOCK_RANGE;
 
     return MODE_OK;
 }
commit 8fd0e46571c7ba15c05f0a759113f8ca842c76a2
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Feb 23 15:44:26 2009 -0500

    Limit CRT DAC speed better.
    
    Verified against the public docs for i8xx parts, although not 9xx yet.

diff --git a/src/i830_crt.c b/src/i830_crt.c
index 605ecf9..984e77c 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -84,11 +84,23 @@ i830_crt_restore (xf86OutputPtr output)
 static int
 i830_crt_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
 {
+    ScrnInfoPtr pScrn = output->scrn;
+    I830Ptr	pI830 = I830Ptr(pScrn);
+    int		maxclock;
+
     if (pMode->Flags & V_DBLSCAN)
 	return MODE_NO_DBLESCAN;
 
-    if (pMode->Clock > 400000 || pMode->Clock < 25000)
-	return MODE_CLOCK_RANGE;
+    if (pMode->Clock < 25000)
+	return MODE_CLOCK_LOW;
+
+    if (!IS_I9XX(pI830))
+	maxclock = 350000;
+    else
+	maxclock = 400000;
+
+    if (pMode->Clock > maxclock)
+	return MODE_CLOCK_HIGH;
 
     return MODE_OK;
 }
commit 73bc7f113969834d00cd92be8374dbadc62f96a9
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Mon Feb 23 15:16:51 2009 -0500

    KMS: Fix bug that prevented EDID data from getting propagated.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 0ae7d34..f0e4f1e 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -460,7 +460,8 @@ drmmode_output_get_modes(xf86OutputPtr output)
 		if (!props || !(props->flags & DRM_MODE_PROP_BLOB))
 			continue;
 
-		if (!strcmp(props->name, "EDID") && drmmode_output->edid_blob) {
+		if (!strcmp(props->name, "EDID") &&
+		    drmmode_output->edid_blob == NULL) {
 			drmModeFreePropertyBlob(drmmode_output->edid_blob);
 			drmmode_output->edid_blob =
 				drmModeGetPropertyBlob(drmmode->fd,
commit ef952760551ad15cb9f63025d1e087645949a227
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Sun Feb 15 22:10:42 2009 -0500

    Use stat() and the dev_t to find the drm device filename.
    
    Simpler and more robust.  Works when we haven't set the device PCI ID,
    ie when not going through the legacy DRI module.

diff --git a/src/i830_dri.c b/src/i830_dri.c
index f03be43..105bb10 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -66,6 +66,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <string.h>
 #include <assert.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <errno.h>
 #include <unistd.h>
@@ -1677,8 +1678,10 @@ Bool I830DRI2ScreenInit(ScreenPtr pScreen)
     ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
     I830Ptr pI830 = I830PTR(pScrn);
     DRI2InfoRec info;
-    char *p, *busId, buf[64];
+    char *p, buf[64];
     int fd, i, cmp;
+    struct stat sbuf;
+    dev_t d;
 
     if (pI830->accel != ACCEL_UXA) {
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "DRI2 requires UXA\n");
@@ -1712,21 +1715,13 @@ Bool I830DRI2ScreenInit(ScreenPtr pScreen)
      * things worse with even more ad hoc directory walking code to
      * discover the device file name. */
 
+    fstat(info.fd, &sbuf);
+    d = sbuf.st_rdev;
+
     p = pI830->deviceName;
     for (i = 0; i < DRM_MAX_MINOR; i++) {
 	sprintf(p, DRM_DEV_NAME, DRM_DIR_NAME, i);
-	fd = open(p, O_RDWR);
-	if (fd < 0)
-	    continue;
-
-	busId = drmGetBusid(fd);
-	close(fd);
-	if (busId == NULL)
-	    continue;
-
-	cmp = strcmp(busId, buf);
-	drmFree(busId);
-	if (cmp == 0)
+	if (stat(p, &sbuf) == 0 && sbuf.st_rdev == d)
 	    break;
     }
     if (i == DRM_MAX_MINOR) {
commit 81c652e9a666a7459bcc5217c8a5ec518b6e00da
Author: Helge Bahmann <helge.bahmann at secunet.com>
Date:   Sat Feb 21 10:10:04 2009 -0800

    Move disable_render_standby to EnterVT instead of startup.
    
    Otherwise, with a pre-2.6.28 older kernel the disable would be lost at
    resume time and cause hangs.
    
    Bug #20214

diff --git a/src/i830_driver.c b/src/i830_driver.c
index e7ca6b0..0a8a9c6 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3304,9 +3304,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	   return FALSE;
    }
 
-   if (!pI830->use_drm_mode)
-       i830_disable_render_standby(pScrn);
-
    DPRINTF(PFX, "assert( if(!I830EnterVT(scrnIndex, 0)) )\n");
 
    if (pI830->accel <= ACCEL_XAA) {
@@ -3638,6 +3635,9 @@ I830EnterVT(int scrnIndex, int flags)
 
    pI830->leaving = FALSE;
 
+   if (!pI830->use_drm_mode)
+       i830_disable_render_standby(pScrn);
+
 #ifdef XF86DRI
    if (pI830->memory_manager && !pI830->use_drm_mode) {
       int ret;
commit 0621ba12a3b694720e67a49b25ca52f0e09b3802
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Feb 18 13:32:44 2009 -0800

    uxa: Ask for BOs ready for rendering for pixmaps.
    
    The assumption is that we're almost always accelerating our drawing to
    new pixmaps (fill, copy, etc.).

diff --git a/configure.ac b/configure.ac
index 38d373e..a6ced67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -207,7 +207,7 @@ if test "x$GCC" = "xyes"; then
 	-Wnested-externs -fno-strict-aliasing"
 fi
 
-PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.3])
+PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.5])
 AM_CONDITIONAL(DRI, test x$DRI = xyes)
 if test "$DRI" = yes; then
         PKG_CHECK_MODULES(DRI, [xf86driproto glproto])
diff --git a/src/i830_exa.c b/src/i830_exa.c
index ebc6624..b878402 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -900,7 +900,7 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
 	 */
 	size = i830_get_fence_size(i830, stride * h);
 
-	bo = dri_bo_alloc (i830->bufmgr, "pixmap", size, 0);
+	bo = drm_intel_bo_alloc_for_render(i830->bufmgr, "pixmap", size, 0);
 	if (!bo) {
 	    fbDestroyPixmap (pixmap);
 	    return NullPixmap;
commit 5018d0f16cb8b44c743b5b37d194fe806d955568
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Fri Feb 20 15:34:29 2009 -0500

    KMS: Hook up rotated shadow buffers.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 66d6014..0ae7d34 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -48,7 +48,7 @@ typedef struct {
     drmModeCrtcPtr mode_crtc;
     dri_bo *cursor;
     dri_bo *rotate_bo;
-    int rotate_fb_id;
+    uint32_t rotate_fb_id;
 } drmmode_crtc_private_rec, *drmmode_crtc_private_ptr;
 
 typedef struct {
@@ -277,17 +277,19 @@ drmmode_show_cursor (xf86CrtcPtr crtc)
 static void *
 drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
 {
+	ScrnInfoPtr pScrn = crtc->scrn;
+	I830Ptr pI830 = I830PTR(pScrn);
 	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
 	drmmode_ptr drmmode = drmmode_crtc->drmmode;
-	int size;
+	int size, ret;
 	unsigned long rotate_pitch;
 
-	rotate_pitch = crtc->scrn->displayWidth * drmmode->cpp;
+	width = i830_pad_drawable_width(width, drmmode->cpp);
+	rotate_pitch = width * drmmode->cpp;
 	size = rotate_pitch * height;
 
-#if 0
 	drmmode_crtc->rotate_bo =
-		dri_bo_alloc(drmmode->bufmgr, "rotate", size, 4096);
+		drm_intel_bo_alloc(pI830->bufmgr, "rotate", size, 4096);
 
 	if (!drmmode_crtc->rotate_bo) {
 		xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
@@ -295,18 +297,19 @@ drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
 		return NULL;
 	}
 
-	dri_bo_map(drmmode_crtc->rotate_bo, 1);
+	drm_intel_gem_bo_map_gtt(drmmode_crtc->rotate_bo);
 
 	ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth,
 			   crtc->scrn->bitsPerPixel, rotate_pitch,
 			   drmmode_crtc->rotate_bo->handle,
 			   &drmmode_crtc->rotate_fb_id);
-	if (ret)
+	if (ret) {
 		ErrorF("failed to add rotate fb\n");
+		drm_intel_bo_unreference(drmmode_crtc->rotate_bo);
+		return NULL;
+	}
 
 	return drmmode_crtc->rotate_bo->virtual;
-#endif
-	return NULL;
 }
 
 static PixmapPtr
@@ -321,8 +324,8 @@ drmmode_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 	if (!data)
 		data = drmmode_crtc_shadow_allocate (crtc, width, height);
 
-	rotate_pitch = pScrn->displayWidth * drmmode->cpp;
-
+	rotate_pitch =
+		i830_pad_drawable_width(width, drmmode->cpp) * drmmode->cpp;
 	rotate_pixmap = GetScratchPixmapHeader(pScrn->pScreen,
 					       width, height,
 					       pScrn->depth,
@@ -334,27 +337,32 @@ drmmode_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 			   "Couldn't allocate shadow pixmap for rotated CRTC\n");
 	}
-	return rotate_pixmap;
 
+	if (drmmode_crtc->rotate_bo)
+		i830_set_pixmap_bo(rotate_pixmap, drmmode_crtc->rotate_bo);
+
+	return rotate_pixmap;
 }
 
 static void
 drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
 {
+	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+	drmmode_ptr drmmode = drmmode_crtc->drmmode;
+
 	if (rotate_pixmap)
 		FreeScratchPixmapHeader(rotate_pixmap);
 
-#if 0
-	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
 
 	if (data) {
-		/* Be sure to sync acceleration before the memory gets unbound. */
+		/* Be sure to sync acceleration before the memory gets
+		 * unbound. */
 		drmModeRmFB(drmmode->fd, drmmode_crtc->rotate_fb_id);
 		drmmode_crtc->rotate_fb_id = 0;
+		drm_intel_bo_unmap(drmmode_crtc->rotate_bo);
 		dri_bo_unreference(drmmode_crtc->rotate_bo);
 		drmmode_crtc->rotate_bo = NULL;
 	}
-#endif
 }
 
 static void
@@ -376,17 +384,10 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
 	.show_cursor = drmmode_show_cursor,
 	.hide_cursor = drmmode_hide_cursor,
 	.load_cursor_argb = drmmode_load_cursor_argb,
-
 	.shadow_create = drmmode_crtc_shadow_create,
 	.shadow_allocate = drmmode_crtc_shadow_allocate,
 	.shadow_destroy = drmmode_crtc_shadow_destroy,
 	.gamma_set = drmmode_crtc_gamma_set,
-#if 0
-	.shadow_create = i830_crtc_shadow_create,
-	.shadow_allocate = i830_crtc_shadow_allocate,
-	.shadow_destroy = i830_crtc_shadow_destroy,
-	.set_cursor_colors = i830_crtc_set_cursor_colors,
-#endif
 	.destroy = NULL, /* XXX */
 };
 
@@ -637,7 +638,8 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 	scrn->virtualX = width;
 	scrn->virtualY = height;
 	scrn->displayWidth = pitch;
-	pI830->front_buffer = i830_allocate_framebuffer(scrn, pI830, &mem_box, FALSE);
+	pI830->front_buffer =
+		i830_allocate_framebuffer(scrn, pI830, &mem_box, FALSE);
 	if (!pI830->front_buffer)
 		goto fail;
 
commit beca598bc2848093b710bd47828d622205d273df
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Fri Feb 20 11:08:51 2009 -0500

    Access the Xv buffer through the GTT for the non-KMS case.

diff --git a/src/i830_video.c b/src/i830_video.c
index e542897..c9a0181 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -1271,7 +1271,8 @@ I830CopyPackedData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 		   int srcPitch,
 		   int dstPitch, int top, int left, int h, int w)
 {
-    unsigned char *src, *dst;
+    I830Ptr pI830 = I830PTR(pScrn);
+    unsigned char *src, *dst, *dst_base;
     int i,j;
     unsigned char *s;
 
@@ -1283,11 +1284,18 @@ I830CopyPackedData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 
     src = buf + (top * srcPitch) + (left << 1);
 
-    drm_intel_bo_map(pPriv->buf, TRUE);
+    if (pPriv->textured) {
+	drm_intel_bo_map(pPriv->buf, TRUE);
+	dst_base = pPriv->buf->virtual;
+    } else {
+	drm_intel_gem_bo_start_gtt_access(pPriv->buf, TRUE);
+	dst_base = pI830->FbBase;
+    }
+
     if (pPriv->currentBuf == 0)
-	dst = (unsigned char *) pPriv->buf->virtual + pPriv->YBuf0offset;
+	dst = dst_base + pPriv->YBuf0offset;
     else
-	dst = (unsigned char *) pPriv->buf->virtual + pPriv->YBuf1offset;
+	dst = dst_base + pPriv->YBuf1offset;
 
     switch (pPriv->rotation) {
     case RR_Rotate_0:
@@ -1360,7 +1368,9 @@ I830CopyPackedData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 	}
 	break;
     }
-    drm_intel_bo_unmap(pPriv->buf);
+
+    if (pPriv->textured)
+	drm_intel_bo_unmap(pPriv->buf);
 }
 
 static void
@@ -1369,8 +1379,9 @@ I830CopyPlanarData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 		   int srcPitch2, int dstPitch, int srcH, int top, int left,
 		   int h, int w, int id)
 {
+    I830Ptr pI830 = I830PTR(pScrn);
     int i, j = 0;
-    unsigned char *src1, *src2, *src3, *dst1, *dst2, *dst3;
+    unsigned char *src1, *src2, *src3, *dst_base, *dst1, *dst2, *dst3;
     unsigned char *s;
     int dstPitch2 = dstPitch << 1;
 
@@ -1387,11 +1398,19 @@ I830CopyPlanarData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
     ErrorF("src1 is %p, offset is %ld\n", src1,
 	   (unsigned long)src1 - (unsigned long)buf);
 #endif
-    drm_intel_bo_map(pPriv->buf, TRUE);
+
+    if (pPriv->textured) {
+	drm_intel_bo_map(pPriv->buf, TRUE);
+	dst_base = pPriv->buf->virtual;
+    } else {
+	drm_intel_gem_bo_start_gtt_access(pPriv->buf, TRUE);
+	dst_base = pI830->FbBase + pPriv->buf->offset;
+    }
+
     if (pPriv->currentBuf == 0)
-	dst1 = (unsigned char *) pPriv->buf->virtual + pPriv->YBuf0offset;
+	dst1 = dst_base + pPriv->YBuf0offset;
     else
-	dst1 = (unsigned char *) pPriv->buf->virtual + pPriv->YBuf1offset;
+	dst1 = dst_base + pPriv->YBuf1offset;
 
     switch (pPriv->rotation) {
     case RR_Rotate_0:
@@ -1441,14 +1460,14 @@ I830CopyPlanarData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 #endif
     if (pPriv->currentBuf == 0) {
 	if (id == FOURCC_I420)
-	    dst2 = (unsigned char *) pPriv->buf->virtual + pPriv->UBuf0offset;
+	    dst2 = dst_base + pPriv->UBuf0offset;
 	else
-	    dst2 = (unsigned char *) pPriv->buf->virtual + pPriv->VBuf0offset;
+	    dst2 = dst_base + pPriv->VBuf0offset;
     } else {
 	if (id == FOURCC_I420)
-	    dst2 = (unsigned char *) pPriv->buf->virtual + pPriv->UBuf1offset;
+	    dst2 = dst_base + pPriv->UBuf1offset;
 	else
-	    dst2 = (unsigned char *) pPriv->buf->virtual + pPriv->VBuf1offset;
+	    dst2 = dst_base + pPriv->VBuf1offset;
     }
 
     switch (pPriv->rotation) {
@@ -1500,14 +1519,14 @@ I830CopyPlanarData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 #endif
     if (pPriv->currentBuf == 0) {
 	if (id == FOURCC_I420)
-	    dst3 = (unsigned char *) pPriv->buf->virtual + pPriv->VBuf0offset;
+	    dst3 = dst_base + pPriv->VBuf0offset;
 	else
-	    dst3 = (unsigned char *) pPriv->buf->virtual + pPriv->UBuf0offset;
+	    dst3 = dst_base + pPriv->UBuf0offset;
     } else {
 	if (id == FOURCC_I420)
-	    dst3 = (unsigned char *) pPriv->buf->virtual + pPriv->VBuf1offset;
+	    dst3 = dst_base + pPriv->VBuf1offset;
 	else
-	    dst3 = (unsigned char *) pPriv->buf->virtual + pPriv->UBuf1offset;
+	    dst3 = dst_base + pPriv->UBuf1offset;
     }
 
     switch (pPriv->rotation) {
@@ -1549,7 +1568,9 @@ I830CopyPlanarData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 	}
 	break;
     }
-    drm_intel_bo_unmap(pPriv->buf);
+
+    if (pPriv->textured)
+	drm_intel_bo_unmap(pPriv->buf);
 }
 
 typedef struct {
@@ -2410,10 +2431,10 @@ I830PutImage(ScrnInfoPtr pScrn,
 	destId = FOURCC_YV12;
     } else {
 #endif
-	if (!pPriv->textured)
-	    pPriv->YBuf0offset = pPriv->buf->offset;
-	else
+	if (pPriv->textured)
 	    pPriv->YBuf0offset = 0;
+	else
+	    pPriv->YBuf0offset = pPriv->buf->offset;
 
 	if (pPriv->rotation & (RR_Rotate_90 | RR_Rotate_270)) {
 	    pPriv->UBuf0offset = pPriv->YBuf0offset + (dstPitch * 2 * width);
commit e97e2571703e3d6188bf18f211b793fc50383f9c
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Thu Feb 19 16:41:49 2009 -0500

    Fix i915 textured video to work with the i830_memory -> bo change.
    
    Forgot to update i915_video.c in 872aadc7102bd5131e1582ede081e22672911ba2.

diff --git a/src/i915_video.c b/src/i915_video.c
index b903b5e..81a0f87 100644
--- a/src/i915_video.c
+++ b/src/i915_video.c
@@ -161,7 +161,8 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 
       OUT_BATCH(_3DSTATE_MAP_STATE | 3);
       OUT_BATCH(0x00000001);	/* texture map #1 */
-      OUT_BATCH(pPriv->YBuf0offset);
+      OUT_RELOC(pPriv->buf, I915_GEM_DOMAIN_SAMPLER, 0, pPriv->YBuf0offset);
+
       ms3 = MAPSURF_422 | MS3_USE_FENCE_REGS;
       switch (id) {
       case FOURCC_YUY2:
@@ -269,7 +270,7 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
       OUT_BATCH(_3DSTATE_MAP_STATE | 9);
       OUT_BATCH(0x00000007);
 
-      OUT_BATCH(pPriv->YBuf0offset);
+      OUT_RELOC(pPriv->buf, I915_GEM_DOMAIN_SAMPLER, 0, pPriv->YBuf0offset);
       ms3 = MAPSURF_8BIT | MT_8BIT_I8 | MS3_USE_FENCE_REGS;
       ms3 |= (height - 1) << MS3_HEIGHT_SHIFT;
       ms3 |= (width - 1) << MS3_WIDTH_SHIFT;
@@ -282,14 +283,14 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
       else
 	  OUT_BATCH(((video_pitch * 2 / 4) - 1) << MS4_PITCH_SHIFT);
 
-      OUT_BATCH(pPriv->UBuf0offset);
+      OUT_RELOC(pPriv->buf, I915_GEM_DOMAIN_SAMPLER, 0, pPriv->UBuf0offset);
       ms3 = MAPSURF_8BIT | MT_8BIT_I8 | MS3_USE_FENCE_REGS;
       ms3 |= (height / 2 - 1) << MS3_HEIGHT_SHIFT;
       ms3 |= (width / 2 - 1) << MS3_WIDTH_SHIFT;
       OUT_BATCH(ms3);
       OUT_BATCH(((video_pitch / 4) - 1) << MS4_PITCH_SHIFT);
 
-      OUT_BATCH(pPriv->VBuf0offset);
+      OUT_RELOC(pPriv->buf, I915_GEM_DOMAIN_SAMPLER, 0, pPriv->VBuf0offset);
       ms3 = MAPSURF_8BIT | MT_8BIT_I8 | MS3_USE_FENCE_REGS;
       ms3 |= (height / 2 - 1) << MS3_HEIGHT_SHIFT;
       ms3 |= (width / 2 - 1) << MS3_WIDTH_SHIFT;
commit 96da26b6813a8c1da8a43036c375aa0d2bb70f16
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Thu Feb 19 16:40:19 2009 -0500

    Dont allocate overlay registers in KMS mode.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index adb9544..e7ca6b0 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3249,12 +3249,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 		    "needs 2D acceleration.\n");
 	 pI830->XvEnabled = FALSE;
       }
-      if (!OVERLAY_NOEXIST(pI830) && pI830->overlay_regs == NULL) {
-	  xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		     "Disabling Xv because the overlay register buffer "
-		      "allocation failed.\n");
-	 pI830->XvEnabled = FALSE;
-      }
    }
 #endif
 
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 23cc4c7..62765d6 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1473,7 +1473,7 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
     /* Allocate overlay register space and optional XAA linear allocator
      * space.  The second head in zaphod mode will share the space.
      */
-    if (I830IsPrimary(pScrn))
+    if (I830IsPrimary(pScrn) && !pI830->use_drm_mode)
 	i830_allocate_overlay(pScrn);
 #endif
 
diff --git a/src/i830_video.c b/src/i830_video.c
index be2d28e..e542897 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -648,8 +648,13 @@ I830InitVideo(ScreenPtr pScreen)
     }
 #endif
 
-    if (num_adaptors)
+    if (num_adaptors) {
 	xf86XVScreenInit(pScreen, adaptors, num_adaptors);
+    } else {
+	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+		   "Disabling Xv because no adaptors could be initialized.\n");
+	pI830->XvEnabled = FALSE;
+    }
 
 #ifdef INTEL_XVMC
     if (xvmc_status)
commit 872aadc7102bd5131e1582ede081e22672911ba2
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Wed Feb 18 17:26:06 2009 -0500

    Make Xv used a buffer object instead of i830_memory.
    
    We still pin the buffer object in case of overlay, but for textured video
    we're now no longer using i830_memory for Xv anymore.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 571f4c2..adb9544 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3441,7 +3441,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	       pI830->XvMCEnabled ? "en" : "dis");
 #endif
    /* Init video */
-   if (pI830->XvEnabled && !pI830->use_drm_mode)
+   if (pI830->XvEnabled)
       I830InitVideo(pScreen);
 #endif
 
diff --git a/src/i830_video.c b/src/i830_video.c
index 8a3718d..be2d28e 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -620,7 +620,7 @@ I830InitVideo(ScreenPtr pScreen)
 
     /* Set up overlay video if we can do it at this depth. */
     if (!OVERLAY_NOEXIST(pI830) && pScrn->bitsPerPixel != 8 &&
-	    pI830->overlay_regs != NULL)
+	!pI830->use_drm_mode && pI830->overlay_regs != NULL)
     {
 	overlayAdaptor = I830SetupImageVideoOverlay(pScreen);
 	if (overlayAdaptor != NULL) {
@@ -1073,10 +1073,9 @@ I830StopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
 	    if (pI830->entityPrivate)
 		pI830->entityPrivate->XvInUse = -1;
 	}
-	/* Sync before freeing the buffer, because the pages will be unbound.
-	 */
-	I830Sync(pScrn);
-	i830_free_memory(pScrn, pPriv->buf);
+	if (!pPriv->textured)
+	    drm_intel_bo_unpin(pPriv->buf);
+	drm_intel_bo_unreference(pPriv->buf);
 	pPriv->buf = NULL;
 	pPriv->videoStatus = 0;
     } else {
@@ -1267,7 +1266,6 @@ I830CopyPackedData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 		   int srcPitch,
 		   int dstPitch, int top, int left, int h, int w)
 {
-    I830Ptr pI830 = I830PTR(pScrn);
     unsigned char *src, *dst;
     int i,j;
     unsigned char *s;
@@ -1280,10 +1278,11 @@ I830CopyPackedData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 
     src = buf + (top * srcPitch) + (left << 1);
 
+    drm_intel_bo_map(pPriv->buf, TRUE);
     if (pPriv->currentBuf == 0)
-	dst = pI830->FbBase + pPriv->YBuf0offset;
+	dst = (unsigned char *) pPriv->buf->virtual + pPriv->YBuf0offset;
     else
-	dst = pI830->FbBase + pPriv->YBuf1offset;
+	dst = (unsigned char *) pPriv->buf->virtual + pPriv->YBuf1offset;
 
     switch (pPriv->rotation) {
     case RR_Rotate_0:
@@ -1356,6 +1355,7 @@ I830CopyPackedData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 	}
 	break;
     }
+    drm_intel_bo_unmap(pPriv->buf);
 }
 
 static void
@@ -1364,7 +1364,6 @@ I830CopyPlanarData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 		   int srcPitch2, int dstPitch, int srcH, int top, int left,
 		   int h, int w, int id)
 {
-    I830Ptr pI830 = I830PTR(pScrn);
     int i, j = 0;
     unsigned char *src1, *src2, *src3, *dst1, *dst2, *dst3;
     unsigned char *s;
@@ -1383,10 +1382,11 @@ I830CopyPlanarData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
     ErrorF("src1 is %p, offset is %ld\n", src1,
 	   (unsigned long)src1 - (unsigned long)buf);
 #endif
+    drm_intel_bo_map(pPriv->buf, TRUE);
     if (pPriv->currentBuf == 0)
-	dst1 = pI830->FbBase + pPriv->YBuf0offset;
+	dst1 = (unsigned char *) pPriv->buf->virtual + pPriv->YBuf0offset;
     else
-	dst1 = pI830->FbBase + pPriv->YBuf1offset;
+	dst1 = (unsigned char *) pPriv->buf->virtual + pPriv->YBuf1offset;
 
     switch (pPriv->rotation) {
     case RR_Rotate_0:
@@ -1436,14 +1436,14 @@ I830CopyPlanarData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 #endif
     if (pPriv->currentBuf == 0) {
 	if (id == FOURCC_I420)
-	    dst2 = pI830->FbBase + pPriv->UBuf0offset;
+	    dst2 = (unsigned char *) pPriv->buf->virtual + pPriv->UBuf0offset;
 	else
-	    dst2 = pI830->FbBase + pPriv->VBuf0offset;
+	    dst2 = (unsigned char *) pPriv->buf->virtual + pPriv->VBuf0offset;
     } else {
 	if (id == FOURCC_I420)
-	    dst2 = pI830->FbBase + pPriv->UBuf1offset;
+	    dst2 = (unsigned char *) pPriv->buf->virtual + pPriv->UBuf1offset;
 	else
-	    dst2 = pI830->FbBase + pPriv->VBuf1offset;
+	    dst2 = (unsigned char *) pPriv->buf->virtual + pPriv->VBuf1offset;
     }
 
     switch (pPriv->rotation) {
@@ -1495,14 +1495,14 @@ I830CopyPlanarData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 #endif
     if (pPriv->currentBuf == 0) {
 	if (id == FOURCC_I420)
-	    dst3 = pI830->FbBase + pPriv->VBuf0offset;
+	    dst3 = (unsigned char *) pPriv->buf->virtual + pPriv->VBuf0offset;
 	else
-	    dst3 = pI830->FbBase + pPriv->UBuf0offset;
+	    dst3 = (unsigned char *) pPriv->buf->virtual + pPriv->UBuf0offset;
     } else {
 	if (id == FOURCC_I420)
-	    dst3 = pI830->FbBase + pPriv->VBuf1offset;
+	    dst3 = (unsigned char *) pPriv->buf->virtual + pPriv->VBuf1offset;
 	else
-	    dst3 = pI830->FbBase + pPriv->UBuf1offset;
+	    dst3 = (unsigned char *) pPriv->buf->virtual + pPriv->UBuf1offset;
     }
 
     switch (pPriv->rotation) {
@@ -1544,6 +1544,7 @@ I830CopyPlanarData(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv,
 	}
 	break;
     }
+    drm_intel_bo_unmap(pPriv->buf);
 }
 
 typedef struct {
@@ -2374,29 +2375,27 @@ I830PutImage(ScrnInfoPtr pScrn,
     if (pPriv->doubleBuffer)
 	alloc_size *= 2;
 
-    if (pPriv->buf) {
-	/* Wait for any previous acceleration to the buffer to have completed.
-	 * When we start using BOs for rendering, we won't have to worry
-	 * because mapping or freeing will take care of it automatically.
-	 */
-	I830Sync(pScrn);
-    }
-
     /* Free the current buffer if we're going to have to reallocate */
     if (pPriv->buf && pPriv->buf->size < alloc_size) {
-	i830_free_memory(pScrn, pPriv->buf);
+	if (!pPriv->textured)
+	    drm_intel_bo_unpin(pPriv->buf);
+	drm_intel_bo_unreference(pPriv->buf);
 	pPriv->buf = NULL;
     }
 
     if (pPriv->buf == NULL) {
-	pPriv->buf = i830_allocate_memory(pScrn, "xv buffer",
-					  alloc_size, 0, 16,
-					  0, TILE_NONE);
+	pPriv->buf = drm_intel_bo_alloc(pI830->bufmgr,
+					"xv buffer", alloc_size, 4096);
+	if (pPriv->buf == NULL)
+	    return BadAlloc;
+	if (!pPriv->textured && drm_intel_bo_pin(pPriv->buf, 4096) != 0) {
+	    drm_intel_bo_unreference(pPriv->buf);
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "Failed to pin xv buffer\n");
+	    return BadAlloc;
+	}
     }
 
-    if (pPriv->buf == NULL)
-	return BadAlloc;
-
     /* fixup pointers */
 #ifdef INTEL_XVMC
     if (id == FOURCC_XVMC && IS_I915(pI830)) {
@@ -2406,7 +2405,11 @@ I830PutImage(ScrnInfoPtr pScrn,
 	destId = FOURCC_YV12;
     } else {
 #endif
-	pPriv->YBuf0offset = pPriv->buf->offset;
+	if (!pPriv->textured)
+	    pPriv->YBuf0offset = pPriv->buf->offset;
+	else
+	    pPriv->YBuf0offset = 0;
+
 	if (pPriv->rotation & (RR_Rotate_90 | RR_Rotate_270)) {
 	    pPriv->UBuf0offset = pPriv->YBuf0offset + (dstPitch * 2 * width);
 	    pPriv->VBuf0offset = pPriv->UBuf0offset + (dstPitch * width / 2);
@@ -2663,11 +2666,9 @@ I830VideoBlockHandler(int i, pointer blockData, pointer pTimeout,
 	    }
 	} else {				/* FREE_TIMER */
 	    if (pPriv->freeTime < now) {
-		/* Sync before freeing the buffer, because the pages will be
-		 * unbound.
-		 */
-		I830Sync(pScrn);
-		i830_free_memory(pScrn, pPriv->buf);
+		if (!pPriv->textured)
+		    drm_intel_bo_unpin(pPriv->buf);
+		drm_intel_bo_unreference(pPriv->buf);
 		pPriv->buf = NULL;
 		pPriv->videoStatus = 0;
 	    }
@@ -2680,7 +2681,6 @@ I830VideoBlockHandler(int i, pointer blockData, pointer pTimeout,
  ***************************************************************************/
 
 typedef struct {
-    i830_memory *buf;
     Bool isOn;
 } OffscreenPrivRec, *OffscreenPrivPtr;
 
@@ -2725,14 +2725,6 @@ I830AllocateSurface(ScrnInfoPtr pScrn,
     fbpitch = pI830->cpp * pScrn->displayWidth;
     size = pitch * h;
 
-    pPriv->buf = i830_allocate_memory(pScrn, "xv surface buffer", size, 0, 16, 0, TILE_NONE);
-    if (pPriv->buf == NULL) {
-	xfree(surface->pitches);
-	xfree(surface->offsets);
-	xfree(pPriv);
-	return BadAlloc;
-    }
-
     surface->width = w;
     surface->height = h;
 
@@ -2741,11 +2733,9 @@ I830AllocateSurface(ScrnInfoPtr pScrn,
     surface->pScrn = pScrn;
     surface->id = id;
     surface->pitches[0] = pitch;
-    surface->offsets[0] = pPriv->buf->offset;
+    surface->offsets[0] = 0;
     surface->devPrivate.ptr = (pointer) pPriv;
 
-    memset(pI830->FbBase + surface->offsets[0], 0, size);
-
     return Success;
 }
 
@@ -2778,10 +2768,6 @@ I830FreeSurface(XF86SurfacePtr surface)
     OffscreenPrivPtr pPriv = (OffscreenPrivPtr) surface->devPrivate.ptr;
 
     I830StopSurface(surface);
-    /* Sync before freeing the buffer, because the pages will be unbound. */
-    I830Sync(pScrn);
-    i830_free_memory(surface->pScrn, pPriv->buf);
-    pPriv->buf = NULL;
     xfree(surface->pitches);
     xfree(surface->offsets);
     xfree(surface->devPrivate.ptr);
diff --git a/src/i830_video.h b/src/i830_video.h
index 3c2fa4c..254ee32 100644
--- a/src/i830_video.h
+++ b/src/i830_video.h
@@ -58,7 +58,7 @@ typedef struct {
    uint32_t videoStatus;
    Time offTime;
    Time freeTime;
-   i830_memory *buf; /** YUV data buffer */
+   drm_intel_bo *buf; /** YUV data buffer */
 
    Bool overlayOK;
    int oneLineMode;
diff --git a/src/i965_video.c b/src/i965_video.c
index 7cd20f3..72a55d6 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -397,6 +397,7 @@ i965_create_dst_surface_state(ScrnInfoPtr scrn,
 
 static drm_intel_bo *
 i965_create_src_surface_state(ScrnInfoPtr scrn,
+			      drm_intel_bo *src_bo,
 			      uint32_t src_offset,
 			      int src_width,
 			      int src_height,
@@ -424,13 +425,18 @@ i965_create_src_surface_state(ScrnInfoPtr scrn,
     src_surf_state->ss0.mipmap_layout_mode = 0;
     src_surf_state->ss0.render_cache_read_mode = 0;
 
-    src_surf_state->ss1.base_addr = src_offset;
     src_surf_state->ss2.width = src_width - 1;
     src_surf_state->ss2.height = src_height - 1;
     src_surf_state->ss2.mip_count = 0;
     src_surf_state->ss2.render_target_rotation = 0;
     src_surf_state->ss3.pitch = src_pitch - 1;
 
+    src_surf_state->ss1.base_addr =
+	intel_emit_reloc(surface_bo,
+			 offsetof(struct brw_surface_state, ss1),
+			 src_bo, src_offset,
+			 I915_GEM_DOMAIN_SAMPLER, 0);
+
     drm_intel_bo_unmap(surface_bo);
     return surface_bo;
 }
@@ -897,11 +903,11 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 	   video_pitch);
 #endif
 
+#if 0
     /* enable debug */
     OUTREG (INST_PM,
 	    (1 << (16 + 4)) |
 	    (1 << 4));
-#if 0
     ErrorF ("INST_PM 0x%08x\n", INREG(INST_PM));
 #endif
 
@@ -967,6 +973,7 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
     for (src_surf = 0; src_surf < n_src_surf; src_surf++) {
 	drm_intel_bo *surf_bo =
 	    i965_create_src_surface_state(pScrn,
+					  pPriv->buf,
 					  src_surf_base[src_surf],
 					  src_width[src_surf],
 					  src_height[src_surf],
commit 527e8177cde3abbabbcdccee0dbc0dcc0068a1be
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Feb 18 11:26:58 2009 +0800

    bios_reader: parse driver feature BDB

diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index 4b20e0d..db8f364 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -359,6 +359,64 @@ static void dump_lvds_data(void)
     free(block);
 }
 
+static void dump_driver_feature(void)
+{
+    struct bdb_block *block;
+    struct bdb_driver_feature *feature;
+
+    block = find_section(BDB_DRIVER_FEATURES);
+    if (!block) {
+	printf("No Driver feature data block\n");
+	return;
+    }
+    feature = block->data;
+
+    printf("Driver feature Data Block:\n");
+    printf("\tBoot Device Algorithm: %s\n", feature->boot_dev_algorithm ?
+	    "driver default": "os default");
+    printf("\tBlock display switching when DVD active: %s\n",
+	    YESNO(feature->block_display_switch));
+    printf("\tAllow display switching when in Full Screen DOS: %s\n",
+	    YESNO(feature->allow_display_switch));
+    printf("\tHot Plug DVO: %s\n", YESNO(feature->hotplug_dvo));
+    printf("\tDual View Zoom: %s\n", YESNO(feature->dual_view_zoom));
+    printf("\tDriver INT 15h hook: %s\n", YESNO(feature->int15h_hook));
+    printf("\tEnable Sprite in Clone Mode: %s\n", YESNO(feature->sprite_in_clone));
+    printf("\tUse 00000110h ID for Primary LFP: %s\n", YESNO(feature->primary_lfp_id));
+    printf("\tBoot Mode X: %u\n", feature->boot_mode_x);
+    printf("\tBoot Mode Y: %u\n", feature->boot_mode_y);
+    printf("\tBoot Mode Bpp: %u\n", feature->boot_mode_bpp);
+    printf("\tBoot Mode Refresh: %u\n", feature->boot_mode_refresh);
+    printf("\tEnable LFP as primary: %s\n", YESNO(feature->enable_lfp_primary));
+    printf("\tSelective Mode Pruning: %s\n", YESNO(feature->selective_mode_pruning));
+    printf("\tDual-Frequency Graphics Technology: %s\n", YESNO(feature->dual_frequency));
+    printf("\tDefault Render Clock Frequency: %s\n", feature->render_clock_freq ? "low" : "high");
+    printf("\tNT 4.0 Dual Display Clone Support: %s\n", YESNO(feature->nt_clone_support));
+    printf("\tDefault Power Scheme user interface: %s\n", feature->power_scheme_ui ? "3rd party":"CUI");
+    printf("\tSprite Display Assignment when Overlay is Active in Clone Mode: %s\n",
+	    feature->sprite_display_assign ? "primary" : "secondary");
+    printf("\tDisplay Maintain Aspect Scaling via CUI: %s\n", YESNO(feature->cui_aspect_scaling));
+    printf("\tPreserve Aspect Ratio: %s\n", YESNO(feature->preserve_aspect_ratio));
+    printf("\tEnable SDVO device power down: %s\n", YESNO(feature->sdvo_device_power_down));
+    printf("\tCRT hotplug: %s\n", YESNO(feature->crt_hotplug));
+    printf("\tLVDS config: ");
+    switch (feature->lvds_config) {
+	case BDB_DRIVER_NO_LVDS:
+	    printf("No LVDS\n");
+	    break;
+	case BDB_DRIVER_INTER_LVDS:
+	    printf("Integrated LVDS\n");
+	    break;
+	case BDB_DRIVER_SDVO_LVDS:
+	    printf("SDVO LVDS\n");
+	    break;
+	case BDB_DRIVER_ALL_LVDS:
+	    printf("Both Integrated LVDS and SDVO LVDS\n");
+	    break;
+    }
+    free(block);
+}
+
 int main(int argc, char **argv)
 {
     int fd;
@@ -433,5 +491,7 @@ int main(int argc, char **argv)
     dump_lvds_data();
     dump_lvds_ptr_data();
 
+    dump_driver_feature();
+
     return 0;
 }
diff --git a/src/i830_bios.h b/src/i830_bios.h
index 39706ac..2dcc092 100644
--- a/src/i830_bios.h
+++ b/src/i830_bios.h
@@ -395,6 +395,41 @@ struct vch_bdb_22 {
     struct vch_panel_data   panels[16];
 } __attribute__((packed));
 
+#define BDB_DRIVER_NO_LVDS	0
+#define BDB_DRIVER_INTER_LVDS	1
+#define BDB_DRIVER_SDVO_LVDS	2
+#define BDB_DRIVER_ALL_LVDS	3
+
+struct bdb_driver_feature {
+    uint8_t	boot_dev_algorithm:1;
+    uint8_t	block_display_switch:1;
+    uint8_t	allow_display_switch:1;
+    uint8_t	hotplug_dvo:1;
+    uint8_t	dual_view_zoom:1;
+    uint8_t	int15h_hook:1;
+    uint8_t	sprite_in_clone:1;
+    uint8_t	primary_lfp_id:1;
+
+    uint16_t	boot_mode_x;
+    uint16_t	boot_mode_y;
+    uint8_t	boot_mode_bpp;
+    uint8_t	boot_mode_refresh;
+
+    uint16_t	enable_lfp_primary:1;
+    uint16_t	selective_mode_pruning:1;
+    uint16_t	dual_frequency:1;
+    uint16_t	render_clock_freq:1; /* 0: high freq; 1: low freq */
+    uint16_t	nt_clone_support:1;
+    uint16_t	power_scheme_ui:1; /* 0: CUI; 1: 3rd party */
+    uint16_t	sprite_display_assign:1; /* 0: secondary; 1: primary */
+    uint16_t	cui_aspect_scaling:1;
+    uint16_t	preserve_aspect_ratio:1;
+    uint16_t	sdvo_device_power_down:1;
+    uint16_t	crt_hotplug:1;
+    uint16_t	lvds_config:2;
+    uint16_t	reserved:3;
+} __attribute__((packed));
+
 #ifndef REG_DUMPER
 int i830_bios_init(ScrnInfoPtr pScrn);
 #endif
commit 62ca1c479825ffa0e9cf444b4e25080150faa45b
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Feb 18 10:49:00 2009 +0800

    Fix SDVO mulitiplier setting for 945G
    
    Wrong SDVO multiplier setup has been slipped
    in SDVO TV patch. Thanks Michael Fu to point this out!

diff --git a/src/i830_display.c b/src/i830_display.c
index 8a5cf24..16908c6 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1337,7 +1337,7 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
 	    dpll |= DPLL_DVO_HIGH_SPEED;
 	    if ((IS_I945G(pI830) || IS_I945GM(pI830) || IS_G33CLASS(pI830)))
 	    {
-		int sdvo_pixel_multiply = i830_sdvo_get_pixel_multiplier (adjusted_mode);
+		int sdvo_pixel_multiply = adjusted_mode->Clock / mode->Clock;
 		dpll |= (sdvo_pixel_multiply - 1) << SDVO_MULTIPLIER_SHIFT_HIRES;
 	    }
 	}
commit 723b6065093adb56a2d7204bd990ceae41bfafc9
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Tue Feb 17 13:48:04 2009 -0500

    KMS: Hook up crtc::gamma_set.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 0d0e130..66d6014 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -357,6 +357,17 @@ drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *dat
 #endif
 }
 
+static void
+drmmode_crtc_gamma_set(xf86CrtcPtr crtc,
+		       CARD16 *red, CARD16 *green, CARD16 *blue, int size)
+{
+	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+	drmmode_ptr drmmode = drmmode_crtc->drmmode;
+
+	drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
+			    size, red, green, blue);
+}
+
 static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
 	.dpms = drmmode_crtc_dpms,
 	.set_mode_major = drmmode_set_mode_major,
@@ -369,8 +380,8 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
 	.shadow_create = drmmode_crtc_shadow_create,
 	.shadow_allocate = drmmode_crtc_shadow_allocate,
 	.shadow_destroy = drmmode_crtc_shadow_destroy,
+	.gamma_set = drmmode_crtc_gamma_set,
 #if 0
-	.gamma_set = i830_crtc_gamma_set,
 	.shadow_create = i830_crtc_shadow_create,
 	.shadow_allocate = i830_crtc_shadow_allocate,
 	.shadow_destroy = i830_crtc_shadow_destroy,
commit 506bbb8341c052499057834a669b82787454b426
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Feb 16 14:09:49 2009 +0800

    Safely init SDVO found variable
    
    Found by Michael Fu for my last SDVO detect fix.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 77c127e..571f4c2 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -912,7 +912,7 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
       i830_lvds_init(pScrn);
 
    if (IS_I9XX(pI830)) {
-      Bool found;
+      Bool found = FALSE;
       if ((INREG(SDVOB) & SDVO_DETECTED)) {
 	 found = i830_sdvo_init(pScrn, SDVOB);
 
commit 9d464bd5b0d2724f5edb26e859888ceb6a248f9b
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Fri Feb 13 11:15:48 2009 +0800

    Fix SDVO/HDMI detect
    
    SDVOC detect bit is only valid for HDMIC.
    And for SDVO devices, SDVOB detect bit should be used
    to probe all possible SDVO outputs.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index f8219b7..77c127e 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -912,21 +912,21 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
       i830_lvds_init(pScrn);
 
    if (IS_I9XX(pI830)) {
+      Bool found;
       if ((INREG(SDVOB) & SDVO_DETECTED)) {
-	 Bool found = i830_sdvo_init(pScrn, SDVOB);
+	 found = i830_sdvo_init(pScrn, SDVOB);
 
 	 if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
 	    i830_hdmi_init(pScrn, SDVOB);
       }
 
-      if ((INREG(SDVOC) & SDVO_DETECTED) ||
-	      /* SDVOC detect bit is reserved on 965G/965GM */
-	      (IS_I965G(pI830) && !IS_G4X(pI830))) {
-	 Bool found = i830_sdvo_init(pScrn, SDVOC);
+      if ((INREG(SDVOB) & SDVO_DETECTED))
+	 found = i830_sdvo_init(pScrn, SDVOC);
+
+      if ((INREG(SDVOC) & SDVO_DETECTED) &&
+	    !found && SUPPORTS_INTEGRATED_HDMI(pI830))
+	 i830_hdmi_init(pScrn, SDVOC);
 
-	 if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
-	    i830_hdmi_init(pScrn, SDVOC);
-      }
    } else {
       i830_dvo_init(pScrn);
    }
commit 48445d2e939328495b4abe0fb7e579dfcef727bb
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Fri Feb 13 11:11:18 2009 +0800

    SDVO: remove ForceSDVODetect option
    
    Which is just a hack to hide our SDVO detect drawback,
    we will have SDVO/HDMI detect fix later.

diff --git a/man/intel.man b/man/intel.man
index 65d1114..c7a3c61 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -202,12 +202,6 @@ information.
 Enable XvMC driver. Current support MPEG2 MC on 915/945 and G33 series.
 User should provide absolute path to libIntelXvMC.so in XvMCConfig file.
 Default: Disabled.
-.TP
-.BI "Option \*qForceSDVODetect\*q \*q" boolean \*q
-Instead of depending on SDVO detect status bit to initialize SDVO outputs,
-this option trys to ignore that status bit and try to probe on all SDVO
-ports anyway. Try this if some output is not detected on your ADD2 card.
-Use of this option will slow down your startup time. Default: Disabled.
 
 .SH OUTPUT CONFIGURATION
 On 830M and better chipsets, the driver supports runtime configuration of
diff --git a/src/i830.h b/src/i830.h
index bfd78dc..7904b9f 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -729,9 +729,6 @@ typedef struct _I830Rec {
    Bool debug_modes;
    unsigned int quirk_flag;
 
-   /* User option to ignore SDVO detect bit status, in case some outputs
-      not detected on SDVO, so let driver try its best. */
-   Bool force_sdvo_detect;
     /** User option to print acceleration fallback info to the server log. */
    Bool fallback_debug;
 } I830Rec;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index b8d8d37..f8219b7 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -317,7 +317,6 @@ typedef enum {
 #ifdef INTEL_XVMC
    OPTION_XVMC,
 #endif
-   OPTION_FORCE_SDVO_DETECT,
    OPTION_PREFER_OVERLAY,
 } I830Opts;
 
@@ -343,7 +342,6 @@ static OptionInfoRec I830Options[] = {
 #ifdef INTEL_XVMC
    {OPTION_XVMC,	"XvMC",		OPTV_BOOLEAN,	{0},	TRUE},
 #endif
-   {OPTION_FORCE_SDVO_DETECT, "ForceSDVODetect", OPTV_BOOLEAN,  {0},	FALSE},
    {OPTION_PREFER_OVERLAY, "XvPreferOverlay", OPTV_BOOLEAN, {0}, FALSE},
    {-1,			NULL,		OPTV_NONE,	{0},	FALSE}
 };
@@ -914,14 +912,14 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
       i830_lvds_init(pScrn);
 
    if (IS_I9XX(pI830)) {
-      if ((INREG(SDVOB) & SDVO_DETECTED) || pI830->force_sdvo_detect) {
+      if ((INREG(SDVOB) & SDVO_DETECTED)) {
 	 Bool found = i830_sdvo_init(pScrn, SDVOB);
 
 	 if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
 	    i830_hdmi_init(pScrn, SDVOB);
       }
 
-      if ((INREG(SDVOC) & SDVO_DETECTED) || pI830->force_sdvo_detect ||
+      if ((INREG(SDVOC) & SDVO_DETECTED) ||
 	      /* SDVOC detect bit is reserved on 965G/965GM */
 	      (IS_I965G(pI830) && !IS_G4X(pI830))) {
 	 Bool found = i830_sdvo_init(pScrn, SDVOC);
@@ -1556,12 +1554,6 @@ I830GetEarlyOptions(ScrnInfoPtr pScrn)
     if (xf86ReturnOptValBool(pI830->Options, OPTION_FORCEENABLEPIPEA, FALSE))
 	pI830->quirk_flag |= QUIRK_PIPEA_FORCE;
 
-    if (xf86ReturnOptValBool(pI830->Options, OPTION_FORCE_SDVO_DETECT, FALSE)) {
-	pI830->force_sdvo_detect = TRUE;
-    } else {
-	pI830->force_sdvo_detect = FALSE;
-    }
-
     return TRUE;
 }
 
commit ddedf19f889da2ce6d69a3afce4665e2245682fa
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Fri Feb 13 10:09:42 2009 +0800

    SDVO: Switch control bus only before DDC access
    
    Instead of set control bus switch before every i2c start,
    just set once before doing DDC. This should eliminate some
    encoders returning error during that.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 8066251..4b98a9b 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1377,9 +1377,7 @@ i830_sdvo_ddc_i2c_start(I2CBusPtr b, int timeout)
     xf86OutputPtr	    output = b->DriverPrivate.ptr;
     I830OutputPrivatePtr    intel_output = output->driver_private;
     I2CBusPtr		    i2cbus = intel_output->pI2CBus;
-    struct i830_sdvo_priv   *dev_priv = intel_output->dev_priv;
 
-    i830_sdvo_set_control_bus_switch(output, dev_priv->ddc_bus);
     return i2cbus->I2CStart(i2cbus, timeout);
 }
 
@@ -1566,9 +1564,11 @@ i830_sdvo_get_ddc_modes(xf86OutputPtr output)
     xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
     DisplayModePtr modes = NULL;
     xf86OutputPtr crt;
-    I830OutputPrivatePtr intel_output;
+    I830OutputPrivatePtr intel_output = output->driver_private;
     xf86MonPtr edid_mon = NULL;
-    struct i830_sdvo_priv *dev_priv;
+    struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
+
+    i830_sdvo_set_control_bus_switch(output, dev_priv->ddc_bus);
 
     modes = i830_ddc_get_modes(output);
     if (modes != NULL)
commit f1ca56e17d0ecd4f1299061a6b3272bfd289e123
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Fri Feb 13 10:02:02 2009 +0800

    SDVO: Fix TV support
    
    As SDVO TV uses SDVO_TVClkIn from SDVO encoder for clock reference,
    it needs to generate proper PLL for current input clock. This uses
    fixed PLL table from vbios for this. And possible sdvo mulitiplier
    has to be setup correctly. This makes TV output stable on my 945GCLF2
    board with NTSC-M format.

diff --git a/src/i830_display.c b/src/i830_display.c
index 8ecb5e5..8a5cf24 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1304,6 +1304,26 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
 		   (float)adjusted_mode->Clock / 1000);
     }
 
+    /* SDVO TV has fixed PLL values depends on its clock range,
+       this mirrors vbios setting. */
+    if (is_sdvo && is_tv) {
+	if (adjusted_mode->Clock >= 100000 &&
+		adjusted_mode->Clock < 140500) {
+	    clock.p1 = 2;
+	    clock.p2 = 10;
+	    clock.n = 3;
+	    clock.m1 = 16;
+	    clock.m2 = 8;
+	} else if (adjusted_mode->Clock >= 140500 &&
+		adjusted_mode->Clock <= 200000) {
+	    clock.p1 = 1;
+	    clock.p2 = 10;
+	    clock.n = 6;
+	    clock.m1 = 12;
+	    clock.m2 = 8;
+	}
+    }
+
     fp = clock.n << 16 | clock.m1 << 8 | clock.m2;
 
     dpll = DPLL_VGA_MODE_DIS;
@@ -1315,10 +1335,9 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
 	if (is_sdvo)
 	{
 	    dpll |= DPLL_DVO_HIGH_SPEED;
-	    if ((IS_I945G(pI830) || IS_I945GM(pI830) || IS_G33CLASS(pI830)) &&
-		!is_tv)
+	    if ((IS_I945G(pI830) || IS_I945GM(pI830) || IS_G33CLASS(pI830)))
 	    {
-		int sdvo_pixel_multiply = adjusted_mode->Clock / mode->Clock;
+		int sdvo_pixel_multiply = i830_sdvo_get_pixel_multiplier (adjusted_mode);
 		dpll |= (sdvo_pixel_multiply - 1) << SDVO_MULTIPLIER_SHIFT_HIRES;
 	    }
 	}
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 233141c..8066251 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -957,6 +957,31 @@ static void i830_sdvo_set_avi_infoframe(xf86OutputPtr output,
 			SDVO_HBUF_TX_VSYNC);
 }
 
+static void
+i830_sdvo_set_tv_format(xf86OutputPtr output)
+{
+    ScrnInfoPtr pScrn = output->scrn;
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
+    struct i830_sdvo_tv_format *format, unset;
+    uint8_t status;
+
+    format = &dev_priv->tv_format;
+    memset(&unset, 0, sizeof(unset));
+    if (memcmp(format, &unset, sizeof(*format))) {
+	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		   "%s: Choosing default TV format of NTSC-M\n",
+		   SDVO_NAME(dev_priv));
+	format->ntsc_m = 1;
+	i830_sdvo_write_cmd(output, SDVO_CMD_SET_TV_FORMAT, format,
+		sizeof(*format));
+	status = i830_sdvo_read_response(output, NULL, 0);
+	if (status != SDVO_CMD_STATUS_SUCCESS)
+	    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		    "%s: Fail to set TV format\n", SDVO_NAME(dev_priv));
+    }
+}
+
 static Bool
 i830_sdvo_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
 		     DisplayModePtr adjusted_mode)
@@ -1002,8 +1027,12 @@ i830_sdvo_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
 
 	    i830_sdvo_get_mode_from_dtd(adjusted_mode, &input_dtd);
 
+	    xf86SetModeCrtc(adjusted_mode, 0);
+
 	    ErrorF("input modeline:\n");
 	    xf86PrintModeline(0, adjusted_mode);
+	    /* Clock range is required to be in 100-200Mhz */
+	    adjusted_mode->Clock *= i830_sdvo_get_pixel_multiplier(adjusted_mode);
 	} else {
 	    return FALSE;
 	}
@@ -1049,20 +1078,28 @@ i830_sdvo_mode_set(xf86OutputPtr output, DisplayModePtr mode,
 	sdvox |= SDVO_AUDIO_ENABLE;
     }
 
-    i830_sdvo_get_dtd_from_mode(&input_dtd, mode);
+    /* We have tried to get input timing in mode_fixup, and filled into
+       adjusted_mode */
+    if (dev_priv->is_tv)
+	i830_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode);
+    else
+	i830_sdvo_get_dtd_from_mode(&input_dtd, mode);
 
     /* If it's a TV, we already set the output timing in mode_fixup.
      * Otherwise, the output timing is equal to the input timing.
      */
+    i830_sdvo_set_target_output(output, dev_priv->controlled_output);
+    /* Set the input timing to the screen. Assume always input 0. */
+    i830_sdvo_set_target_input(output, TRUE, FALSE);
+
+    if (dev_priv->is_tv)
+	i830_sdvo_set_tv_format(output);
+
     if (!dev_priv->is_tv) {
 	/* Set the output timing to the screen */
-	i830_sdvo_set_target_output(output, dev_priv->controlled_output);
 	i830_sdvo_set_output_timing(output, &input_dtd);
     }
 
-    /* Set the input timing to the screen. Assume always input 0. */
-    i830_sdvo_set_target_input(output, TRUE, FALSE);
-
     /* We would like to use i830_sdvo_create_preferred_input_timing() to
      * provide the device with a timing it can support, if it supports that
      * feature.  However, presumably we would need to adjust the CRTC to output
@@ -1620,10 +1657,9 @@ i830_sdvo_get_tv_mode(DisplayModePtr *head, int width, int height,
 static void
 i830_sdvo_check_tv_format(xf86OutputPtr output)
 {
-    ScrnInfoPtr pScrn = output->scrn;
     I830OutputPrivatePtr intel_output = output->driver_private;
     struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
-    struct i830_sdvo_tv_format format, unset;
+    struct i830_sdvo_tv_format format;
     uint8_t status;
 
     i830_sdvo_write_cmd(output, SDVO_CMD_GET_TV_FORMAT, NULL, 0);
@@ -1631,19 +1667,6 @@ i830_sdvo_check_tv_format(xf86OutputPtr output)
     if (status != SDVO_CMD_STATUS_SUCCESS)
 	return;
 
-    memset(&unset, 0, sizeof(unset));
-    if (memcmp(&format, &unset, sizeof(format))) {
-	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-		   "%s: Choosing default TV format of NTSC-M\n",
-		   SDVO_NAME(dev_priv));
-
-	format.ntsc_m = TRUE;
-	i830_sdvo_write_cmd(output, SDVO_CMD_SET_TV_FORMAT, &format,
-		sizeof(format));
-	status = i830_sdvo_read_response(output, NULL, 0);
-	if (status != SDVO_CMD_STATUS_SUCCESS)
-	    return;
-    }
     memcpy(&dev_priv->tv_format, &format, sizeof(format));
 }
 
commit acde0ef683d6ec33d0b478923ffb11bd6785798f
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Fri Feb 13 09:53:57 2009 +0800

    SDVO: fix CREATE_PREFERRED_INPUT_TIMING command

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 5c2a4b1..233141c 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -594,9 +594,12 @@ i830_sdvo_create_preferred_input_timing(xf86OutputPtr output, uint16_t clock,
     struct i830_sdvo_preferred_input_timing_args args;
     uint8_t status;
 
+    memset(&args, 0, sizeof(args));
     args.clock = clock;
     args.width = width;
     args.height = height;
+    args.interlace = 0;
+    args.scaled = 0;
     i830_sdvo_write_cmd(output, SDVO_CMD_CREATE_PREFERRED_INPUT_TIMING,
 			&args, sizeof(args));
     status = i830_sdvo_read_response(output, NULL, 0);
diff --git a/src/i830_sdvo_regs.h b/src/i830_sdvo_regs.h
index 6988d49..ab38355 100644
--- a/src/i830_sdvo_regs.h
+++ b/src/i830_sdvo_regs.h
@@ -101,6 +101,9 @@ struct i830_sdvo_preferred_input_timing_args {
     uint16_t clock;
     uint16_t width;
     uint16_t height;
+    uint8_t interlace:1;
+    uint8_t scaled:1;
+    uint8_t pad:6;
 } __attribute__((packed));
 
 /* I2C registers for SDVO */
commit 824b2f0c5530c3196901c961757e6677b042caf3
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Fri Feb 13 09:50:45 2009 +0800

    SDVO: fix usage for SET_TV_FORMAT and GET_SDTV_RESOLUTION_SUPPORT command
    
    They both needs parameters.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 9cce316..5c2a4b1 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1635,9 +1635,13 @@ i830_sdvo_check_tv_format(xf86OutputPtr output)
 		   SDVO_NAME(dev_priv));
 
 	format.ntsc_m = TRUE;
-	i830_sdvo_write_cmd(output, SDVO_CMD_SET_TV_FORMAT, NULL, 0);
+	i830_sdvo_write_cmd(output, SDVO_CMD_SET_TV_FORMAT, &format,
+		sizeof(format));
 	status = i830_sdvo_read_response(output, NULL, 0);
+	if (status != SDVO_CMD_STATUS_SUCCESS)
+	    return;
     }
+    memcpy(&dev_priv->tv_format, &format, sizeof(format));
 }
 
 static DisplayModePtr
@@ -1647,6 +1651,7 @@ i830_sdvo_get_tv_modes(xf86OutputPtr output)
     struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
     DisplayModePtr modes = NULL;
     struct i830_sdvo_sdtv_resolution_reply *res = &dev_priv->sdtv_resolutions;
+    struct i830_sdvo_sdtv_resolution_request tv_res;
     uint8_t status;
     float refresh = 60; /* XXX */
 
@@ -1654,7 +1659,10 @@ i830_sdvo_get_tv_modes(xf86OutputPtr output)
 
     /* Read the list of supported input resolutions for the selected TV format.
      */
-    i830_sdvo_write_cmd(output, SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT, NULL, 0);
+    memset(&tv_res, 0, sizeof(tv_res));
+    memcpy(&tv_res, &dev_priv->tv_format, sizeof(tv_res));
+    i830_sdvo_write_cmd(output, SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT,
+	    &tv_res, sizeof(tv_res));
     status = i830_sdvo_read_response(output, res, sizeof(*res));
     if (status != SDVO_CMD_STATUS_SUCCESS)
 	return NULL;
commit 62c0c2f5549a51c5df209f7353a19ca301f221be
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Fri Feb 13 09:48:34 2009 +0800

    SDVO: fix error in modeline and DTD convert

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 508a467..9cce316 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -702,7 +702,7 @@ i830_sdvo_get_dtd_from_mode(struct i830_sdvo_dtd *dtd, DisplayModePtr mode)
     dtd->part1.v_high = (((height >> 8) & 0xf) << 4) |
 	((v_blank_len >> 8) & 0xf);
 
-    dtd->part2.h_sync_off = h_sync_offset;
+    dtd->part2.h_sync_off = h_sync_offset & 0xff;
     dtd->part2.h_sync_width = h_sync_len & 0xff;
     dtd->part2.v_sync_off_width = (v_sync_offset & 0xf) << 4 |
 	(v_sync_len & 0xf);
@@ -724,27 +724,10 @@ i830_sdvo_get_dtd_from_mode(struct i830_sdvo_dtd *dtd, DisplayModePtr mode)
 static void
 i830_sdvo_get_mode_from_dtd(DisplayModePtr mode, struct i830_sdvo_dtd *dtd)
 {
-    uint16_t width, height;
-    uint16_t h_blank_len, h_sync_len, v_blank_len, v_sync_len;
-    uint16_t h_sync_offset, v_sync_offset;
-
-    width = mode->CrtcHDisplay;
-    height = mode->CrtcVDisplay;
-
-    /* do some mode translations */
-    h_blank_len = mode->CrtcHBlankEnd - mode->CrtcHBlankStart;
-    h_sync_len = mode->CrtcHSyncEnd - mode->CrtcHSyncStart;
-
-    v_blank_len = mode->CrtcVBlankEnd - mode->CrtcVBlankStart;
-    v_sync_len = mode->CrtcVSyncEnd - mode->CrtcVSyncStart;
-
-    h_sync_offset = mode->CrtcHSyncStart - mode->CrtcHBlankStart;
-    v_sync_offset = mode->CrtcVSyncStart - mode->CrtcVBlankStart;
-
     mode->HDisplay = dtd->part1.h_active;
     mode->HDisplay += ((dtd->part1.h_high >> 4) & 0x0f) << 8;
     mode->HSyncStart = mode->HDisplay + dtd->part2.h_sync_off;
-    mode->HSyncStart += (dtd->part2.sync_off_width_high & 0xa0) << 2;
+    mode->HSyncStart += (dtd->part2.sync_off_width_high & 0xc0) << 2;
     mode->HSyncEnd = mode->HSyncStart + dtd->part2.h_sync_width;
     mode->HSyncEnd += (dtd->part2.sync_off_width_high & 0x30) << 4;
     mode->HTotal = mode->HDisplay + dtd->part1.h_blank;
@@ -754,7 +737,7 @@ i830_sdvo_get_mode_from_dtd(DisplayModePtr mode, struct i830_sdvo_dtd *dtd)
     mode->VDisplay += ((dtd->part1.v_high >> 4) & 0x0f) << 8;
     mode->VSyncStart = mode->VDisplay;
     mode->VSyncStart += (dtd->part2.v_sync_off_width >> 4) & 0xf;
-    mode->VSyncStart += (dtd->part2.sync_off_width_high & 0x0a) << 2;
+    mode->VSyncStart += (dtd->part2.sync_off_width_high & 0x0c) << 2;
     mode->VSyncStart += dtd->part2.v_sync_off_high & 0xc0;
     mode->VSyncEnd = mode->VSyncStart + (dtd->part2.v_sync_off_width & 0xf);
     mode->VSyncEnd += (dtd->part2.sync_off_width_high & 0x3) << 4;
@@ -763,7 +746,7 @@ i830_sdvo_get_mode_from_dtd(DisplayModePtr mode, struct i830_sdvo_dtd *dtd)
 
     mode->Clock = dtd->part1.clock * 10;
 
-    mode->Flags &= (V_PHSYNC | V_PVSYNC);
+    mode->Flags &= ~(V_PHSYNC | V_PVSYNC);
     if (dtd->part2.dtd_flags & 0x2)
 	mode->Flags |= V_PHSYNC;
     if (dtd->part2.dtd_flags & 0x4)
commit 37c67088a887e6380571e6eec8a8f058e3e24717
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Feb 11 15:15:27 2009 +0800

    SDVO: check EDID info for DVI-I
    
    For SDVO DVI-I, check EDID info for digital output,
    otherwise mark it to be disconnected as analog output
    is driven by VGA then.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 1fbf8dc..508a467 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1507,7 +1507,9 @@ i830_sdvo_check_hdmi_encode (xf86OutputPtr output)
 static xf86OutputStatus
 i830_sdvo_detect(xf86OutputPtr output)
 {
-    uint8_t response[2];
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
+    uint16_t response;
     uint8_t status;
 
     i830_sdvo_write_cmd(output, SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0);
@@ -1516,10 +1518,22 @@ i830_sdvo_detect(xf86OutputPtr output)
     if (status != SDVO_CMD_STATUS_SUCCESS)
 	return XF86OutputStatusUnknown;
 
-    if (response[0] != 0 || response[1] != 0)
-	return XF86OutputStatusConnected;
-    else
+    if (response == 0)
 	return XF86OutputStatusDisconnected;
+
+    if (response & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
+    {
+	xf86MonPtr edid_mon;
+	/* Check EDID in DVI-I case */
+	i830_sdvo_set_control_bus_switch(output, dev_priv->ddc_bus);
+	edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
+	if (!edid_mon || !DIGITAL(edid_mon->features.input_type)) {
+	    xfree(edid_mon);
+	    return XF86OutputStatusDisconnected;
+	}
+	xfree(edid_mon);
+    }
+    return XF86OutputStatusConnected;
 }
 
 static DisplayModePtr
commit 38079bc0f1038da77048bbf6e5c10758f9fb8a55
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Feb 11 14:41:58 2009 +0800

    SDVO: Fix for HDMI encode and audio setup (try 5)
    
    SDVO HDMI encode and audio is not setup in detect,
    which fails in hotplug case for HDMI audio. Fix to
    check current encode type and set flag for HDMI audio
    enabling.
    
    Check and set HDMI encode state in get_modes.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 0750166..1fbf8dc 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -786,6 +786,24 @@ i830_sdvo_get_supp_encode(xf86OutputPtr output, struct i830_sdvo_encode *encode)
 }
 
 static Bool
+i830_sdvo_get_digital_encoding_mode(xf86OutputPtr output)
+{
+    I830OutputPrivatePtr    intel_output = output->driver_private;
+    struct i830_sdvo_priv   *dev_priv = intel_output->dev_priv;
+    uint8_t status;
+
+    i830_sdvo_set_target_output(output, dev_priv->controlled_output);
+
+    i830_sdvo_write_cmd(output, SDVO_CMD_GET_ENCODE, NULL, 0);
+    status = i830_sdvo_read_response(output, &dev_priv->is_hdmi, 1);
+    if (status != SDVO_CMD_STATUS_SUCCESS) {
+	dev_priv->is_hdmi = FALSE;
+	return FALSE;
+    }
+    return TRUE;
+}
+
+static Bool
 i830_sdvo_set_encode(xf86OutputPtr output, uint8_t mode)
 {
     uint8_t status;
@@ -1449,6 +1467,34 @@ i830_sdvo_dump(ScrnInfoPtr pScrn)
     }
 }
 
+static void
+i830_sdvo_set_hdmi_encode (xf86OutputPtr output)
+{
+    /* enable hdmi encoding mode if supported */
+    i830_sdvo_set_encode(output, SDVO_ENCODE_HDMI);
+    i830_sdvo_set_colorimetry(output, SDVO_COLORIMETRY_RGB256);
+}
+
+/**
+ * Determine if current TMDS encoding is HDMI.
+ * Return TRUE if found HDMI encoding is used, otherwise return FALSE.
+ */
+static Bool
+i830_sdvo_check_hdmi_encode (xf86OutputPtr output)
+{
+    I830OutputPrivatePtr intel_output = output->driver_private;
+    struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
+
+    if (i830_sdvo_get_supp_encode(output, &dev_priv->encode) &&
+	    i830_sdvo_get_digital_encoding_mode(output) &&
+	    dev_priv->is_hdmi)
+    {
+	i830_sdvo_set_hdmi_encode(output);
+	return TRUE;
+    } else
+	return FALSE;
+}
+
 /**
  * Asks the SDVO device if any displays are currently connected.
  *
@@ -1485,10 +1531,11 @@ i830_sdvo_get_ddc_modes(xf86OutputPtr output)
     xf86OutputPtr crt;
     I830OutputPrivatePtr intel_output;
     xf86MonPtr edid_mon = NULL;
+    struct i830_sdvo_priv *dev_priv;
 
     modes = i830_ddc_get_modes(output);
     if (modes != NULL)
-	return modes;
+	goto check_hdmi;
 
     /* Mac mini hack.  On this device, I get DDC through the analog, which
      * load-detects as disconnected.  I fail to DDC through the SDVO DDC,
@@ -1508,6 +1555,23 @@ i830_sdvo_get_ddc_modes(xf86OutputPtr output)
 	modes = xf86OutputGetEDIDModes(output);
     }
 
+check_hdmi:
+    /* Check if HDMI encode, setup it and set the flag for HDMI audio */
+    intel_output = output->driver_private;
+    dev_priv = intel_output->dev_priv;
+
+    if (dev_priv->caps.output_flags & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
+    {
+	if (!i830_sdvo_check_hdmi_encode(output)) {
+	    /* check EDID HDMI info for monitor */
+	    if (output->MonInfo && xf86LoaderCheckSymbol("xf86MonitorIsHDMI")
+		    && xf86MonitorIsHDMI(output->MonInfo)) {
+		dev_priv->is_hdmi = TRUE;
+		i830_sdvo_set_hdmi_encode (output);
+	    } else
+		dev_priv->is_hdmi = FALSE;
+	}
+    }
     return modes;
 }
 
@@ -1733,21 +1797,6 @@ i830_sdvo_select_ddc_bus(struct i830_sdvo_priv *dev_priv)
     dev_priv->ddc_bus = 1 << num_bits;
 }
 
-static Bool
-i830_sdvo_get_digital_encoding_mode(xf86OutputPtr output)
-{
-    I830OutputPrivatePtr    intel_output = output->driver_private;
-    struct i830_sdvo_priv   *dev_priv = intel_output->dev_priv;
-    uint8_t status;
-
-    i830_sdvo_set_target_output(output, dev_priv->controlled_output);
-
-    i830_sdvo_write_cmd(output, SDVO_CMD_GET_ENCODE, NULL, 0);
-    status = i830_sdvo_read_response(output, &dev_priv->is_hdmi, 1);
-    if (status != SDVO_CMD_STATUS_SUCCESS)
-	return FALSE;
-    return TRUE;
-}
 
 Bool
 i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
@@ -1876,14 +1925,8 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
         output->subpixel_order = SubPixelHorizontalRGB;
 	name_prefix="TMDS";
 
-	if (i830_sdvo_get_supp_encode(output, &dev_priv->encode) &&
-		i830_sdvo_get_digital_encoding_mode(output) &&
-		dev_priv->is_hdmi) {
-	    /* enable hdmi encoding mode if supported */
-	    i830_sdvo_set_encode(output, SDVO_ENCODE_HDMI);
-	    i830_sdvo_set_colorimetry(output, SDVO_COLORIMETRY_RGB256);
+	if (i830_sdvo_check_hdmi_encode (output))
 	    name_prefix = "HDMI";
-	}
     }
     else if (dev_priv->caps.output_flags & SDVO_OUTPUT_SVID0)
     {
commit 3012d85cc5eb58c2447e93c05c39dc14feaae988
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb 10 18:47:28 2009 -0800

    uxa: Fix breakage from UXA_FALLBACK conversion from "do {} while (0)" construct.
    
    Thanks to keithp for post-commit review.

diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
index ae3fb2a..bdc6e82 100644
--- a/uxa/uxa-priv.h
+++ b/uxa/uxa-priv.h
@@ -76,7 +76,7 @@
 if (uxa_get_screen(screen)->fallback_debug) {			\
 	ErrorF("UXA fallback at %s: ", __FUNCTION__);		\
 	ErrorF x;						\
-} while (0)
+}
 
 char
 uxa_drawable_location(DrawablePtr pDrawable);
commit 5009127de7d9527ae329d1c2fbc7283648bde2e6
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb 10 18:23:35 2009 -0800

    uxa: Fix driver against fbDoCopy -> miDoCopy change in the server.

diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index 785855c..1b0af9c 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -493,9 +493,9 @@ uxa_copy_area(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
                                  srcx, srcy, width, height, dstx, dsty);
     }
 
-    return  fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
-                      srcx, srcy, width, height,
-                      dstx, dsty, uxa_copy_n_to_n, 0, NULL);
+    return miDoCopy (pSrcDrawable, pDstDrawable, pGC,
+		     srcx, srcy, width, height,
+		     dstx, dsty, uxa_copy_n_to_n, 0, NULL);
 }
 
 static void
@@ -841,7 +841,7 @@ uxa_copy_window(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
 			  -pPixmap->screen_x, -pPixmap->screen_y);
 #endif
 
-    fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
+    miCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
 		  NULL,
 		  &rgnDst, dx, dy, uxa_copy_n_to_n, 0, NULL);
 
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
index 463749a..ae3fb2a 100644
--- a/uxa/uxa-priv.h
+++ b/uxa/uxa-priv.h
@@ -61,7 +61,12 @@
 #endif
 #include "damage.h"
 
-#define DEBUG_TRACE_FALL	0
+/* 1.6 and earlier server compat */
+#ifndef miGetCompositeClip
+#define miCopyRegion fbCopyRegion
+#define miDoCopy fbDoCopy
+#endif
+
 #define DEBUG_MIGRATE		0
 #define DEBUG_PIXMAP		0
 #define DEBUG_OFFSCREEN		0
commit b53977f4c53c7c8f562f909e985b8d5a7b2526f3
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb 10 18:22:46 2009 -0800

    uxa: Fix failure to --amend in further changes in previous commit.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index d18bcd2..ebc6624 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -1007,7 +1007,7 @@ i830_uxa_init (ScreenPtr pScreen)
 
     I830SelectBuffer(scrn, I830_SELECT_FRONT);
 
-    uxa_set_fallback_debug(pI830->fallback_debug);
+    uxa_set_fallback_debug(pScreen, i830->fallback_debug);
 
     return TRUE;
 }
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 13635f8..60022cc 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -33,13 +33,11 @@
 #ifdef RENDER
 #include "mipict.h"
 
-#if DEBUG_TRACE_FALL
 static void uxa_composite_fallback_pict_desc(PicturePtr pict, char *string, int n)
 {
     char format[20];
     char size[20];
     char loc;
-    int temp;
 
     if (!pict) {
 	snprintf(string, n, "None");
@@ -71,7 +69,7 @@ static void uxa_composite_fallback_pict_desc(PicturePtr pict, char *string, int
 	break;
     }
 
-    loc = uxa_get_drawable_pixmap(pict->pDrawable, &temp, &temp) ? 's' : 'm';
+    loc = uxa_get_drawable_pixmap(pict->pDrawable) ? 's' : 'm';
 
     snprintf(size, 20, "%dx%d%s", pict->pDrawable->width,
 	     pict->pDrawable->height, pict->repeat ?
@@ -112,7 +110,6 @@ uxa_print_composite_fallback(CARD8 op,
 	   "                    dst  %s, \n",
 	   sop, srcdesc, maskdesc, dstdesc);
 }
-#endif /* DEBUG_TRACE_FALL */
 
 Bool
 uxa_op_reads_destination (CARD8 op)
@@ -775,9 +772,8 @@ uxa_composite(CARD8	op,
     }
 
 fallback:
-#if DEBUG_TRACE_FALL
-    uxa_print_composite_fallback (op, pSrc, pMask, pDst);
-#endif
+    if (uxa_screen->fallback_debug)
+	uxa_print_composite_fallback (op, pSrc, pMask, pDst);
 
     uxa_check_composite (op, pSrc, pMask, pDst, xSrc, ySrc,
 		      xMask, yMask, xDst, yDst, width, height);
diff --git a/uxa/uxa-unaccel.c b/uxa/uxa-unaccel.c
index d2c5de0..8f86468 100644
--- a/uxa/uxa-unaccel.c
+++ b/uxa/uxa-unaccel.c
@@ -68,13 +68,11 @@ uxa_finish_access_gc(GCPtr pGC)
         uxa_finish_access(&pGC->stipple->drawable);
 }
 
-#if DEBUG_TRACE_FALL
 char
 uxa_drawable_location(DrawablePtr pDrawable)
 {
     return uxa_drawable_is_offscreen(pDrawable) ? 's' : 'm';
 }
-#endif /* DEBUG_TRACE_FALL */
 
 void
 uxa_check_fill_spans (DrawablePtr pDrawable, GCPtr pGC, int nspans,
commit 5212ec6515c6562f66b86fc16928b601bf04e49b
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Feb 10 15:35:20 2009 -0800

    uxa: hook up the fallback debug to the driver's fallback debug option.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index 28be786..d18bcd2 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -1007,6 +1007,8 @@ i830_uxa_init (ScreenPtr pScreen)
 
     I830SelectBuffer(scrn, I830_SELECT_FRONT);
 
+    uxa_set_fallback_debug(pI830->fallback_debug);
+
     return TRUE;
 }
 #endif /* I830_USE_UXA */
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index f42e0e2..785855c 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -424,7 +424,8 @@ uxa_copy_n_to_n (DrawablePtr    pSrcDrawable,
 		 Pixel		bitplane,
 		 void		*closure)
 {
-    uxa_screen_t    *uxa_screen = uxa_get_screen(pDstDrawable->pScreen);
+    ScreenPtr       screen = pDstDrawable->pScreen;
+    uxa_screen_t    *uxa_screen = uxa_get_screen(screen);
     int		    src_off_x, src_off_y;
     int		    dst_off_x, dst_off_y;
     PixmapPtr	    pSrcPixmap, pDstPixmap;
@@ -988,7 +989,8 @@ void
 uxa_get_image (DrawablePtr pDrawable, int x, int y, int w, int h,
 	       unsigned int format, unsigned long planeMask, char *d)
 {
-    uxa_screen_t    *uxa_screen = uxa_get_screen(pDrawable->pScreen);
+    ScreenPtr       screen = pDrawable->pScreen;
+    uxa_screen_t    *uxa_screen = uxa_get_screen(screen);
     BoxRec	    Box;
     PixmapPtr	    pPix = uxa_get_drawable_pixmap (pDrawable);
     int		    xoff, yoff;
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
index f4b3cee..463749a 100644
--- a/uxa/uxa-priv.h
+++ b/uxa/uxa-priv.h
@@ -67,18 +67,14 @@
 #define DEBUG_OFFSCREEN		0
 #define DEBUG_GLYPH_CACHE	0
 
-#if DEBUG_TRACE_FALL
 #define UXA_FALLBACK(x)     					\
-do {								\
+if (uxa_get_screen(screen)->fallback_debug) {			\
 	ErrorF("UXA fallback at %s: ", __FUNCTION__);		\
 	ErrorF x;						\
 } while (0)
 
 char
 uxa_drawable_location(DrawablePtr pDrawable);
-#else
-#define UXA_FALLBACK(x)
-#endif
 
 #if DEBUG_PIXMAP
 #define DBG_PIXMAP(a) ErrorF a
@@ -139,6 +135,7 @@ typedef struct {
 #endif
     EnableDisableFBAccessProcPtr SavedEnableDisableFBAccess;
 
+    Bool			 fallback_debug;
     Bool			 swappedOut;
     unsigned			 disableFbCount;
     unsigned			 offScreenCounter;
diff --git a/uxa/uxa-unaccel.c b/uxa/uxa-unaccel.c
index aba12e8..d2c5de0 100644
--- a/uxa/uxa-unaccel.c
+++ b/uxa/uxa-unaccel.c
@@ -80,6 +80,8 @@ void
 uxa_check_fill_spans (DrawablePtr pDrawable, GCPtr pGC, int nspans,
 		   DDXPointPtr ppt, int *pwidth, int fSorted)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
     if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
 	if (uxa_prepare_access_gc (pGC)) {
@@ -94,6 +96,8 @@ void
 uxa_check_set_spans (DrawablePtr pDrawable, GCPtr pGC, char *psrc,
 		 DDXPointPtr ppt, int *pwidth, int nspans, int fSorted)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
     if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
 	fbSetSpans (pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);
@@ -106,6 +110,8 @@ uxa_check_put_image (DrawablePtr pDrawable, GCPtr pGC, int depth,
 		 int x, int y, int w, int h, int leftPad, int format,
 		 char *bits)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
     if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
 	fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
@@ -117,6 +123,7 @@ RegionPtr
 uxa_check_copy_area (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
 		     int srcx, int srcy, int w, int h, int dstx, int dsty)
 {
+    ScreenPtr screen = pSrc->pScreen;
     RegionPtr ret = NULL;
 
     UXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst,
@@ -136,6 +143,7 @@ uxa_check_copy_plane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
 		  int srcx, int srcy, int w, int h, int dstx, int dsty,
 		  unsigned long bitPlane)
 {
+    ScreenPtr screen = pSrc->pScreen;
     RegionPtr ret = NULL;
 
     UXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst,
@@ -155,6 +163,8 @@ void
 uxa_check_poly_point (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
 		  DDXPointPtr pptInit)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
     if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
 	fbPolyPoint (pDrawable, pGC, mode, npt, pptInit);
@@ -166,6 +176,8 @@ void
 uxa_check_poly_lines (DrawablePtr pDrawable, GCPtr pGC,
 		  int mode, int npt, DDXPointPtr ppt)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("to %p (%c), width %d, mode %d, count %d\n",
 		  pDrawable, uxa_drawable_location(pDrawable),
 		  pGC->lineWidth, mode, npt));
@@ -188,6 +200,8 @@ void
 uxa_check_poly_segment (DrawablePtr pDrawable, GCPtr pGC,
 		    int nsegInit, xSegment *pSegInit)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("to %p (%c) width %d, count %d\n", pDrawable,
 		  uxa_drawable_location(pDrawable), pGC->lineWidth, nsegInit));
     if (pGC->lineWidth == 0) {
@@ -208,6 +222,8 @@ void
 uxa_check_poly_arc (DrawablePtr pDrawable, GCPtr pGC,
 		int narcs, xArc *pArcs)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
 
     /* Disable this as fbPolyArc can call miZeroPolyArc which in turn
@@ -234,6 +250,8 @@ void
 uxa_check_poly_fill_rect (DrawablePtr pDrawable, GCPtr pGC,
 		     int nrect, xRectangle *prect)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
 
     if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
@@ -250,6 +268,8 @@ uxa_check_image_glyph_blt (DrawablePtr pDrawable, GCPtr pGC,
 		      int x, int y, unsigned int nglyph,
 		      CharInfoPtr *ppci, pointer pglyphBase)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("to %p (%c)\n", pDrawable,
 		  uxa_drawable_location(pDrawable)));
     if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
@@ -266,6 +286,8 @@ uxa_check_poly_glyph_blt (DrawablePtr pDrawable, GCPtr pGC,
 		     int x, int y, unsigned int nglyph,
 		     CharInfoPtr *ppci, pointer pglyphBase)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("to %p (%c), style %d alu %d\n", pDrawable,
 		  uxa_drawable_location(pDrawable), pGC->fillStyle, pGC->alu));
     if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
@@ -282,6 +304,8 @@ uxa_check_push_pixels (GCPtr pGC, PixmapPtr pBitmap,
 		   DrawablePtr pDrawable,
 		   int w, int h, int x, int y)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("from %p to %p (%c,%c)\n", pBitmap, pDrawable,
 		  uxa_drawable_location(&pBitmap->drawable),
 		  uxa_drawable_location(pDrawable)));
@@ -305,6 +329,8 @@ uxa_check_get_spans (DrawablePtr pDrawable,
 		 int nspans,
 		 char *pdstStart)
 {
+    ScreenPtr screen = pDrawable->pScreen;
+
     UXA_FALLBACK(("from %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
     if (uxa_prepare_access (pDrawable, UXA_ACCESS_RO)) {
 	fbGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
@@ -326,6 +352,8 @@ uxa_check_composite (CARD8      op,
                    CARD16     width,
                    CARD16     height)
 {
+    ScreenPtr screen = pDst->pDrawable->pScreen;
+
     UXA_FALLBACK(("from picts %p/%p to pict %p\n",
 		 pSrc, pMask, pDst));
 
@@ -366,7 +394,9 @@ uxa_check_add_traps (PicturePtr	pPicture,
 		  int		ntrap,
 		  xTrap		*traps)
 {
-    UXA_FALLBACK(("to pict %p (%c)\n",
+    ScreenPtr screen = pPicture->pDrawable->pScreen;
+
+    UXA_FALLBACK(("to pict %p (%c)\n", pPicture,
 		  uxa_drawable_location(pPicture->pDrawable)));
     if (uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW)) {
 	fbAddTraps (pPicture, x_off, y_off, ntrap, traps);
diff --git a/uxa/uxa.c b/uxa/uxa.c
index 4aeb5e4..0de408c 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -346,6 +346,14 @@ uxa_xorg_enable_disable_fb_access (int index, Bool enable)
        uxa_screen->SavedEnableDisableFBAccess(index, enable);
 }
 
+void
+uxa_set_fallback_debug (ScreenPtr screen, Bool enable)
+{
+    uxa_screen_t *uxa_screen = uxa_get_screen(screen);
+
+    uxa_screen->fallback_debug = enable;
+}
+
 /**
  * uxa_close_screen() unwraps its wrapped screen functions and tears down UXA's
  * screen private, before calling down to the next CloseSccreen.
diff --git a/uxa/uxa.h b/uxa/uxa.h
index f1c1cfa..8f6f896 100644
--- a/uxa/uxa.h
+++ b/uxa/uxa.h
@@ -517,6 +517,9 @@ uxa_driver_fini(ScreenPtr pScreen);
 CARD32
 uxa_get_pixmap_first_pixel (PixmapPtr pPixmap);
 
+void
+uxa_set_fallback_debug (ScreenPtr screen, Bool enable);
+
 /**
  * Returns TRUE if the given planemask covers all the significant bits in the
  * pixel values for pDrawable.
commit 3aa8591abfbe8db0f13912910c850fdd748808df
Author: Ma Ling <ling.ma at intel.com>
Date:   Fri Feb 6 09:14:15 2009 +0800

    Don't disable vga centering bit.
    
    commit id b9f5915ce812144ffd9d2aa42e8ba856129c35e,
    which resolved bug #17235, but generate new regression-bug #19715.
    This patch intends to resolve bug #17235, and avoid regression as well.
    We have successfully re-tested it for bug #17235 and #19715 respectively.

diff --git a/src/i830_display.c b/src/i830_display.c
index 7a8e96d..8ecb5e5 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -808,10 +808,6 @@ i830_disable_vga_plane (xf86CrtcPtr crtc)
 
     vgacntrl |= VGA_DISP_DISABLE;
 
-    /* disable center mode */
-    if (IS_I9XX(pI830))
-	vgacntrl &= ~(3 << 24);
-
     OUTREG(VGACNTRL, vgacntrl);
     i830WaitForVblank(pScrn);
 
commit 9fe5fca3fe761a4f11857d9766138a60f471a9e6
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Feb 4 06:00:39 2009 +0800

    TV quirk for HP Compaq nx6310

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 4df1e6c..8680baf 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -312,6 +312,8 @@ static i830_quirk i830_quirk_list[] = {
 
     /* HP Compaq nx6110 has no TV output */
     { PCI_CHIP_I915_GM, 0x103c, 0x099c, quirk_ignore_tv },
+    /* HP Compaq nx6310 has no TV output */
+    { PCI_CHIP_I945_GM, 0x103c, 0x30aa, quirk_ignore_tv },
     /* HP Compaq 6730s has no TV output */
     { PCI_CHIP_GM45_GM, 0x103c, 0x30e8, quirk_ignore_tv },
     /* HP Compaq 2730p needs pipe A force quirk (LP: #291555) */
commit 5c370091620b38447172ebeffbc6ed3256e86c9d
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Mon Feb 2 12:02:00 2009 -0500

    Fix front buffer memset() for non-KMS case.
    
    Missed the pI830->FbBase condition when removing the KMS hook.

diff --git a/src/i830_memory.c b/src/i830_memory.c
index e5d70fa..23cc4c7 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1292,7 +1292,7 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
 	return NULL;
     }
 
-    if (!pI830->use_drm_mode)
+    if (!pI830->use_drm_mode && pI830->FbBase)
 	memset (pI830->FbBase + front_buffer->offset, 0, size);
 
     return front_buffer;
commit 2013799b20599a58de48cb21a5a389e898a58af1
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Mon Feb 2 11:51:47 2009 -0500

    Un-revert the I915_SETPARAM_NUM_USED_FENCES commit reverted by accident.
    
    Oops, my bad.  Reverted 8d4bc36fae50b09a73ba2cfab920adb32141a358
    since my kernel doesn't yet have the new param, committed
    the revert by accident.

diff --git a/src/common.h b/src/common.h
index 4a87acb..be222df 100644
--- a/src/common.h
+++ b/src/common.h
@@ -367,6 +367,8 @@ extern int I810_DEBUG;
 #define SUPPORTS_INTEGRATED_HDMI(pI810) (IS_G4X(pI810))
 /* dsparb controlled by hw only */
 #define DSPARB_HWCONTROL(pI810) (IS_G4X(pI810))
+/* supports Y tiled surfaces (pre-965 Mesa isn't ready yet) */
+#define SUPPORTS_YTILING(pI810) (IS_I965G(pI830))
 
 #define GTT_PAGE_SIZE			KB(4)
 #define ROUND_TO(x, y)			(((x) + (y) - 1) / (y) * (y))
diff --git a/src/i830.h b/src/i830.h
index f33b971..bfd78dc 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -723,6 +723,7 @@ typedef struct _I830Rec {
    enum last_3d *last_3d;
 
    Bool use_drm_mode;
+   Bool kernel_exec_fencing;
 
    /** Enables logging of debug output related to mode switching. */
    Bool debug_modes;
@@ -911,6 +912,9 @@ extern void i830WaitSync(ScrnInfoPtr pScrn);
 /* i830_memory.c */
 Bool i830_bind_all_memory(ScrnInfoPtr pScrn);
 Bool i830_unbind_all_memory(ScrnInfoPtr pScrn);
+unsigned long i830_get_fence_size(I830Ptr pI830, unsigned long size);
+unsigned long i830_get_fence_pitch(I830Ptr pI830, unsigned long pitch, int format);
+unsigned long i830_get_fence_alignment(I830Ptr pI830, unsigned long size);
 
 Bool I830BindAGPMemory(ScrnInfoPtr pScrn);
 Bool I830UnbindAGPMemory(ScrnInfoPtr pScrn);
diff --git a/src/i830_dri.c b/src/i830_dri.c
index ec83abd..f03be43 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1570,7 +1570,7 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
 					       pDraw->depth, 0);
 	    switch (attachments[i]) {
 	    case DRI2BufferDepth:
-		if (IS_I965G(pI830))
+		if (SUPPORTS_YTILING(pI830))
 		    tiling = I915_TILING_Y;
 		else
 		    tiling = I915_TILING_X;
@@ -1583,19 +1583,14 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
 		break;
 	    }
 
-	    /* Disable tiling on 915-class 3D for now.  Because the 2D blitter
-	     * requires fence regs to operate, and they're not being managed
-	     * by the kernel yet, we don't want to expose tiled buffers to the
-	     * 3D client as it'll just render incorrectly if it pays attention
-	     * to our tiling bits at all.
-	     */
-	    if (!IS_I965G(pI830))
+	    if (!pI830->tiling ||
+		(!IS_I965G(pI830) && !pI830->kernel_exec_fencing))
 		tiling = I915_TILING_NONE;
 
 	    if (tiling != I915_TILING_NONE) {
 		bo = i830_get_pixmap_bo(pPixmap);
 		drm_intel_bo_set_tiling(bo, &tiling,
-					pDraw->width * pDraw->bitsPerPixel / 8);
+					intel_get_pixmap_pitch(pPixmap));
 	    }
 	}
 
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 235c01a..b8d8d37 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1842,6 +1842,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
    pI830->SaveGeneration = -1;
    pI830->pEnt = pEnt;
    pI830->use_drm_mode = drm_mode_setting;
+   pI830->kernel_exec_fencing = pI830->use_drm_mode;
 
    if (!I830LoadSyms(pScrn))
        return FALSE;
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 9249074..28be786 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -882,11 +882,25 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
     
     if (w && h)
     {
+	unsigned int size;
+
 	stride = ROUND_TO((w * pixmap->drawable.bitsPerPixel + 7) / 8,
 			  i830->accel_pixmap_pitch_alignment);
-    
-	bo = dri_bo_alloc (i830->bufmgr, "pixmap", stride * h, 
-			   i830->accel_pixmap_offset_alignment);
+
+	/* Use the I915_FENCE_TILING_X even if it may end up being TILING_Y,
+	 * as it just results in larger alignment.  Really, we need to use the
+	 * usage hint to tell what the pixmap's going to be.
+	 */
+	stride = i830_get_fence_pitch(i830, stride, I915_TILING_X);
+	/* Round the object up to the size of the fence it will live in
+	 * if necessary.  We could potentially make the kernel allocate
+	 * a larger aperture space and just bind the subset of pages in,
+	 * but this is easier and also keeps us out of trouble (as much)
+	 * with drm_intel_bufmgr_check_aperture().
+	 */
+	size = i830_get_fence_size(i830, stride * h);
+
+	bo = dri_bo_alloc (i830->bufmgr, "pixmap", size, 0);
 	if (!bo) {
 	    fbDestroyPixmap (pixmap);
 	    return NullPixmap;
diff --git a/src/i830_memory.c b/src/i830_memory.c
index e8348f1..e5d70fa 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -132,10 +132,9 @@ static void i830_clear_tiling(ScrnInfoPtr pScrn, unsigned int fence_nr);
 /**
  * Returns the fence size for a tiled area of the given size.
  */
-static unsigned long
-i830_get_fence_size(ScrnInfoPtr pScrn, unsigned long size)
+unsigned long
+i830_get_fence_size(I830Ptr pI830, unsigned long size)
 {
-    I830Ptr pI830 = I830PTR(pScrn);
     unsigned long i;
     unsigned long start;
 
@@ -158,6 +157,43 @@ i830_get_fence_size(ScrnInfoPtr pScrn, unsigned long size)
     }
 }
 
+/**
+ * On some chips, pitch width has to be a power of two tile width, so
+ * calculate that here.
+ */
+unsigned long
+i830_get_fence_pitch(I830Ptr pI830, unsigned long pitch, int format)
+{
+    unsigned long i;
+    unsigned long tile_width = (format == I915_TILING_Y) ? 128 : 512;
+
+    if (format == TILE_NONE)
+	return pitch;
+
+    /* 965 is flexible */
+    if (IS_I965G(pI830))
+	return ROUND_TO(pitch, tile_width);
+
+    /* Pre-965 needs power of two tile width */
+    for (i = tile_width; i < pitch; i <<= 1)
+	;
+
+    return i;
+}
+
+/**
+ * On some chips, pitch width has to be a power of two tile width, so
+ * calculate that here.
+ */
+unsigned long
+i830_get_fence_alignment(I830Ptr pI830, unsigned long size)
+{
+    if (IS_I965G(pI830))
+	return 4096;
+    else
+	return i830_get_fence_size(pI830, size);
+}
+
 static Bool
 i830_check_display_stride(ScrnInfoPtr pScrn, int stride, Bool tiling)
 {
@@ -388,6 +424,7 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
 #ifdef XF86DRI
     int dri_major, dri_minor, dri_patch;
     struct drm_i915_getparam gp;
+    struct drm_i915_setparam sp;
     int has_gem;
     int has_dri;
 #endif
@@ -499,6 +536,18 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
 		struct drm_i915_gem_init init;
 		int ret;
 
+		sp.param = I915_SETPARAM_NUM_USED_FENCES;
+		if (pI830->use_drm_mode)
+		    sp.value = 0; /* kernel gets them all */
+		else if (pI830->directRenderingType == DRI_XF86DRI)
+		    sp.value = 3; /* front/back/depth */
+		else
+		    sp.value = 2; /* just front for DRI2 (both old & new though) */
+		ret = drmCommandWrite(pI830->drmSubFD, DRM_I915_SETPARAM, &sp,
+				      sizeof(sp));
+		if (ret == 0)
+		    pI830->kernel_exec_fencing = TRUE;
+
 		init.gtt_start = pI830->memory_manager->offset;
 		init.gtt_end = pI830->memory_manager->offset +
 		    pI830->memory_manager->size;
@@ -769,7 +818,7 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
 
     /* Only allocate page-sized increments. */
     size = ALIGN(size, GTT_PAGE_SIZE);
-    align = ROUND_TO(align, GTT_PAGE_SIZE);
+    align = i830_get_fence_alignment(pI830, size);
 
     mem = xcalloc(1, sizeof(*mem));
     if (mem == NULL)
@@ -814,7 +863,7 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
 	break;
     }
 
-    ret = dri_bo_set_tiling(mem->bo, &bo_tiling_mode);
+    ret = drm_intel_bo_set_tiling(mem->bo, &bo_tiling_mode, pitch);
     if (ret != 0 || (bo_tiling_mode == I915_TILING_NONE && tile_format != TILE_NONE)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		   "Failed to set tiling on %s: %s\n",
@@ -887,16 +936,8 @@ i830_allocate_memory(ScrnInfoPtr pScrn, const char *name,
 	}
 
 	/* round to size necessary for the fence register to work */
-	size = i830_get_fence_size(pScrn, size);
-	if (IS_I965G(pI830)) {
-	    if (alignment < GTT_PAGE_SIZE)
-		alignment = GTT_PAGE_SIZE;
-	} else {
-	    /* The offset has to be aligned to at least the size of the fence
-	     * region.
-	     */
-	    alignment = size;
-	}
+	size = i830_get_fence_size(pI830, size);
+	alignment = i830_get_fence_alignment(pI830, size);
     }
 #ifdef XF86DRI
     if (pI830->use_drm_mode || (pI830->memory_manager &&
commit 127330bfd53ac7571bdd12a551142528b972893f
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Mon Feb 2 11:02:59 2009 -0500

    Fix last-minute "cleanup" that broke the patch.

diff --git a/src/common.h b/src/common.h
index be222df..4a87acb 100644
--- a/src/common.h
+++ b/src/common.h
@@ -367,8 +367,6 @@ extern int I810_DEBUG;
 #define SUPPORTS_INTEGRATED_HDMI(pI810) (IS_G4X(pI810))
 /* dsparb controlled by hw only */
 #define DSPARB_HWCONTROL(pI810) (IS_G4X(pI810))
-/* supports Y tiled surfaces (pre-965 Mesa isn't ready yet) */
-#define SUPPORTS_YTILING(pI810) (IS_I965G(pI830))
 
 #define GTT_PAGE_SIZE			KB(4)
 #define ROUND_TO(x, y)			(((x) + (y) - 1) / (y) * (y))
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 52402ab..0d0e130 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -598,12 +598,12 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 		    drmmode_crtc = xf86_config->crtc[0]->driver_private;
 	drmmode_ptr drmmode = drmmode_crtc->drmmode;
 	I830Ptr     pI830 = I830PTR(scrn);
-	i830_memory *new_front, *old_front = NULL;
+	i830_memory *old_front = NULL;
 	BoxRec	    mem_box;
 	Bool	    tiled, ret;
 	ScreenPtr   screen = screenInfo.screens[scrn->scrnIndex];
 	uint32_t    old_fb_id;
-	int	    i, pitch;
+	int	    i, pitch, old_width, old_height, old_pitch;
 
 	if (scrn->virtualX == width && scrn->virtualY == height)
 		return TRUE;
@@ -611,33 +611,37 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 	if (!pI830->can_resize)
 		return FALSE;
 
-	tiled = i830_tiled_width(pI830, &scrn->displayWidth, pI830->cpp);
-	pitch = scrn->displayWidth * pI830->cpp;
+	pitch = i830_pad_drawable_width(width, pI830->cpp);
+	tiled = i830_tiled_width(pI830, &pitch, pI830->cpp);
 	xf86DrvMsg(scrn->scrnIndex, X_INFO,
 		   "Allocate new frame buffer %dx%d stride %d\n",
-		   width, height, scrn->displayWidth);
+		   width, height, pitch);
 
+	old_width = scrn->virtualX;
+	old_height = scrn->virtualY;
+	old_pitch = scrn->displayWidth;
+	old_fb_id = drmmode->fb_id;
 	old_front = pI830->front_buffer;
-	new_front = i830_allocate_framebuffer(scrn, pI830, &mem_box, FALSE);
-	if (!new_front)
-		return FALSE;
 
-	old_fb_id = drmmode->fb_id;
+	scrn->virtualX = width;
+	scrn->virtualY = height;
+	scrn->displayWidth = pitch;
+	pI830->front_buffer = i830_allocate_framebuffer(scrn, pI830, &mem_box, FALSE);
+	if (!pI830->front_buffer)
+		goto fail;
+
 	ret = drmModeAddFB(drmmode->fd, width, height, scrn->depth,
-			   scrn->bitsPerPixel, pitch, new_front->bo->handle,
+			   scrn->bitsPerPixel, pitch * pI830->cpp,
+			   pI830->front_buffer->bo->handle,
 			   &drmmode->fb_id);
 	if (ret)
-		ErrorF("Failed to add fb: %s\n", strerror(-ret));
+		goto fail;
 
-	scrn->virtualX = width;
-	scrn->virtualY = height;
-	scrn->displayWidth = i830_pad_drawable_width(width, pI830->cpp);
-	pI830->front_buffer = new_front;
-	i830_set_pixmap_bo(screen->GetScreenPixmap(screen), new_front->bo);
+	i830_set_pixmap_bo(screen->GetScreenPixmap(screen), pI830->front_buffer->bo);
 	scrn->fbOffset = pI830->front_buffer->offset;
 
 	screen->ModifyPixmapHeader(screen->GetScreenPixmap(screen),
-				   width, height, -1, -1, pitch, NULL);
+				   width, height, -1, -1, pitch * pI830->cpp, NULL);
 	xf86DrvMsg(scrn->scrnIndex, X_INFO, "New front buffer at 0x%lx\n",
 		   pI830->front_buffer->offset);
 
@@ -657,6 +661,17 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 		i830_free_memory(scrn, old_front);
 
 	return TRUE;
+
+ fail:
+	if (pI830->front_buffer)
+		i830_free_memory(scrn, pI830->front_buffer);
+	pI830->front_buffer = old_front;
+	scrn->virtualX = old_width;
+	scrn->virtualY = old_height;
+	scrn->displayWidth = old_pitch;
+	drmmode->fb_id = old_fb_id;
+
+	return FALSE;
 }
 
 static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = {
diff --git a/src/i830.h b/src/i830.h
index bfd78dc..f33b971 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -723,7 +723,6 @@ typedef struct _I830Rec {
    enum last_3d *last_3d;
 
    Bool use_drm_mode;
-   Bool kernel_exec_fencing;
 
    /** Enables logging of debug output related to mode switching. */
    Bool debug_modes;
@@ -912,9 +911,6 @@ extern void i830WaitSync(ScrnInfoPtr pScrn);
 /* i830_memory.c */
 Bool i830_bind_all_memory(ScrnInfoPtr pScrn);
 Bool i830_unbind_all_memory(ScrnInfoPtr pScrn);
-unsigned long i830_get_fence_size(I830Ptr pI830, unsigned long size);
-unsigned long i830_get_fence_pitch(I830Ptr pI830, unsigned long pitch, int format);
-unsigned long i830_get_fence_alignment(I830Ptr pI830, unsigned long size);
 
 Bool I830BindAGPMemory(ScrnInfoPtr pScrn);
 Bool I830UnbindAGPMemory(ScrnInfoPtr pScrn);
diff --git a/src/i830_dri.c b/src/i830_dri.c
index f03be43..ec83abd 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1570,7 +1570,7 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
 					       pDraw->depth, 0);
 	    switch (attachments[i]) {
 	    case DRI2BufferDepth:
-		if (SUPPORTS_YTILING(pI830))
+		if (IS_I965G(pI830))
 		    tiling = I915_TILING_Y;
 		else
 		    tiling = I915_TILING_X;
@@ -1583,14 +1583,19 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
 		break;
 	    }
 
-	    if (!pI830->tiling ||
-		(!IS_I965G(pI830) && !pI830->kernel_exec_fencing))
+	    /* Disable tiling on 915-class 3D for now.  Because the 2D blitter
+	     * requires fence regs to operate, and they're not being managed
+	     * by the kernel yet, we don't want to expose tiled buffers to the
+	     * 3D client as it'll just render incorrectly if it pays attention
+	     * to our tiling bits at all.
+	     */
+	    if (!IS_I965G(pI830))
 		tiling = I915_TILING_NONE;
 
 	    if (tiling != I915_TILING_NONE) {
 		bo = i830_get_pixmap_bo(pPixmap);
 		drm_intel_bo_set_tiling(bo, &tiling,
-					intel_get_pixmap_pitch(pPixmap));
+					pDraw->width * pDraw->bitsPerPixel / 8);
 	    }
 	}
 
diff --git a/src/i830_driver.c b/src/i830_driver.c
index b8d8d37..235c01a 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1842,7 +1842,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
    pI830->SaveGeneration = -1;
    pI830->pEnt = pEnt;
    pI830->use_drm_mode = drm_mode_setting;
-   pI830->kernel_exec_fencing = pI830->use_drm_mode;
 
    if (!I830LoadSyms(pScrn))
        return FALSE;
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 28be786..9249074 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -882,25 +882,11 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
     
     if (w && h)
     {
-	unsigned int size;
-
 	stride = ROUND_TO((w * pixmap->drawable.bitsPerPixel + 7) / 8,
 			  i830->accel_pixmap_pitch_alignment);
-
-	/* Use the I915_FENCE_TILING_X even if it may end up being TILING_Y,
-	 * as it just results in larger alignment.  Really, we need to use the
-	 * usage hint to tell what the pixmap's going to be.
-	 */
-	stride = i830_get_fence_pitch(i830, stride, I915_TILING_X);
-	/* Round the object up to the size of the fence it will live in
-	 * if necessary.  We could potentially make the kernel allocate
-	 * a larger aperture space and just bind the subset of pages in,
-	 * but this is easier and also keeps us out of trouble (as much)
-	 * with drm_intel_bufmgr_check_aperture().
-	 */
-	size = i830_get_fence_size(i830, stride * h);
-
-	bo = dri_bo_alloc (i830->bufmgr, "pixmap", size, 0);
+    
+	bo = dri_bo_alloc (i830->bufmgr, "pixmap", stride * h, 
+			   i830->accel_pixmap_offset_alignment);
 	if (!bo) {
 	    fbDestroyPixmap (pixmap);
 	    return NullPixmap;
diff --git a/src/i830_memory.c b/src/i830_memory.c
index e5d70fa..e8348f1 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -132,9 +132,10 @@ static void i830_clear_tiling(ScrnInfoPtr pScrn, unsigned int fence_nr);
 /**
  * Returns the fence size for a tiled area of the given size.
  */
-unsigned long
-i830_get_fence_size(I830Ptr pI830, unsigned long size)
+static unsigned long
+i830_get_fence_size(ScrnInfoPtr pScrn, unsigned long size)
 {
+    I830Ptr pI830 = I830PTR(pScrn);
     unsigned long i;
     unsigned long start;
 
@@ -157,43 +158,6 @@ i830_get_fence_size(I830Ptr pI830, unsigned long size)
     }
 }
 
-/**
- * On some chips, pitch width has to be a power of two tile width, so
- * calculate that here.
- */
-unsigned long
-i830_get_fence_pitch(I830Ptr pI830, unsigned long pitch, int format)
-{
-    unsigned long i;
-    unsigned long tile_width = (format == I915_TILING_Y) ? 128 : 512;
-
-    if (format == TILE_NONE)
-	return pitch;
-
-    /* 965 is flexible */
-    if (IS_I965G(pI830))
-	return ROUND_TO(pitch, tile_width);
-
-    /* Pre-965 needs power of two tile width */
-    for (i = tile_width; i < pitch; i <<= 1)
-	;
-
-    return i;
-}
-
-/**
- * On some chips, pitch width has to be a power of two tile width, so
- * calculate that here.
- */
-unsigned long
-i830_get_fence_alignment(I830Ptr pI830, unsigned long size)
-{
-    if (IS_I965G(pI830))
-	return 4096;
-    else
-	return i830_get_fence_size(pI830, size);
-}
-
 static Bool
 i830_check_display_stride(ScrnInfoPtr pScrn, int stride, Bool tiling)
 {
@@ -424,7 +388,6 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
 #ifdef XF86DRI
     int dri_major, dri_minor, dri_patch;
     struct drm_i915_getparam gp;
-    struct drm_i915_setparam sp;
     int has_gem;
     int has_dri;
 #endif
@@ -536,18 +499,6 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
 		struct drm_i915_gem_init init;
 		int ret;
 
-		sp.param = I915_SETPARAM_NUM_USED_FENCES;
-		if (pI830->use_drm_mode)
-		    sp.value = 0; /* kernel gets them all */
-		else if (pI830->directRenderingType == DRI_XF86DRI)
-		    sp.value = 3; /* front/back/depth */
-		else
-		    sp.value = 2; /* just front for DRI2 (both old & new though) */
-		ret = drmCommandWrite(pI830->drmSubFD, DRM_I915_SETPARAM, &sp,
-				      sizeof(sp));
-		if (ret == 0)
-		    pI830->kernel_exec_fencing = TRUE;
-
 		init.gtt_start = pI830->memory_manager->offset;
 		init.gtt_end = pI830->memory_manager->offset +
 		    pI830->memory_manager->size;
@@ -818,7 +769,7 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
 
     /* Only allocate page-sized increments. */
     size = ALIGN(size, GTT_PAGE_SIZE);
-    align = i830_get_fence_alignment(pI830, size);
+    align = ROUND_TO(align, GTT_PAGE_SIZE);
 
     mem = xcalloc(1, sizeof(*mem));
     if (mem == NULL)
@@ -863,7 +814,7 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
 	break;
     }
 
-    ret = drm_intel_bo_set_tiling(mem->bo, &bo_tiling_mode, pitch);
+    ret = dri_bo_set_tiling(mem->bo, &bo_tiling_mode);
     if (ret != 0 || (bo_tiling_mode == I915_TILING_NONE && tile_format != TILE_NONE)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		   "Failed to set tiling on %s: %s\n",
@@ -936,8 +887,16 @@ i830_allocate_memory(ScrnInfoPtr pScrn, const char *name,
 	}
 
 	/* round to size necessary for the fence register to work */
-	size = i830_get_fence_size(pI830, size);
-	alignment = i830_get_fence_alignment(pI830, size);
+	size = i830_get_fence_size(pScrn, size);
+	if (IS_I965G(pI830)) {
+	    if (alignment < GTT_PAGE_SIZE)
+		alignment = GTT_PAGE_SIZE;
+	} else {
+	    /* The offset has to be aligned to at least the size of the fence
+	     * region.
+	     */
+	    alignment = size;
+	}
     }
 #ifdef XF86DRI
     if (pI830->use_drm_mode || (pI830->memory_manager &&
commit 0cb87ccfe97b0e016e47dcf236fd5ce78dddfc4b
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Fri Jan 30 17:53:03 2009 -0500

    Implement front buffer resize for KMS.
    
    This adds back the resize hook so we can resize the front buffer under
    kernel mode setting as well.
    
    The patch also pulls the drmmode_* structs from drmmode_display.h into
    drmmode_display.c and eliminates the header file.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 4994251..52402ab 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -33,25 +33,31 @@
 
 #ifdef XF86DRM_MODE
 #include "i830.h"
-#include "sarea.h"
-
-static Bool drmmode_resize_fb(ScrnInfoPtr scrn, drmmode_ptr drmmode,
-			      int width, int height);
-
-static Bool
-drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
-{
-	xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
-	drmmode_crtc_private_ptr drmmode_crtc =
-		xf86_config->crtc[0]->driver_private;
-	drmmode_ptr drmmode = drmmode_crtc->drmmode;
-	Bool ret;
-
-	ret = drmmode_resize_fb(scrn, drmmode, width, height);
-	scrn->virtualX = width;
-	scrn->virtualY = height;
-	return ret;
-}
+#include "intel_bufmgr.h"
+#include "xf86drmMode.h"
+
+typedef struct {
+    int fd;
+    uint32_t fb_id;
+    drmModeResPtr mode_res;
+    int cpp;
+} drmmode_rec, *drmmode_ptr;
+
+typedef struct {
+    drmmode_ptr drmmode;
+    drmModeCrtcPtr mode_crtc;
+    dri_bo *cursor;
+    dri_bo *rotate_bo;
+    int rotate_fb_id;
+} drmmode_crtc_private_rec, *drmmode_crtc_private_ptr;
+
+typedef struct {
+    drmmode_ptr drmmode;
+    int output_id;
+    drmModeConnectorPtr mode_output;
+    drmModeEncoderPtr mode_encoder;
+    drmModePropertyBlobPtr edid_blob;
+} drmmode_output_private_rec, *drmmode_output_private_ptr;
 
 static void
 drmmode_ConvertFromKMode(ScrnInfoPtr scrn,
@@ -112,10 +118,6 @@ drmmode_ConvertToKMode(ScrnInfoPtr scrn,
 
 }
 
-static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = {
-	drmmode_xf86crtc_resize
-};
-
 static void
 drmmode_crtc_dpms(xf86CrtcPtr drmmode_crtc, int mode)
 {
@@ -126,6 +128,8 @@ static Bool
 drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 		       Rotation rotation, int x, int y)
 {
+	ScrnInfoPtr pScrn = crtc->scrn;
+	I830Ptr     pI830 = I830PTR(pScrn);
 	xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
 	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
 	drmmode_ptr drmmode = drmmode_crtc->drmmode;
@@ -138,6 +142,19 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 	int i;
 	int fb_id;
 	struct drm_mode_modeinfo kmode;
+	unsigned int pitch = pScrn->displayWidth * pI830->cpp;
+
+	if (drmmode->fb_id == 0) {
+		ret = drmModeAddFB(drmmode->fd,
+				   pScrn->virtualX, pScrn->virtualY,
+				   pScrn->depth, pScrn->bitsPerPixel,
+				   pitch, pI830->front_buffer->bo->handle,
+				   &drmmode->fb_id);
+		if (ret < 0) {
+			ErrorF("failed to add fb\n");
+			return FALSE;
+		}
+	}
 
 	saved_mode = crtc->mode;
 	saved_x = crtc->x;
@@ -185,7 +202,6 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 	fb_id = drmmode->fb_id;
 	if (drmmode_crtc->rotate_fb_id)
 		fb_id = drmmode_crtc->rotate_fb_id;
-	ErrorF("fb id is %d\n", fb_id);
 	ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
 			     fb_id, x, y, output_ids, output_count, &kmode);
 	if (ret)
@@ -574,24 +590,89 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
 	return;
 }
 
-Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, char *busId,
-		      char *driver_name, int cpp)
+static Bool
+drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 {
-	xf86CrtcConfigPtr   xf86_config;
-	int i;
-	Bool ret;
+	xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+	drmmode_crtc_private_ptr
+		    drmmode_crtc = xf86_config->crtc[0]->driver_private;
+	drmmode_ptr drmmode = drmmode_crtc->drmmode;
+	I830Ptr     pI830 = I830PTR(scrn);
+	i830_memory *new_front, *old_front = NULL;
+	BoxRec	    mem_box;
+	Bool	    tiled, ret;
+	ScreenPtr   screen = screenInfo.screens[scrn->scrnIndex];
+	uint32_t    old_fb_id;
+	int	    i, pitch;
+
+	if (scrn->virtualX == width && scrn->virtualY == height)
+		return TRUE;
 
-	/* Create a bus Id */
-	/* Low level DRM open */
-	ret = DRIOpenDRMMaster(pScrn, SAREA_MAX, busId, driver_name);
-	if (!ret) {
-		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-			   "[dri] DRIGetVersion failed to open the DRM\n"
-			   "[dri] Disabling DRI.\n");
+	if (!pI830->can_resize)
+		return FALSE;
+
+	tiled = i830_tiled_width(pI830, &scrn->displayWidth, pI830->cpp);
+	pitch = scrn->displayWidth * pI830->cpp;
+	xf86DrvMsg(scrn->scrnIndex, X_INFO,
+		   "Allocate new frame buffer %dx%d stride %d\n",
+		   width, height, scrn->displayWidth);
+
+	old_front = pI830->front_buffer;
+	new_front = i830_allocate_framebuffer(scrn, pI830, &mem_box, FALSE);
+	if (!new_front)
 		return FALSE;
+
+	old_fb_id = drmmode->fb_id;
+	ret = drmModeAddFB(drmmode->fd, width, height, scrn->depth,
+			   scrn->bitsPerPixel, pitch, new_front->bo->handle,
+			   &drmmode->fb_id);
+	if (ret)
+		ErrorF("Failed to add fb: %s\n", strerror(-ret));
+
+	scrn->virtualX = width;
+	scrn->virtualY = height;
+	scrn->displayWidth = i830_pad_drawable_width(width, pI830->cpp);
+	pI830->front_buffer = new_front;
+	i830_set_pixmap_bo(screen->GetScreenPixmap(screen), new_front->bo);
+	scrn->fbOffset = pI830->front_buffer->offset;
+
+	screen->ModifyPixmapHeader(screen->GetScreenPixmap(screen),
+				   width, height, -1, -1, pitch, NULL);
+	xf86DrvMsg(scrn->scrnIndex, X_INFO, "New front buffer at 0x%lx\n",
+		   pI830->front_buffer->offset);
+
+	for (i = 0; i < xf86_config->num_crtc; i++) {
+		xf86CrtcPtr crtc = xf86_config->crtc[i];
+
+		if (!crtc->enabled)
+			continue;
+
+		drmmode_set_mode_major(crtc, &crtc->mode,
+				       crtc->rotation, crtc->x, crtc->y);
 	}
 
-	drmmode->fd = DRIMasterFD(pScrn);
+	if (old_fb_id)
+		drmModeRmFB(drmmode->fd, old_fb_id);
+	if (old_front)
+		i830_free_memory(scrn, old_front);
+
+	return TRUE;
+}
+
+static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = {
+	drmmode_xf86crtc_resize
+};
+
+Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
+{
+	I830Ptr pI830 = I830PTR(pScrn);
+	xf86CrtcConfigPtr   xf86_config;
+	drmmode_ptr drmmode;
+	int i;
+
+	drmmode = xnfalloc(sizeof *drmmode);
+	drmmode->fd = fd;
+	drmmode->fb_id = 0;
 
 	xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs);
 	xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
@@ -609,40 +690,10 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, char *busId,
 	for (i = 0; i < drmmode->mode_res->count_connectors; i++)
 		drmmode_output_init(pScrn, drmmode, i);
 
-	xf86InitialConfiguration(pScrn, FALSE);
-
-	return TRUE;
-}
+	xf86InitialConfiguration(pScrn, pI830->can_resize);
 
-#if 0
-Bool drmmode_set_bufmgr(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
-			dri_bufmgr *bufmgr)
-{
-	drmmode->bufmgr = bufmgr;
 	return TRUE;
 }
-#endif
-
-void drmmode_set_fb(ScrnInfoPtr scrn, drmmode_ptr drmmode, int width,
-		    int height, int pitch, dri_bo *bo)
-{
-	int ret;
-
-	ret = drmModeAddFB(drmmode->fd, width, height, scrn->depth,
-			   scrn->bitsPerPixel, pitch, bo->handle,
-			   &drmmode->fb_id);
-
-	if (ret) {
-		ErrorF("Failed to add fb: %s\n", strerror(-ret));
-	}
-
-	drmmode->mode_fb = drmModeGetFB(drmmode->fd, drmmode->fb_id);
-	if (!drmmode->mode_fb)
-		return;
-
-
-	ErrorF("Add fb id %d %d %d\n", drmmode->fb_id, width, height);
-}
 
 Bool drmmode_is_rotate_pixmap(ScrnInfoPtr pScrn, pointer pPixData, dri_bo **bo)
 {
@@ -668,41 +719,4 @@ Bool drmmode_is_rotate_pixmap(ScrnInfoPtr pScrn, pointer pPixData, dri_bo **bo)
 #endif
 }
 
-static Bool drmmode_resize_fb(ScrnInfoPtr scrn, drmmode_ptr drmmode, int width,
-			      int height)
-{
-	uint32_t handle;
-	int pitch;
-	int ret;
-
-	return FALSE;
-
-	if (drmmode->mode_fb->width == width &&
-	    drmmode->mode_fb->height == height)
-		return TRUE;
-
-	if (!drmmode->create_new_fb)
-		return FALSE;
-
-	handle = drmmode->create_new_fb(scrn, width, height, &pitch);
-	if (handle == 0)
-		return FALSE;
-
-	ret = drmModeReplaceFB(drmmode->fd, drmmode->fb_id,
-			       width, height,
-			       scrn->depth, scrn->bitsPerPixel, pitch,
-			       handle);
-
-	if (ret)
-		return FALSE;
-
-	drmModeFreeFB(drmmode->mode_fb);
-	drmmode->mode_fb = drmModeGetFB(drmmode->fd, drmmode->fb_id);
-	if (!drmmode->mode_fb)
-		return FALSE;
-
-	return TRUE;
-}
-
 #endif
-
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
deleted file mode 100644
index ee51c95..0000000
--- a/src/drmmode_display.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright © 2007 Red Hat, Inc.
- *
- * 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:
- *     Dave Airlie <airlied at redhat.com>
- *
- */
-#ifndef DRMMODE_DISPLAY_H
-#define DRMMODE_DISPLAY_H
-
-#ifdef XF86DRM_MODE
-
-#include "intel_bufmgr.h"
-#include "xf86drmMode.h"
-
-typedef struct {
-    int fd;
-    uint32_t fb_id;
-    drmModeResPtr mode_res;
-    drmModeFBPtr mode_fb;
-    int cpp;
-    uint32_t (*create_new_fb)(ScrnInfoPtr pScrn, int width, int height,
-			      int *pitch);
-} drmmode_rec, *drmmode_ptr;
-
-typedef struct {
-
-    drmmode_ptr drmmode;
-    drmModeCrtcPtr mode_crtc;
-    dri_bo *cursor;
-    dri_bo *rotate_bo;
-    int rotate_fb_id;
-} drmmode_crtc_private_rec, *drmmode_crtc_private_ptr;
-
-typedef struct {
-    drmmode_ptr drmmode;
-    int output_id;
-    drmModeConnectorPtr mode_output;
-    drmModeEncoderPtr mode_encoder;
-    drmModePropertyBlobPtr edid_blob;
-} drmmode_output_private_rec, *drmmode_output_private_ptr;
-
-
-extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
-			     char *busId, char *driver_name, int cpp);
-extern void drmmode_set_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int width,
-			   int height, int pitch, dri_bo *bo);
-extern Bool drmmode_is_rotate_pixmap(ScrnInfoPtr pScrn, pointer pPixData,
-				     dri_bo **bo);
-extern void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id,
-			       void *ptr, uint32_t handle);
-#endif /* XF86DRM_MODE */
-
-#endif /* DRMMODE_DISPLAY_H */
diff --git a/src/i830.h b/src/i830.h
index d9adfbf..bfd78dc 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -72,7 +72,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "dri.h"
 #include "GL/glxint.h"
 #include "i830_dri.h"
-#include "drmmode_display.h"
 #endif
 #include "intel_bufmgr.h"
 #include "i915_drm.h"
@@ -725,10 +724,6 @@ typedef struct _I830Rec {
 
    Bool use_drm_mode;
    Bool kernel_exec_fencing;
-#ifdef XF86DRM_MODE
-   drmmode_rec drmmode;
-   int drm_mm_init;
-#endif
 
    /** Enables logging of debug output related to mode switching. */
    Bool debug_modes;
@@ -836,6 +831,12 @@ Bool I830DRI2ScreenInit(ScreenPtr pScreen);
 void I830DRI2CloseScreen(ScreenPtr pScreen);
 #endif
 
+#ifdef XF86DRM_MODE
+extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp);
+extern Bool drmmode_is_rotate_pixmap(ScrnInfoPtr pScrn, pointer pPixData,
+				     dri_bo **bo);
+#endif
+
 extern Bool I830AccelInit(ScreenPtr pScreen);
 extern void I830SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir,
 					   int ydir, int rop,
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 2c4ea07..b8d8d37 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -212,6 +212,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "i915_drm.h"
 #endif
 
+#ifdef XF86DRM_MODE
+#include <xf86drmMode.h>
+#endif
+
 #ifdef I830_USE_EXA
 const char *I830exaSymbols[] = {
     "exaGetVersion",
@@ -1718,6 +1722,7 @@ I830DrmModeInit(ScrnInfoPtr pScrn)
     I830Ptr pI830 = I830PTR(pScrn);
     char *bus_id;
     char *s;
+    int ret;
 
     /* Default to UXA but allow override */
     pI830->accel = ACCEL_UXA;
@@ -1731,21 +1736,36 @@ I830DrmModeInit(ScrnInfoPtr pScrn)
 	    pI830->accel = ACCEL_UXA;
     }
 
+    pI830->can_resize = FALSE;
+    if (pI830->accel == ACCEL_UXA && pI830->directRenderingType != DRI_XF86DRI)
+	pI830->can_resize = TRUE;
+
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+	       "Resizable framebuffer: %s (%d %d)\n",
+	       pI830->can_resize ? "available" : "not available",
+	       pI830->directRenderingType, pI830->accel);
+
     bus_id = DRICreatePCIBusID(pI830->PciInfo);
-    if (drmmode_pre_init(pScrn, &pI830->drmmode, bus_id, "i915",
-			 pI830->cpp) == FALSE) {
-	xfree(bus_id);
+
+    /* Create a bus Id */
+    /* Low level DRM open */
+    ret = DRIOpenDRMMaster(pScrn, SAREA_MAX, bus_id, "i915");
+    xfree(bus_id);
+    if (!ret) {
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		       "[dri] DRIGetVersion failed to open the DRM\n"
+		       "[dri] Disabling DRI.\n");
+	    return FALSE;
+    }
+
+    pI830->drmSubFD = DRIMasterFD(pScrn);
+    if (drmmode_pre_init(pScrn, pI830->drmSubFD, pI830->cpp) == FALSE) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		   "Kernel modesetting setup failed\n");
 	PreInitCleanup(pScrn);
 	return FALSE;
     }
 
-    pI830->drmmode.create_new_fb = i830_create_new_fb;
-
-    pI830->drmSubFD = pI830->drmmode.fd;
-    xfree(bus_id);
-
     pI830->directRenderingType = DRI_NONE;
     pI830->allocate_classic_textures = FALSE;
 
diff --git a/src/i830_memory.c b/src/i830_memory.c
index f3c55a3..e5d70fa 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1292,14 +1292,7 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
 	return NULL;
     }
 
-    if (pI830->use_drm_mode) {
-#ifdef XF86DRM_MODE
-	ErrorF("setting kernel fb to new front buffer\n");
-	ErrorF("front_buffer->bo->size: %ld\n", front_buffer->bo->size);
-        drmmode_set_fb(pScrn, &pI830->drmmode, pScrn->virtualX, fb_height,
-		       pScrn->displayWidth * pI830->cpp, front_buffer->bo);
-#endif
-    } else if (pI830->FbBase)
+    if (!pI830->use_drm_mode)
 	memset (pI830->FbBase + front_buffer->offset, 0, size);
 
     return front_buffer;
@@ -2130,9 +2123,3 @@ Bool i830_allocate_xvmc_buffer(ScrnInfoPtr pScrn, const char *name,
     return TRUE;
 }
 #endif
-
-uint32_t
-i830_create_new_fb(ScrnInfoPtr pScrn, int width, int height, int *pitch)
-{
-    return 0;
-}
commit 66bc44e8f9a0505c0b11b8042243ca74079da85f
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jan 27 15:43:58 2009 -0800

    dri2: Use modesetting's master fd instead of opening our own non-master.
    
    This fixes failure to auth DRI2 clients under KMS.

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 7a95d02..f03be43 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1691,7 +1691,17 @@ Bool I830DRI2ScreenInit(ScreenPtr pScreen)
 	    pI830->PciInfo->dev,
 	    pI830->PciInfo->func);
 
-    info.fd = drmOpen("i915", buf);
+    info.fd = -1;
+
+#ifdef XF86DRM_MODE
+    /* Use the already opened (master) fd from modesetting */
+    if (pI830->use_drm_mode)
+	info.fd = pI830->drmSubFD;
+#endif
+
+    if (info.fd < 0)
+	info.fd = drmOpen("i915", buf);
+
     if (info.fd < 0) {
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Failed to open DRM device\n");
 	return FALSE;
commit 8d4bc36fae50b09a73ba2cfab920adb32141a358
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Mon Jan 26 17:14:06 2009 -0800

    Support tiled back/depth on 915-class hardware with DRI2.
    
    Set alignments, tile settings and flags correctly in the 2D driver to support
    tiled rendering.  UXA's create pixmap function currently assumes the worst
    about the alignment constraints; that should probably be fixed.  Some of the
    1M alignment fixes could probably be done more cleanly as well.

diff --git a/src/common.h b/src/common.h
index 4a87acb..be222df 100644
--- a/src/common.h
+++ b/src/common.h
@@ -367,6 +367,8 @@ extern int I810_DEBUG;
 #define SUPPORTS_INTEGRATED_HDMI(pI810) (IS_G4X(pI810))
 /* dsparb controlled by hw only */
 #define DSPARB_HWCONTROL(pI810) (IS_G4X(pI810))
+/* supports Y tiled surfaces (pre-965 Mesa isn't ready yet) */
+#define SUPPORTS_YTILING(pI810) (IS_I965G(pI830))
 
 #define GTT_PAGE_SIZE			KB(4)
 #define ROUND_TO(x, y)			(((x) + (y) - 1) / (y) * (y))
diff --git a/src/i830.h b/src/i830.h
index 4794169..d9adfbf 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -724,6 +724,7 @@ typedef struct _I830Rec {
    enum last_3d *last_3d;
 
    Bool use_drm_mode;
+   Bool kernel_exec_fencing;
 #ifdef XF86DRM_MODE
    drmmode_rec drmmode;
    int drm_mm_init;
@@ -910,6 +911,9 @@ extern void i830WaitSync(ScrnInfoPtr pScrn);
 /* i830_memory.c */
 Bool i830_bind_all_memory(ScrnInfoPtr pScrn);
 Bool i830_unbind_all_memory(ScrnInfoPtr pScrn);
+unsigned long i830_get_fence_size(I830Ptr pI830, unsigned long size);
+unsigned long i830_get_fence_pitch(I830Ptr pI830, unsigned long pitch, int format);
+unsigned long i830_get_fence_alignment(I830Ptr pI830, unsigned long size);
 
 Bool I830BindAGPMemory(ScrnInfoPtr pScrn);
 Bool I830UnbindAGPMemory(ScrnInfoPtr pScrn);
diff --git a/src/i830_dri.c b/src/i830_dri.c
index d6698da..7a95d02 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1570,7 +1570,7 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
 					       pDraw->depth, 0);
 	    switch (attachments[i]) {
 	    case DRI2BufferDepth:
-		if (IS_I965G(pI830))
+		if (SUPPORTS_YTILING(pI830))
 		    tiling = I915_TILING_Y;
 		else
 		    tiling = I915_TILING_X;
@@ -1583,19 +1583,14 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
 		break;
 	    }
 
-	    /* Disable tiling on 915-class 3D for now.  Because the 2D blitter
-	     * requires fence regs to operate, and they're not being managed
-	     * by the kernel yet, we don't want to expose tiled buffers to the
-	     * 3D client as it'll just render incorrectly if it pays attention
-	     * to our tiling bits at all.
-	     */
-	    if (!IS_I965G(pI830))
+	    if (!pI830->tiling ||
+		(!IS_I965G(pI830) && !pI830->kernel_exec_fencing))
 		tiling = I915_TILING_NONE;
 
 	    if (tiling != I915_TILING_NONE) {
 		bo = i830_get_pixmap_bo(pPixmap);
 		drm_intel_bo_set_tiling(bo, &tiling,
-					pDraw->width * pDraw->bitsPerPixel / 8);
+					intel_get_pixmap_pitch(pPixmap));
 	    }
 	}
 
diff --git a/src/i830_driver.c b/src/i830_driver.c
index bf5ecc4..2c4ea07 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1822,6 +1822,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
    pI830->SaveGeneration = -1;
    pI830->pEnt = pEnt;
    pI830->use_drm_mode = drm_mode_setting;
+   pI830->kernel_exec_fencing = pI830->use_drm_mode;
 
    if (!I830LoadSyms(pScrn))
        return FALSE;
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 9249074..28be786 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -882,11 +882,25 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
     
     if (w && h)
     {
+	unsigned int size;
+
 	stride = ROUND_TO((w * pixmap->drawable.bitsPerPixel + 7) / 8,
 			  i830->accel_pixmap_pitch_alignment);
-    
-	bo = dri_bo_alloc (i830->bufmgr, "pixmap", stride * h, 
-			   i830->accel_pixmap_offset_alignment);
+
+	/* Use the I915_FENCE_TILING_X even if it may end up being TILING_Y,
+	 * as it just results in larger alignment.  Really, we need to use the
+	 * usage hint to tell what the pixmap's going to be.
+	 */
+	stride = i830_get_fence_pitch(i830, stride, I915_TILING_X);
+	/* Round the object up to the size of the fence it will live in
+	 * if necessary.  We could potentially make the kernel allocate
+	 * a larger aperture space and just bind the subset of pages in,
+	 * but this is easier and also keeps us out of trouble (as much)
+	 * with drm_intel_bufmgr_check_aperture().
+	 */
+	size = i830_get_fence_size(i830, stride * h);
+
+	bo = dri_bo_alloc (i830->bufmgr, "pixmap", size, 0);
 	if (!bo) {
 	    fbDestroyPixmap (pixmap);
 	    return NullPixmap;
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 9bfee81..f3c55a3 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -132,10 +132,9 @@ static void i830_clear_tiling(ScrnInfoPtr pScrn, unsigned int fence_nr);
 /**
  * Returns the fence size for a tiled area of the given size.
  */
-static unsigned long
-i830_get_fence_size(ScrnInfoPtr pScrn, unsigned long size)
+unsigned long
+i830_get_fence_size(I830Ptr pI830, unsigned long size)
 {
-    I830Ptr pI830 = I830PTR(pScrn);
     unsigned long i;
     unsigned long start;
 
@@ -158,6 +157,43 @@ i830_get_fence_size(ScrnInfoPtr pScrn, unsigned long size)
     }
 }
 
+/**
+ * On some chips, pitch width has to be a power of two tile width, so
+ * calculate that here.
+ */
+unsigned long
+i830_get_fence_pitch(I830Ptr pI830, unsigned long pitch, int format)
+{
+    unsigned long i;
+    unsigned long tile_width = (format == I915_TILING_Y) ? 128 : 512;
+
+    if (format == TILE_NONE)
+	return pitch;
+
+    /* 965 is flexible */
+    if (IS_I965G(pI830))
+	return ROUND_TO(pitch, tile_width);
+
+    /* Pre-965 needs power of two tile width */
+    for (i = tile_width; i < pitch; i <<= 1)
+	;
+
+    return i;
+}
+
+/**
+ * On some chips, pitch width has to be a power of two tile width, so
+ * calculate that here.
+ */
+unsigned long
+i830_get_fence_alignment(I830Ptr pI830, unsigned long size)
+{
+    if (IS_I965G(pI830))
+	return 4096;
+    else
+	return i830_get_fence_size(pI830, size);
+}
+
 static Bool
 i830_check_display_stride(ScrnInfoPtr pScrn, int stride, Bool tiling)
 {
@@ -388,6 +424,7 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
 #ifdef XF86DRI
     int dri_major, dri_minor, dri_patch;
     struct drm_i915_getparam gp;
+    struct drm_i915_setparam sp;
     int has_gem;
     int has_dri;
 #endif
@@ -499,6 +536,18 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
 		struct drm_i915_gem_init init;
 		int ret;
 
+		sp.param = I915_SETPARAM_NUM_USED_FENCES;
+		if (pI830->use_drm_mode)
+		    sp.value = 0; /* kernel gets them all */
+		else if (pI830->directRenderingType == DRI_XF86DRI)
+		    sp.value = 3; /* front/back/depth */
+		else
+		    sp.value = 2; /* just front for DRI2 (both old & new though) */
+		ret = drmCommandWrite(pI830->drmSubFD, DRM_I915_SETPARAM, &sp,
+				      sizeof(sp));
+		if (ret == 0)
+		    pI830->kernel_exec_fencing = TRUE;
+
 		init.gtt_start = pI830->memory_manager->offset;
 		init.gtt_end = pI830->memory_manager->offset +
 		    pI830->memory_manager->size;
@@ -769,7 +818,7 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
 
     /* Only allocate page-sized increments. */
     size = ALIGN(size, GTT_PAGE_SIZE);
-    align = ROUND_TO(align, GTT_PAGE_SIZE);
+    align = i830_get_fence_alignment(pI830, size);
 
     mem = xcalloc(1, sizeof(*mem));
     if (mem == NULL)
@@ -814,7 +863,7 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
 	break;
     }
 
-    ret = dri_bo_set_tiling(mem->bo, &bo_tiling_mode);
+    ret = drm_intel_bo_set_tiling(mem->bo, &bo_tiling_mode, pitch);
     if (ret != 0 || (bo_tiling_mode == I915_TILING_NONE && tile_format != TILE_NONE)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		   "Failed to set tiling on %s: %s\n",
@@ -887,16 +936,8 @@ i830_allocate_memory(ScrnInfoPtr pScrn, const char *name,
 	}
 
 	/* round to size necessary for the fence register to work */
-	size = i830_get_fence_size(pScrn, size);
-	if (IS_I965G(pI830)) {
-	    if (alignment < GTT_PAGE_SIZE)
-		alignment = GTT_PAGE_SIZE;
-	} else {
-	    /* The offset has to be aligned to at least the size of the fence
-	     * region.
-	     */
-	    alignment = size;
-	}
+	size = i830_get_fence_size(pI830, size);
+	alignment = i830_get_fence_alignment(pI830, size);
     }
 #ifdef XF86DRI
     if (pI830->use_drm_mode || (pI830->memory_manager &&
commit 6c0ca1676bf60529dd331cc739abdf68fa9e918d
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jan 21 15:52:02 2009 -0800

    Don't forget the new state bos in check_aperture.
    
    They're tiny so it shouldn't have been a problem, but play it safe.  This is
    another <5% loss on top of the previously reported value, bringing the whole
    series to about 8%.

diff --git a/src/i965_render.c b/src/i965_render.c
index 7092fc9..de1c8b3 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -487,6 +487,7 @@ typedef struct gen4_composite_op {
     sampler_state_extend_t src_extend;
     sampler_state_extend_t mask_extend;
     Bool is_affine;
+    wm_kernel_t wm_kernel;
 } gen4_composite_op;
 
 /** Private data for gen4 render accel implementation. */
@@ -1007,7 +1008,6 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
     int urb_cs_start, urb_cs_size;
     uint32_t src_blend, dst_blend;
     dri_bo *binding_table_bo = composite_op->binding_table_bo;
-    wm_kernel_t wm_kernel;
 
     render_state->needs_state_emit = FALSE;
 
@@ -1118,34 +1118,7 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
 		      I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
 	}
 
-	if (pMask) {
-	    if (pMaskPicture->componentAlpha &&
-		PICT_FORMAT_RGB(pMaskPicture->format))
-	    {
-		if (i965_blend_op[op].src_alpha) {
-		    if (is_affine)
-			wm_kernel = WM_KERNEL_MASKCA_SRCALPHA_AFFINE;
-		    else
-			wm_kernel = WM_KERNEL_MASKCA_SRCALPHA_PROJECTIVE;
-		} else {
-		    if (is_affine)
-			wm_kernel = WM_KERNEL_MASKCA_AFFINE;
-		    else
-			wm_kernel = WM_KERNEL_MASKCA_PROJECTIVE;
-		}
-	    } else {
-		if (is_affine)
-		    wm_kernel = WM_KERNEL_MASKNOCA_AFFINE;
-		else
-		    wm_kernel = WM_KERNEL_MASKNOCA_PROJECTIVE;
-	    }
-	} else {
-	    if (is_affine)
-		wm_kernel = WM_KERNEL_NOMASK_AFFINE;
-	    else
-		wm_kernel = WM_KERNEL_NOMASK_PROJECTIVE;
-	}
-	OUT_RELOC(render_state->wm_state_bo[wm_kernel]
+	OUT_RELOC(render_state->wm_state_bo[composite_op->wm_kernel]
 		  [src_filter][src_extend]
 		  [mask_filter][mask_extend],
 		  I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
@@ -1264,6 +1237,16 @@ i965_composite_check_aperture(ScrnInfoPtr pScrn)
 	pI830->batch_bo,
 	composite_op->binding_table_bo,
 	render_state->vertex_buffer_bo,
+	render_state->vs_state_bo,
+	render_state->sf_state_bo,
+	render_state->sf_mask_state_bo,
+	render_state->wm_state_bo[composite_op->wm_kernel]
+				 [composite_op->src_filter]
+				 [composite_op->src_extend]
+				 [composite_op->mask_filter]
+				 [composite_op->mask_extend],
+	render_state->cc_state_bo,
+	render_state->sip_kernel_bo,
     };
 
     return drm_intel_bufmgr_check_aperture_space(bo_table,
@@ -1369,12 +1352,6 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
     composite_op->src_filter =
 	sampler_state_filter_from_picture(pSrcPicture->filter);
 
-    if (!i965_composite_check_aperture(pScrn)) {
-	intel_batch_flush(pScrn, FALSE);
-	if (!i965_composite_check_aperture(pScrn))
-	    I830FALLBACK("Couldn't fit render operation in aperture\n");
-    }
-
     pI830->scale_units[0][0] = pSrc->drawable.width;
     pI830->scale_units[0][1] = pSrc->drawable.height;
 
@@ -1394,6 +1371,41 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
 	    i830_transform_is_affine(pI830->transform[1]);
     }
 
+
+    if (pMask) {
+	if (pMaskPicture->componentAlpha &&
+	    PICT_FORMAT_RGB(pMaskPicture->format))
+	{
+	    if (i965_blend_op[op].src_alpha) {
+		if (composite_op->is_affine)
+		    composite_op->wm_kernel = WM_KERNEL_MASKCA_SRCALPHA_AFFINE;
+		else
+		    composite_op->wm_kernel = WM_KERNEL_MASKCA_SRCALPHA_PROJECTIVE;
+	    } else {
+		if (composite_op->is_affine)
+		    composite_op->wm_kernel = WM_KERNEL_MASKCA_AFFINE;
+		else
+		    composite_op->wm_kernel = WM_KERNEL_MASKCA_PROJECTIVE;
+	    }
+	} else {
+	    if (composite_op->is_affine)
+		composite_op->wm_kernel = WM_KERNEL_MASKNOCA_AFFINE;
+	    else
+		composite_op->wm_kernel = WM_KERNEL_MASKNOCA_PROJECTIVE;
+	}
+    } else {
+	if (composite_op->is_affine)
+	    composite_op->wm_kernel = WM_KERNEL_NOMASK_AFFINE;
+	else
+	    composite_op->wm_kernel = WM_KERNEL_NOMASK_PROJECTIVE;
+    }
+
+    if (!i965_composite_check_aperture(pScrn)) {
+	intel_batch_flush(pScrn, FALSE);
+	if (!i965_composite_check_aperture(pScrn))
+	    I830FALLBACK("Couldn't fit render operation in aperture\n");
+    }
+
     render_state->needs_state_emit = TRUE;
 
     return TRUE;
commit 57a02b50c60c10a25ff0f3cd93af9f37fa0d1b11
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Mon Jan 26 14:58:28 2009 -0800

    Fixup bogus VBT modes when detected
    
    Several VBT modes out in the wild have H or VSyncEnd values greater than
    the H or VTotal value.  This clearly ends up creating a bad mode,
    causing some panels to either ignore the timing or display some sort of
    corrupt image.
    
    Check for these cases and fix them up by default, making things work for
    several Dell and Sony machines.
    
    Fixes FDO bug #17292.

diff --git a/src/i830_bios.c b/src/i830_bios.c
index 72408f0..6baacd4 100644
--- a/src/i830_bios.c
+++ b/src/i830_bios.c
@@ -135,6 +135,12 @@ parse_panel_data(I830Ptr pI830, struct bdb_header *bdb)
     fixed_mode->Clock      = _PIXEL_CLOCK(timing_ptr) / 1000;
     fixed_mode->type       = M_T_PREFERRED;
 
+    /* Some VBTs have bogus h/vtotal values */
+    if (fixed_mode->HSyncEnd > fixed_mode->HTotal)
+	fixed_mode->HTotal = fixed_mode->HSyncEnd + 1;
+    if (fixed_mode->VSyncEnd > fixed_mode->VTotal)
+	fixed_mode->VTotal = fixed_mode->VSyncEnd + 1;
+
     xf86SetModeDefaultName(fixed_mode);
 
     pI830->lvds_fixed_mode = fixed_mode;
commit e20e1cf76fb00ba4f933a1ed6d1a4896be346c91
Author: Bill Nottingham <notting at redhat.com>
Date:   Sat Jan 24 08:36:20 2009 +0800

    Quirk MSI IM-945GSE-A LVDS, TV outputs.
    
    The IM-945GSE-A claims to have a TV output, and always claims a connected
    LVDS output. It has neither.

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index f67df4e..4df1e6c 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -222,6 +222,20 @@ static void quirk_lenovo_tv_dmi (I830Ptr pI830)
 	pI830->quirk_flag |= QUIRK_IGNORE_TV;
 }
 
+static void quirk_msi_lvds_dmi (I830Ptr pI830)
+{
+   /* MSI IM-945GSE-A has no TV output, nor a LVDS connection.
+    */
+   if (!i830_dmi_data[board_name]) {
+       ErrorF("Failed to load DMI info, MSI LVDS quirk not applied.\n");
+       return;
+   }
+   if (!strncmp(i830_dmi_data[board_name],"A9830IMS",8)) {
+       pI830->quirk_flag |= QUIRK_IGNORE_LVDS;
+       pI830->quirk_flag |= QUIRK_IGNORE_TV;
+   }
+}
+
 static void quirk_ivch_dvob (I830Ptr pI830)
 {
 	pI830->quirk_flag |= QUIRK_IVCH_NEED_DVOB;
@@ -275,6 +289,9 @@ static i830_quirk i830_quirk_list[] = {
     /* Lenovo 3000 v200 */
     { PCI_CHIP_I965_GM, 0x17aa, 0x3c18, quirk_ignore_tv },
 
+    /* MSI IM-945GSE-A has no LVDS or TV (use dmi) */
+    { PCI_CHIP_I945_GME, 0x8086, 0x27ae, quirk_msi_lvds_dmi },
+
     /* Panasonic Toughbook CF-Y4 has no TV output */
     { PCI_CHIP_I915_GM, 0x10f7, 0x8338, quirk_ignore_tv },
     /* Panasonic Toughbook CF-Y7 has no TV output */
commit 05ff561234cc2b93fe1ea2a35041fa2e119a7e38
Author: Vincent Mussard <vmussard at free.fr>
Date:   Sat Jan 24 08:33:16 2009 +0800

    quirk for AOpen MP45

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index a82a6e6..f67df4e 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -240,6 +240,8 @@ static i830_quirk i830_quirk_list[] = {
     { PCI_CHIP_I915_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
     { PCI_CHIP_I945_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
     { PCI_CHIP_I965_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
+    { PCI_CHIP_GM45_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
+
     { PCI_CHIP_I965_GM, 0x8086, 0x1999, quirk_ignore_lvds },
 
     /* Apple Mac mini has no lvds, but macbook pro does */
commit fbf003ef2767a1a9f5e4064f04a17992030d8f5c
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Dec 5 17:27:13 2008 -0800

    Move i965 render sampler state to BOs.
    
    This eliminates the pinned memory allocation for 965 render state.

diff --git a/src/i830.h b/src/i830.h
index f5ae40b..4794169 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -415,7 +415,6 @@ typedef struct _I830Rec {
    i830_memory *xaa_scratch_2;
 #ifdef I830_USE_EXA
    i830_memory *exa_offscreen;
-   i830_memory *gen4_render_state_mem;
 #endif
    i830_memory *fake_bufmgr_mem;
 
diff --git a/src/i830_memory.c b/src/i830_memory.c
index ab4e5ce..9bfee81 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -65,7 +65,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  * - HW cursor block (either one block or four)
  * - Overlay registers
  * - XAA linear allocator (optional)
- * - EXA 965 state buffer
  * - XAA scratch (screen 1)
  * - XAA scratch (screen 2, only in zaphod mode)
  * - Front buffer (screen 1, more is better for XAA)
@@ -346,7 +345,6 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
     pI830->xaa_scratch = NULL;
     pI830->xaa_scratch_2 = NULL;
     pI830->exa_offscreen = NULL;
-    pI830->gen4_render_state_mem = NULL;
     pI830->overlay_regs = NULL;
     pI830->power_context = NULL;
 #ifdef XF86DRI
@@ -1437,22 +1435,6 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 	}
     }
 
-    /* even in XAA, 965G needs state mem buffer for rendering */
-    if (IS_I965G(pI830) && pI830->accel != ACCEL_NONE &&
-	pI830->gen4_render_state_mem == NULL)
-    {
-	pI830->gen4_render_state_mem =
-	    i830_allocate_memory(pScrn, "exa G965 state buffer",
-				 gen4_render_state_size(pScrn),
-				 PITCH_NONE,
-				 GTT_PAGE_SIZE, 0, TILE_NONE);
-	if (pI830->gen4_render_state_mem == NULL) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		    "Failed to allocate exa state buffer for 965.\n");
-	    return FALSE;
-	}
-    }
-
 #ifdef I830_XV
     /* Allocate overlay register space and optional XAA linear allocator
      * space.  The second head in zaphod mode will share the space.
diff --git a/src/i965_render.c b/src/i965_render.c
index 3672b1e..7092fc9 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -471,25 +471,6 @@ struct gen4_cc_unit_state {
 				     [BRW_BLENDFACTOR_COUNT];
 };
 
-/**
- * Gen4 rendering state buffer structure.
- *
- * This structure contains static data for all of the combinations of
- * state that we use for Render acceleration.
- */
-typedef struct _gen4_static_state {
-    /* Index by [src_filter][src_extend][mask_filter][mask_extend].  Two of
-     * the structs happen to add to 32 bytes.
-     */
-    struct brw_sampler_state sampler_state[SAMPLER_STATE_FILTER_COUNT]
-					  [SAMPLER_STATE_EXTEND_COUNT]
-					  [SAMPLER_STATE_FILTER_COUNT]
-					  [SAMPLER_STATE_EXTEND_COUNT][2];
-
-    struct brw_sampler_legacy_border_color sampler_border_color;
-    PAD64 (brw_sampler_legacy_border_color, 0);
-} gen4_static_state_t;
-
 typedef float gen4_vertex_buffer[VERTEX_BUFFER_SIZE];
 
 typedef struct gen4_composite_op {
@@ -510,9 +491,6 @@ typedef struct gen4_composite_op {
 
 /** Private data for gen4 render accel implementation. */
 struct gen4_render_state {
-    gen4_static_state_t *static_state;
-    uint32_t static_state_offset;
-
     drm_intel_bo *vs_state_bo;
     drm_intel_bo *sf_state_bo;
     drm_intel_bo *sf_mask_state_bo;
@@ -593,12 +571,36 @@ gen4_create_sf_state(ScrnInfoPtr scrn, drm_intel_bo *kernel_bo)
     return sf_state_bo;
 }
 
+static drm_intel_bo *
+sampler_border_color_create(ScrnInfoPtr scrn)
+{
+    struct brw_sampler_legacy_border_color sampler_border_color;
+
+    /* Set up the sampler border color (always transparent black) */
+    memset(&sampler_border_color, 0, sizeof(sampler_border_color));
+    sampler_border_color.color[0] = 0; /* R */
+    sampler_border_color.color[1] = 0; /* G */
+    sampler_border_color.color[2] = 0; /* B */
+    sampler_border_color.color[3] = 0; /* A */
+
+    return intel_bo_alloc_for_data(scrn,
+				   &sampler_border_color,
+				   sizeof(sampler_border_color),
+				   "gen4 render sampler border color");
+}
+
 static void
-sampler_state_init (struct brw_sampler_state *sampler_state,
+sampler_state_init (drm_intel_bo *sampler_state_bo,
+		    struct brw_sampler_state *sampler_state,
 		    sampler_state_filter_t filter,
 		    sampler_state_extend_t extend,
-		    int border_color_offset)
+		    drm_intel_bo *border_color_bo)
 {
+    uint32_t sampler_state_offset;
+
+    sampler_state_offset = (char *)sampler_state -
+	(char *)sampler_state_bo->virtual;
+
     /* PS kernel use this sampler */
     memset(sampler_state, 0, sizeof(*sampler_state));
 
@@ -644,12 +646,47 @@ sampler_state_init (struct brw_sampler_state *sampler_state,
 	break;
     }
 
-    assert((border_color_offset & 31) == 0);
-    sampler_state->ss2.border_color_pointer = border_color_offset >> 5;
+    sampler_state->ss2.border_color_pointer =
+	intel_emit_reloc(sampler_state_bo, sampler_state_offset +
+			 offsetof(struct brw_sampler_state, ss2),
+			 border_color_bo, 0,
+			 I915_GEM_DOMAIN_SAMPLER, 0) >> 5;
 
     sampler_state->ss3.chroma_key_enable = 0; /* disable chromakey */
 }
 
+static drm_intel_bo *
+gen4_create_sampler_state(ScrnInfoPtr scrn,
+			  sampler_state_filter_t src_filter,
+			  sampler_state_extend_t src_extend,
+			  sampler_state_filter_t mask_filter,
+			  sampler_state_extend_t mask_extend,
+			  drm_intel_bo *border_color_bo)
+{
+    I830Ptr pI830 = I830PTR(scrn);
+    drm_intel_bo *sampler_state_bo;
+    struct brw_sampler_state *sampler_state;
+
+    sampler_state_bo = drm_intel_bo_alloc(pI830->bufmgr, "gen4 sampler state",
+					  sizeof(struct brw_sampler_state) * 2,
+					  4096);
+    drm_intel_bo_map(sampler_state_bo, TRUE);
+    sampler_state = sampler_state_bo->virtual;
+
+    sampler_state_init(sampler_state_bo,
+		       &sampler_state[0],
+		       src_filter, src_extend,
+		       border_color_bo);
+    sampler_state_init(sampler_state_bo,
+		       &sampler_state[1],
+		       mask_filter, mask_extend,
+		       border_color_bo);
+
+    drm_intel_bo_unmap(sampler_state_bo);
+
+    return sampler_state_bo;
+}
+
 static void
 cc_state_init (drm_intel_bo *cc_state_bo,
 	       uint32_t cc_state_offset,
@@ -697,7 +734,7 @@ cc_state_init (drm_intel_bo *cc_state_bo,
 static drm_intel_bo *
 gen4_create_wm_state(ScrnInfoPtr scrn,
 		     Bool has_mask, drm_intel_bo *kernel_bo,
-		     uint32_t sampler_state_offset)
+		     drm_intel_bo *sampler_bo)
 {
     I830Ptr pI830 = I830PTR(scrn);
     struct brw_wm_unit_state *wm_state;
@@ -716,7 +753,7 @@ gen4_create_wm_state(ScrnInfoPtr scrn,
                          kernel_bo, wm_state->thread0.grf_reg_count << 1,
                          I915_GEM_DOMAIN_INSTRUCTION, 0) >> 6;
 
-   wm_state->thread1.single_program_flow = 0;
+    wm_state->thread1.single_program_flow = 0;
 
     /* scratch space is not used in our kernel */
     wm_state->thread2.scratch_space_base_pointer = 0;
@@ -730,9 +767,13 @@ gen4_create_wm_state(ScrnInfoPtr scrn,
     wm_state->thread3.dispatch_grf_start_reg = 3; /* must match kernel */
 
     wm_state->wm4.stats_enable = 1;  /* statistic */
-    assert((sampler_state_offset & 31) == 0);
-    wm_state->wm4.sampler_state_pointer = sampler_state_offset >> 5;
     wm_state->wm4.sampler_count = 1; /* 1-4 samplers used */
+    wm_state->wm4.sampler_state_pointer =
+	intel_emit_reloc(wm_state_bo, offsetof(struct brw_wm_unit_state, wm4),
+			 sampler_bo,
+			 wm_state->wm4.stats_enable +
+			 (wm_state->wm4.sampler_count << 2),
+			 I915_GEM_DOMAIN_INSTRUCTION, 0) >> 5;
     wm_state->wm5.max_threads = PS_MAX_THREADS - 1;
     wm_state->wm5.transposed_urb_read = 0;
     wm_state->wm5.thread_dispatch_enable = 1;
@@ -823,43 +864,6 @@ gen4_create_cc_unit_state(ScrnInfoPtr scrn)
     return cc_state_bo;
 }
 
-/**
- * Called at EnterVT to fill in our state buffer with any static information.
- */
-static void
-gen4_static_state_init (gen4_static_state_t *static_state,
-			uint32_t static_state_offset)
-{
-    int i, j, k, l;
-
-    /* Set up the sampler border color (always transparent black) */
-    memset(&static_state->sampler_border_color, 0,
-	   sizeof(static_state->sampler_border_color));
-    static_state->sampler_border_color.color[0] = 0; /* R */
-    static_state->sampler_border_color.color[1] = 0; /* G */
-    static_state->sampler_border_color.color[2] = 0; /* B */
-    static_state->sampler_border_color.color[3] = 0; /* A */
-
-    for (i = 0; i < SAMPLER_STATE_FILTER_COUNT; i++) {
-	for (j = 0; j < SAMPLER_STATE_EXTEND_COUNT; j++) {
-	    for (k = 0; k < SAMPLER_STATE_FILTER_COUNT; k++) {
-		for (l = 0; l < SAMPLER_STATE_EXTEND_COUNT; l++) {
-		    sampler_state_init (&static_state->sampler_state[i][j][k][l][0],
-					i, j,
-					static_state_offset +
-					offsetof (gen4_static_state_t,
-						  sampler_border_color));
-		    sampler_state_init (&static_state->sampler_state[i][j][k][l][1],
-					k, l,
-					static_state_offset +
-					offsetof (gen4_static_state_t,
-						  sampler_border_color));
-		}
-	    }
-	}
-    }
-}
-
 static uint32_t 
 i965_get_card_format(PicturePtr pPict)
 {
@@ -1620,33 +1624,15 @@ gen4_render_state_init(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     struct gen4_render_state *render_state;
-    uint32_t static_state_offset;
-    int ret;
     int i, j, k, l, m;
     drm_intel_bo *sf_kernel_bo, *sf_kernel_mask_bo;
+    drm_intel_bo *border_color_bo;
 
     if (pI830->gen4_render_state == NULL)
 	pI830->gen4_render_state = calloc(sizeof(*render_state), 1);
 
     render_state = pI830->gen4_render_state;
-
-    render_state->static_state_offset = pI830->gen4_render_state_mem->offset;
-    static_state_offset = render_state->static_state_offset;
-
-    if (pI830->use_drm_mode) {
-	ret = dri_bo_map(pI830->gen4_render_state_mem->bo, 1);
-	if (ret) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		       "Failed to map gen4 state\n");
-	    return;
-	}
-	render_state->static_state = pI830->gen4_render_state_mem->bo->virtual;
-    } else {
-	render_state->static_state = (gen4_static_state_t *)
-	    (pI830->FbBase + render_state->static_state_offset);
-    }
-    gen4_static_state_init(render_state->static_state,
-			   render_state->static_state_offset);
+    render_state->vb_offset = 0;
 
     render_state->vs_state_bo = gen4_create_vs_unit_state(pScrn);
 
@@ -1675,25 +1661,32 @@ gen4_render_state_init(ScrnInfoPtr pScrn)
     /* Set up the WM states: each filter/extend type for source and mask, per
      * kernel.
      */
+    border_color_bo = sampler_border_color_create(pScrn);
     for (i = 0; i < SAMPLER_STATE_FILTER_COUNT; i++) {
 	for (j = 0; j < SAMPLER_STATE_EXTEND_COUNT; j++) {
 	    for (k = 0; k < SAMPLER_STATE_FILTER_COUNT; k++) {
 		for (l = 0; l < SAMPLER_STATE_EXTEND_COUNT; l++) {
-		    for (m = 0; m < WM_KERNEL_COUNT; m++) {
-			uint32_t sampler_offset = static_state_offset +
-			    offsetof(gen4_static_state_t,
-				     sampler_state[i][j][k][l]);
+		    drm_intel_bo *sampler_state_bo;
 
+		    sampler_state_bo =
+			gen4_create_sampler_state(pScrn,
+						  i, j,
+						  k, l,
+						  border_color_bo);
+
+		    for (m = 0; m < WM_KERNEL_COUNT; m++) {
 			render_state->wm_state_bo[m][i][j][k][l] =
 			    gen4_create_wm_state(pScrn,
 						 wm_kernels[m].has_mask,
 						 render_state->wm_kernel_bo[m],
-						 sampler_offset);
+						 sampler_state_bo);
 		    }
+		    drm_intel_bo_unreference(sampler_state_bo);
 		}
 	    }
 	}
     }
+    drm_intel_bo_unreference(border_color_bo);
 
     render_state->cc_state_bo = gen4_create_cc_unit_state(pScrn);
     render_state->sip_kernel_bo = intel_bo_alloc_for_data(pScrn,
@@ -1717,11 +1710,6 @@ gen4_render_state_cleanup(ScrnInfoPtr pScrn)
 	render_state->vertex_buffer_bo = NULL;
     }
 
-    if (pI830->use_drm_mode) {
-	dri_bo_unmap(pI830->gen4_render_state_mem->bo);
-	dri_bo_unreference(pI830->gen4_render_state_mem->bo);
-    }
-    render_state->static_state = NULL;
     drm_intel_bo_unreference(render_state->vs_state_bo);
     render_state->vs_state_bo = NULL;
     drm_intel_bo_unreference(render_state->sf_state_bo);
@@ -1737,9 +1725,3 @@ gen4_render_state_cleanup(ScrnInfoPtr pScrn)
     drm_intel_bo_unreference(render_state->sip_kernel_bo);
     render_state->sip_kernel_bo = NULL;
 }
-
-unsigned int
-gen4_render_state_size(ScrnInfoPtr pScrn)
-{
-    return sizeof(gen4_static_state_t);
-}
commit befd4ad8beae39377f804e06c7cbd926ec4251db
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jan 20 14:43:08 2009 -0800

    Move i965 render kernels to BOs.

diff --git a/src/i965_render.c b/src/i965_render.c
index fba5a4d..3672b1e 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -390,12 +390,6 @@ static const uint32_t ps_kernel_masknoca_projective_static [][4] = {
 #include "exa_wm_write.g4b"
 };
 
-/**
- * Storage for the static kernel data with template name, rounded to 64 bytes.
- */
-#define KERNEL_DECL(template) \
-    uint32_t template [((sizeof (template ## _static) + 63) & ~63) / 16][4];
-
 #define WM_STATE_DECL(kernel) \
     struct brw_wm_unit_state wm_state_ ## kernel[SAMPLER_STATE_FILTER_COUNT] \
 						[SAMPLER_STATE_EXTEND_COUNT] \
@@ -484,18 +478,6 @@ struct gen4_cc_unit_state {
  * state that we use for Render acceleration.
  */
 typedef struct _gen4_static_state {
-    KERNEL_DECL (sip_kernel);
-    KERNEL_DECL (sf_kernel);
-    KERNEL_DECL (sf_kernel_mask);
-    KERNEL_DECL (ps_kernel_nomask_affine);
-    KERNEL_DECL (ps_kernel_nomask_projective);
-    KERNEL_DECL (ps_kernel_maskca_affine);
-    KERNEL_DECL (ps_kernel_maskca_projective);
-    KERNEL_DECL (ps_kernel_maskca_srcalpha_affine);
-    KERNEL_DECL (ps_kernel_maskca_srcalpha_projective);
-    KERNEL_DECL (ps_kernel_masknoca_affine);
-    KERNEL_DECL (ps_kernel_masknoca_projective);
-
     /* Index by [src_filter][src_extend][mask_filter][mask_extend].  Two of
      * the structs happen to add to 32 bytes.
      */
@@ -542,6 +524,7 @@ struct gen4_render_state {
 			     [SAMPLER_STATE_EXTEND_COUNT];
     drm_intel_bo *wm_kernel_bo[WM_KERNEL_COUNT];
 
+    drm_intel_bo *sip_kernel_bo;
     dri_bo* vertex_buffer_bo;
 
     gen4_composite_op composite_op;
@@ -560,7 +543,7 @@ struct gen4_render_state {
  * back to SF which then hands pixels off to WM.
  */
 static drm_intel_bo *
-gen4_create_sf_state(ScrnInfoPtr scrn, int kernel_offset)
+gen4_create_sf_state(ScrnInfoPtr scrn, drm_intel_bo *kernel_bo)
 {
     I830Ptr pI830 = I830PTR(scrn);
     struct brw_sf_unit_state *sf_state;
@@ -573,6 +556,11 @@ gen4_create_sf_state(ScrnInfoPtr scrn, int kernel_offset)
 
     memset(sf_state, 0, sizeof(*sf_state));
     sf_state->thread0.grf_reg_count = BRW_GRF_BLOCKS(SF_KERNEL_NUM_GRF);
+    sf_state->thread0.kernel_start_pointer =
+	intel_emit_reloc(sf_state_bo,
+			 offsetof(struct brw_sf_unit_state, thread0),
+			 kernel_bo, sf_state->thread0.grf_reg_count << 1,
+			 I915_GEM_DOMAIN_INSTRUCTION, 0) >> 6;
     sf_state->sf1.single_program_flow = 1;
     sf_state->sf1.binding_table_entry_count = 0;
     sf_state->sf1.thread_priority = 0;
@@ -600,9 +588,6 @@ gen4_create_sf_state(ScrnInfoPtr scrn, int kernel_offset)
     sf_state->sf6.dest_org_vbias = 0x8;
     sf_state->sf6.dest_org_hbias = 0x8;
 
-    assert((kernel_offset & 63) == 0);
-    sf_state->thread0.kernel_start_pointer = kernel_offset >> 6;
-
     drm_intel_bo_unmap(sf_state_bo);
 
     return sf_state_bo;
@@ -847,14 +832,6 @@ gen4_static_state_init (gen4_static_state_t *static_state,
 {
     int i, j, k, l;
 
-#define KERNEL_COPY(kernel) \
-    memcpy(static_state->kernel, kernel ## _static, sizeof(kernel ## _static))
-
-    KERNEL_COPY (sip_kernel);
-    KERNEL_COPY (sf_kernel);
-    KERNEL_COPY (sf_kernel_mask);
-#undef KERNEL_COPY
-
     /* Set up the sampler border color (always transparent black) */
     memset(&static_state->sampler_border_color, 0,
 	   sizeof(static_state->sampler_border_color));
@@ -1024,8 +1001,6 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
     int urb_clip_start, urb_clip_size;
     int urb_sf_start, urb_sf_size;
     int urb_cs_start, urb_cs_size;
-    char *state_base;
-    int state_base_offset;
     uint32_t src_blend, dst_blend;
     dri_bo *binding_table_bo = composite_op->binding_table_bo;
     wm_kernel_t wm_kernel;
@@ -1035,10 +1010,6 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
     IntelEmitInvarientState(pScrn);
     *pI830->last_3d = LAST_3D_RENDER;
 
-    state_base_offset = pI830->gen4_render_state_mem->offset;
-    assert((state_base_offset & 63) == 0);
-    state_base = (char *)(pI830->FbBase + state_base_offset);
-
     urb_vs_start = 0;
     urb_vs_size = URB_VS_ENTRIES * URB_VS_ENTRY_SIZE;
     urb_gs_start = urb_vs_start + urb_vs_size;
@@ -1091,7 +1062,8 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
 
 	/* Set system instruction pointer */
 	OUT_BATCH(BRW_STATE_SIP | 0);
-	OUT_BATCH(state_base_offset + offsetof(gen4_static_state_t, sip_kernel));
+	OUT_RELOC(render_state->sip_kernel_bo,
+		  I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
 	OUT_BATCH(MI_NOOP);
 	ADVANCE_BATCH();
     }
@@ -1651,6 +1623,7 @@ gen4_render_state_init(ScrnInfoPtr pScrn)
     uint32_t static_state_offset;
     int ret;
     int i, j, k, l, m;
+    drm_intel_bo *sf_kernel_bo, *sf_kernel_mask_bo;
 
     if (pI830->gen4_render_state == NULL)
 	pI830->gen4_render_state = calloc(sizeof(*render_state), 1);
@@ -1676,15 +1649,21 @@ gen4_render_state_init(ScrnInfoPtr pScrn)
 			   render_state->static_state_offset);
 
     render_state->vs_state_bo = gen4_create_vs_unit_state(pScrn);
+
     /* Set up the two SF states (one for blending with a mask, one without) */
-    render_state->sf_state_bo =
-	gen4_create_sf_state(pScrn, static_state_offset +
-			     offsetof(gen4_static_state_t,
-				      sf_kernel));
-    render_state->sf_mask_state_bo =
-	gen4_create_sf_state(pScrn, static_state_offset +
-			     offsetof(gen4_static_state_t,
-				      sf_kernel_mask));
+    sf_kernel_bo = intel_bo_alloc_for_data(pScrn,
+					   sf_kernel_static,
+					   sizeof(sf_kernel_static),
+					   "sf kernel");
+    sf_kernel_mask_bo = intel_bo_alloc_for_data(pScrn,
+						sf_kernel_mask_static,
+						sizeof(sf_kernel_mask_static),
+						"sf mask kernel");
+    render_state->sf_state_bo = gen4_create_sf_state(pScrn, sf_kernel_bo);
+    render_state->sf_mask_state_bo = gen4_create_sf_state(pScrn,
+							  sf_kernel_mask_bo);
+    drm_intel_bo_unreference(sf_kernel_bo);
+    drm_intel_bo_unreference(sf_kernel_mask_bo);
 
     for (m = 0; m < WM_KERNEL_COUNT; m++) {
 	render_state->wm_kernel_bo[m] =
@@ -1717,6 +1696,10 @@ gen4_render_state_init(ScrnInfoPtr pScrn)
     }
 
     render_state->cc_state_bo = gen4_create_cc_unit_state(pScrn);
+    render_state->sip_kernel_bo = intel_bo_alloc_for_data(pScrn,
+							  sip_kernel_static,
+							  sizeof(sip_kernel_static),
+							  "sip kernel");
 }
 
 /**
@@ -1751,6 +1734,8 @@ gen4_render_state_cleanup(ScrnInfoPtr pScrn)
 	drm_intel_bo_unreference(render_state->wm_kernel_bo[i]);
 	render_state->wm_kernel_bo[i] = NULL;
     }
+    drm_intel_bo_unreference(render_state->sip_kernel_bo);
+    render_state->sip_kernel_bo = NULL;
 }
 
 unsigned int
commit 5d705de5d11297f4d6bd5237fb67619e703745bc
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Dec 5 15:30:35 2008 -0800

    Move 965 render unit state to BOs.
    
    This is a first step in a series of changes to avoid requiring a pinned object,
    which gets in the way of doing non-root KMS.  This change appears to result in
    about a 2-6% loss in x11perf -aa10text, which better algorithms in libdrm could
    make up for (it hasn't really had to deal with code this bad before).

diff --git a/src/i830.h b/src/i830.h
index 50d29cd..f5ae40b 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -1040,6 +1040,21 @@ intel_emit_reloc(drm_intel_bo *bo, uint32_t offset,
     return target_bo->offset + target_offset;
 }
 
+static inline drm_intel_bo *
+intel_bo_alloc_for_data(ScrnInfoPtr scrn, void *data, unsigned int size,
+			char *name)
+{
+    I830Ptr pI830 = I830PTR(scrn);
+    drm_intel_bo *bo;
+
+    bo = drm_intel_bo_alloc(pI830->bufmgr, name, size, 4096);
+    if (!bo)
+	return NULL;
+    drm_intel_bo_subdata(bo, 0, size, data);
+
+    return bo;
+}
+
 extern const int I830PatternROP[16];
 extern const int I830CopyROP[16];
 
diff --git a/src/i965_render.c b/src/i965_render.c
index ef9b09f..fba5a4d 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -423,6 +423,44 @@ typedef enum {
     SAMPLER_STATE_EXTEND_COUNT
 } sampler_state_extend_t;
 
+typedef enum {
+    WM_KERNEL_NOMASK_AFFINE,
+    WM_KERNEL_NOMASK_PROJECTIVE,
+    WM_KERNEL_MASKCA_AFFINE,
+    WM_KERNEL_MASKCA_PROJECTIVE,
+    WM_KERNEL_MASKCA_SRCALPHA_AFFINE,
+    WM_KERNEL_MASKCA_SRCALPHA_PROJECTIVE,
+    WM_KERNEL_MASKNOCA_AFFINE,
+    WM_KERNEL_MASKNOCA_PROJECTIVE,
+    WM_KERNEL_COUNT
+} wm_kernel_t;
+
+#define KERNEL(kernel_enum, kernel, masked) \
+    [kernel_enum] = {&kernel, sizeof(kernel), masked}
+struct wm_kernel_info {
+    void *data;
+    unsigned int size;
+    Bool has_mask;
+} wm_kernels[] = {
+    KERNEL(WM_KERNEL_NOMASK_AFFINE,
+	   ps_kernel_nomask_affine_static, FALSE),
+    KERNEL(WM_KERNEL_NOMASK_PROJECTIVE,
+	   ps_kernel_nomask_projective_static, FALSE),
+    KERNEL(WM_KERNEL_MASKCA_AFFINE,
+	   ps_kernel_maskca_affine_static, TRUE),
+    KERNEL(WM_KERNEL_MASKCA_PROJECTIVE,
+	   ps_kernel_maskca_projective_static, TRUE),
+    KERNEL(WM_KERNEL_MASKCA_SRCALPHA_AFFINE,
+	   ps_kernel_maskca_srcalpha_affine_static, TRUE),
+    KERNEL(WM_KERNEL_MASKCA_SRCALPHA_PROJECTIVE,
+	   ps_kernel_maskca_srcalpha_projective_static, TRUE),
+    KERNEL(WM_KERNEL_MASKNOCA_AFFINE,
+	   ps_kernel_masknoca_affine_static, TRUE),
+    KERNEL(WM_KERNEL_MASKNOCA_PROJECTIVE,
+	   ps_kernel_masknoca_projective_static, TRUE),
+};
+#undef KERNEL
+
 typedef struct _brw_cc_unit_state_padded {
     struct brw_cc_unit_state state;
     char pad[64 - sizeof (struct brw_cc_unit_state)];
@@ -433,6 +471,12 @@ typedef struct brw_surface_state_padded {
     char pad[32 - sizeof (struct brw_surface_state)];
 } brw_surface_state_padded;
 
+struct gen4_cc_unit_state {
+    /* Index by [src_blend][dst_blend] */
+    brw_cc_unit_state_padded cc_state[BRW_BLENDFACTOR_COUNT]
+				     [BRW_BLENDFACTOR_COUNT];
+};
+
 /**
  * Gen4 rendering state buffer structure.
  *
@@ -452,23 +496,6 @@ typedef struct _gen4_static_state {
     KERNEL_DECL (ps_kernel_masknoca_affine);
     KERNEL_DECL (ps_kernel_masknoca_projective);
 
-    struct brw_vs_unit_state vs_state;
-    PAD64 (brw_vs_unit_state, 0);
-
-    struct brw_sf_unit_state sf_state;
-    PAD64 (brw_sf_unit_state, 0);
-    struct brw_sf_unit_state sf_state_mask;
-    PAD64 (brw_sf_unit_state, 1);
-
-    WM_STATE_DECL (nomask_affine);
-    WM_STATE_DECL (nomask_projective);
-    WM_STATE_DECL (maskca_affine);
-    WM_STATE_DECL (maskca_projective);
-    WM_STATE_DECL (maskca_srcalpha_affine);
-    WM_STATE_DECL (maskca_srcalpha_projective);
-    WM_STATE_DECL (masknoca_affine);
-    WM_STATE_DECL (masknoca_projective);
-
     /* Index by [src_filter][src_extend][mask_filter][mask_extend].  Two of
      * the structs happen to add to 32 bytes.
      */
@@ -479,12 +506,6 @@ typedef struct _gen4_static_state {
 
     struct brw_sampler_legacy_border_color sampler_border_color;
     PAD64 (brw_sampler_legacy_border_color, 0);
-
-    /* Index by [src_blend][dst_blend] */
-    brw_cc_unit_state_padded cc_state[BRW_BLENDFACTOR_COUNT]
-				     [BRW_BLENDFACTOR_COUNT];
-    struct brw_cc_viewport cc_viewport;
-    PAD64 (brw_cc_viewport, 0);
 } gen4_static_state_t;
 
 typedef float gen4_vertex_buffer[VERTEX_BUFFER_SIZE];
@@ -510,6 +531,17 @@ struct gen4_render_state {
     gen4_static_state_t *static_state;
     uint32_t static_state_offset;
 
+    drm_intel_bo *vs_state_bo;
+    drm_intel_bo *sf_state_bo;
+    drm_intel_bo *sf_mask_state_bo;
+    drm_intel_bo *cc_state_bo;
+    drm_intel_bo *wm_state_bo[WM_KERNEL_COUNT]
+			     [SAMPLER_STATE_FILTER_COUNT]
+			     [SAMPLER_STATE_EXTEND_COUNT]
+			     [SAMPLER_STATE_FILTER_COUNT]
+			     [SAMPLER_STATE_EXTEND_COUNT];
+    drm_intel_bo *wm_kernel_bo[WM_KERNEL_COUNT];
+
     dri_bo* vertex_buffer_bo;
 
     gen4_composite_op composite_op;
@@ -527,9 +559,18 @@ struct gen4_render_state {
  * calculate dA/dx and dA/dy.  Hand these interpolation coefficients
  * back to SF which then hands pixels off to WM.
  */
-static void
-sf_state_init (struct brw_sf_unit_state *sf_state, int kernel_offset)
+static drm_intel_bo *
+gen4_create_sf_state(ScrnInfoPtr scrn, int kernel_offset)
 {
+    I830Ptr pI830 = I830PTR(scrn);
+    struct brw_sf_unit_state *sf_state;
+    drm_intel_bo *sf_state_bo;
+
+    sf_state_bo = drm_intel_bo_alloc(pI830->bufmgr, "gen4 SF state",
+				     sizeof(*sf_state), 4096);
+    drm_intel_bo_map(sf_state_bo, TRUE);
+    sf_state = sf_state_bo->virtual;
+
     memset(sf_state, 0, sizeof(*sf_state));
     sf_state->thread0.grf_reg_count = BRW_GRF_BLOCKS(SF_KERNEL_NUM_GRF);
     sf_state->sf1.single_program_flow = 1;
@@ -561,6 +602,10 @@ sf_state_init (struct brw_sf_unit_state *sf_state, int kernel_offset)
 
     assert((kernel_offset & 63) == 0);
     sf_state->thread0.kernel_start_pointer = kernel_offset >> 6;
+
+    drm_intel_bo_unmap(sf_state_bo);
+
+    return sf_state_bo;
 }
 
 static void
@@ -621,11 +666,17 @@ sampler_state_init (struct brw_sampler_state *sampler_state,
 }
 
 static void
-cc_state_init (struct brw_cc_unit_state *cc_state,
+cc_state_init (drm_intel_bo *cc_state_bo,
+	       uint32_t cc_state_offset,
 	       int src_blend,
 	       int dst_blend,
-	       int cc_viewport_offset)
+	       drm_intel_bo *cc_vp_bo)
 {
+    struct brw_cc_unit_state *cc_state;
+
+    cc_state = (struct brw_cc_unit_state *)((char *)cc_state_bo->virtual +
+					    cc_state_offset);
+
     memset(cc_state, 0, sizeof(*cc_state));
     cc_state->cc0.stencil_enable = 0;   /* disable stencil */
     cc_state->cc2.depth_test = 0;       /* disable depth test */
@@ -634,8 +685,11 @@ cc_state_init (struct brw_cc_unit_state *cc_state,
     cc_state->cc3.blend_enable = 1;     /* enable color blend */
     cc_state->cc3.alpha_test = 0;       /* disable alpha test */
 
-    assert((cc_viewport_offset & 31) == 0);
-    cc_state->cc4.cc_viewport_state_offset = cc_viewport_offset >> 5;
+    cc_state->cc4.cc_viewport_state_offset =
+	intel_emit_reloc(cc_state_bo, cc_state_offset +
+			 offsetof(struct brw_cc_unit_state, cc4),
+			 cc_vp_bo, 0,
+			 I915_GEM_DOMAIN_INSTRUCTION, 0) >> 5;
 
     cc_state->cc5.dither_enable = 0;    /* disable dither */
     cc_state->cc5.logicop_func = 0xc;   /* COPY */
@@ -655,15 +709,29 @@ cc_state_init (struct brw_cc_unit_state *cc_state,
     cc_state->cc6.dest_blend_factor = dst_blend;
 }
 
-static void
-wm_state_init (struct brw_wm_unit_state *wm_state,
-	       Bool has_mask,
-	       int kernel_offset,
-	       int sampler_state_offset)
+static drm_intel_bo *
+gen4_create_wm_state(ScrnInfoPtr scrn,
+		     Bool has_mask, drm_intel_bo *kernel_bo,
+		     uint32_t sampler_state_offset)
 {
+    I830Ptr pI830 = I830PTR(scrn);
+    struct brw_wm_unit_state *wm_state;
+    drm_intel_bo *wm_state_bo;
+
+    wm_state_bo = drm_intel_bo_alloc(pI830->bufmgr, "gen4 WM state",
+				     sizeof(*wm_state), 4096);
+    drm_intel_bo_map(wm_state_bo, TRUE);
+    wm_state = wm_state_bo->virtual;
+
     memset(wm_state, 0, sizeof (*wm_state));
     wm_state->thread0.grf_reg_count = BRW_GRF_BLOCKS(PS_KERNEL_NUM_GRF);
-    wm_state->thread1.single_program_flow = 0;
+    wm_state->thread0.kernel_start_pointer =
+	intel_emit_reloc(wm_state_bo,
+			 offsetof(struct brw_wm_unit_state, thread0),
+                         kernel_bo, wm_state->thread0.grf_reg_count << 1,
+                         I915_GEM_DOMAIN_INSTRUCTION, 0) >> 6;
+
+   wm_state->thread1.single_program_flow = 0;
 
     /* scratch space is not used in our kernel */
     wm_state->thread2.scratch_space_base_pointer = 0;
@@ -690,9 +758,6 @@ wm_state_init (struct brw_wm_unit_state *wm_state,
     wm_state->wm5.enable_8_pix = 0;
     wm_state->wm5.early_depth_test = 1;
 
-    assert((kernel_offset & 63) == 0);
-    wm_state->thread0.kernel_start_pointer = kernel_offset >> 6;
-
     /* Each pair of attributes (src/mask coords) is two URB entries */
     if (has_mask) {
 	wm_state->thread1.binding_table_entry_count = 3; /* 2 tex and fb */
@@ -701,6 +766,76 @@ wm_state_init (struct brw_wm_unit_state *wm_state,
 	wm_state->thread1.binding_table_entry_count = 2; /* 1 tex and fb */
 	wm_state->thread3.urb_entry_read_length = 2;
     }
+
+    drm_intel_bo_unmap(wm_state_bo);
+
+    return wm_state_bo;
+}
+
+static drm_intel_bo *
+gen4_create_cc_viewport(ScrnInfoPtr scrn)
+{
+    I830Ptr pI830 = I830PTR(scrn);
+    drm_intel_bo *bo;
+    struct brw_cc_viewport cc_viewport;
+
+    cc_viewport.min_depth = -1.e35;
+    cc_viewport.max_depth = 1.e35;
+
+    bo = drm_intel_bo_alloc(pI830->bufmgr, "gen4 render unit state",
+			    sizeof(cc_viewport), 4096);
+    drm_intel_bo_subdata(bo, 0, sizeof(cc_viewport), &cc_viewport);
+
+    return bo;
+}
+
+static drm_intel_bo *
+gen4_create_vs_unit_state(ScrnInfoPtr scrn)
+{
+    struct brw_vs_unit_state vs_state;
+    memset(&vs_state, 0, sizeof(vs_state));
+
+    /* Set up the vertex shader to be disabled (passthrough) */
+    vs_state.thread4.nr_urb_entries = URB_VS_ENTRIES;
+    vs_state.thread4.urb_entry_allocation_size = URB_VS_ENTRY_SIZE - 1;
+    vs_state.vs6.vs_enable = 0;
+    vs_state.vs6.vert_cache_disable = 1;
+
+    return intel_bo_alloc_for_data(scrn, &vs_state, sizeof(vs_state),
+				   "gen4 render VS state");
+}
+
+/**
+ * Set up all combinations of cc state: each blendfactor for source and
+ * dest.
+ */
+static drm_intel_bo *
+gen4_create_cc_unit_state(ScrnInfoPtr scrn)
+{
+    I830Ptr pI830 = I830PTR(scrn);
+    struct gen4_cc_unit_state *cc_state;
+    drm_intel_bo *cc_state_bo, *cc_vp_bo;
+    int i, j;
+
+    cc_vp_bo = gen4_create_cc_viewport(scrn);
+
+    cc_state_bo = drm_intel_bo_alloc(pI830->bufmgr, "gen4 CC state",
+				     sizeof(*cc_state), 4096);
+    drm_intel_bo_map(cc_state_bo, TRUE);
+    cc_state = cc_state_bo->virtual;
+    for (i = 0; i < BRW_BLENDFACTOR_COUNT; i++) {
+	for (j = 0; j < BRW_BLENDFACTOR_COUNT; j++) {
+	    cc_state_init(cc_state_bo,
+			  offsetof(struct gen4_cc_unit_state,
+				   cc_state[i][j].state),
+			  i, j, cc_vp_bo);
+	}
+    }
+    drm_intel_bo_unmap(cc_state_bo);
+
+    drm_intel_bo_unreference(cc_vp_bo);
+
+    return cc_state_bo;
 }
 
 /**
@@ -718,24 +853,8 @@ gen4_static_state_init (gen4_static_state_t *static_state,
     KERNEL_COPY (sip_kernel);
     KERNEL_COPY (sf_kernel);
     KERNEL_COPY (sf_kernel_mask);
-    KERNEL_COPY (ps_kernel_nomask_affine);
-    KERNEL_COPY (ps_kernel_nomask_projective);
-    KERNEL_COPY (ps_kernel_maskca_affine);
-    KERNEL_COPY (ps_kernel_maskca_projective);
-    KERNEL_COPY (ps_kernel_maskca_srcalpha_affine);
-    KERNEL_COPY (ps_kernel_maskca_srcalpha_projective);
-    KERNEL_COPY (ps_kernel_masknoca_affine);
-    KERNEL_COPY (ps_kernel_masknoca_projective);
 #undef KERNEL_COPY
 
-    /* Set up the vertex shader to be disabled (passthrough) */
-    memset(&static_state->vs_state, 0, sizeof(static_state->vs_state));
-    static_state->vs_state.thread4.nr_urb_entries = URB_VS_ENTRIES;
-    static_state->vs_state.thread4.urb_entry_allocation_size =
-	URB_VS_ENTRY_SIZE - 1;
-    static_state->vs_state.vs6.vs_enable = 0;
-    static_state->vs_state.vs6.vert_cache_disable = 1;
-
     /* Set up the sampler border color (always transparent black) */
     memset(&static_state->sampler_border_color, 0,
 	   sizeof(static_state->sampler_border_color));
@@ -744,16 +863,6 @@ gen4_static_state_init (gen4_static_state_t *static_state,
     static_state->sampler_border_color.color[2] = 0; /* B */
     static_state->sampler_border_color.color[3] = 0; /* A */
 
-    static_state->cc_viewport.min_depth = -1.e35;
-    static_state->cc_viewport.max_depth = 1.e35;
-
-    sf_state_init (&static_state->sf_state,
-		   static_state_offset +
-		   offsetof (gen4_static_state_t, sf_kernel));
-    sf_state_init (&static_state->sf_state_mask,
-		   static_state_offset +
-		   offsetof (gen4_static_state_t, sf_kernel_mask));
-
     for (i = 0; i < SAMPLER_STATE_FILTER_COUNT; i++) {
 	for (j = 0; j < SAMPLER_STATE_EXTEND_COUNT; j++) {
 	    for (k = 0; k < SAMPLER_STATE_FILTER_COUNT; k++) {
@@ -772,42 +881,6 @@ gen4_static_state_init (gen4_static_state_t *static_state,
 	    }
 	}
     }
-
-
-    for (i = 0; i < BRW_BLENDFACTOR_COUNT; i++) {
-	for (j = 0; j < BRW_BLENDFACTOR_COUNT; j++) {
-	    cc_state_init (&static_state->cc_state[i][j].state, i, j,
-			   static_state_offset +
-			   offsetof (gen4_static_state_t, cc_viewport));
-	}
-    }
-
-#define SETUP_WM_STATE(kernel, has_mask)				\
-    wm_state_init(&static_state->wm_state_ ## kernel [i][j][k][l],	\
-		  has_mask,						\
-		  static_state_offset + offsetof(gen4_static_state_t,	\
-						 ps_kernel_ ## kernel),	\
-		  static_state_offset + offsetof(gen4_static_state_t,	\
-						 sampler_state[i][j][k][l]));
-
-
-    for (i = 0; i < SAMPLER_STATE_FILTER_COUNT; i++) {
-	for (j = 0; j < SAMPLER_STATE_EXTEND_COUNT; j++) {
-	    for (k = 0; k < SAMPLER_STATE_FILTER_COUNT; k++) {
-		for (l = 0; l < SAMPLER_STATE_EXTEND_COUNT; l++) {
-		    SETUP_WM_STATE (nomask_affine, FALSE);
-		    SETUP_WM_STATE (nomask_projective, FALSE);
-		    SETUP_WM_STATE (maskca_affine, TRUE);
-		    SETUP_WM_STATE (maskca_projective, TRUE);
-		    SETUP_WM_STATE (maskca_srcalpha_affine, TRUE);
-		    SETUP_WM_STATE (maskca_srcalpha_projective, TRUE);
-		    SETUP_WM_STATE (masknoca_affine, TRUE);
-		    SETUP_WM_STATE (masknoca_projective, TRUE);
-		}
-	    }
-	}
-    }
-#undef SETUP_WM_STATE
 }
 
 static uint32_t 
@@ -941,7 +1014,6 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
     PicturePtr pDstPicture = composite_op->dest_picture;
     PixmapPtr pMask = composite_op->mask;
     PixmapPtr pDst = composite_op->dest;
-    uint32_t sf_state_offset;
     sampler_state_filter_t src_filter = composite_op->src_filter;
     sampler_state_filter_t mask_filter = composite_op->mask_filter;
     sampler_state_extend_t src_extend = composite_op->src_extend;
@@ -956,6 +1028,7 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
     int state_base_offset;
     uint32_t src_blend, dst_blend;
     dri_bo *binding_table_bo = composite_op->binding_table_bo;
+    wm_kernel_t wm_kernel;
 
     render_state->needs_state_emit = FALSE;
 
@@ -1058,33 +1131,16 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
 
 	/* Set the pointers to the 3d pipeline state */
 	OUT_BATCH(BRW_3DSTATE_PIPELINED_POINTERS | 5);
-	assert((offsetof(gen4_static_state_t, vs_state) & 31) == 0);
-	OUT_BATCH(state_base_offset + offsetof(gen4_static_state_t, vs_state));
+	OUT_RELOC(render_state->vs_state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
 	OUT_BATCH(BRW_GS_DISABLE);   /* disable GS, resulting in passthrough */
 	OUT_BATCH(BRW_CLIP_DISABLE); /* disable CLIP, resulting in passthrough */
-
 	if (pMask) {
-	    sf_state_offset = state_base_offset +
-		offsetof(gen4_static_state_t, sf_state_mask);
+	    OUT_RELOC(render_state->sf_mask_state_bo,
+		      I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
 	} else {
-	    sf_state_offset = state_base_offset +
-		offsetof(gen4_static_state_t, sf_state);
+	    OUT_RELOC(render_state->sf_state_bo,
+		      I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
 	}
-	assert((sf_state_offset & 31) == 0);
-	OUT_BATCH(sf_state_offset);
-
-	/* Shorthand for long array lookup */
-#define OUT_WM_KERNEL(kernel) do {					\
-    uint32_t offset = state_base_offset +				\
-	offsetof(gen4_static_state_t,					\
-		 wm_state_ ## kernel					\
-		 [src_filter]						\
-		 [src_extend]						\
-		 [mask_filter]						\
-		 [mask_extend]);					\
-    assert((offset & 31) == 0);						\
-    OUT_BATCH(offset);							\
-} while (0)
 
 	if (pMask) {
 	    if (pMaskPicture->componentAlpha &&
@@ -1092,34 +1148,36 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
 	    {
 		if (i965_blend_op[op].src_alpha) {
 		    if (is_affine)
-			OUT_WM_KERNEL(maskca_srcalpha_affine);
+			wm_kernel = WM_KERNEL_MASKCA_SRCALPHA_AFFINE;
 		    else
-			OUT_WM_KERNEL(maskca_srcalpha_projective);
+			wm_kernel = WM_KERNEL_MASKCA_SRCALPHA_PROJECTIVE;
 		} else {
 		    if (is_affine)
-			OUT_WM_KERNEL(maskca_affine);
+			wm_kernel = WM_KERNEL_MASKCA_AFFINE;
 		    else
-			OUT_WM_KERNEL(maskca_projective);
+			wm_kernel = WM_KERNEL_MASKCA_PROJECTIVE;
 		}
 	    } else {
 		if (is_affine)
-		    OUT_WM_KERNEL(masknoca_affine);
+		    wm_kernel = WM_KERNEL_MASKNOCA_AFFINE;
 		else
-		    OUT_WM_KERNEL(masknoca_projective);
+		    wm_kernel = WM_KERNEL_MASKNOCA_PROJECTIVE;
 	    }
 	} else {
 	    if (is_affine)
-		OUT_WM_KERNEL(nomask_affine);
+		wm_kernel = WM_KERNEL_NOMASK_AFFINE;
 	    else
-		OUT_WM_KERNEL(nomask_projective);
+		wm_kernel = WM_KERNEL_NOMASK_PROJECTIVE;
 	}
-#undef OUT_WM_KERNEL
+	OUT_RELOC(render_state->wm_state_bo[wm_kernel]
+		  [src_filter][src_extend]
+		  [mask_filter][mask_extend],
+		  I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
 
-	/* 64 byte aligned */
-	assert((offsetof(gen4_static_state_t,
-			 cc_state[src_blend][dst_blend]) & 63) == 0);
-	OUT_BATCH(state_base_offset +
-		  offsetof(gen4_static_state_t, cc_state[src_blend][dst_blend]));
+	OUT_RELOC(render_state->cc_state_bo,
+		  I915_GEM_DOMAIN_INSTRUCTION, 0,
+		  offsetof(struct gen4_cc_unit_state,
+			   cc_state[src_blend][dst_blend]));
 
 	/* URB fence */
 	OUT_BATCH(BRW_URB_FENCE |
@@ -1590,7 +1648,9 @@ gen4_render_state_init(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     struct gen4_render_state *render_state;
+    uint32_t static_state_offset;
     int ret;
+    int i, j, k, l, m;
 
     if (pI830->gen4_render_state == NULL)
 	pI830->gen4_render_state = calloc(sizeof(*render_state), 1);
@@ -1598,6 +1658,7 @@ gen4_render_state_init(ScrnInfoPtr pScrn)
     render_state = pI830->gen4_render_state;
 
     render_state->static_state_offset = pI830->gen4_render_state_mem->offset;
+    static_state_offset = render_state->static_state_offset;
 
     if (pI830->use_drm_mode) {
 	ret = dri_bo_map(pI830->gen4_render_state_mem->bo, 1);
@@ -1611,9 +1672,51 @@ gen4_render_state_init(ScrnInfoPtr pScrn)
 	render_state->static_state = (gen4_static_state_t *)
 	    (pI830->FbBase + render_state->static_state_offset);
     }
-
     gen4_static_state_init(render_state->static_state,
 			   render_state->static_state_offset);
+
+    render_state->vs_state_bo = gen4_create_vs_unit_state(pScrn);
+    /* Set up the two SF states (one for blending with a mask, one without) */
+    render_state->sf_state_bo =
+	gen4_create_sf_state(pScrn, static_state_offset +
+			     offsetof(gen4_static_state_t,
+				      sf_kernel));
+    render_state->sf_mask_state_bo =
+	gen4_create_sf_state(pScrn, static_state_offset +
+			     offsetof(gen4_static_state_t,
+				      sf_kernel_mask));
+
+    for (m = 0; m < WM_KERNEL_COUNT; m++) {
+	render_state->wm_kernel_bo[m] =
+	    intel_bo_alloc_for_data(pScrn,
+				    wm_kernels[m].data, wm_kernels[m].size,
+				    "WM kernel");
+    }
+
+    /* Set up the WM states: each filter/extend type for source and mask, per
+     * kernel.
+     */
+    for (i = 0; i < SAMPLER_STATE_FILTER_COUNT; i++) {
+	for (j = 0; j < SAMPLER_STATE_EXTEND_COUNT; j++) {
+	    for (k = 0; k < SAMPLER_STATE_FILTER_COUNT; k++) {
+		for (l = 0; l < SAMPLER_STATE_EXTEND_COUNT; l++) {
+		    for (m = 0; m < WM_KERNEL_COUNT; m++) {
+			uint32_t sampler_offset = static_state_offset +
+			    offsetof(gen4_static_state_t,
+				     sampler_state[i][j][k][l]);
+
+			render_state->wm_state_bo[m][i][j][k][l] =
+			    gen4_create_wm_state(pScrn,
+						 wm_kernels[m].has_mask,
+						 render_state->wm_kernel_bo[m],
+						 sampler_offset);
+		    }
+		}
+	    }
+	}
+    }
+
+    render_state->cc_state_bo = gen4_create_cc_unit_state(pScrn);
 }
 
 /**
@@ -1624,6 +1727,7 @@ gen4_render_state_cleanup(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     struct gen4_render_state *render_state= pI830->gen4_render_state;
+    int i;
 
     if (render_state->vertex_buffer_bo) {
 	dri_bo_unreference (render_state->vertex_buffer_bo);
@@ -1635,6 +1739,18 @@ gen4_render_state_cleanup(ScrnInfoPtr pScrn)
 	dri_bo_unreference(pI830->gen4_render_state_mem->bo);
     }
     render_state->static_state = NULL;
+    drm_intel_bo_unreference(render_state->vs_state_bo);
+    render_state->vs_state_bo = NULL;
+    drm_intel_bo_unreference(render_state->sf_state_bo);
+    render_state->sf_state_bo = NULL;
+    drm_intel_bo_unreference(render_state->sf_mask_state_bo);
+    render_state->sf_mask_state_bo = NULL;
+    drm_intel_bo_unreference(render_state->cc_state_bo);
+    render_state->cc_state_bo = NULL;
+    for (i = 0; i < WM_KERNEL_COUNT; i++) {
+	drm_intel_bo_unreference(render_state->wm_kernel_bo[i]);
+	render_state->wm_kernel_bo[i] = NULL;
+    }
 }
 
 unsigned int
commit 64b08ed5ad46ccd76964972e39bfed8721a920aa
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jan 20 17:13:52 2009 -0800

    Remove 965 render wm scratch space, which was just unused.

diff --git a/src/i965_render.c b/src/i965_render.c
index 0d7d8f3..ef9b09f 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -315,8 +315,6 @@ static const uint32_t sf_kernel_mask_static[][4] = {
 /* ps kernels */
 #define PS_KERNEL_NUM_GRF   32
 #define PS_MAX_THREADS	    48
-#define PS_SCRATCH_SPACE    1024
-#define PS_SCRATCH_SPACE_LOG	0   /* log2 (PS_SCRATCH_SPACE) - 10  (1024 is 0, 2048 is 1) */
 
 static const uint32_t ps_kernel_nomask_affine_static [][4] = {
 #include "exa_wm_xy.g4b"
@@ -442,8 +440,6 @@ typedef struct brw_surface_state_padded {
  * state that we use for Render acceleration.
  */
 typedef struct _gen4_static_state {
-    uint8_t wm_scratch[128 * PS_MAX_THREADS];
-
     KERNEL_DECL (sip_kernel);
     KERNEL_DECL (sf_kernel);
     KERNEL_DECL (sf_kernel_mask);
@@ -662,7 +658,6 @@ cc_state_init (struct brw_cc_unit_state *cc_state,
 static void
 wm_state_init (struct brw_wm_unit_state *wm_state,
 	       Bool has_mask,
-	       int scratch_offset,
 	       int kernel_offset,
 	       int sampler_state_offset)
 {
@@ -670,10 +665,10 @@ wm_state_init (struct brw_wm_unit_state *wm_state,
     wm_state->thread0.grf_reg_count = BRW_GRF_BLOCKS(PS_KERNEL_NUM_GRF);
     wm_state->thread1.single_program_flow = 0;
 
-    assert((scratch_offset & 1023) == 0);
-    wm_state->thread2.scratch_space_base_pointer = scratch_offset >> 10;
+    /* scratch space is not used in our kernel */
+    wm_state->thread2.scratch_space_base_pointer = 0;
+    wm_state->thread2.per_thread_scratch_space = 0;
 
-    wm_state->thread2.per_thread_scratch_space = PS_SCRATCH_SPACE_LOG;
     wm_state->thread3.const_urb_entry_read_length = 0;
     wm_state->thread3.const_urb_entry_read_offset = 0;
 
@@ -791,8 +786,6 @@ gen4_static_state_init (gen4_static_state_t *static_state,
     wm_state_init(&static_state->wm_state_ ## kernel [i][j][k][l],	\
 		  has_mask,						\
 		  static_state_offset + offsetof(gen4_static_state_t,	\
-						 wm_scratch),		\
-		  static_state_offset + offsetof(gen4_static_state_t,	\
 						 ps_kernel_ ## kernel),	\
 		  static_state_offset + offsetof(gen4_static_state_t,	\
 						 sampler_state[i][j][k][l]));
commit f126aabdf8952177bb15f392041da7a7094eb31b
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jan 21 12:52:36 2009 -0800

    Fix build with server 1.4.
    
    Debian "unstable" is still stuck with this ancient version.

diff --git a/src/i830.h b/src/i830.h
index 4ee9c39..50d29cd 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -539,8 +539,8 @@ typedef struct _I830Rec {
 #ifdef I830_USE_UXA
    uxa_driver_t *uxa_driver;
    Bool need_flush;
-   Bool need_sync;
 #endif
+   Bool need_sync;
 #if defined(I830_USE_EXA) || defined(I830_USE_UXA)
    PixmapPtr pSrcPixmap;
 #endif
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 7eac3c2..027bb5d 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -917,6 +917,11 @@ static void fill_detailed_block(struct detailed_monitor_section *det_mon,
         timing->misc |= 0x01;
 }
 
+/* X Server pre-1.5 compatibility */
+#ifndef DS_VENDOR
+#define DS_VENDOR 0x101
+#endif
+
 /**
  * Return the list of DDC modes if available, or the BIOS fixed mode otherwise.
  */
commit 253b8db298f38676e47dc902534465054f7b58b8
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Wed Jan 21 09:02:13 2009 -0800

    Don't run in KD_TEXT mode even with KMS
    
    Leaving the VT in KD_TEXT mode keeps the kernel's blanking code active,
    so when a DPMS event happens, the fb console is restored rather than X's
    configuration.  On the downside it means the kernel won't print messages
    in the background, which would be visible if a panic or emergency switch
    occurred.  The proper fix here is a new kernel mode, which we can move
    to when ready.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 4a9b9d0..bf5ecc4 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1226,10 +1226,6 @@ i830SetHotkeyControl(ScrnInfoPtr pScrn, int mode)
  * DRM mode setting Linux only at this point... later on we could
  * add a wrapper here.
  */
-#ifdef __linux__
-#include <linux/kd.h>
-#endif
-
 static Bool i830_kernel_mode_enabled(ScrnInfoPtr pScrn)
 {
 #if XSERVER_LIBPCIACCESS
@@ -1254,10 +1250,6 @@ static Bool i830_kernel_mode_enabled(ScrnInfoPtr pScrn)
     if (ret)
 	return FALSE;
 
-#ifdef __linux__
-    ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
-#endif
-
     return TRUE;
 }
 #else
commit 131b414feb2ecabe31b538d65725ac4427a4387a
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Wed Jan 21 09:01:05 2009 -0800

    Tear down batchbuffers unconditionally on LeaveVT
    
    Even if KMS is enabled we should do this, to avoid running batches that
    depend on other state we tear down in LeaveVT.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 7b66a53..4a9b9d0 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3581,7 +3581,6 @@ I830LeaveVT(int scrnIndex, int flags)
 	*/
        if (!pI830->memory_manager)
 	   intel_bufmgr_fake_evict_all(pI830->bufmgr);
-       intel_batch_teardown(pScrn);
 
        if (!pI830->memory_manager)
 	   i830_stop_ring(pScrn, TRUE);
@@ -3592,6 +3591,8 @@ I830LeaveVT(int scrnIndex, int flags)
        }
    }
 
+   intel_batch_teardown(pScrn);
+
    if (I830IsPrimary(pScrn))
       i830_unbind_all_memory(pScrn);
 
commit b6f3ce32e295929f461a7bc37e61f126fb51e4aa
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jan 20 10:45:23 2009 -0800

    Use drm_intel_bo_subdata to put render vb data in.
    
    This improves performance by avoiding repeated map/unmap cycles, which are
    a bit expensive on my machine with lock debugging on in the kernel.  It could
    do much better if we did more than 18 or so floats at a time.

diff --git a/src/i965_render.c b/src/i965_render.c
index 1d63eb8..0d7d8f3 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1395,12 +1395,6 @@ i965_get_vb_space(ScrnInfoPtr pScrn)
 	render_state->vb_offset = 0;
     }
 
-    /* Map the vertex_buffer buffer object so we can write to it. */
-    if (drm_intel_bo_map(render_state->vertex_buffer_bo, 1) != 0) {
-	ErrorF("i965_get_vb_space(): couldn't map vb\n");
-	return NULL;
-    }
-
     drm_intel_bo_reference(render_state->vertex_buffer_bo);
     return render_state->vertex_buffer_bo;
 }
@@ -1416,7 +1410,7 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
     float src_x[3], src_y[3], src_w[3], mask_x[3], mask_y[3], mask_w[3];
     int i;
     drm_intel_bo *vb_bo;
-    float *vb;
+    float vb[18];
     Bool is_affine = render_state->composite_op.is_affine;
 
     if (is_affine)
@@ -1492,8 +1486,7 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
     vb_bo = i965_get_vb_space(pScrn);
     if (vb_bo == NULL)
 	return;
-    vb = vb_bo->virtual;
-    i = render_state->vb_offset;
+    i = 0;
     /* rect (x2,y2) */
     vb[i++] = (float)(dstX + w);
     vb[i++] = (float)(dstY + h);
@@ -1536,7 +1529,7 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
 	    vb[i++] = mask_w[0];
     }
     assert (i <= VERTEX_BUFFER_SIZE);
-    drm_intel_bo_unmap(vb_bo);
+    drm_intel_bo_subdata(vb_bo, render_state->vb_offset * 4, i * 4, vb);
 
     if (!i965_composite_check_aperture(pScrn))
 	intel_batch_flush(pScrn, FALSE);
@@ -1568,7 +1561,7 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
     OUT_BATCH(0); /* index buffer offset, ignored */
     ADVANCE_BATCH();
 
-    render_state->vb_offset = i;
+    render_state->vb_offset += i;
     drm_intel_bo_unreference(vb_bo);
 
     intel_batch_end_atomic(pScrn);
commit 9a8bbb1951ad0ca0a9407a97348fc7fa03127900
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 19 19:34:50 2009 -0800

    Move i965 render vb setup to use time, and decouple state emit from it.
    
    The require_space had failed since it only checked for the space required
    by the batch emits in the function itself, but not in the
    i965_emit_composite_state() that it called (the state we were concerned about
    having set up for that 12 * 4 dwords to follow!).  This is replaced by
    intel_batch_start_atomic(), which will catch such mistakes in the future.

diff --git a/src/i965_render.c b/src/i965_render.c
index eb5f76a..1d63eb8 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -520,6 +520,8 @@ struct gen4_render_state {
 
     int vb_offset;
     int vertex_size;
+
+    Bool needs_state_emit;
 };
 
 /**
@@ -962,12 +964,7 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
     uint32_t src_blend, dst_blend;
     dri_bo *binding_table_bo = composite_op->binding_table_bo;
 
-    if (render_state->vertex_buffer_bo == NULL) {
-	render_state->vertex_buffer_bo = dri_bo_alloc (pI830->bufmgr, "vb",
-						       sizeof (gen4_vertex_buffer),
-						       4096);
-	render_state->vb_offset = 0;
-    }
+    render_state->needs_state_emit = FALSE;
 
     IntelEmitInvarientState(pScrn);
     *pI830->last_3d = LAST_3D_RENDER;
@@ -1370,11 +1367,44 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
 	    i830_transform_is_affine(pI830->transform[1]);
     }
 
-    i965_emit_composite_state(pScrn);
+    render_state->needs_state_emit = TRUE;
 
     return TRUE;
 }
 
+static drm_intel_bo *
+i965_get_vb_space(ScrnInfoPtr pScrn)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    struct gen4_render_state *render_state = pI830->gen4_render_state;
+
+    /* If the vertex buffer is too full, then we free the old and a new one
+     * gets made.
+     */
+    if (render_state->vb_offset + VERTEX_FLOATS_PER_COMPOSITE >
+	VERTEX_BUFFER_SIZE) {
+	drm_intel_bo_unreference(render_state->vertex_buffer_bo);
+	render_state->vertex_buffer_bo = NULL;
+    }
+
+    /* Alloc a new vertex buffer if necessary. */
+    if (render_state->vertex_buffer_bo == NULL) {
+	render_state->vertex_buffer_bo = drm_intel_bo_alloc(pI830->bufmgr, "vb",
+							    sizeof(gen4_vertex_buffer),
+							    4096);
+	render_state->vb_offset = 0;
+    }
+
+    /* Map the vertex_buffer buffer object so we can write to it. */
+    if (drm_intel_bo_map(render_state->vertex_buffer_bo, 1) != 0) {
+	ErrorF("i965_get_vb_space(): couldn't map vb\n");
+	return NULL;
+    }
+
+    drm_intel_bo_reference(render_state->vertex_buffer_bo);
+    return render_state->vertex_buffer_bo;
+}
+
 void
 i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
 	       int dstX, int dstY, int w, int h)
@@ -1385,6 +1415,7 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
     Bool has_mask;
     float src_x[3], src_y[3], src_w[3], mask_x[3], mask_y[3], mask_w[3];
     int i;
+    drm_intel_bo *vb_bo;
     float *vb;
     Bool is_affine = render_state->composite_op.is_affine;
 
@@ -1458,30 +1489,10 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
 	}
     }
 
-    /* We're about to do a BEGIN_BATCH(12) for the vertex setup. And
-     * we first need to ensure that that's not going to cause a flush
-     * since we need to not flush between setting up our vertices in
-     * the VB and emitting them into the batch. */
-    intel_batch_require_space(pScrn, pI830, 12 * 4);
-
-    /* If the vertex buffer is too full, then we flush and re-emit all
-     * necessary state into the batch for the composite operation. */
-    if (render_state->vb_offset + VERTEX_FLOATS_PER_COMPOSITE > VERTEX_BUFFER_SIZE) {
-	dri_bo_unreference (render_state->vertex_buffer_bo);
-	render_state->vertex_buffer_bo = NULL;
-    }
-
-    if (!i965_composite_check_aperture(pScrn))
-	intel_batch_flush(pScrn, FALSE);
-    if (render_state->vertex_buffer_bo == NULL)
-	i965_emit_composite_state(pScrn);
-
-    /* Map the vertex_buffer buffer object so we can write to it. */
-    if (dri_bo_map (render_state->vertex_buffer_bo, 1) != 0)
-	return;		/* XXX what else to do here? */
-
-    vb = render_state->vertex_buffer_bo->virtual;
-
+    vb_bo = i965_get_vb_space(pScrn);
+    if (vb_bo == NULL)
+	return;
+    vb = vb_bo->virtual;
     i = render_state->vb_offset;
     /* rect (x2,y2) */
     vb[i++] = (float)(dstX + w);
@@ -1525,8 +1536,14 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
 	    vb[i++] = mask_w[0];
     }
     assert (i <= VERTEX_BUFFER_SIZE);
+    drm_intel_bo_unmap(vb_bo);
 
-    dri_bo_unmap (render_state->vertex_buffer_bo);
+    if (!i965_composite_check_aperture(pScrn))
+	intel_batch_flush(pScrn, FALSE);
+
+    intel_batch_start_atomic(pScrn, 200);
+    if (render_state->needs_state_emit)
+	i965_emit_composite_state(pScrn);
 
     BEGIN_BATCH(12);
     OUT_BATCH(MI_FLUSH);
@@ -1535,8 +1552,7 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
     OUT_BATCH((0 << VB0_BUFFER_INDEX_SHIFT) |
 	      VB0_VERTEXDATA |
 	      (render_state->vertex_size << VB0_BUFFER_PITCH_SHIFT));
-    OUT_RELOC(render_state->vertex_buffer_bo, I915_GEM_DOMAIN_VERTEX, 0,
-	      render_state->vb_offset * 4);
+    OUT_RELOC(vb_bo, I915_GEM_DOMAIN_VERTEX, 0, render_state->vb_offset * 4);
     OUT_BATCH(3);
     OUT_BATCH(0); // ignore for VERTEXDATA, but still there
 
@@ -1553,6 +1569,9 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
     ADVANCE_BATCH();
 
     render_state->vb_offset = i;
+    drm_intel_bo_unreference(vb_bo);
+
+    intel_batch_end_atomic(pScrn);
 
 #ifdef I830DEBUG
     ErrorF("sync after 3dprimitive\n");
@@ -1573,6 +1592,8 @@ i965_batch_flush_notify(ScrnInfoPtr pScrn)
 	dri_bo_unreference (render_state->vertex_buffer_bo);
 	render_state->vertex_buffer_bo = NULL;
     }
+
+    render_state->needs_state_emit = TRUE;
 }
 
 /**
commit 3d739597c4f5817079efd9067ad5db2f4105f765
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jan 20 10:37:20 2009 -0800

    Move i965 render transform setup from emit_composite_state to prepare_composite.

diff --git a/src/i965_render.c b/src/i965_render.c
index d5eb683..eb5f76a 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -506,6 +506,7 @@ typedef struct gen4_composite_op {
     sampler_state_filter_t mask_filter;
     sampler_state_extend_t src_extend;
     sampler_state_extend_t mask_extend;
+    Bool is_affine;
 } gen4_composite_op;
 
 /** Private data for gen4 render accel implementation. */
@@ -941,10 +942,8 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
     struct gen4_render_state *render_state= pI830->gen4_render_state;
     gen4_composite_op *composite_op = &render_state->composite_op;
     int op = composite_op->op;
-    PicturePtr pSrcPicture = composite_op->source_picture;
     PicturePtr pMaskPicture = composite_op->mask_picture;
     PicturePtr pDstPicture = composite_op->dest_picture;
-    PixmapPtr pSrc = composite_op->source;
     PixmapPtr pMask = composite_op->mask;
     PixmapPtr pDst = composite_op->dest;
     uint32_t sf_state_offset;
@@ -952,7 +951,7 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
     sampler_state_filter_t mask_filter = composite_op->mask_filter;
     sampler_state_extend_t src_extend = composite_op->src_extend;
     sampler_state_extend_t mask_extend = composite_op->mask_extend;
-    Bool is_affine_src, is_affine_mask, is_affine;
+    Bool is_affine = composite_op->is_affine;
     int urb_vs_start, urb_vs_size;
     int urb_gs_start, urb_gs_size;
     int urb_clip_start, urb_clip_size;
@@ -973,26 +972,6 @@ i965_emit_composite_state(ScrnInfoPtr pScrn)
     IntelEmitInvarientState(pScrn);
     *pI830->last_3d = LAST_3D_RENDER;
 
-    pI830->scale_units[0][0] = pSrc->drawable.width;
-    pI830->scale_units[0][1] = pSrc->drawable.height;
-
-    pI830->transform[0] = pSrcPicture->transform;
-    is_affine_src = i830_transform_is_affine (pI830->transform[0]);
-
-    if (!pMask) {
-	pI830->transform[1] = NULL;
-	pI830->scale_units[1][0] = -1;
-	pI830->scale_units[1][1] = -1;
-	is_affine_mask = TRUE;
-    } else {
-	pI830->transform[1] = pMaskPicture->transform;
-	pI830->scale_units[1][0] = pMask->drawable.width;
-	pI830->scale_units[1][1] = pMask->drawable.height;
-	is_affine_mask = i830_transform_is_affine (pI830->transform[1]);
-    }
-
-    is_affine = is_affine_src && is_affine_mask;
-
     state_base_offset = pI830->gen4_render_state_mem->offset;
     assert((state_base_offset & 63) == 0);
     state_base = (char *)(pI830->FbBase + state_base_offset);
@@ -1372,6 +1351,25 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
 	    I830FALLBACK("Couldn't fit render operation in aperture\n");
     }
 
+    pI830->scale_units[0][0] = pSrc->drawable.width;
+    pI830->scale_units[0][1] = pSrc->drawable.height;
+
+    pI830->transform[0] = pSrcPicture->transform;
+    composite_op->is_affine =
+	i830_transform_is_affine(pI830->transform[0]);
+
+    if (!pMask) {
+	pI830->transform[1] = NULL;
+	pI830->scale_units[1][0] = -1;
+	pI830->scale_units[1][1] = -1;
+    } else {
+	pI830->transform[1] = pMaskPicture->transform;
+	pI830->scale_units[1][0] = pMask->drawable.width;
+	pI830->scale_units[1][1] = pMask->drawable.height;
+	composite_op->is_affine |=
+	    i830_transform_is_affine(pI830->transform[1]);
+    }
+
     i965_emit_composite_state(pScrn);
 
     return TRUE;
@@ -1385,15 +1383,11 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
     I830Ptr pI830 = I830PTR(pScrn);
     struct gen4_render_state *render_state = pI830->gen4_render_state;
     Bool has_mask;
-    Bool is_affine_src, is_affine_mask, is_affine;
     float src_x[3], src_y[3], src_w[3], mask_x[3], mask_y[3], mask_w[3];
     int i;
     float *vb;
+    Bool is_affine = render_state->composite_op.is_affine;
 
-    is_affine_src = i830_transform_is_affine (pI830->transform[0]);
-    is_affine_mask = i830_transform_is_affine (pI830->transform[1]);
-    is_affine = is_affine_src && is_affine_mask;
-    
     if (is_affine)
     {
 	if (!i830_get_transformed_coordinates(srcX, srcY,
commit e20f7278f3abb44a3a151ac91f83c45cf1a2745a
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 19 20:31:31 2009 -0800

    i965: Pull check_aperture out to a separate function and make it dtrt.
    
    Previously it wouldn't count the pixmaps that were about to be used, which
    is pretty much the only purpose of having the pain around.  This also
    eliminates the check_twice confusion with emit_batch_header_for_composite().

diff --git a/src/i965_render.c b/src/i965_render.c
index f4ad29c..d5eb683 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -934,46 +934,8 @@ i965_set_picture_surface_state(dri_bo *ss_bo, int ss_index,
     }
 }
 
-
-static Bool
-_emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn,
-					   Bool check_twice);
-
-/* Allocate the dynamic state needed for a composite operation,
- * flushing the current batch if needed to create sufficient space.
- *
- * Even after flushing we check again and return FALSE if the
- * operation still can't fit with an empty batch. Otherwise, returns
- * TRUE.
- */
-static Bool
-_emit_batch_header_for_composite_check_twice (ScrnInfoPtr pScrn)
-{
-     return _emit_batch_header_for_composite_internal (pScrn, TRUE);
-}
-
-/* Allocate the dynamic state needed for a composite operation,
- * flushing the current batch if needed to create sufficient space.
- *
- * See _emit_batch_header_for_composite_check_twice for a safer
- * version, (but this version is fine if the safer version has
- * previously been called for the same composite operation).
- */
 static void
-_emit_batch_header_for_composite (ScrnInfoPtr pScrn)
-{
-    _emit_batch_header_for_composite_internal (pScrn, FALSE);
-}
-
-/* Number of buffer object in our call to check_aperture_size:
- *
- *	batch_bo
- *	vertex_buffer_bo
- */
-#define NUM_BO 2
-
-static Bool
-_emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
+i965_emit_composite_state(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     struct gen4_render_state *render_state= pI830->gen4_render_state;
@@ -999,7 +961,6 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
     char *state_base;
     int state_base_offset;
     uint32_t src_blend, dst_blend;
-    dri_bo *bo_table[NUM_BO];
     dri_bo *binding_table_bo = composite_op->binding_table_bo;
 
     if (render_state->vertex_buffer_bo == NULL) {
@@ -1009,23 +970,6 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
 	render_state->vb_offset = 0;
     }
 
-    bo_table[0] = pI830->batch_bo;
-    bo_table[1] = render_state->vertex_buffer_bo;
-
-    /* If this command won't fit in the current batch, flush. */
-    if (dri_bufmgr_check_aperture_space (bo_table, NUM_BO) < 0) {
-	intel_batch_flush (pScrn, FALSE);
-
-	if (check_twice) {
-	    bo_table[0] = pI830->batch_bo; /* get refreshed batch_bo */
-	    /* If the command still won't fit in an empty batch, then it's
-	     * just plain too big for the hardware---fallback to software.
-	     */
-	    if (dri_bufmgr_check_aperture_space (bo_table, 1) < 0)
-		return FALSE;
-	}
-    }
-
     IntelEmitInvarientState(pScrn);
     *pI830->last_3d = LAST_3D_RENDER;
 
@@ -1301,10 +1245,27 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
     ErrorF("try to sync to show any errors...\n");
     I830Sync(pScrn);
 #endif
+}
 
-    return TRUE;
+/**
+ * Returns whether the current set of composite state plus vertex buffer is
+ * expected to fit in the aperture.
+ */
+static Bool
+i965_composite_check_aperture(ScrnInfoPtr pScrn)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    struct gen4_render_state *render_state= pI830->gen4_render_state;
+    gen4_composite_op *composite_op = &render_state->composite_op;
+    drm_intel_bo *bo_table[] = {
+	pI830->batch_bo,
+	composite_op->binding_table_bo,
+	render_state->vertex_buffer_bo,
+    };
+
+    return drm_intel_bufmgr_check_aperture_space(bo_table,
+						 ARRAY_SIZE(bo_table)) == 0;
 }
-#undef NUM_BO
 
 Bool
 i965_prepare_composite(int op, PicturePtr pSrcPicture,
@@ -1405,8 +1366,15 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
     composite_op->src_filter =
 	sampler_state_filter_from_picture(pSrcPicture->filter);
 
-    /* Fallback if we can't make this operation fit. */
-    return _emit_batch_header_for_composite_check_twice (pScrn);
+    if (!i965_composite_check_aperture(pScrn)) {
+	intel_batch_flush(pScrn, FALSE);
+	if (!i965_composite_check_aperture(pScrn))
+	    I830FALLBACK("Couldn't fit render operation in aperture\n");
+    }
+
+    i965_emit_composite_state(pScrn);
+
+    return TRUE;
 }
 
 void
@@ -1509,8 +1477,10 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
 	render_state->vertex_buffer_bo = NULL;
     }
 
+    if (!i965_composite_check_aperture(pScrn))
+	intel_batch_flush(pScrn, FALSE);
     if (render_state->vertex_buffer_bo == NULL)
-	_emit_batch_header_for_composite (pScrn);
+	i965_emit_composite_state(pScrn);
 
     /* Map the vertex_buffer buffer object so we can write to it. */
     if (dri_bo_map (render_state->vertex_buffer_bo, 1) != 0)
commit 013e2adfbf955cb21450b610091542ebd54392c2
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 19 20:24:20 2009 -0800

    Move filter computation from emit_batch_header to prepare_composite.

diff --git a/src/i965_render.c b/src/i965_render.c
index 821be40..f4ad29c 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -502,6 +502,10 @@ typedef struct gen4_composite_op {
     PixmapPtr	mask;
     PixmapPtr	dest;
     drm_intel_bo *binding_table_bo;
+    sampler_state_filter_t src_filter;
+    sampler_state_filter_t mask_filter;
+    sampler_state_extend_t src_extend;
+    sampler_state_extend_t mask_extend;
 } gen4_composite_op;
 
 /** Private data for gen4 render accel implementation. */
@@ -982,8 +986,10 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
     PixmapPtr pMask = composite_op->mask;
     PixmapPtr pDst = composite_op->dest;
     uint32_t sf_state_offset;
-    sampler_state_filter_t src_filter, mask_filter;
-    sampler_state_extend_t src_extend, mask_extend;
+    sampler_state_filter_t src_filter = composite_op->src_filter;
+    sampler_state_filter_t mask_filter = composite_op->mask_filter;
+    sampler_state_extend_t src_extend = composite_op->src_extend;
+    sampler_state_extend_t mask_extend = composite_op->mask_extend;
     Bool is_affine_src, is_affine_mask, is_affine;
     int urb_vs_start, urb_vs_size;
     int urb_gs_start, urb_gs_size;
@@ -1061,25 +1067,6 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
     i965_get_blend_cntl(op, pMaskPicture, pDstPicture->format,
 			&src_blend, &dst_blend);
 
-    src_filter = sampler_state_filter_from_picture (pSrcPicture->filter);
-    if (src_filter < 0)
-	I830FALLBACK ("Bad src filter 0x%x\n", pSrcPicture->filter);
-    src_extend = sampler_state_extend_from_picture (pSrcPicture->repeatType);
-    if (src_extend < 0)
-	I830FALLBACK ("Bad src repeat 0x%x\n", pSrcPicture->repeatType);
-
-    if (pMaskPicture) {
-	mask_filter = sampler_state_filter_from_picture (pMaskPicture->filter);
-	if (mask_filter < 0)
-	    I830FALLBACK ("Bad mask filter 0x%x\n", pMaskPicture->filter);
-	mask_extend = sampler_state_extend_from_picture (pMaskPicture->repeatType);
-	if (mask_extend < 0)
-	    I830FALLBACK ("Bad mask repeat 0x%x\n", pMaskPicture->repeatType);
-    } else {
-	mask_filter = SAMPLER_STATE_FILTER_NEAREST;
-	mask_extend = SAMPLER_STATE_EXTEND_NONE;
-    }
-
     /* Begin the long sequence of commands needed to set up the 3D
      * rendering pipe
      */
@@ -1331,6 +1318,27 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
     uint32_t *binding_table;
     drm_intel_bo *binding_table_bo, *surface_state_bo;
 
+    if (composite_op->src_filter < 0)
+	I830FALLBACK("Bad src filter 0x%x\n", pSrcPicture->filter);
+    composite_op->src_extend =
+	sampler_state_extend_from_picture(pSrcPicture->repeatType);
+    if (composite_op->src_extend < 0)
+	I830FALLBACK("Bad src repeat 0x%x\n", pSrcPicture->repeatType);
+
+    if (pMaskPicture) {
+	composite_op->mask_filter =
+	    sampler_state_filter_from_picture(pMaskPicture->filter);
+	if (composite_op->mask_filter < 0)
+	    I830FALLBACK("Bad mask filter 0x%x\n", pMaskPicture->filter);
+	composite_op->mask_extend =
+	    sampler_state_extend_from_picture(pMaskPicture->repeatType);
+	if (composite_op->mask_extend < 0)
+	    I830FALLBACK("Bad mask repeat 0x%x\n", pMaskPicture->repeatType);
+    } else {
+	composite_op->mask_filter = SAMPLER_STATE_FILTER_NEAREST;
+	composite_op->mask_extend = SAMPLER_STATE_EXTEND_NONE;
+    }
+
     /* Set up the surface states. */
     surface_state_bo = dri_bo_alloc(pI830->bufmgr, "surface_state",
 				    3 * sizeof (brw_surface_state_padded),
@@ -1394,6 +1402,8 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
     composite_op->dest = pDst;
     drm_intel_bo_unreference(composite_op->binding_table_bo);
     composite_op->binding_table_bo = binding_table_bo;
+    composite_op->src_filter =
+	sampler_state_filter_from_picture(pSrcPicture->filter);
 
     /* Fallback if we can't make this operation fit. */
     return _emit_batch_header_for_composite_check_twice (pScrn);
commit a340fe5e4227ebea5493e658eb6289624b07ab0b
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 19 19:11:41 2009 -0800

    Use intel_emit_reloc from video to prettify 965 render bind_bo setup.

diff --git a/src/i830.h b/src/i830.h
index b726dd6..4ee9c39 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -1023,6 +1023,23 @@ Bool i830_pixmap_tiled(PixmapPtr p);
     if (pitch > KB(8)) I830FALLBACK("pitch exceeds 3d limit 8K\n");\
 } while(0)
 
+/**
+ * Little wrapper around drm_intel_bo_reloc to return the initial value you
+ * should stuff into the relocation entry.
+ *
+ * If only we'd done this before settling on the library API.
+ */
+static inline uint32_t
+intel_emit_reloc(drm_intel_bo *bo, uint32_t offset,
+		 drm_intel_bo *target_bo, uint32_t target_offset,
+		 uint32_t read_domains, uint32_t write_domain)
+{
+    drm_intel_bo_emit_reloc(bo, offset, target_bo, target_offset,
+			    read_domains, write_domain);
+
+    return target_bo->offset + target_offset;
+}
+
 extern const int I830PatternROP[16];
 extern const int I830CopyROP[16];
 
diff --git a/src/i965_render.c b/src/i965_render.c
index 281eb0d..821be40 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1360,24 +1360,24 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
     }
 
     binding_table = binding_table_bo->virtual;
-    binding_table[0] = 0 * sizeof (brw_surface_state_padded) + surface_state_bo->offset;
-    dri_bo_emit_reloc (binding_table_bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
-		       0 * sizeof (brw_surface_state_padded),
-		       0 * sizeof (uint32_t),
-		       surface_state_bo);
-
-    binding_table[1] = 1 * sizeof (brw_surface_state_padded) + surface_state_bo->offset;
-    dri_bo_emit_reloc (binding_table_bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
-		       1 * sizeof (brw_surface_state_padded),
-		       1 * sizeof (uint32_t),
-		       surface_state_bo);
+    binding_table[0] = intel_emit_reloc(binding_table_bo,
+					0 * sizeof(uint32_t),
+					surface_state_bo,
+					0 * sizeof(brw_surface_state_padded),
+					I915_GEM_DOMAIN_INSTRUCTION, 0);
+
+    binding_table[1] = intel_emit_reloc(binding_table_bo,
+					1 * sizeof(uint32_t),
+					surface_state_bo,
+					1 * sizeof(brw_surface_state_padded),
+					I915_GEM_DOMAIN_INSTRUCTION, 0);
 
     if (pMask) {
-	binding_table[2] = 2 * sizeof (brw_surface_state_padded) + surface_state_bo->offset;
-	dri_bo_emit_reloc (binding_table_bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
-			   2 * sizeof (brw_surface_state_padded),
-			   2 * sizeof (uint32_t),
-			   surface_state_bo);
+	binding_table[2] = intel_emit_reloc(binding_table_bo,
+					    2 * sizeof(uint32_t),
+					    surface_state_bo,
+					    2 * sizeof(brw_surface_state_padded),
+					    I915_GEM_DOMAIN_INSTRUCTION, 0);
     } else {
 	binding_table[2] = 0;
     }
diff --git a/src/i965_video.c b/src/i965_video.c
index cd726a2..7cd20f3 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -326,23 +326,6 @@ i965_post_draw_debug(ScrnInfoPtr scrn)
 #define URB_CS_ENTRIES	      0
 #define URB_CS_ENTRY_SIZE     0
 
-/**
- * Little wrapper around drm_intel_bo_reloc to return the initial value you
- * should stuff into the relocation entry.
- *
- * If only we'd done this before settling on the library API.
- */
-static uint32_t
-intel_emit_reloc(drm_intel_bo *bo, uint32_t offset,
-		 drm_intel_bo *target_bo, uint32_t target_offset,
-		 uint32_t read_domains, uint32_t write_domain)
-{
-    drm_intel_bo_emit_reloc(bo, offset, target_bo, target_offset,
-			    read_domains, write_domain);
-
-    return target_bo->offset + target_offset;
-}
-
 static int
 intel_alloc_and_map(I830Ptr i830, char *name, int size,
 		    drm_intel_bo **bop, void *virtualp)
commit aefe198ca427a5ad69717f49948eb3ede713bb28
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 19 18:57:01 2009 -0800

    Move i965 render state bo setup back to prepare_composite.
    
    We want the objects to be created once per prepare/done both for efficiency and
    so we can handle aperture checking better.

diff --git a/src/i965_render.c b/src/i965_render.c
index 00cb051..281eb0d 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -501,6 +501,7 @@ typedef struct gen4_composite_op {
     PixmapPtr	source;
     PixmapPtr	mask;
     PixmapPtr	dest;
+    drm_intel_bo *binding_table_bo;
 } gen4_composite_op;
 
 /** Private data for gen4 render accel implementation. */
@@ -992,9 +993,8 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
     char *state_base;
     int state_base_offset;
     uint32_t src_blend, dst_blend;
-    uint32_t *binding_table;
     dri_bo *bo_table[NUM_BO];
-    dri_bo *binding_table_bo, *surface_state_bo;
+    dri_bo *binding_table_bo = composite_op->binding_table_bo;
 
     if (render_state->vertex_buffer_bo == NULL) {
 	render_state->vertex_buffer_bo = dri_bo_alloc (pI830->bufmgr, "vb",
@@ -1061,67 +1061,6 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
     i965_get_blend_cntl(op, pMaskPicture, pDstPicture->format,
 			&src_blend, &dst_blend);
 
-    /* Set up the surface states. */
-    surface_state_bo = dri_bo_alloc (pI830->bufmgr, "surface_state",
-				     3 * sizeof (brw_surface_state_padded),
-				     4096);
-    if (dri_bo_map (surface_state_bo, 1) != 0) {
-	dri_bo_unreference (surface_state_bo);
-	dri_bo_unreference (render_state->vertex_buffer_bo);
-	render_state->vertex_buffer_bo = NULL;
-
-	return FALSE;
-    }
-    /* Set up the state buffer for the destination surface */
-    i965_set_picture_surface_state(surface_state_bo, 0,
-				   pDstPicture, pDst, TRUE);
-    /* Set up the source surface state buffer */
-    i965_set_picture_surface_state(surface_state_bo, 1,
-				   pSrcPicture, pSrc, FALSE);
-    if (pMask) {
-	/* Set up the mask surface state buffer */
-	i965_set_picture_surface_state(surface_state_bo, 2,
-				       pMaskPicture, pMask,
-				       FALSE);
-    }
-    dri_bo_unmap (surface_state_bo);
-
-    /* Set up the binding table of surface indices to surface state. */
-    binding_table_bo = dri_bo_alloc (pI830->bufmgr, "binding_table",
-				     3 * sizeof (uint32_t), 4096);
-    if (dri_bo_map (binding_table_bo, 1) != 0) {
-	dri_bo_unreference(binding_table_bo);
-	dri_bo_unreference(surface_state_bo);
-	dri_bo_unreference (render_state->vertex_buffer_bo);
-	render_state->vertex_buffer_bo = NULL;
-
-	return FALSE;
-    }
-
-    binding_table = binding_table_bo->virtual;
-    binding_table[0] = 0 * sizeof (brw_surface_state_padded) + surface_state_bo->offset;
-    dri_bo_emit_reloc (binding_table_bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
-		       0 * sizeof (brw_surface_state_padded),
-		       0 * sizeof (uint32_t),
-		       surface_state_bo);
-
-    binding_table[1] = 1 * sizeof (brw_surface_state_padded) + surface_state_bo->offset;
-    dri_bo_emit_reloc (binding_table_bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
-		       1 * sizeof (brw_surface_state_padded),
-		       1 * sizeof (uint32_t),
-		       surface_state_bo);
-
-    if (pMask) {
-	binding_table[2] = 2 * sizeof (brw_surface_state_padded) + surface_state_bo->offset;
-	dri_bo_emit_reloc (binding_table_bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
-			   2 * sizeof (brw_surface_state_padded),
-			   2 * sizeof (uint32_t),
-			   surface_state_bo);
-    } else {
-	binding_table[2] = 0;
-    }
-    dri_bo_unmap (binding_table_bo);
-
     src_filter = sampler_state_filter_from_picture (pSrcPicture->filter);
     if (src_filter < 0)
 	I830FALLBACK ("Bad src filter 0x%x\n", pSrcPicture->filter);
@@ -1376,9 +1315,6 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
     I830Sync(pScrn);
 #endif
 
-    dri_bo_unreference (binding_table_bo);
-    dri_bo_unreference (surface_state_bo);
-
     return TRUE;
 }
 #undef NUM_BO
@@ -1392,6 +1328,62 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
     I830Ptr pI830 = I830PTR(pScrn);
     struct gen4_render_state *render_state= pI830->gen4_render_state;
     gen4_composite_op *composite_op = &render_state->composite_op;
+    uint32_t *binding_table;
+    drm_intel_bo *binding_table_bo, *surface_state_bo;
+
+    /* Set up the surface states. */
+    surface_state_bo = dri_bo_alloc(pI830->bufmgr, "surface_state",
+				    3 * sizeof (brw_surface_state_padded),
+				    4096);
+    if (dri_bo_map(surface_state_bo, 1) != 0)
+	return FALSE;
+    /* Set up the state buffer for the destination surface */
+    i965_set_picture_surface_state(surface_state_bo, 0,
+				   pDstPicture, pDst, TRUE);
+    /* Set up the source surface state buffer */
+    i965_set_picture_surface_state(surface_state_bo, 1,
+				   pSrcPicture, pSrc, FALSE);
+    if (pMask) {
+	/* Set up the mask surface state buffer */
+	i965_set_picture_surface_state(surface_state_bo, 2,
+				       pMaskPicture, pMask,
+				       FALSE);
+    }
+    dri_bo_unmap(surface_state_bo);
+
+    /* Set up the binding table of surface indices to surface state. */
+    binding_table_bo = dri_bo_alloc(pI830->bufmgr, "binding_table",
+				    3 * sizeof(uint32_t), 4096);
+    if (dri_bo_map (binding_table_bo, 1) != 0) {
+	dri_bo_unreference(surface_state_bo);
+	return FALSE;
+    }
+
+    binding_table = binding_table_bo->virtual;
+    binding_table[0] = 0 * sizeof (brw_surface_state_padded) + surface_state_bo->offset;
+    dri_bo_emit_reloc (binding_table_bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
+		       0 * sizeof (brw_surface_state_padded),
+		       0 * sizeof (uint32_t),
+		       surface_state_bo);
+
+    binding_table[1] = 1 * sizeof (brw_surface_state_padded) + surface_state_bo->offset;
+    dri_bo_emit_reloc (binding_table_bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
+		       1 * sizeof (brw_surface_state_padded),
+		       1 * sizeof (uint32_t),
+		       surface_state_bo);
+
+    if (pMask) {
+	binding_table[2] = 2 * sizeof (brw_surface_state_padded) + surface_state_bo->offset;
+	dri_bo_emit_reloc (binding_table_bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
+			   2 * sizeof (brw_surface_state_padded),
+			   2 * sizeof (uint32_t),
+			   surface_state_bo);
+    } else {
+	binding_table[2] = 0;
+    }
+    dri_bo_unmap(binding_table_bo);
+    /* All refs to surface_state are now contained in binding_table_bo. */
+    drm_intel_bo_unreference(surface_state_bo);
 
     composite_op->op = op;
     composite_op->source_picture = pSrcPicture;
@@ -1400,6 +1392,8 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture,
     composite_op->source = pSrc;
     composite_op->mask = pMask;
     composite_op->dest = pDst;
+    drm_intel_bo_unreference(composite_op->binding_table_bo);
+    composite_op->binding_table_bo = binding_table_bo;
 
     /* Fallback if we can't make this operation fit. */
     return _emit_batch_header_for_composite_check_twice (pScrn);
commit 946c7ef8170e74ac178c83b1465242d57fa86f2e
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 19 14:43:20 2009 -0800

    Do check_aperture_space and batch_start_atomic for i965 video.
    
    This increases the overhead for video in the presence of cliprects, but we
    were already doing nasty things in that case and don't seem to care.  This
    could fix potential bad rendering or hangs with video, particularly with
    DRI2.

diff --git a/src/i965_video.c b/src/i965_video.c
index 3c626ca..cd726a2 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -1057,8 +1057,6 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 	}
     }
 
-    i965_emit_video_setup(pScrn, bind_bo, n_src_surf);
-
    /* Set up the offset for translating from the given region (in screen
     * coordinates) to the backing pixmap.
     */
@@ -1087,12 +1085,25 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 	int i;
 	drm_intel_bo *vb_bo;
 	float *vb;
+	drm_intel_bo *bo_table[] = {
+	    NULL, /* vb_bo */
+	    pI830->batch_bo,
+	    bind_bo,
+	    pI830->video.gen4_sampler_bo,
+	    pI830->video.gen4_sip_kernel_bo,
+	    pI830->video.gen4_vs_bo,
+	    pI830->video.gen4_sf_bo,
+	    pI830->video.gen4_wm_packed_bo,
+	    pI830->video.gen4_wm_planar_bo,
+	    pI830->video.gen4_cc_bo,
+	};
 
 	pbox++;
 
 	if (intel_alloc_and_map(pI830, "textured video vb", 4096,
 				&vb_bo, &vb) != 0)
 	    break;
+	bo_table[0] = vb_bo;
 
 	i = 0;
 	vb[i++] = (box_x2 - dxo) * src_scale_x;
@@ -1114,6 +1125,18 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 
 	i965_pre_draw_debug(pScrn);
 
+	/* If this command won't fit in the current batch, flush.
+	 * Assume that it does after being flushed.
+	 */
+	if (drm_intel_bufmgr_check_aperture_space(bo_table,
+						  ARRAY_SIZE(bo_table)) < 0) {
+	    intel_batch_flush(pScrn, FALSE);
+	}
+
+	intel_batch_start_atomic(pScrn, 100);
+
+	i965_emit_video_setup(pScrn, bind_bo, n_src_surf);
+
 	BEGIN_BATCH(10);
 	/* Set up the pointer to our vertex buffer */
 	OUT_BATCH(BRW_3DSTATE_VERTEX_BUFFERS | 2);
@@ -1136,6 +1159,8 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 	OUT_BATCH(0); /* index buffer offset, ignored */
 	ADVANCE_BATCH();
 
+	intel_batch_end_atomic(pScrn);
+
 	drm_intel_bo_unreference(vb_bo);
 
 	i965_post_draw_debug(pScrn);
commit 7be668179a12918918cad863f6936ced4ab78dbf
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 19 14:29:25 2009 -0800

    Move 965 video setup to a separate function so we can move it around.

diff --git a/src/i965_video.c b/src/i965_video.c
index e9f5ced..3c626ca 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -714,6 +714,179 @@ i965_create_cc_state(ScrnInfoPtr scrn)
     return cc_bo;
 }
 
+static void
+i965_emit_video_setup(ScrnInfoPtr pScrn, drm_intel_bo *bind_bo, int n_src_surf)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    int urb_vs_start, urb_vs_size;
+    int urb_gs_start, urb_gs_size;
+    int urb_clip_start, urb_clip_size;
+    int urb_sf_start, urb_sf_size;
+    int urb_cs_start, urb_cs_size;
+
+    IntelEmitInvarientState(pScrn);
+    *pI830->last_3d = LAST_3D_VIDEO;
+
+    urb_vs_start = 0;
+    urb_vs_size = URB_VS_ENTRIES * URB_VS_ENTRY_SIZE;
+    urb_gs_start = urb_vs_start + urb_vs_size;
+    urb_gs_size = URB_GS_ENTRIES * URB_GS_ENTRY_SIZE;
+    urb_clip_start = urb_gs_start + urb_gs_size;
+    urb_clip_size = URB_CLIP_ENTRIES * URB_CLIP_ENTRY_SIZE;
+    urb_sf_start = urb_clip_start + urb_clip_size;
+    urb_sf_size = URB_SF_ENTRIES * URB_SF_ENTRY_SIZE;
+    urb_cs_start = urb_sf_start + urb_sf_size;
+    urb_cs_size = URB_CS_ENTRIES * URB_CS_ENTRY_SIZE;
+
+    BEGIN_BATCH(2);
+    OUT_BATCH(MI_FLUSH |
+	      MI_STATE_INSTRUCTION_CACHE_FLUSH |
+	      BRW_MI_GLOBAL_SNAPSHOT_RESET);
+    OUT_BATCH(MI_NOOP);
+    ADVANCE_BATCH();
+
+    /* brw_debug (pScrn, "before base address modify"); */
+    BEGIN_BATCH(12);
+    /* Match Mesa driver setup */
+    if (IS_G4X(pI830))
+	OUT_BATCH(NEW_PIPELINE_SELECT | PIPELINE_SELECT_3D);
+    else
+	OUT_BATCH(BRW_PIPELINE_SELECT | PIPELINE_SELECT_3D);
+
+    /* Mesa does this. Who knows... */
+    OUT_BATCH(BRW_CS_URB_STATE | 0);
+    OUT_BATCH((0 << 4) |	/* URB Entry Allocation Size */
+	      (0 << 0));	/* Number of URB Entries */
+
+    /* Zero out the two base address registers so all offsets are
+     * absolute
+     */
+    OUT_BATCH(BRW_STATE_BASE_ADDRESS | 4);
+    OUT_BATCH(0 | BASE_ADDRESS_MODIFY);  /* Generate state base address */
+    OUT_BATCH(0 | BASE_ADDRESS_MODIFY);  /* Surface state base address */
+    OUT_BATCH(0 | BASE_ADDRESS_MODIFY);  /* media base addr, don't care */
+    /* general state max addr, disabled */
+    OUT_BATCH(0x10000000 | BASE_ADDRESS_MODIFY);
+    /* media object state max addr, disabled */
+    OUT_BATCH(0x10000000 | BASE_ADDRESS_MODIFY);
+
+    /* Set system instruction pointer */
+    OUT_BATCH(BRW_STATE_SIP | 0);
+    /* system instruction pointer */
+    OUT_RELOC(pI830->video.gen4_sip_kernel_bo,
+	      I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+
+    OUT_BATCH(MI_NOOP);
+    ADVANCE_BATCH();
+
+    /* brw_debug (pScrn, "after base address modify"); */
+
+    BEGIN_BATCH(38);
+    /* Enable VF statistics */
+    OUT_BATCH(BRW_3DSTATE_VF_STATISTICS | 1);
+
+    /* Pipe control */
+    OUT_BATCH(BRW_PIPE_CONTROL |
+	      BRW_PIPE_CONTROL_NOWRITE |
+	      BRW_PIPE_CONTROL_IS_FLUSH |
+	      2);
+    OUT_BATCH(0);			/* Destination address */
+    OUT_BATCH(0);			/* Immediate data low DW */
+    OUT_BATCH(0);			/* Immediate data high DW */
+
+    /* Binding table pointers */
+    OUT_BATCH(BRW_3DSTATE_BINDING_TABLE_POINTERS | 4);
+    OUT_BATCH(0); /* vs */
+    OUT_BATCH(0); /* gs */
+    OUT_BATCH(0); /* clip */
+    OUT_BATCH(0); /* sf */
+    /* Only the PS uses the binding table */
+    OUT_RELOC(bind_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+    drm_intel_bo_unreference(bind_bo);
+
+    /* Blend constant color (magenta is fun) */
+    OUT_BATCH(BRW_3DSTATE_CONSTANT_COLOR | 3);
+    OUT_BATCH(float_to_uint (1.0));
+    OUT_BATCH(float_to_uint (0.0));
+    OUT_BATCH(float_to_uint (1.0));
+    OUT_BATCH(float_to_uint (1.0));
+
+    /* The drawing rectangle clipping is always on.  Set it to values that
+     * shouldn't do any clipping.
+     */
+    OUT_BATCH(BRW_3DSTATE_DRAWING_RECTANGLE | 2); /* XXX 3 for BLC or CTG */
+    OUT_BATCH(0x00000000);			/* ymin, xmin */
+    OUT_BATCH((pScrn->virtualX - 1) |
+	      (pScrn->virtualY - 1) << 16);	/* ymax, xmax */
+    OUT_BATCH(0x00000000);			/* yorigin, xorigin */
+
+    /* skip the depth buffer */
+    /* skip the polygon stipple */
+    /* skip the polygon stipple offset */
+    /* skip the line stipple */
+
+    /* Set the pointers to the 3d pipeline state */
+    OUT_BATCH(BRW_3DSTATE_PIPELINED_POINTERS | 5);
+    OUT_RELOC(pI830->video.gen4_vs_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+    /* disable GS, resulting in passthrough */
+    OUT_BATCH(BRW_GS_DISABLE);
+    /* disable CLIP, resulting in passthrough */
+    OUT_BATCH(BRW_CLIP_DISABLE);
+    OUT_RELOC(pI830->video.gen4_sf_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+    if (n_src_surf == 1)
+	OUT_RELOC(pI830->video.gen4_wm_packed_bo,
+		  I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+    else
+	OUT_RELOC(pI830->video.gen4_wm_planar_bo,
+		  I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+    OUT_RELOC(pI830->video.gen4_cc_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+
+    /* URB fence */
+    OUT_BATCH(BRW_URB_FENCE |
+	      UF0_CS_REALLOC |
+	      UF0_SF_REALLOC |
+	      UF0_CLIP_REALLOC |
+	      UF0_GS_REALLOC |
+	      UF0_VS_REALLOC |
+	      1);
+    OUT_BATCH(((urb_clip_start + urb_clip_size) << UF1_CLIP_FENCE_SHIFT) |
+	      ((urb_gs_start + urb_gs_size) << UF1_GS_FENCE_SHIFT) |
+	      ((urb_vs_start + urb_vs_size) << UF1_VS_FENCE_SHIFT));
+    OUT_BATCH(((urb_cs_start + urb_cs_size) << UF2_CS_FENCE_SHIFT) |
+	      ((urb_sf_start + urb_sf_size) << UF2_SF_FENCE_SHIFT));
+
+    /* Constant buffer state */
+    OUT_BATCH(BRW_CS_URB_STATE | 0);
+    OUT_BATCH(((URB_CS_ENTRY_SIZE - 1) << 4) |
+	      (URB_CS_ENTRIES << 0));
+
+    /* Set up our vertex elements, sourced from the single vertex buffer. */
+    OUT_BATCH(BRW_3DSTATE_VERTEX_ELEMENTS | 3);
+    /* offset 0: X,Y -> {X, Y, 1.0, 1.0} */
+    OUT_BATCH((0 << VE0_VERTEX_BUFFER_INDEX_SHIFT) |
+	      VE0_VALID |
+	      (BRW_SURFACEFORMAT_R32G32_FLOAT << VE0_FORMAT_SHIFT) |
+	      (0 << VE0_OFFSET_SHIFT));
+    OUT_BATCH((BRW_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_0_SHIFT) |
+	      (BRW_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_1_SHIFT) |
+	      (BRW_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_2_SHIFT) |
+	      (BRW_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_3_SHIFT) |
+	      (0 << VE1_DESTINATION_ELEMENT_OFFSET_SHIFT));
+    /* offset 8: S0, T0 -> {S0, T0, 1.0, 1.0} */
+    OUT_BATCH((0 << VE0_VERTEX_BUFFER_INDEX_SHIFT) |
+	      VE0_VALID |
+	      (BRW_SURFACEFORMAT_R32G32_FLOAT << VE0_FORMAT_SHIFT) |
+	      (8 << VE0_OFFSET_SHIFT));
+    OUT_BATCH((BRW_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_0_SHIFT) |
+	      (BRW_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_1_SHIFT) |
+	      (BRW_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_2_SHIFT) |
+	      (BRW_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_3_SHIFT) |
+	      (4 << VE1_DESTINATION_ELEMENT_OFFSET_SHIFT));
+
+    OUT_BATCH(MI_NOOP);			/* pad to quadword */
+    ADVANCE_BATCH();
+}
+
 void
 I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 			 RegionPtr dstRegion,
@@ -726,11 +899,6 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
     I830Ptr pI830 = I830PTR(pScrn);
     BoxPtr pbox;
     int nbox, dxo, dyo, pix_xoff, pix_yoff;
-    int urb_vs_start, urb_vs_size;
-    int urb_gs_start, urb_gs_size;
-    int urb_clip_start, urb_clip_size;
-    int urb_sf_start, urb_sf_size;
-    int urb_cs_start, urb_cs_size;
     float src_scale_x, src_scale_y;
     int src_surf, i;
     int n_src_surf;
@@ -798,25 +966,11 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 	return;
     }    
 
-    IntelEmitInvarientState(pScrn);
-    *pI830->last_3d = LAST_3D_VIDEO;
-
 #if 0
     ErrorF("dst surf:      0x%08x\n", state_base_offset + dest_surf_offset);
     ErrorF("src surf:      0x%08x\n", state_base_offset + src_surf_offset);
 #endif
 
-    urb_vs_start = 0;
-    urb_vs_size = URB_VS_ENTRIES * URB_VS_ENTRY_SIZE;
-    urb_gs_start = urb_vs_start + urb_vs_size;
-    urb_gs_size = URB_GS_ENTRIES * URB_GS_ENTRY_SIZE;
-    urb_clip_start = urb_gs_start + urb_gs_size;
-    urb_clip_size = URB_CLIP_ENTRIES * URB_CLIP_ENTRY_SIZE;
-    urb_sf_start = urb_clip_start + urb_clip_size;
-    urb_sf_size = URB_SF_ENTRIES * URB_SF_ENTRY_SIZE;
-    urb_cs_start = urb_sf_start + urb_sf_size;
-    urb_cs_size = URB_CS_ENTRIES * URB_CS_ENTRY_SIZE;
-
     /* We'll be poking the state buffers that could be in use by the 3d
      * hardware here, but we should have synced the 3D engine already in
      * I830PutImage.
@@ -903,159 +1057,7 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 	}
     }
 
-    {
-	BEGIN_BATCH(2);
-	OUT_BATCH(MI_FLUSH |
-		  MI_STATE_INSTRUCTION_CACHE_FLUSH |
-		  BRW_MI_GLOBAL_SNAPSHOT_RESET);
-	OUT_BATCH(MI_NOOP);
-	ADVANCE_BATCH();
-    }
-
-    /* brw_debug (pScrn, "before base address modify"); */
-    {
-	BEGIN_BATCH(12);
-	/* Match Mesa driver setup */
-	if (IS_G4X(pI830))
-	    OUT_BATCH(NEW_PIPELINE_SELECT | PIPELINE_SELECT_3D);
-	else
-	    OUT_BATCH(BRW_PIPELINE_SELECT | PIPELINE_SELECT_3D);
-
-	/* Mesa does this. Who knows... */
-	OUT_BATCH(BRW_CS_URB_STATE | 0);
-	OUT_BATCH((0 << 4) |	/* URB Entry Allocation Size */
-		  (0 << 0));	/* Number of URB Entries */
-
-	/* Zero out the two base address registers so all offsets are
-	 * absolute
-	 */
-	OUT_BATCH(BRW_STATE_BASE_ADDRESS | 4);
-	OUT_BATCH(0 | BASE_ADDRESS_MODIFY);  /* Generate state base address */
-	OUT_BATCH(0 | BASE_ADDRESS_MODIFY);  /* Surface state base address */
-	OUT_BATCH(0 | BASE_ADDRESS_MODIFY);  /* media base addr, don't care */
-	/* general state max addr, disabled */
-	OUT_BATCH(0x10000000 | BASE_ADDRESS_MODIFY);
-	/* media object state max addr, disabled */
-	OUT_BATCH(0x10000000 | BASE_ADDRESS_MODIFY);
-
-	/* Set system instruction pointer */
-	OUT_BATCH(BRW_STATE_SIP | 0);
-	/* system instruction pointer */
-	OUT_RELOC(pI830->video.gen4_sip_kernel_bo,
-		  I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
-
-	OUT_BATCH(MI_NOOP);
-	ADVANCE_BATCH();
-    }
-
-    /* brw_debug (pScrn, "after base address modify"); */
-
-    {
-       BEGIN_BATCH(38);
-       /* Enable VF statistics */
-       OUT_BATCH(BRW_3DSTATE_VF_STATISTICS | 1);
-
-       /* Pipe control */
-       OUT_BATCH(BRW_PIPE_CONTROL |
-		 BRW_PIPE_CONTROL_NOWRITE |
-		 BRW_PIPE_CONTROL_IS_FLUSH |
-		 2);
-       OUT_BATCH(0);			/* Destination address */
-       OUT_BATCH(0);			/* Immediate data low DW */
-       OUT_BATCH(0);			/* Immediate data high DW */
-
-       /* Binding table pointers */
-       OUT_BATCH(BRW_3DSTATE_BINDING_TABLE_POINTERS | 4);
-       OUT_BATCH(0); /* vs */
-       OUT_BATCH(0); /* gs */
-       OUT_BATCH(0); /* clip */
-       OUT_BATCH(0); /* sf */
-       /* Only the PS uses the binding table */
-       OUT_RELOC(bind_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
-       drm_intel_bo_unreference(bind_bo);
-
-       /* Blend constant color (magenta is fun) */
-       OUT_BATCH(BRW_3DSTATE_CONSTANT_COLOR | 3);
-       OUT_BATCH(float_to_uint (1.0));
-       OUT_BATCH(float_to_uint (0.0));
-       OUT_BATCH(float_to_uint (1.0));
-       OUT_BATCH(float_to_uint (1.0));
-
-       /* The drawing rectangle clipping is always on.  Set it to values that
-	* shouldn't do any clipping.
-	*/
-       OUT_BATCH(BRW_3DSTATE_DRAWING_RECTANGLE | 2); /* XXX 3 for BLC or CTG */
-       OUT_BATCH(0x00000000);			/* ymin, xmin */
-       OUT_BATCH((pScrn->virtualX - 1) |
-		 (pScrn->virtualY - 1) << 16);	/* ymax, xmax */
-       OUT_BATCH(0x00000000);			/* yorigin, xorigin */
-
-       /* skip the depth buffer */
-       /* skip the polygon stipple */
-       /* skip the polygon stipple offset */
-       /* skip the line stipple */
-
-       /* Set the pointers to the 3d pipeline state */
-       OUT_BATCH(BRW_3DSTATE_PIPELINED_POINTERS | 5);
-       OUT_RELOC(pI830->video.gen4_vs_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
-       /* disable GS, resulting in passthrough */
-       OUT_BATCH(BRW_GS_DISABLE);
-       /* disable CLIP, resulting in passthrough */
-       OUT_BATCH(BRW_CLIP_DISABLE);
-       OUT_RELOC(pI830->video.gen4_sf_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
-       if (n_src_surf == 1)
-	   OUT_RELOC(pI830->video.gen4_wm_packed_bo,
-		     I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
-       else
-	   OUT_RELOC(pI830->video.gen4_wm_planar_bo,
-		     I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
-       OUT_RELOC(pI830->video.gen4_cc_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
-
-       /* URB fence */
-       OUT_BATCH(BRW_URB_FENCE |
-		 UF0_CS_REALLOC |
-		 UF0_SF_REALLOC |
-		 UF0_CLIP_REALLOC |
-		 UF0_GS_REALLOC |
-		 UF0_VS_REALLOC |
-		 1);
-       OUT_BATCH(((urb_clip_start + urb_clip_size) << UF1_CLIP_FENCE_SHIFT) |
-		 ((urb_gs_start + urb_gs_size) << UF1_GS_FENCE_SHIFT) |
-		 ((urb_vs_start + urb_vs_size) << UF1_VS_FENCE_SHIFT));
-       OUT_BATCH(((urb_cs_start + urb_cs_size) << UF2_CS_FENCE_SHIFT) |
-		 ((urb_sf_start + urb_sf_size) << UF2_SF_FENCE_SHIFT));
-
-       /* Constant buffer state */
-       OUT_BATCH(BRW_CS_URB_STATE | 0);
-       OUT_BATCH(((URB_CS_ENTRY_SIZE - 1) << 4) |
-		 (URB_CS_ENTRIES << 0));
-
-       /* Set up our vertex elements, sourced from the single vertex buffer. */
-       OUT_BATCH(BRW_3DSTATE_VERTEX_ELEMENTS | 3);
-       /* offset 0: X,Y -> {X, Y, 1.0, 1.0} */
-       OUT_BATCH((0 << VE0_VERTEX_BUFFER_INDEX_SHIFT) |
-		 VE0_VALID |
-		 (BRW_SURFACEFORMAT_R32G32_FLOAT << VE0_FORMAT_SHIFT) |
-		 (0 << VE0_OFFSET_SHIFT));
-       OUT_BATCH((BRW_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_0_SHIFT) |
-		 (BRW_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_1_SHIFT) |
-		 (BRW_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_2_SHIFT) |
-		 (BRW_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_3_SHIFT) |
-		 (0 << VE1_DESTINATION_ELEMENT_OFFSET_SHIFT));
-       /* offset 8: S0, T0 -> {S0, T0, 1.0, 1.0} */
-       OUT_BATCH((0 << VE0_VERTEX_BUFFER_INDEX_SHIFT) |
-		 VE0_VALID |
-		 (BRW_SURFACEFORMAT_R32G32_FLOAT << VE0_FORMAT_SHIFT) |
-		 (8 << VE0_OFFSET_SHIFT));
-       OUT_BATCH((BRW_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_0_SHIFT) |
-		 (BRW_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_1_SHIFT) |
-		 (BRW_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_2_SHIFT) |
-		 (BRW_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_3_SHIFT) |
-		 (4 << VE1_DESTINATION_ELEMENT_OFFSET_SHIFT));
-
-       OUT_BATCH(MI_NOOP);			/* pad to quadword */
-       ADVANCE_BATCH();
-    }
+    i965_emit_video_setup(pScrn, bind_bo, n_src_surf);
 
    /* Set up the offset for translating from the given region (in screen
     * coordinates) to the backing pixmap.
commit c7db3201106f07f3228c989014d6db5ace5378f6
Author: Owain G. Ainsworth <oga at openbsd.org>
Date:   Tue Jan 13 18:46:41 2009 +0000

    Remove the pageflipping infrastructure.
    
    It was broken on current kernels, and deprecated anyway.

diff --git a/configure.ac b/configure.ac
index 6c4ba57..38d373e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,8 +105,6 @@ if test x$DRI != xno; then
                       [have_sarea_h="yes"], [have_sarea_h="no"])
         AC_CHECK_FILE([${sdkdir}/dristruct.h],
                       [have_dristruct_h="yes"], [have_dristruct_h="no"])
-	AC_CHECK_FILE([${sdkdir}/damage.h],
-                      [have_damage_h="yes"], [have_damage_h="no"])
 fi
 AC_MSG_CHECKING([whether to include DRI support])
 if test x$DRI = xauto; then
@@ -215,9 +213,6 @@ if test "$DRI" = yes; then
         PKG_CHECK_MODULES(DRI, [xf86driproto glproto])
         AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
         AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
-	if test "$have_damage_h" = yes; then
-		AC_DEFINE(DAMAGE,1,[Use Damage extension])
-	fi
 fi
 
 dnl exaGetPixmapDriverPrivate required for DRM_MODE.
diff --git a/man/intel.man b/man/intel.man
index 2359624..65d1114 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -150,13 +150,6 @@ pool.  On systems with a working GEM environment, this can be disabled to
 increase the memory pool available to other graphics tasks.
 Default for i830 and newer: Enabled.
 Default for i810: this option is not used.
-.BI "Option \*qPageFlip\*q \*q" boolean \*q
-Enable support for page flipping. This should improve 3D performance at the
-potential cost of worse performance with mixed 2D/3D. Also note that this gives
-no benefit without corresponding support in the Mesa 3D driver
-Default for i810: The option is not used.
-Default for i830 and above: Disabled (This option is currently unstable).
-.TP
 .BI "Option \*qAccelMethod\*q \*q" string \*q
 Choose acceleration architecture, either "XAA" or "EXA".  XAA is the old
 XFree86 based acceleration architecture.  EXA is a newer and simpler
diff --git a/src/i830.h b/src/i830.h
index 10f7bf6..b726dd6 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -72,9 +72,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "dri.h"
 #include "GL/glxint.h"
 #include "i830_dri.h"
-#ifdef DAMAGE
-#include "damage.h"
-#endif
 #include "drmmode_display.h"
 #endif
 #include "intel_bufmgr.h"
@@ -477,16 +474,11 @@ typedef struct _I830Rec {
    Bool can_resize;
 
    Bool want_vblank_interrupts;
-#ifdef DAMAGE
-   DamagePtr pDamage;
-   RegionRec driRegion;
-#endif
 #endif
 
    Bool need_mi_flush;
 
    Bool NeedRingBufferLow;
-   Bool allowPageFlip;
    Bool tiling;
    Bool fb_compression;
 
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 98df2ac..d6698da 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -111,14 +111,6 @@ static void I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
 
 static void I830DRITransitionTo2d(ScreenPtr pScreen);
 static void I830DRITransitionTo3d(ScreenPtr pScreen);
-#if defined(DAMAGE) && (DRIINFO_MAJOR_VERSION > 5 ||		\
-			(DRIINFO_MAJOR_VERSION == 5 && DRIINFO_MINOR_VERSION >= 1))
-#define DRI_SUPPORTS_CLIP_NOTIFY 1
-#else
-#define DRI_SUPPORTS_CLIP_NOTIFY 0
-static void I830DRITransitionMultiToSingle3d(ScreenPtr pScreen);
-static void I830DRITransitionSingleToMulti3d(ScreenPtr pScreen);
-#endif
 
 #if (DRIINFO_MAJOR_VERSION > 5 || \
      (DRIINFO_MAJOR_VERSION == 5 && DRIINFO_MINOR_VERSION >= 4))
@@ -127,10 +119,6 @@ static void I830DRITransitionSingleToMulti3d(ScreenPtr pScreen);
 #define DRI_DRIVER_FRAMEBUFFER_MAP 0
 #endif
 
-#if DRI_SUPPORTS_CLIP_NOTIFY
-static void I830DRIClipNotify(ScreenPtr pScreen, WindowPtr *ppWin, int num);
-#endif
-
 extern void GlxSetVisualConfigs(int nconfigs,
 				__GLXvisualConfig * configs,
 				void **configprivs);
@@ -599,10 +587,6 @@ I830DRIScreenInit(ScreenPtr pScreen)
 	 pDRIInfo->texOffsetStart = I830TexOffsetStart;
 #endif
 
-#if DRI_SUPPORTS_CLIP_NOTIFY
-      pDRIInfo->ClipNotify = I830DRIClipNotify;
-#endif
-
 #if DRI_DRIVER_FRAMEBUFFER_MAP
    /* DRI version is high enough that we can get the DRI code to not
     * try to manage the framebuffer.
@@ -622,11 +606,6 @@ I830DRIScreenInit(ScreenPtr pScreen)
    pDRIInfo->TransitionTo2d = I830DRITransitionTo2d;
    pDRIInfo->TransitionTo3d = I830DRITransitionTo3d;
 
-#if !DRI_SUPPORTS_CLIP_NOTIFY
-   pDRIInfo->TransitionSingleToMulti3D = I830DRITransitionSingleToMulti3d;
-   pDRIInfo->TransitionMultiToSingle3D = I830DRITransitionMultiToSingle3d;
-#endif
-
    /* do driver-independent DRI screen initialization here */
    if (!DRIScreenInit(pScreen, pDRIInfo, &pI830->drmSubFD)) {
       xf86DrvMsg(pScreen->myNum, X_ERROR,
@@ -729,14 +708,6 @@ I830DRIScreenInit(ScreenPtr pScreen)
 	    return FALSE;
 	 }
 	 pI830->drmMinor = version->version_minor;
-#ifdef DAMAGE
-	 if (pI830->allowPageFlip && pI830->drmMinor < 9) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		       "DRM version 1.9 or newer required for Page flipping. "
-		       "Disabling.\n");
-	    pI830->allowPageFlip = FALSE;
-	 }
-#endif	 
 	 drmFreeVersion(version);
       }
    }
@@ -965,10 +936,6 @@ I830DRICloseScreen(ScreenPtr pScreen)
 
    DPRINTF(PFX, "I830DRICloseScreen\n");
 
-#ifdef DAMAGE
-   REGION_UNINIT(pScreen, &pI830->driRegion);
-#endif
-
    if (!pI830->memory_manager && pI830DRI->irq) {
        drmCtlUninstHandler(pI830->drmSubFD);
        pI830DRI->irq = 0;
@@ -1022,66 +989,6 @@ I830DRIFinishScreenInit(ScreenPtr pScreen)
    return TRUE;
 }
 
-#ifdef DAMAGE
-/* This should be done *before* XAA syncs,
- * Otherwise will have to sync again???
- */
-static void
-I830DRIDoRefreshArea (ScrnInfoPtr pScrn, int num, BoxPtr pbox, uint32_t dst)
-{
-   I830Ptr pI830 = I830PTR(pScrn);
-   unsigned int i, cmd, pitch, flags;
-
-   pitch = pScrn->displayWidth * pI830->cpp;
-   flags = 0xcc << 16; /* ROP_S */
-
-   if (pScrn->bitsPerPixel == 32) {
-      cmd = (XY_SRC_COPY_BLT_CMD | XY_SRC_COPY_BLT_WRITE_ALPHA |
-	     XY_SRC_COPY_BLT_WRITE_RGB);
-      flags |= 3 << 24;
-   } else {
-      cmd = (XY_SRC_COPY_BLT_CMD);
-      flags |= 1 << 24;
-   }
-
-   /* We can assume tiled buffers if page flipping is on */
-   if (IS_I965G(pI830)) {
-       cmd |= XY_SRC_COPY_BLT_DST_TILED | XY_SRC_COPY_BLT_SRC_TILED;
-       pitch >>= 2;
-   }
-
-   for (i = 0 ; i < num ; i++, pbox++) {
-      BEGIN_BATCH(8);
-      OUT_BATCH(cmd);
-      OUT_BATCH(flags | pitch);
-      OUT_BATCH((pbox->y1 << 16) | pbox->x1);
-      OUT_BATCH((pbox->y2 << 16) | pbox->x2);
-      OUT_BATCH(dst);
-      OUT_BATCH((pbox->y1 << 16) | pbox->x1);
-      OUT_BATCH(pitch);
-      OUT_BATCH(pI830->front_buffer->offset);
-      ADVANCE_BATCH();
-   }
-}
-
-static void
-I830DRIRefreshArea (ScrnInfoPtr pScrn, int num, BoxPtr pbox)
-{
-   I830Ptr pI830 = I830PTR(pScrn);
-   drmI830Sarea *pSAREAPriv = DRIGetSAREAPrivate(pScrn->pScreen);
-
-   /* Don't want to do this when no 3d is active and pages are
-    * right-way-round :
-    */
-   if (!pSAREAPriv->pf_active && pSAREAPriv->pf_current_page == 0)
-      return;
-
-   I830DRIDoRefreshArea(pScrn, num, pbox, pI830->back_buffer->offset);
-
-   DamageEmpty(pI830->pDamage);
-}
-#endif
-
 static void
 I830DRISwapContext(ScreenPtr pScreen, DRISyncType syncType,
 		   DRIContextType oldContextType, void *oldContext,
@@ -1104,86 +1011,14 @@ I830DRISwapContext(ScreenPtr pScreen, DRISyncType syncType,
       if (!pI830->memory_manager)
 	  i830_refresh_ring(pScrn);
 
-#ifdef DAMAGE
-      if (!pI830->pDamage && pI830->allowPageFlip) {
-	 PixmapPtr pPix  = pScreen->GetScreenPixmap(pScreen);
-	 pI830->pDamage = DamageCreate(NULL, NULL, DamageReportNone, TRUE,
-				       pScreen, pPix);
-
-	 if (pI830->pDamage == NULL) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                       "No screen damage record, page flipping disabled\n");
-            pI830->allowPageFlip = FALSE;
-	 } else {
-	    DamageRegister(&pPix->drawable, pI830->pDamage);
-
-	    DamageDamageRegion(&pPix->drawable,
-			       &WindowTable[pScreen->myNum]->winSize);
-
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                       "Damage tracking initialized for page flipping\n");
-	 }
-    }
-#endif
    } else if (syncType == DRI_2D_SYNC &&
 	      oldContextType == DRI_NO_CONTEXT &&
 	      newContextType == DRI_2D_CONTEXT) {
-#ifdef DAMAGE
-      drmI830Sarea *sPriv = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
-#endif
-
       if (I810_DEBUG & DEBUG_VERBOSE_DRI)
 	 ErrorF("i830DRISwapContext (out)\n");
 
       if (!pScrn->vtSema)
      	 return;
-
-#ifdef DAMAGE
-      if (pI830->pDamage) {
-	 RegionPtr pDamageReg = DamageRegion(pI830->pDamage);
-
-	 if (pDamageReg) {
-	    RegionRec region;
-	    int nrects;
-
-	    REGION_NULL(pScreen, &region);
-	    REGION_SUBTRACT(pScreen, &region, pDamageReg, &pI830->driRegion);
-
-	    if ((nrects = REGION_NUM_RECTS(&region)))
-	       I830DRIRefreshArea(pScrn, nrects, REGION_RECTS(&region));
-
-	    REGION_UNINIT(pScreen, &region);
-	 }
-      }
-#endif
-
-#ifdef DAMAGE
-      /* Try flipping back to the front page if necessary */
-      if (sPriv && !sPriv->pf_enabled && sPriv->pf_current_page != 0) {
-	 drm_i915_flip_t flip = { .pipes = 0 };
-
-	 if (sPriv->pf_current_page & (0x3 << 2)) {
-	    sPriv->pf_current_page = sPriv->pf_current_page & 0x3;
-	    sPriv->pf_current_page |= 1 << 2;
-
-	    flip.pipes |= 0x2;
-	 }
-
-	 if (sPriv->pf_current_page & 0x3) {
-	    sPriv->pf_current_page = sPriv->pf_current_page & (0x3 << 2);
-	    sPriv->pf_current_page |= 1;
-
-	    flip.pipes |= 0x1;
-	 }
-
-	 drmCommandWrite(pI830->drmSubFD, DRM_I915_FLIP, &flip, sizeof(flip));
-
-	 if (sPriv->pf_current_page != 0)
-	    xf86DrvMsg(pScreen->myNum, X_WARNING,
-		       "[dri] %s: kernel failed to unflip buffers.\n", __func__);
-      }
-#endif
-
       pI830->LockHeld = 0;
    } else if (I810_DEBUG & DEBUG_VERBOSE_DRI)
       ErrorF("i830DRISwapContext (other)\n");
@@ -1402,70 +1237,12 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
    i830MarkSync(pScrn);
 }
 
-/* Use callbacks from dri.c to support pageflipping mode for a single
- * 3d context without need for any specific full-screen extension.
- *
- * Also see tdfx driver for example of using these callbacks to
- * allocate and free 3d-specific memory on demand.
- */
-
-/* Use the miext/shadow module to maintain a list of dirty rectangles.
- * These are blitted to the back buffer to keep both buffers clean
- * during page-flipping when the 3d application isn't fullscreen.
- *
- * Unlike most use of the shadow code, both buffers are in video
- * memory.
- *
- * An alternative to this would be to organize for all on-screen
- * drawing operations to be duplicated for the two buffers.  That
- * might be faster, but seems like a lot more work...
- */
-
-static void
-I830DRISetPfMask(ScreenPtr pScreen, int pfMask)
-{
-   ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-   I830Ptr pI830 = I830PTR(pScrn);
-   drmI830Sarea *pSAREAPriv = DRIGetSAREAPrivate(pScreen);
-
-   if (pI830->allowPageFlip && pfMask) {
-      pSAREAPriv->pf_enabled = pI830->allowPageFlip;
-      pSAREAPriv->pf_active = pfMask;
-   } else
-      pSAREAPriv->pf_active = 0;
-}
-
-#if !DRI_SUPPORTS_CLIP_NOTIFY
-static void
-I830DRITransitionSingleToMulti3d(ScreenPtr pScreen)
-{
-   /* Tell the clients not to pageflip.  How?
-    *   -- Field in sarea, plus bumping the window counters.
-    *   -- DRM needs to cope with Front-to-Back swapbuffers.
-    */
-   I830DRISetPfMask(pScreen, 0);
-}
-
-static void
-I830DRITransitionMultiToSingle3d(ScreenPtr pScreen)
-{
-   ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-   I830Ptr pI830 = I830PTR(pScrn);
-
-   /* Let the remaining 3d app start page flipping again.
-    */
-   I830DRISetPfMask(pScreen, pI830->allowPageFlip ? 0x3 : 0);
-}
-#endif /* !DRI_SUPPORTS_CLIP_NOTIFY */
-
 static void
 I830DRITransitionTo3d(ScreenPtr pScreen)
 {
    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
    I830Ptr pI830 = I830PTR(pScrn);
 
-   I830DRISetPfMask(pScreen, pI830->allowPageFlip ? 0x3 : 0);
-
    pI830->want_vblank_interrupts = TRUE;
    I830DRISetVBlankInterrupt(pScrn, TRUE);
 }
@@ -1477,65 +1254,10 @@ I830DRITransitionTo2d(ScreenPtr pScreen)
    I830Ptr pI830 = I830PTR(pScrn);
    drmI830Sarea *sPriv = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
 
-   I830DRISetPfMask(pScreen, 0);
-
-   sPriv->pf_enabled = 0;
-
    pI830->want_vblank_interrupts = FALSE;
    I830DRISetVBlankInterrupt(pScrn, FALSE);
 }
 
-#if DRI_SUPPORTS_CLIP_NOTIFY
-static void
-I830DRIClipNotify(ScreenPtr pScreen, WindowPtr *ppWin, int num)
-{
-   ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-   I830Ptr pI830 = I830PTR(pScrn);
-   unsigned pfMask = 0;
-
-   REGION_UNINIT(pScreen, &pI830->driRegion);
-   REGION_NULL(pScreen, &pI830->driRegion);
-
-   if (num > 0) {
-      drmI830Sarea *sPriv = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
-      BoxRec crtcBox[2];
-      unsigned numvisible[2] = { 0, 0 };
-      int i, j;
-
-      crtcBox[0].x1 = sPriv->pipeA_x;
-      crtcBox[0].y1 = sPriv->pipeA_y;
-      crtcBox[0].x2 = crtcBox[0].x1 + sPriv->pipeA_w;
-      crtcBox[0].y2 = crtcBox[0].y1 + sPriv->pipeA_h;
-      crtcBox[1].x1 = sPriv->pipeB_x;
-      crtcBox[1].y1 = sPriv->pipeB_y;
-      crtcBox[1].x2 = crtcBox[1].x1 + sPriv->pipeB_w;
-      crtcBox[1].y2 = crtcBox[1].y1 + sPriv->pipeB_h;
-
-      for (i = 0; i < 2; i++) {
-	 for (j = 0; j < num; j++) {
-	    WindowPtr pWin = ppWin[j];
-
-	    if (pWin) {
-	       if (RECT_IN_REGION(pScreen, &pWin->clipList, &crtcBox[i]) !=
-		   rgnOUT)
-		  numvisible[i]++;
-
-	       if (i == 0)
-		  REGION_UNION(pScreen, &pI830->driRegion, &pWin->clipList,
-			       &pI830->driRegion);
-	    }
-	 }
-
-	 if (numvisible[i] == 1)
-	    pfMask |= 1 << i;
-      }
-   } else
-      REGION_NULL(pScreen, &pI830->driRegion);
-
-   I830DRISetPfMask(pScreen, pfMask);
-}
-#endif /* DRI_SUPPORTS_CLIP_NOTIFY */
-
 static int
 i830_name_buffer (ScrnInfoPtr pScrn, i830_memory *mem)
 {
diff --git a/src/i830_driver.c b/src/i830_driver.c
index b5e77c7..7b66a53 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -323,7 +323,6 @@ static OptionInfoRec I830Options[] = {
    {OPTION_SW_CURSOR,	"SWcursor",	OPTV_BOOLEAN,	{0},	FALSE},
    {OPTION_CACHE_LINES,	"CacheLines",	OPTV_INTEGER,	{0},	FALSE},
    {OPTION_DRI,		"DRI",		OPTV_BOOLEAN,	{0},	TRUE},
-   {OPTION_PAGEFLIP,	"PageFlip",	OPTV_BOOLEAN,	{0},	FALSE},
    {OPTION_XVIDEO,	"XVideo",	OPTV_BOOLEAN,	{0},	TRUE},
    {OPTION_COLOR_KEY,	"ColorKey",	OPTV_INTEGER,	{0},	FALSE},
    {OPTION_VIDEO_KEY,	"VideoKey",	OPTV_INTEGER,	{0},	FALSE},
@@ -1794,24 +1793,6 @@ I830XvInit(ScrnInfoPtr pScrn)
 #endif
 }
 
-static void
-I830DriOptsInit(ScrnInfoPtr pScrn)
-{
-#ifdef XF86DRI
-    I830Ptr pI830 = I830PTR(pScrn);
-    MessageType from = X_PROBED;
-
-    pI830->allowPageFlip = FALSE;
-    from = (pI830->directRenderingType != DRI_DISABLED &&
-	    xf86GetOptValBool(pI830->Options, OPTION_PAGEFLIP,
-			      &pI830->allowPageFlip)) ? X_CONFIG : X_DEFAULT;
-
-    xf86DrvMsg(pScrn->scrnIndex, from, "Will%s try to enable page flipping\n",
-	       pI830->allowPageFlip ? "" : " not");
-
-#endif /* XF86DRI */
-}
-
 /**
  * This is called per zaphod head (so usually just once) to do initialization
  * before the Screen is created.
@@ -1965,8 +1946,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
 
    I830XvInit(pScrn);
 
-   I830DriOptsInit(pScrn);
-
    if (!xf86SetGamma(pScrn, zeros)) {
        PreInitCleanup(pScrn);
        return FALSE;
@@ -2879,11 +2858,6 @@ i830_memory_init(ScrnInfoPtr pScrn)
 
     /* If tiling fails we have to disable page flipping & FBC */
     pScrn->displayWidth = savedDisplayWidth;
-    if (pI830->allowPageFlip)
-	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		"Couldn't allocate tiled memory, page flipping "
-		"disabled\n");
-    pI830->allowPageFlip = FALSE;
     if (pI830->fb_compression)
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 		"Couldn't allocate tiled memory, fb compression "
@@ -3314,11 +3288,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
        I830SwapPipes(pScrn);
 #endif
 
-#ifdef XF86DRI
-   xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Page Flipping %sabled\n",
-	      pI830->allowPageFlip ? "en" : "dis");
-#endif
-
    if (I830IsPrimary(pScrn)) {
         pScrn->fbOffset = pI830->front_buffer->offset;
    } else {
@@ -3871,15 +3840,6 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
 #ifdef XF86DRI
    if (pI830->directRenderingOpen &&
        pI830->directRenderingType == DRI_XF86DRI) {
-#ifdef DAMAGE
-      if (pI830->pDamage) {
-	 PixmapPtr pPix = pScreen->GetScreenPixmap(pScreen);
-
-	 DamageUnregister(&pPix->drawable, pI830->pDamage);
-	 DamageDestroy(pI830->pDamage);
-	 pI830->pDamage = NULL;
-      }
-#endif
       pI830->directRenderingOpen = FALSE;
       I830DRICloseScreen(pScreen);
    }
commit c82adfd0169317efb6c2f9de0f315651f9adbae1
Author: Owain G. Ainsworth <oga at openbsd.org>
Date:   Tue Jan 13 17:09:00 2009 +0000

    Remove triple-buffering support
    
    It never worked with any upstream linux kernel, and is quite heavily
    deprecated. A new solution based around DRI2 will probably be
    forthcoming. Pageflipping itself is next.

diff --git a/man/intel.man b/man/intel.man
index 00aa1be..2359624 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -153,23 +153,10 @@ Default for i810: this option is not used.
 .BI "Option \*qPageFlip\*q \*q" boolean \*q
 Enable support for page flipping. This should improve 3D performance at the
 potential cost of worse performance with mixed 2D/3D. Also note that this gives
-no benefit without corresponding support in the Mesa 3D driver and may not give
-the full benefit without triple buffering (see
-.B "Option \*qTripleBuffer\*q"
-).
+no benefit without corresponding support in the Mesa 3D driver
 Default for i810: The option is not used.
 Default for i830 and above: Disabled (This option is currently unstable).
 .TP
-.BI "Option \*qTripleBuffer\*q \*q" boolean \*q
-Enable support for triple buffering. This should improve 3D performance at the
-potential cost of worse performance with mixed 2D/3D. Also note that this gives
-no benefit without corresponding support in the Mesa 3D driver and may not give
-any benefit without page flipping either (see
-.B "Option \*qPageFlip\*q"
-).
-Default for i810: The option is not used.
-Default for i830 and above: Disabled.
-.TP
 .BI "Option \*qAccelMethod\*q \*q" string \*q
 Choose acceleration architecture, either "XAA" or "EXA".  XAA is the old
 XFree86 based acceleration architecture.  EXA is a newer and simpler
diff --git a/src/i830.h b/src/i830.h
index fcf8884..10f7bf6 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -465,7 +465,6 @@ typedef struct _I830Rec {
 
 #ifdef XF86DRI
    i830_memory *back_buffer;
-   i830_memory *third_buffer;
    i830_memory *depth_buffer;
    i830_memory *textures;		/**< Compatibility texture memory */
    i830_memory *memory_manager;		/**< DRI memory manager aperture */
@@ -488,7 +487,6 @@ typedef struct _I830Rec {
 
    Bool NeedRingBufferLow;
    Bool allowPageFlip;
-   Bool TripleBuffer;
    Bool tiling;
    Bool fb_compression;
 
diff --git a/src/i830_accel.c b/src/i830_accel.c
index 5ee53bb..9155c92 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -255,11 +255,6 @@ I830SelectBuffer(ScrnInfoPtr pScrn, int buffer)
       if (pI830->back_buffer->tiling == TILE_YMAJOR)
 	 return FALSE;
       break;
-   case I830_SELECT_THIRD:
-      pI830->bufferOffset = pI830->third_buffer->offset;
-      if (pI830->third_buffer->tiling == TILE_YMAJOR)
-	 return FALSE;
-      break;
    case I830_SELECT_DEPTH:
       pI830->bufferOffset = pI830->depth_buffer->offset;
       if (pI830->depth_buffer->tiling == TILE_YMAJOR)
diff --git a/src/i830_dri.c b/src/i830_dri.c
index c4440ce..98df2ac 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -848,7 +848,6 @@ I830DRIDoMappings(ScreenPtr pScreen)
    /* init to zero to be safe */
    sarea->front_handle = 0;
    sarea->back_handle = 0;
-   sarea->third_handle = 0;
    sarea->depth_handle = 0;
    sarea->tex_handle = 0;
 
@@ -1079,10 +1078,6 @@ I830DRIRefreshArea (ScrnInfoPtr pScrn, int num, BoxPtr pbox)
 
    I830DRIDoRefreshArea(pScrn, num, pbox, pI830->back_buffer->offset);
 
-   if (pI830->third_buffer) {
-      I830DRIDoRefreshArea(pScrn, num, pbox, pI830->third_buffer->offset);
-   }
-
    DamageEmpty(pI830->pDamage);
 }
 #endif
@@ -1169,14 +1164,14 @@ I830DRISwapContext(ScreenPtr pScreen, DRISyncType syncType,
 
 	 if (sPriv->pf_current_page & (0x3 << 2)) {
 	    sPriv->pf_current_page = sPriv->pf_current_page & 0x3;
-	    sPriv->pf_current_page |= (sPriv->third_handle ? 2 : 1) << 2;
+	    sPriv->pf_current_page |= 1 << 2;
 
 	    flip.pipes |= 0x2;
 	 }
 
 	 if (sPriv->pf_current_page & 0x3) {
 	    sPriv->pf_current_page = sPriv->pf_current_page & (0x3 << 2);
-	    sPriv->pf_current_page |= sPriv->third_handle ? 2 : 1;
+	    sPriv->pf_current_page |= 1;
 
 	    flip.pipes |= 0x1;
 	 }
@@ -1208,8 +1203,6 @@ I830DRIInitBuffers(WindowPtr pWin, RegionPtr prgn, CARD32 index)
 
    first_buffer = I830_SELECT_BACK;
    last_buffer = I830_SELECT_DEPTH;
-   if (I830PTR(pScrn)->third_buffer)
-      last_buffer = I830_SELECT_THIRD;
 
    for (buffer = first_buffer; buffer <= last_buffer; buffer++) {
       pbox = REGION_RECTS(prgn);
@@ -1358,8 +1351,6 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
    I830EmitFlush(pScrn);
    first_buffer = I830_SELECT_BACK;
    last_buffer = I830_SELECT_DEPTH;
-   if (pI830->third_buffer)
-      last_buffer = I830_SELECT_THIRD;
 
    for (buffer = first_buffer; buffer <= last_buffer; buffer++) {
       if (!I830SelectBuffer(pScrn, buffer))
@@ -1591,10 +1582,6 @@ i830_update_sarea(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
 
    sarea->front_tiled = (pI830->front_buffer->tiling != TILE_NONE);
    sarea->back_tiled = (pI830->back_buffer->tiling != TILE_NONE);
-   if (pI830->third_buffer != NULL)
-       sarea->third_tiled = (pI830->third_buffer->tiling != TILE_NONE);
-   else
-       sarea->third_tiled = FALSE;
    sarea->depth_tiled = (pI830->depth_buffer->tiling != TILE_NONE);
    sarea->rotated_tiled = FALSE;
 
@@ -1602,7 +1589,6 @@ i830_update_sarea(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
 
    sarea->front_bo_handle = i830_name_buffer (pScrn, pI830->front_buffer);
    sarea->back_bo_handle = i830_name_buffer (pScrn, pI830->back_buffer);
-   sarea->third_bo_handle = i830_name_buffer (pScrn, pI830->third_buffer);
    sarea->depth_bo_handle = i830_name_buffer (pScrn, pI830->depth_buffer);
 
    /* The rotation is now handled entirely by the X Server, so just leave the
@@ -1695,17 +1681,9 @@ i830_update_dri_mappings(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
        return FALSE;
    }
 
-   if (pI830->third_buffer) {
-       if (!i830_do_addmap(pScrn, pI830->third_buffer, &sarea->third_handle,
-			   &sarea->third_size, &sarea->third_offset)) {
-	   xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Disabling DRI.\n");
-	   return FALSE;
-       }
-   } else {
-       sarea->third_handle = 0;
-       sarea->third_offset = 0;
-       sarea->third_size = 0;
-   }
+   sarea->third_handle = 0;
+   sarea->third_offset = 0;
+   sarea->third_size = 0;
 
    if (!i830_do_addmap(pScrn, pI830->depth_buffer, &sarea->depth_handle,
 		       &sarea->depth_size, &sarea->depth_offset)) {
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 411d79c..b5e77c7 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -336,7 +336,6 @@ static OptionInfoRec I830Options[] = {
    {OPTION_LEGACY3D,	"Legacy3D",     OPTV_BOOLEAN,	{0},	FALSE},
 #endif
    {OPTION_LVDSFIXEDMODE, "LVDSFixedMode", OPTV_BOOLEAN,	{0},	FALSE},
-   {OPTION_TRIPLEBUFFER, "TripleBuffer", OPTV_BOOLEAN,	{0},	FALSE},
    {OPTION_FORCEENABLEPIPEA, "ForceEnablePipeA", OPTV_BOOLEAN,	{0},	FALSE},
 #ifdef INTEL_XVMC
    {OPTION_XVMC,	"XvMC",		OPTV_BOOLEAN,	{0},	TRUE},
@@ -1810,13 +1809,6 @@ I830DriOptsInit(ScrnInfoPtr pScrn)
     xf86DrvMsg(pScrn->scrnIndex, from, "Will%s try to enable page flipping\n",
 	       pI830->allowPageFlip ? "" : " not");
 
-    pI830->TripleBuffer = FALSE;
-    from =  (pI830->directRenderingType != DRI_DISABLED &&
-	     xf86GetOptValBool(pI830->Options, OPTION_TRIPLEBUFFER,
-			       &pI830->TripleBuffer)) ? X_CONFIG : X_DEFAULT;
-
-    xf86DrvMsg(pScrn->scrnIndex, from, "Triple buffering %sabled\n",
-	       pI830->TripleBuffer ? "en" : "dis");
 #endif /* XF86DRI */
 }
 
diff --git a/src/i830_memory.c b/src/i830_memory.c
index b6d8026..ab4e5ce 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -351,7 +351,6 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
     pI830->power_context = NULL;
 #ifdef XF86DRI
     pI830->back_buffer = NULL;
-    pI830->third_buffer = NULL;
     pI830->depth_buffer = NULL;
     pI830->textures = NULL;
 #endif
@@ -367,8 +366,6 @@ i830_free_3d_memory(ScrnInfoPtr pScrn)
 #ifdef XF86DRI
     i830_free_memory(pScrn, pI830->back_buffer);
     pI830->back_buffer = NULL;
-    i830_free_memory(pScrn, pI830->third_buffer);
-    pI830->third_buffer = NULL;
     i830_free_memory(pScrn, pI830->depth_buffer);
     pI830->depth_buffer = NULL;
     i830_free_memory(pScrn, pI830->textures);
@@ -1753,14 +1750,6 @@ i830_allocate_3d_memory(ScrnInfoPtr pScrn)
     if (!i830_allocate_backbuffer(pScrn, &pI830->back_buffer, "back buffer"))
 	return FALSE;
 
-    if (pI830->TripleBuffer && !i830_allocate_backbuffer(pScrn,
-							 &pI830->third_buffer,
-							 "third buffer")) {
-       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		  "Failed to allocate third buffer, triple buffering "
-		  "inactive\n");
-    }
-
     if (!i830_allocate_depthbuffer(pScrn))
 	return FALSE;
 
diff --git a/src/i830_xaa.c b/src/i830_xaa.c
index e5e849d..7684978 100644
--- a/src/i830_xaa.c
+++ b/src/i830_xaa.c
@@ -292,12 +292,6 @@ I830CheckTiling(ScrnInfoPtr pScrn)
    {
        return TRUE;
    }
-   if (pI830->third_buffer != NULL &&
-       pI830->bufferOffset == pI830->third_buffer->offset &&
-       pI830->third_buffer->tiling != TILE_NONE)
-   {
-       return TRUE;
-   }
 #endif
 
    return FALSE;
commit ada44c1c0edcd3ea9e41ed6b6fdb2bf0e87c9c67
Author: Kshitij Kulshreshtha <kkhere.geo at gmail.com>
Date:   Tue Jan 20 11:35:36 2009 +0800

    Support sysfs backlight control for Sony laptops in xf86-video-intel
    
    The sony_laptop kernel module (since v2.6.23) supports backlight control
    via the sysfs interface:
    /sys/class/backlight/sony
    
    This patch will enable xf86-video-intel to use this backlight control method
    for Sony VAIO Laptops with Intel integrated video.

diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 7056504..7eac3c2 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -84,6 +84,7 @@ static char *backlight_interfaces[] = {
     "acpi_video1",
     "acpi_video0",
     "fujitsu-laptop",
+    "sony",
     NULL,
 };
 
commit d89de6d60a86105a198d904821853e6ed7de3305
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jan 16 16:59:17 2009 -0800

    Protect i915 textured video against batchbuffer wrapping.

diff --git a/src/i915_video.c b/src/i915_video.c
index 7761a45..b903b5e 100644
--- a/src/i915_video.c
+++ b/src/i915_video.c
@@ -49,8 +49,9 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 {
    I830Ptr pI830 = I830PTR(pScrn);
    uint32_t format, ms3, s5;
-   BoxPtr pbox;
-   int nbox, dxo, dyo, pix_xoff, pix_yoff;
+   BoxPtr pbox = REGION_RECTS(dstRegion);
+   int nbox = REGION_NUM_RECTS(dstRegion);
+   int dxo, dyo, pix_xoff, pix_yoff;
    Bool planar;
 
 #if 0
@@ -72,6 +73,8 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
       return;
    }
 
+   intel_batch_start_atomic(pScrn, 200 + 20 * nbox);
+
    IntelEmitInvarientState(pScrn);
    *pI830->last_3d = LAST_3D_VIDEO;
 
@@ -362,8 +365,6 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
    dxo = dstRegion->extents.x1;
    dyo = dstRegion->extents.y1;
 
-   pbox = REGION_RECTS(dstRegion);
-   nbox = REGION_NUM_RECTS(dstRegion);
    while (nbox--)
    {
       int box_x1 = pbox->x1;
@@ -412,6 +413,8 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
       ADVANCE_BATCH();
    }
 
+   intel_batch_end_atomic(pScrn);
+
    i830MarkSync(pScrn);
 }
 
commit 15780c53f5717936ea10ac87aff8a881c172f1dc
Author: Eric Anholt <eric at anholt.net>
Date:   Sat Jan 17 16:23:38 2009 -0800

    Fix i915 batch_start_atomic counting.

diff --git a/src/i915_render.c b/src/i915_render.c
index 8a2bc63..5dd97e6 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -542,7 +542,7 @@ i915_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
     ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
     I830Ptr pI830 = I830PTR(pScrn);
 
-    intel_batch_start_atomic(pScrn, 100);
+    intel_batch_start_atomic(pScrn, 150);
 
     if (pI830->i915_render_state.needs_emit)
 	i915_emit_composite_setup(pScrn);
commit fc46cb6403387215d13aa28d720f205688ae9d67
Author: Eric Anholt <eric at anholt.net>
Date:   Sat Jan 17 12:47:53 2009 -0800

    Fix libdrm version number requirement regression that got spammed in.

diff --git a/configure.ac b/configure.ac
index 877cc73..6c4ba57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,7 +209,7 @@ if test "x$GCC" = "xyes"; then
 	-Wnested-externs -fno-strict-aliasing"
 fi
 
-PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.0])
+PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.3])
 AM_CONDITIONAL(DRI, test x$DRI = xyes)
 if test "$DRI" = yes; then
         PKG_CHECK_MODULES(DRI, [xf86driproto glproto])
commit 1459f794e2a4b9032807c3794b00a33fa6392837
Author: Dave Airlie <airlied at redhat.com>
Date:   Sat Jan 17 22:14:26 2009 +1000

    intel: fix DRI2 should be DRI_DRI2

diff --git a/configure.ac b/configure.ac
index 6c4ba57..877cc73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,7 +209,7 @@ if test "x$GCC" = "xyes"; then
 	-Wnested-externs -fno-strict-aliasing"
 fi
 
-PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.3])
+PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.0])
 AM_CONDITIONAL(DRI, test x$DRI = xyes)
 if test "$DRI" = yes; then
         PKG_CHECK_MODULES(DRI, [xf86driproto glproto])
diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index 220dda7..671e8c8 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -121,7 +121,7 @@ intel_next_batch(ScrnInfoPtr pScrn)
     /* If we are using DRI2, we don't know when another client has executed,
      * so we have to reinitialize our 3D state per batch.
      */
-    if (pI830->directRenderingType == DRI2)
+    if (pI830->directRenderingType == DRI_DRI2)
 	*pI830->last_3d = LAST_3D_OTHER;
 }
 
commit db43b7870a37ea273941302096a6f00120dfae71
Author: Eric Anholt <eric at anholt.net>
Date:   Thu Jan 15 19:05:52 2009 -0800

    Re-emit i915 composite setup when the batchbuffer wraps.
    
    This also introduces tests to make sure that we asked for enough reserved space
    and that we don't allow wrapping at the wrong time.
    
    This fixes a hang during text rendering with DRI2 and a GL client running,
    but could potentially affect text rendering with GEM in general with an
    exceptional batchbuffer setup.

diff --git a/src/i830.h b/src/i830.h
index 25bf482..fcf8884 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -442,6 +442,10 @@ typedef struct _I830Rec {
    /** Number of bytes to be emitted in the current BEGIN_BATCH. */
    uint32_t batch_emitting;
    dri_bo *batch_bo;
+   /** Whether we're in a section of code that can't tolerate flushing */
+   Bool in_batch_atomic;
+   /** Ending batch_used that was verified by i830_start_batch_atomic() */
+   int batch_atomic_limit;
 
 #ifdef I830_XV
    /* For Xvideo */
@@ -591,6 +595,15 @@ typedef struct _I830Rec {
    uint32_t mapstate[6];
    uint32_t samplerstate[6];
 
+   struct {
+      int op;
+      PicturePtr pSrcPicture, pMaskPicture, pDstPicture;
+      PixmapPtr pSrc, pMask, pDst;
+      uint32_t dst_format;
+      Bool is_nearest;
+      Bool needs_emit;
+   } i915_render_state;
+
    /* 965 render acceleration state */
    struct gen4_render_state *gen4_render_state;
 
@@ -940,6 +953,9 @@ Bool i915_check_composite(int op, PicturePtr pSrc, PicturePtr pMask,
 Bool i915_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMask,
 			    PicturePtr pDst, PixmapPtr pSrcPixmap,
 			    PixmapPtr pMaskPixmap, PixmapPtr pDstPixmap);
+void i915_composite(PixmapPtr pDst, int srcX, int srcY,
+		    int maskX, int maskY, int dstX, int dstY, int w, int h);
+void i915_batch_flush_notify(ScrnInfoPtr pScrn);
 /* i965_render.c */
 unsigned int gen4_render_state_size(ScrnInfoPtr pScrn);
 void gen4_render_state_init(ScrnInfoPtr pScrn);
diff --git a/src/i830_batchbuffer.h b/src/i830_batchbuffer.h
index 0511493..a72786e 100644
--- a/src/i830_batchbuffer.h
+++ b/src/i830_batchbuffer.h
@@ -51,6 +51,28 @@ intel_batch_require_space(ScrnInfoPtr pScrn, I830Ptr pI830, GLuint sz)
 }
 
 static inline void
+intel_batch_start_atomic(ScrnInfoPtr pScrn, unsigned int sz)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+
+    assert(!pI830->in_batch_atomic);
+    intel_batch_require_space(pScrn, pI830, sz);
+
+    pI830->in_batch_atomic = TRUE;
+    pI830->batch_atomic_limit = pI830->batch_used + sz * 4;
+}
+
+static inline void
+intel_batch_end_atomic(ScrnInfoPtr pScrn)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+
+    assert(pI830->in_batch_atomic);
+    assert(pI830->batch_used <= pI830->batch_atomic_limit);
+    pI830->in_batch_atomic = FALSE;
+}
+
+static inline void
 intel_batch_emit_dword(I830Ptr pI830, uint32_t dword)
 {
     assert(pI830->batch_ptr != NULL);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 1ddea00..411d79c 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3406,6 +3406,8 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
    if (IS_I965G(pI830))
        pI830->batch_flush_notify = i965_batch_flush_notify;
+   else if (IS_I9XX(pI830))
+       pI830->batch_flush_notify = i915_batch_flush_notify;
    else
        pI830->batch_flush_notify = NULL;
 
diff --git a/src/i830_exa.c b/src/i830_exa.c
index df48dbf..9249074 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -702,7 +702,7 @@ I830EXAInit(ScreenPtr pScreen)
     {
 	pI830->EXADriverPtr->CheckComposite = i915_check_composite;
    	pI830->EXADriverPtr->PrepareComposite = i915_prepare_composite;
-    	pI830->EXADriverPtr->Composite = i830_composite;
+	pI830->EXADriverPtr->Composite = i915_composite;
     	pI830->EXADriverPtr->DoneComposite = i830_done_composite;
     } else {
  	pI830->EXADriverPtr->CheckComposite = i965_check_composite;
@@ -967,7 +967,7 @@ i830_uxa_init (ScreenPtr pScreen)
     {
 	i830->uxa_driver->check_composite = i915_check_composite;
    	i830->uxa_driver->prepare_composite = i915_prepare_composite;
-    	i830->uxa_driver->composite = i830_composite;
+	i830->uxa_driver->composite = i915_composite;
     	i830->uxa_driver->done_composite = i830_done_composite;
     } else {
  	i830->uxa_driver->check_composite = i965_check_composite;
diff --git a/src/i915_render.c b/src/i915_render.c
index ab288e1..8a2bc63 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -315,39 +315,69 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture,
 {
     ScrnInfoPtr pScrn = xf86Screens[pSrcPicture->pDrawable->pScreen->myNum];
     I830Ptr pI830 = I830PTR(pScrn);
-    uint32_t dst_format, dst_pitch;
-    uint32_t blendctl;
-    int out_reg = FS_OC;
-    FS_LOCALS(20);
-    Bool is_affine_src, is_affine_mask;
-    Bool is_nearest = FALSE;
 
     i830_exa_check_pitch_3d(pSrc);
     if (pMask)
 	i830_exa_check_pitch_3d(pMask);
     i830_exa_check_pitch_3d(pDst);
 
-    IntelEmitInvarientState(pScrn);
-    *pI830->last_3d = LAST_3D_RENDER;
-
-    if (!i915_get_dest_format(pDstPicture, &dst_format))
+    if (!i915_get_dest_format(pDstPicture,
+			      &pI830->i915_render_state.dst_format))
 	return FALSE;
-    dst_pitch = intel_get_pixmap_pitch(pDst);
 
+    pI830->i915_render_state.is_nearest = FALSE;
     if (!i915_texture_setup(pSrcPicture, pSrc, 0))
 	I830FALLBACK("fail to setup src texture\n");
     if (pSrcPicture->filter == PictFilterNearest)
-	is_nearest = TRUE;
+	pI830->i915_render_state.is_nearest = TRUE;
     if (pMask != NULL) {
 	if (!i915_texture_setup(pMaskPicture, pMask, 1))
 	    I830FALLBACK("fail to setup mask texture\n");
 	if (pMaskPicture->filter == PictFilterNearest)
-	    is_nearest = TRUE;
+	    pI830->i915_render_state.is_nearest = TRUE;
     } else {
 	pI830->transform[1] = NULL;
 	pI830->scale_units[1][0] = -1;
 	pI830->scale_units[1][1] = -1;
     }
+
+    pI830->i915_render_state.op = op;
+    pI830->i915_render_state.pSrcPicture = pSrcPicture;
+    pI830->i915_render_state.pMaskPicture = pMaskPicture;
+    pI830->i915_render_state.pDstPicture = pDstPicture;
+    pI830->i915_render_state.pSrc = pSrc;
+    pI830->i915_render_state.pMask = pMask;
+    pI830->i915_render_state.pDst = pDst;
+    pI830->i915_render_state.needs_emit = TRUE;
+
+    return TRUE;
+}
+
+static void
+i915_emit_composite_setup(ScrnInfoPtr pScrn)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    int op = pI830->i915_render_state.op;
+    PicturePtr pSrcPicture = pI830->i915_render_state.pSrcPicture;
+    PicturePtr pMaskPicture = pI830->i915_render_state.pMaskPicture;
+    PicturePtr pDstPicture = pI830->i915_render_state.pDstPicture;
+    PixmapPtr pSrc = pI830->i915_render_state.pSrc;
+    PixmapPtr pMask = pI830->i915_render_state.pMask;
+    PixmapPtr pDst = pI830->i915_render_state.pDst;
+    uint32_t dst_format = pI830->i915_render_state.dst_format, dst_pitch;
+    uint32_t blendctl;
+    int out_reg = FS_OC;
+    FS_LOCALS(20);
+    Bool is_affine_src, is_affine_mask;
+    Bool is_nearest = pI830->i915_render_state.is_nearest;
+
+    pI830->i915_render_state.needs_emit = FALSE;
+
+    IntelEmitInvarientState(pScrn);
+    *pI830->last_3d = LAST_3D_RENDER;
+
+    dst_pitch = intel_get_pixmap_pitch(pDst);
+
     is_affine_src = i830_transform_is_affine (pI830->transform[0]);
     is_affine_mask = i830_transform_is_affine (pI830->transform[1]);
 
@@ -503,6 +533,29 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture,
 	i915_fs_mov(FS_OC, i915_fs_operand(out_reg, W, W, W, W));
 
     FS_END();
+}
 
-    return TRUE;
+void
+i915_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+	       int dstX, int dstY, int w, int h)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+    I830Ptr pI830 = I830PTR(pScrn);
+
+    intel_batch_start_atomic(pScrn, 100);
+
+    if (pI830->i915_render_state.needs_emit)
+	i915_emit_composite_setup(pScrn);
+
+    i830_composite(pDst, srcX, srcY, maskX, maskY, dstX, dstY, w, h);
+
+    intel_batch_end_atomic(pScrn);
+}
+
+void
+i915_batch_flush_notify(ScrnInfoPtr pScrn)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+
+    pI830->i915_render_state.needs_emit = TRUE;
 }
commit cab5b7a7b0e17414f98b2363b0961c87f32f9c05
Author: Eric Anholt <eric at anholt.net>
Date:   Thu Jan 15 09:31:55 2009 -0800

    Fix invarient state emits for DRI2 (do it per batch, since there's no lock).

diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index b1c8a8d..220dda7 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -117,6 +117,12 @@ intel_next_batch(ScrnInfoPtr pScrn)
 
     pI830->batch_used = 0;
     pI830->batch_ptr = pI830->batch_bo->virtual;
+
+    /* If we are using DRI2, we don't know when another client has executed,
+     * so we have to reinitialize our 3D state per batch.
+     */
+    if (pI830->directRenderingType == DRI2)
+	*pI830->last_3d = LAST_3D_OTHER;
 }
 
 void
commit 9f306193c4b128ec72c5b4db16d07302cee50ab5
Author: Owain G. Ainsworth <oga at openbsd.org>
Date:   Tue Jan 13 18:42:44 2009 +0000

    Fix ioctl type.
    
    I915_EMIT_IRQ is a read/write ioctl, not a write only. Found by OpenBSd's
    kernel code which checks these things a long more strongly than Linux.

diff --git a/src/i830_accel.c b/src/i830_accel.c
index 7dff714..5ee53bb 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -205,7 +205,7 @@ I830Sync(ScrnInfoPtr pScrn)
 	* register reads for idle.
 	*/
        emit.irq_seq = &wait.irq_seq;
-       ret = drmCommandWrite(pI830->drmSubFD, DRM_I830_IRQ_EMIT, &emit,
+       ret = drmCommandWriteRead(pI830->drmSubFD, DRM_I830_IRQ_EMIT, &emit,
 			    sizeof(emit));
        if (ret != 0)
 	   FatalError("Failure to emit IRQ: %s\n", strerror(-ret));
commit 1e8588ad5087c69eb77399cfaab8e4ec15eb4da9
Author: Owain G. Ainsworth <oga at openbsd.org>
Date:   Tue Jan 13 17:02:59 2009 +0000

    use ifdef __linux__ where needed.
    
    since modesetting is compiled by default now, ifdef __linux__ the linux
    only includes and ioctls.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 3e27b07..1ddea00 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1228,7 +1228,9 @@ i830SetHotkeyControl(ScrnInfoPtr pScrn, int mode)
  * DRM mode setting Linux only at this point... later on we could
  * add a wrapper here.
  */
+#ifdef __linux__
 #include <linux/kd.h>
+#endif
 
 static Bool i830_kernel_mode_enabled(ScrnInfoPtr pScrn)
 {
@@ -1254,7 +1256,9 @@ static Bool i830_kernel_mode_enabled(ScrnInfoPtr pScrn)
     if (ret)
 	return FALSE;
 
+#ifdef __linux__
     ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
+#endif
 
     return TRUE;
 }
commit db9f5915ce812144ffd9d2aa42e8ba856129c35e
Author: Ma Ling <ling.ma at intel.com>
Date:   Wed Jan 14 14:46:52 2009 +0800

    Disable VGA plane reliably
    
    This fixes #17235, VGA random hang on recent G45/43 board.
    From spec, SR01 bit 5 should be set before VGA plane disable through
    control register, otherwise we might get random crash and lockups.

diff --git a/src/i830_display.c b/src/i830_display.c
index 4fba1fb..7a8e96d 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -786,6 +786,37 @@ static void i830_modeset_ctl(xf86CrtcPtr crtc, int dpms_state)
 }
 #endif /* DRM_IOCTL_MODESET_CTL && (XF86DRI || DRI2) */
 
+static void
+i830_disable_vga_plane (xf86CrtcPtr crtc)
+{
+    ScrnInfoPtr pScrn = crtc->scrn;
+    I830Ptr pI830 = I830PTR(pScrn);
+    uint32_t vgacntrl = INREG(VGACNTRL);
+    uint8_t sr01;
+
+    if (vgacntrl & VGA_DISP_DISABLE)
+	return;
+
+    /*
+       Set bit 5 of SR01;
+       Wait 30us;
+       */
+    OUTREG8(SRX, 1);
+    sr01 = INREG8(SRX + 1);
+    OUTREG8(SRX + 1, sr01 | (1 << 5));
+    usleep(30);
+
+    vgacntrl |= VGA_DISP_DISABLE;
+
+    /* disable center mode */
+    if (IS_I9XX(pI830))
+	vgacntrl &= ~(3 << 24);
+
+    OUTREG(VGACNTRL, vgacntrl);
+    i830WaitForVblank(pScrn);
+
+}
+
 /**
  * Sets the power management mode of the pipe and plane.
  *
@@ -910,8 +941,7 @@ i830_crtc_dpms(xf86CrtcPtr crtc, int mode)
 	}
 
 	/* Disable the VGA plane that we never use. */
-	OUTREG(VGACNTRL, VGA_DISP_DISABLE);
-	i830WaitForVblank(pScrn);
+	i830_disable_vga_plane (crtc);
 
 	break;
     }
commit a4b023c17b9c3bd65fb9466ddb8a953f60244402
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Jan 13 20:01:49 2009 -0800

    Assign rotation memory dri_bo to rotation pixmap.
    
    As the rotation memory and rotation pixmap are allocated separately (to make
    rotation at startup work), the allocate dri_bo needs to be set in the pixmap
    for acceleration to work. This restores the performance in rotated modes.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/i830_display.c b/src/i830_display.c
index 50fbc4d..4fba1fb 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1601,6 +1601,7 @@ static PixmapPtr
 i830_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 {
     ScrnInfoPtr pScrn = crtc->scrn;
+    I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
     I830Ptr pI830 = I830PTR(pScrn);
     int rotate_pitch;
     PixmapPtr rotate_pixmap;
@@ -1621,6 +1622,8 @@ i830_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		   "Couldn't allocate shadow pixmap for rotated CRTC\n");
     }
+    if (intel_crtc->rotate_mem && intel_crtc->rotate_mem->bo)
+	i830_set_pixmap_bo(rotate_pixmap, intel_crtc->rotate_mem->bo);
     return rotate_pixmap;
 }
 
commit f659cc37e61364a408355b9a6a44d39f4d759935
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Tue Jan 13 16:49:41 2009 -0800

    bios_reader: make mode timing output friendlier
    
    Print out the calculated mode line values (as i830_bios.c uses) and
    check for validity against known problems.

diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index 717f5bf..4b20e0d 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -299,6 +299,9 @@ static void dump_lvds_data(void)
     struct bdb_lvds_lfp_data *lvds_data;
     int num_entries;
     int i;
+    int hdisplay, hsyncstart, hsyncend, htotal;
+    int vdisplay, vsyncstart, vsyncend, vtotal;
+    float clock;
 
     block = find_section(BDB_LVDS_LFP_DATA);
     if (!block) {
@@ -322,6 +325,17 @@ static void dump_lvds_data(void)
 	else
 	    marker = ' ';
 
+	hdisplay   = _H_ACTIVE(timing_data);
+	hsyncstart = hdisplay + _H_SYNC_OFF(timing_data);
+	hsyncend   = hsyncstart + _H_SYNC_WIDTH(timing_data);
+	htotal     = hdisplay + _H_BLANK(timing_data);
+
+	vdisplay   = _V_ACTIVE(timing_data);
+	vsyncstart = vdisplay + _V_SYNC_OFF(timing_data);
+	vsyncend   = vsyncstart + _V_SYNC_WIDTH(timing_data);
+	vtotal     = vdisplay + _V_BLANK(timing_data);
+	clock      = _PIXEL_CLOCK(timing_data) / 1000;
+
 	printf("%c\tpanel type %02i: %dx%d clock %d\n", marker,
 	       i, lfp_data->fp_timing.x_res, lfp_data->fp_timing.y_res,
 	       _PIXEL_CLOCK(timing_data));
@@ -336,15 +350,11 @@ static void dump_lvds_data(void)
 	       (unsigned long)lfp_data->fp_timing.pp_cycle_reg_val);
 	printf("\t\t  PFIT: 0x%08lx\n",
 	       (unsigned long)lfp_data->fp_timing.pfit_reg_val);
-	printf("\t\ttimings: %d %d %d %d %d %d %d %d\n",
-	       _H_ACTIVE(timing_data),
-	       _H_BLANK(timing_data),
-	       _H_SYNC_OFF(timing_data),
-	       _H_SYNC_WIDTH(timing_data),
-	       _V_ACTIVE(timing_data),
-	       _V_BLANK(timing_data),
-	       _V_SYNC_OFF(timing_data),
-	       _V_SYNC_WIDTH(timing_data));
+	printf("\t\ttimings: %d %d %d %d %d %d %d %d %.2f (%s)\n",
+	       hdisplay, hsyncstart, hsyncend, htotal,
+	       vdisplay, vsyncstart, vsyncend, vtotal, clock,
+	       (hsyncend > htotal || vsyncend > vtotal) ?
+	       "BAD!" : "good");
     }
     free(block);
 }
commit c80f1a9c5131721eaf87d12a7a67e603cdfed63b
Author: Bernhard Rosenkraenzer <bero at arklinux.org>
Date:   Tue Jan 13 10:35:19 2009 -0800

    UXA: Declare glyph cache picture as component-alpha when necessary.
    
    Without this, rendering component-alpha glyphs may break without a mask.
    
    Bug #19534.  Ported from fix by Michel Dänzer <daenzer at vmware.com> in
    xserver commit 639f289dcdbe00a516820f573c01a8339e120ed4

diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index dd26362..1c06e6d 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -140,6 +140,8 @@ uxa_unrealize_glyph_caches(ScreenPtr    pScreen,
     }
 }
 
+#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
+
 /* All caches for a single format share a single pixmap for glyph storage,
  * allowing mixing glyphs of different sizes without paying a penalty
  * for switching between source pixmaps. (Note that for a size of font
@@ -158,6 +160,7 @@ uxa_realize_glyph_caches(ScreenPtr    pScreen,
     PictFormatPtr   pPictFormat;
     PixmapPtr	    pPixmap;
     PicturePtr	    pPicture;
+    CARD32          component_alpha;
     int		    height;
     int		    i;
     int		    error;
@@ -190,8 +193,10 @@ uxa_realize_glyph_caches(ScreenPtr    pScreen,
     if (!pPixmap)
 	return FALSE;
 
+    component_alpha = NeedsComponent(pPictFormat->format);
     pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat,
-			     0, 0, serverClient, &error);
+			     CPComponentAlpha, &component_alpha, serverClient,
+			     &error);
 
     (*pScreen->DestroyPixmap) (pPixmap); /* picture holds a refcount */
 
@@ -729,8 +734,6 @@ uxa_glyphs_intersect(int nlist, GlyphListPtr list, GlyphPtr *glyphs)
     return FALSE;
 }
 
-#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
-
 void
 uxa_glyphs (CARD8 	 op,
 	   PicturePtr	 pSrc,
commit 3d206f9e46b5237bda7ca3c0f92d64c45ee8bdf5
Author: Ma Ling <ling.ma at intel.com>
Date:   Tue Jan 13 10:26:40 2009 +0800

    set continuous-frequency flag in get modes function
    
    http://bugs.freedesktop.org/show_bug.cgi?id=19247
    Because latest xorg will check whether the display is continuous frequency through one flag in monitor info structure,
    if not it doesn't touch default modes. When laptop failed to fetch edid, We don't set the flag. In i830_lvds.c,
    so currently we can not get default modes except only one mode line from bios.
    In order to achieve default modes from xserver successfully,I set the flag and other EDID features.

diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 3796727..7056504 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -894,6 +894,28 @@ i830_lvds_detect(xf86OutputPtr output)
     return XF86OutputStatusConnected;
 }
 
+static void fill_detailed_block(struct detailed_monitor_section *det_mon,
+                                DisplayModePtr mode)
+{
+    struct detailed_timings *timing = &det_mon->section.d_timings;
+    det_mon->type = DT;
+    timing->clock = mode->Clock * 1000;
+    timing->h_active = mode->HDisplay;
+    timing->h_blanking = mode->HTotal - mode->HDisplay;
+    timing->v_active = mode->VDisplay;
+    timing->v_blanking = mode->VTotal - mode->VDisplay;
+    timing->h_sync_off = mode->HSyncStart - mode->HDisplay;
+    timing->h_sync_width = mode->HSyncEnd - mode->HSyncStart;
+    timing->v_sync_off = mode->VSyncStart - mode->VDisplay;
+    timing->v_sync_width = mode->VSyncEnd - mode->VSyncStart;
+
+    if (mode->Flags & V_PVSYNC)
+        timing->misc |= 0x02;
+
+    if (mode->Flags & V_PHSYNC)
+        timing->misc |= 0x01;
+}
+
 /**
  * Return the list of DDC modes if available, or the BIOS fixed mode otherwise.
  */
@@ -938,7 +960,7 @@ i830_lvds_get_modes(xf86OutputPtr output)
 	}
     }
     xf86OutputSetEDID (output, edid_mon);
-    
+
     modes = xf86OutputGetEDIDModes (output);
     if (modes != NULL)
 	return modes;
@@ -948,15 +970,35 @@ i830_lvds_get_modes(xf86OutputPtr output)
 	edid_mon = xcalloc (1, sizeof (xf86Monitor));
 	if (edid_mon)
 	{
+	    struct detailed_monitor_section *det_mon = edid_mon->det_mon;
+	    /*support DPM, instead of DPMS*/
+	    edid_mon->features.dpms |= 0x1;
+	    /*defaultly support RGB color display*/
+	    edid_mon->features.display_type |= 0x1;
+	    /*defaultly display support continuous-freqencey*/
+	    edid_mon->features.msc |= 0x1;
+	    /*defaultly  the EDID version is 1.4 */
+	    edid_mon->ver.version = 1;
+	    edid_mon->ver.revision = 4;
+
+	    if (pI830->lvds_fixed_mode != NULL) {
+		/* now we construct new EDID monitor,
+		 *  so filled one detailed timing block
+		 */
+		fill_detailed_block(det_mon, pI830->lvds_fixed_mode);
+		/* the filed timing block should be set preferred*/
+		edid_mon->features.msc |= 0x2;
+		det_mon = det_mon + 1;
+	    }
+
 	    /* Set wide sync ranges so we get all modes
 	     * handed to valid_mode for checking
 	     */
-	    edid_mon->det_mon[0].type = DS_RANGES;
-	    edid_mon->det_mon[0].section.ranges.min_v = 0;
-	    edid_mon->det_mon[0].section.ranges.max_v = 200;
-	    edid_mon->det_mon[0].section.ranges.min_h = 0;
-	    edid_mon->det_mon[0].section.ranges.max_h = 200;
-	    
+	    det_mon->type = DS_RANGES;
+	    det_mon->section.ranges.min_v = 0;
+	    det_mon->section.ranges.max_v = 200;
+	    det_mon->section.ranges.min_h = 0;
+	    det_mon->section.ranges.max_h = 200;
 	    output->MonInfo = edid_mon;
 	}
     }
commit 3354e660b0744976871683ce226f17e873f26b50
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Nov 26 16:32:12 2008 +0800

    Fix LVDS EDID to match all possible default modes
    
    If the EDID data from the LVDS doesn't indicate support for a wide range of
    continuous frequencies, it will not match any of the default modes although
    our LVDS scaler logic ignores refresh rates when programming LVDS modes. Fix
    this by smashing the compute EDID data to open up the sync rates.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index df92dea..3796727 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -907,6 +907,36 @@ i830_lvds_get_modes(xf86OutputPtr output)
     DisplayModePtr	    modes;
 
     edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
+
+    /* Our LVDS scaler can hit any size, so mark the EDID data as
+     * supporting continuous timings
+     */
+    if (edid_mon) {
+	int i, j = -1;
+	edid_mon->features.msc |= 0x1;
+
+	/* Either find a DS_RANGES block, or replace a DS_VENDOR block,
+	 * smashing it into a DS_RANGES block with wide open refresh to
+	 * match all default modes
+	 */
+	for (i = 0; i < sizeof (edid_mon->det_mon) / sizeof (edid_mon->det_mon[0]); i++)
+	{
+	    if (edid_mon->det_mon[i].type >= DS_VENDOR && j == -1)
+		j = i;
+	    if (edid_mon->det_mon[i].type == DS_RANGES) {
+		j = i;
+		break;
+	    }
+	}
+	if (j != -1) {
+	    struct monitor_ranges   *ranges = &edid_mon->det_mon[j].section.ranges;
+	    edid_mon->det_mon[j].type = DS_RANGES;
+	    ranges->min_v = 0;
+	    ranges->max_v = 200;
+	    ranges->min_h = 0;
+	    ranges->max_h = 200;
+	}
+    }
     xf86OutputSetEDID (output, edid_mon);
     
     modes = xf86OutputGetEDIDModes (output);
commit f1e9ca4e4fb3ddb083252aea79c67c5e5e71f29c
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Fri Jan 9 16:30:15 2009 -0800

    Remove xorgconfig & xorgcfg from See Also list in man page

diff --git a/man/intel.man b/man/intel.man
index 81a94ac..00aa1be 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -445,7 +445,7 @@ more information (the xorg at lists.freedesktop.org mailing list is the
 most appropriate place to ask X.Org and driver related questions).
 
 .SH "SEE ALSO"
-__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
+__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
 .SH AUTHORS
 Authors include: Keith Whitwell, and also Jonathan Bian, Matthew J Sottek,
 Jeff Hartmann, Mark Vojkovich, Alan Hourihane, H. J. Lu.  830M and 845G
commit 91c49067abab262edce54d33af8bfc03eee20f2e
Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Wed Jan 7 21:45:54 2009 -0800

    Prevent redefinitions of CARD8 and friends.  Fixes build.

diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index 974c272..717f5bf 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -39,9 +39,7 @@
 #include "../i830_bios.h"
 
 #include <X11/Xfuncproto.h>
-typedef uint8_t CARD8;
-typedef uint16_t CARD16;
-typedef uint32_t CARD32;
+#include <X11/Xmd.h>
 #define _PARSE_EDID_
 #include "edid.h"
 
commit 934008a2cbcec0c790580750c672c0367a9e4c55
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jan 6 10:55:59 2009 -0800

    Always enable KMS if server's new enough, and remove option.
    
    The API should be stable at this point, and we don't want to allow mistakes.

diff --git a/configure.ac b/configure.ac
index ca13eab..6c4ba57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,11 +75,6 @@ AC_ARG_ENABLE(xvmc, AC_HELP_STRING([--disable-xvmc],
               [XVMC="$enableval"],
               [XVMC=auto])
 
-AC_ARG_ENABLE(kms, AC_HELP_STRING([--enable-kms],
-                                  [Enable kernel mode setting support [[default=no]]]),
-              [KMS="$enableval"],
-              [KMS=no])
-
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto)
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -112,14 +107,6 @@ if test x$DRI != xno; then
                       [have_dristruct_h="yes"], [have_dristruct_h="no"])
 	AC_CHECK_FILE([${sdkdir}/damage.h],
                       [have_damage_h="yes"], [have_damage_h="no"])
-	if test x$KMS != xno; then
-		dnl exaGetPixmapDriverPrivate required for DRM_MODE.
-		PKG_CHECK_MODULES(DRM_MODE, [xorg-server >= 1.5],
-					    [DRM_MODE=yes], [DRM_MODE=no])
-		if test "x$DRM_MODE" = xyes; then
-	   		AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting])
-		fi
-	fi
 fi
 AC_MSG_CHECKING([whether to include DRI support])
 if test x$DRI = xauto; then
@@ -233,6 +220,13 @@ if test "$DRI" = yes; then
 	fi
 fi
 
+dnl exaGetPixmapDriverPrivate required for DRM_MODE.
+PKG_CHECK_MODULES(DRM_MODE, [xorg-server >= 1.5],
+		  [DRM_MODE=yes], [DRM_MODE=no])
+if test "x$DRM_MODE" = xyes; then
+	AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting])
+fi
+
 AM_CONDITIONAL(VIDEO_DEBUG, test x$VIDEO_DEBUG = xyes)
 if test "$VIDEO_DEBUG" = yes; then
 	AC_DEFINE(VIDEO_DEBUG,1,[Enable debug support])
commit 342120be0956bfc12822d1ffbfbd8aaabf3e922f
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 5 23:21:07 2009 -0800

    Fix pin leakage with EXA GTT-mapping shortcut, and crash with UXA on KMS.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index b300fdc..df48dbf 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -811,14 +811,15 @@ i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access)
 	    i830->need_sync = FALSE;
 	}
 
-	if (drm_intel_bo_pin(bo, 4096) != 0) {
-	    /* happen in vt switched */
-	    if (dri_bo_map(bo, access == UXA_ACCESS_RW) != 0)
+	if (pScrn->vtSema && !pI830->use_drm_mode) {
+	    if (drm_intel_bo_pin(bo, 4096) != 0)
 		return FALSE;
-	    pixmap->devPrivate.ptr = bo->virtual;
-	} else {
 	    drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW);
 	    pixmap->devPrivate.ptr = pI830->FbBase + bo->offset;
+	} else {
+	    if (dri_bo_map(bo, access == UXA_ACCESS_RW) != 0)
+		return FALSE;
+	    pixmap->devPrivate.ptr = bo->virtual;
 	}
     }
     return TRUE;
@@ -827,6 +828,8 @@ i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access)
 static void
 i830_uxa_finish_access (PixmapPtr pixmap)
 {
+    ScrnInfoPtr pScrn = xf86Screens[pixmap->drawable.pScreen->myNum];
+    I830Ptr pI830 = I830PTR(pScrn);
     dri_bo *bo = i830_get_pixmap_bo (pixmap);
 
     if (bo) {
@@ -834,10 +837,10 @@ i830_uxa_finish_access (PixmapPtr pixmap)
 	ScrnInfoPtr scrn = xf86Screens[screen->myNum];
 	I830Ptr i830 = I830PTR(scrn);
 
-	if (bo->virtual)
-	    dri_bo_unmap(bo);
-	else
+	if (pScrn->vtSema && !pI830->use_drm_mode)
 	    drm_intel_bo_unpin(bo);
+	else
+	    dri_bo_unmap(bo);
 
 	pixmap->devPrivate.ptr = NULL;
 	if (bo == i830->front_buffer->bo)
commit 9a5082d2920c1a212fe935b5a093013e8035c321
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 5 23:28:50 2009 -0800

    Disable DRI2 buffer tiling on non-965, as those need fence regs for 2D blits.
    
    This fixes glReadPixels failure on single-channel 915GM, as the software code
    for readpixels was actually the only code in the driver doing tiling against
    these buffers (everything else says "rely on fence registers", since the 2D
    blits don't have a "don't rely on fence registers" option).

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 0fe0eca..c4440ce 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1883,6 +1883,15 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
 		break;
 	    }
 
+	    /* Disable tiling on 915-class 3D for now.  Because the 2D blitter
+	     * requires fence regs to operate, and they're not being managed
+	     * by the kernel yet, we don't want to expose tiled buffers to the
+	     * 3D client as it'll just render incorrectly if it pays attention
+	     * to our tiling bits at all.
+	     */
+	    if (!IS_I965G(pI830))
+		tiling = I915_TILING_NONE;
+
 	    if (tiling != I915_TILING_NONE) {
 		bo = i830_get_pixmap_bo(pPixmap);
 		drm_intel_bo_set_tiling(bo, &tiling,
commit 7736b65be4fb4d5c59d7aedb1e64da976bb10ae9
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Dec 15 15:49:01 2008 -0800

    FatalError on batchbuffer map failure
    
    Yes, it would be nice to do something other than crash here.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index 13d939e..b1c8a8d 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -112,7 +112,9 @@ intel_next_batch(ScrnInfoPtr pScrn)
     else
 	pI830->batch_bo = dri_bo_alloc(pI830->bufmgr, "batch", 4096 * 4, 4096);
 
-    dri_bo_map(pI830->batch_bo, 1);
+    if (dri_bo_map(pI830->batch_bo, 1) != 0)
+	FatalError("Failed to map batchbuffer: %s\n", strerror(errno));
+
     pI830->batch_used = 0;
     pI830->batch_ptr = pI830->batch_bo->virtual;
 }
commit 632f816c72cb4b48b690fd92d1cc1d5a9c9285c7
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Dec 15 15:43:34 2008 -0800

    uxa: handle uxa_prepare_access failure
    
    uxa_prepare_access may fail to map the pixmap into user space. Recover from
    this without crashing.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index b25a8fa..f42e0e2 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -188,7 +188,8 @@ uxa_do_put_image (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
 	    int	dstXoff, dstYoff;
 
 	    if (!access_prepared) {
-		uxa_prepare_access(pDrawable, UXA_ACCESS_RW);
+		if (!uxa_prepare_access(pDrawable, UXA_ACCESS_RW))
+		    return FALSE;
 		access_prepared = TRUE;
 	    }
 
@@ -237,7 +238,8 @@ uxa_do_shm_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth,
 	if (!pPixmap)
 	    return FALSE;
 
-        uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
+        if (!uxa_prepare_access (pDrawable, UXA_ACCESS_RW))
+	    return FALSE;
 	fbCopyArea((DrawablePtr)pPixmap, pDrawable, pGC, sx, sy, sw, sh, dx, dy);
 	uxa_finish_access(pDrawable);
 
@@ -262,7 +264,8 @@ uxa_shm_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, unsigned int form
 {
     if (!uxa_do_shm_put_image(pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh,
 			      dx, dy, data)) {
-	uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
+	if (!uxa_prepare_access (pDrawable, UXA_ACCESS_RW))
+	    return;
 	fbShmPutImage(pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy,
 		      data);
 	uxa_finish_access(pDrawable);
@@ -468,12 +471,14 @@ fallback:
     UXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable,
 		  uxa_drawable_location(pSrcDrawable),
 		  uxa_drawable_location(pDstDrawable)));
-    uxa_prepare_access (pDstDrawable, UXA_ACCESS_RW);
-    uxa_prepare_access (pSrcDrawable, UXA_ACCESS_RO);
-    fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse,
-		upsidedown, bitplane, closure);
-    uxa_finish_access (pSrcDrawable);
-    uxa_finish_access (pDstDrawable);
+    if (uxa_prepare_access (pDstDrawable, UXA_ACCESS_RW)) {
+	if (uxa_prepare_access (pSrcDrawable, UXA_ACCESS_RO)) {
+	    fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy,
+			reverse, upsidedown, bitplane, closure);
+	    uxa_finish_access (pSrcDrawable);
+	}
+	uxa_finish_access (pDstDrawable);
+    }
 }
 
 RegionPtr
@@ -1024,9 +1029,10 @@ fallback:
     UXA_FALLBACK(("from %p (%c)\n", pDrawable,
 		  uxa_drawable_location(pDrawable)));
 
-    uxa_prepare_access (pDrawable, UXA_ACCESS_RO);
-    fbGetImage (pDrawable, x, y, w, h, format, planeMask, d);
-    uxa_finish_access (pDrawable);
+    if (uxa_prepare_access (pDrawable, UXA_ACCESS_RO)) {
+	fbGetImage (pDrawable, x, y, w, h, format, planeMask, d);
+	uxa_finish_access (pDrawable);
+    }
 
    return;
 }
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
index 0f9cfbf..f4b3cee 100644
--- a/uxa/uxa-priv.h
+++ b/uxa/uxa-priv.h
@@ -182,14 +182,14 @@ typedef struct {
   */
 void exaDDXDriverInit (ScreenPtr pScreen);
 
-void
+Bool
 uxa_prepare_access_window(WindowPtr pWin);
 
 void
 uxa_finish_access_window(WindowPtr pWin);
 
 /* uxa-unaccel.c */
-void
+Bool
 uxa_prepare_access_gc(GCPtr pGC);
 
 void
@@ -351,7 +351,7 @@ uxa_check_composite (CARD8      op,
 #endif
 
 /* uxa.c */
-void
+Bool
 uxa_prepare_access(DrawablePtr pDrawable, uxa_access_t access);
 
 void
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index b2d3297..13635f8 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -889,12 +889,12 @@ uxa_trapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
 	xoff += pDraw->x;
 	yoff += pDraw->y;
 
-	uxa_prepare_access(pDraw, UXA_ACCESS_RW);
-
-	for (; ntrap; ntrap--, traps++)
-	    (*ps->RasterizeTrapezoid) (pDst, traps, 0, 0);
-
-	uxa_finish_access(pDraw);
+	if (uxa_prepare_access(pDraw, UXA_ACCESS_RW))
+	{
+	    for (; ntrap; ntrap--, traps++)
+		(*ps->RasterizeTrapezoid) (pDst, traps, 0, 0);
+	    uxa_finish_access(pDraw);
+	}
     }
     else if (maskFormat)
     {
@@ -911,11 +911,12 @@ uxa_trapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
 	if (!pPicture)
 	    return;
 
-	uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW);
-	for (; ntrap; ntrap--, traps++)
-	    (*ps->RasterizeTrapezoid) (pPicture, traps,
-				       -bounds.x1, -bounds.y1);
-	uxa_finish_access(pPicture->pDrawable);
+	if (uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW)) {
+	    for (; ntrap; ntrap--, traps++)
+		(*ps->RasterizeTrapezoid) (pPicture, traps,
+					   -bounds.x1, -bounds.y1);
+	    uxa_finish_access(pPicture->pDrawable);
+	}
 
 	xRel = bounds.x1 + xSrc - xDst;
 	yRel = bounds.y1 + ySrc - yDst;
@@ -972,9 +973,10 @@ uxa_triangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
     if (direct)
     {
 	DrawablePtr pDraw = pDst->pDrawable;
-	uxa_prepare_access(pDraw, UXA_ACCESS_RW);
-	(*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
-	uxa_finish_access(pDraw);
+	if (uxa_prepare_access(pDraw, UXA_ACCESS_RW)) {
+	    (*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
+	    uxa_finish_access(pDraw);
+	}
     }
     else if (maskFormat)
     {
@@ -991,9 +993,10 @@ uxa_triangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
 	if (!pPicture)
 	    return;
 
-	uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW);
-	(*ps->AddTriangles) (pPicture, -bounds.x1, -bounds.y1, ntri, tris);
-	uxa_finish_access(pPicture->pDrawable);
+	if (uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW)) {
+	    (*ps->AddTriangles) (pPicture, -bounds.x1, -bounds.y1, ntri, tris);
+	    uxa_finish_access(pPicture->pDrawable);
+	}
 	
 	xRel = bounds.x1 + xSrc - xDst;
 	yRel = bounds.y1 + ySrc - yDst;
diff --git a/uxa/uxa-unaccel.c b/uxa/uxa-unaccel.c
index 01c1322..aba12e8 100644
--- a/uxa/uxa-unaccel.c
+++ b/uxa/uxa-unaccel.c
@@ -41,13 +41,19 @@
  * 1bpp and never in fb, so we don't worry about them.
  * We should worry about them for completeness sake and going forward.
  */
-void
+Bool
 uxa_prepare_access_gc(GCPtr pGC)
 {
     if (pGC->stipple)
-        uxa_prepare_access(&pGC->stipple->drawable, UXA_ACCESS_RO);
+        if (!uxa_prepare_access(&pGC->stipple->drawable, UXA_ACCESS_RO))
+	    return FALSE;
     if (pGC->fillStyle == FillTiled)
-	uxa_prepare_access(&pGC->tile.pixmap->drawable, UXA_ACCESS_RO);
+	if (!uxa_prepare_access(&pGC->tile.pixmap->drawable, UXA_ACCESS_RO)) {
+	    if (pGC->stipple)
+		uxa_finish_access(&pGC->stipple->drawable);
+	    return FALSE;
+	}
+    return TRUE;
 }
 
 /**
@@ -75,11 +81,13 @@ uxa_check_fill_spans (DrawablePtr pDrawable, GCPtr pGC, int nspans,
 		   DDXPointPtr ppt, int *pwidth, int fSorted)
 {
     UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
-    uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
-    uxa_prepare_access_gc (pGC);
-    fbFillSpans (pDrawable, pGC, nspans, ppt, pwidth, fSorted);
-    uxa_finish_access_gc (pGC);
-    uxa_finish_access (pDrawable);
+    if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
+	if (uxa_prepare_access_gc (pGC)) {
+	    fbFillSpans (pDrawable, pGC, nspans, ppt, pwidth, fSorted);
+	    uxa_finish_access_gc (pGC);
+	}
+	uxa_finish_access (pDrawable);
+    }
 }
 
 void
@@ -87,9 +95,10 @@ uxa_check_set_spans (DrawablePtr pDrawable, GCPtr pGC, char *psrc,
 		 DDXPointPtr ppt, int *pwidth, int nspans, int fSorted)
 {
     UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
-    uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
-    fbSetSpans (pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);
-    uxa_finish_access (pDrawable);
+    if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
+	fbSetSpans (pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);
+	uxa_finish_access (pDrawable);
+    }
 }
 
 void
@@ -98,25 +107,27 @@ uxa_check_put_image (DrawablePtr pDrawable, GCPtr pGC, int depth,
 		 char *bits)
 {
     UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
-    uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
-    fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
-    uxa_finish_access (pDrawable);
+    if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
+	fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
+	uxa_finish_access (pDrawable);
+    }
 }
 
 RegionPtr
 uxa_check_copy_area (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
-		 int srcx, int srcy, int w, int h, int dstx, int dsty)
+		     int srcx, int srcy, int w, int h, int dstx, int dsty)
 {
-    RegionPtr ret;
+    RegionPtr ret = NULL;
 
     UXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst,
 		  uxa_drawable_location(pSrc), uxa_drawable_location(pDst)));
-    uxa_prepare_access (pDst, UXA_ACCESS_RW);
-    uxa_prepare_access (pSrc, UXA_ACCESS_RO);
-    ret = fbCopyArea (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
-    uxa_finish_access (pSrc);
-    uxa_finish_access (pDst);
-
+    if (uxa_prepare_access (pDst, UXA_ACCESS_RW)) {
+	if (uxa_prepare_access (pSrc, UXA_ACCESS_RO)) {
+	    ret = fbCopyArea (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
+	    uxa_finish_access (pSrc);
+	}
+	uxa_finish_access (pDst);
+    }
     return ret;
 }
 
@@ -125,17 +136,18 @@ uxa_check_copy_plane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
 		  int srcx, int srcy, int w, int h, int dstx, int dsty,
 		  unsigned long bitPlane)
 {
-    RegionPtr ret;
+    RegionPtr ret = NULL;
 
     UXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst,
 		  uxa_drawable_location(pSrc), uxa_drawable_location(pDst)));
-    uxa_prepare_access (pDst, UXA_ACCESS_RW);
-    uxa_prepare_access (pSrc, UXA_ACCESS_RO);
-    ret = fbCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty,
-		       bitPlane);
-    uxa_finish_access (pSrc);
-    uxa_finish_access (pDst);
-
+    if (uxa_prepare_access (pDst, UXA_ACCESS_RW)) {
+	if (uxa_prepare_access (pSrc, UXA_ACCESS_RO)) {
+	    ret = fbCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty,
+			       bitPlane);
+	    uxa_finish_access (pSrc);
+	}
+	uxa_finish_access (pDst);
+    }
     return ret;
 }
 
@@ -144,9 +156,10 @@ uxa_check_poly_point (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
 		  DDXPointPtr pptInit)
 {
     UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
-    uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
-    fbPolyPoint (pDrawable, pGC, mode, npt, pptInit);
-    uxa_finish_access (pDrawable);
+    if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
+	fbPolyPoint (pDrawable, pGC, mode, npt, pptInit);
+	uxa_finish_access (pDrawable);
+    }
 }
 
 void
@@ -158,11 +171,13 @@ uxa_check_poly_lines (DrawablePtr pDrawable, GCPtr pGC,
 		  pGC->lineWidth, mode, npt));
 
     if (pGC->lineWidth == 0) {
-	uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
-	uxa_prepare_access_gc (pGC);
-	fbPolyLine (pDrawable, pGC, mode, npt, ppt);
-	uxa_finish_access_gc (pGC);
-	uxa_finish_access (pDrawable);
+	if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
+	    if (uxa_prepare_access_gc (pGC)) {
+		fbPolyLine (pDrawable, pGC, mode, npt, ppt);
+		uxa_finish_access_gc (pGC);
+	    }
+	    uxa_finish_access (pDrawable);
+	}
 	return;
     }
     /* fb calls mi functions in the lineWidth != 0 case. */
@@ -176,11 +191,13 @@ uxa_check_poly_segment (DrawablePtr pDrawable, GCPtr pGC,
     UXA_FALLBACK(("to %p (%c) width %d, count %d\n", pDrawable,
 		  uxa_drawable_location(pDrawable), pGC->lineWidth, nsegInit));
     if (pGC->lineWidth == 0) {
-	uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
-	uxa_prepare_access_gc (pGC);
-	fbPolySegment (pDrawable, pGC, nsegInit, pSegInit);
-	uxa_finish_access_gc (pGC);
-	uxa_finish_access (pDrawable);
+	if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
+	    if (uxa_prepare_access_gc (pGC)) {
+		fbPolySegment (pDrawable, pGC, nsegInit, pSegInit);
+		uxa_finish_access_gc (pGC);
+	    }
+	    uxa_finish_access (pDrawable);
+	}
 	return;
     }
     /* fb calls mi functions in the lineWidth != 0 case. */
@@ -200,11 +217,13 @@ uxa_check_poly_arc (DrawablePtr pDrawable, GCPtr pGC,
 #if 0
     if (pGC->lineWidth == 0)
     {
-	uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
-	uxa_prepare_access_gc (pGC);
-	fbPolyArc (pDrawable, pGC, narcs, pArcs);
-	uxa_finish_access_gc (pGC);
-	uxa_finish_access (pDrawable);
+	if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
+	    if (uxa_prepare_access_gc (pGC)) {
+		fbPolyArc (pDrawable, pGC, narcs, pArcs);
+		uxa_finish_access_gc (pGC);
+	    }
+	    uxa_finish_access (pDrawable);
+	}
 	return;
     }
 #endif
@@ -217,11 +236,13 @@ uxa_check_poly_fill_rect (DrawablePtr pDrawable, GCPtr pGC,
 {
     UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
 
-    uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
-    uxa_prepare_access_gc (pGC);
-    fbPolyFillRect (pDrawable, pGC, nrect, prect);
-    uxa_finish_access_gc (pGC);
-    uxa_finish_access (pDrawable);
+    if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
+	if (uxa_prepare_access_gc (pGC)) {
+	    fbPolyFillRect (pDrawable, pGC, nrect, prect);
+	    uxa_finish_access_gc (pGC);
+	}
+	uxa_finish_access (pDrawable);
+    }
 }
 
 void
@@ -231,11 +252,13 @@ uxa_check_image_glyph_blt (DrawablePtr pDrawable, GCPtr pGC,
 {
     UXA_FALLBACK(("to %p (%c)\n", pDrawable,
 		  uxa_drawable_location(pDrawable)));
-    uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
-    uxa_prepare_access_gc (pGC);
-    fbImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
-    uxa_finish_access_gc (pGC);
-    uxa_finish_access (pDrawable);
+    if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
+	if (uxa_prepare_access_gc (pGC)) {
+	    fbImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
+	    uxa_finish_access_gc (pGC);
+	}
+	uxa_finish_access (pDrawable);
+    }
 }
 
 void
@@ -245,11 +268,13 @@ uxa_check_poly_glyph_blt (DrawablePtr pDrawable, GCPtr pGC,
 {
     UXA_FALLBACK(("to %p (%c), style %d alu %d\n", pDrawable,
 		  uxa_drawable_location(pDrawable), pGC->fillStyle, pGC->alu));
-    uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
-    uxa_prepare_access_gc (pGC);
-    fbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
-    uxa_finish_access_gc (pGC);
-    uxa_finish_access (pDrawable);
+    if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
+	if (uxa_prepare_access_gc (pGC)) {
+	    fbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
+	    uxa_finish_access_gc (pGC);
+	}
+	uxa_finish_access (pDrawable);
+    }
 }
 
 void
@@ -260,13 +285,16 @@ uxa_check_push_pixels (GCPtr pGC, PixmapPtr pBitmap,
     UXA_FALLBACK(("from %p to %p (%c,%c)\n", pBitmap, pDrawable,
 		  uxa_drawable_location(&pBitmap->drawable),
 		  uxa_drawable_location(pDrawable)));
-    uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
-    uxa_prepare_access (&pBitmap->drawable, UXA_ACCESS_RO);
-    uxa_prepare_access_gc (pGC);
-    fbPushPixels (pGC, pBitmap, pDrawable, w, h, x, y);
-    uxa_finish_access_gc (pGC);
-    uxa_finish_access (&pBitmap->drawable);
-    uxa_finish_access (pDrawable);
+    if (uxa_prepare_access (pDrawable, UXA_ACCESS_RW)) {
+	if (uxa_prepare_access (&pBitmap->drawable, UXA_ACCESS_RO)) {
+	    if (uxa_prepare_access_gc (pGC)) {
+		fbPushPixels (pGC, pBitmap, pDrawable, w, h, x, y);
+		uxa_finish_access_gc (pGC);
+	    }
+	    uxa_finish_access (&pBitmap->drawable);
+	}
+	uxa_finish_access (pDrawable);
+    }
 }
 
 void
@@ -278,9 +306,10 @@ uxa_check_get_spans (DrawablePtr pDrawable,
 		 char *pdstStart)
 {
     UXA_FALLBACK(("from %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
-    uxa_prepare_access (pDrawable, UXA_ACCESS_RO);
-    fbGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
-    uxa_finish_access (pDrawable);
+    if (uxa_prepare_access (pDrawable, UXA_ACCESS_RO)) {
+	fbGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
+	uxa_finish_access (pDrawable);
+    }
 }
 
 void
@@ -300,28 +329,34 @@ uxa_check_composite (CARD8      op,
     UXA_FALLBACK(("from picts %p/%p to pict %p\n",
 		 pSrc, pMask, pDst));
 
-    uxa_prepare_access (pDst->pDrawable, UXA_ACCESS_RW);
-    if (pSrc->pDrawable != NULL)
-	uxa_prepare_access (pSrc->pDrawable, UXA_ACCESS_RO);
-    if (pMask && pMask->pDrawable != NULL)
-	uxa_prepare_access (pMask->pDrawable, UXA_ACCESS_RO);
-    fbComposite (op,
-                 pSrc,
-                 pMask,
-                 pDst,
-                 xSrc,
-                 ySrc,
-                 xMask,
-                 yMask,
-                 xDst,
-                 yDst,
-                 width,
-                 height);
-    if (pMask && pMask->pDrawable != NULL)
-	uxa_finish_access (pMask->pDrawable);
-    if (pSrc->pDrawable != NULL)
-	uxa_finish_access (pSrc->pDrawable);
-    uxa_finish_access (pDst->pDrawable);
+    if (uxa_prepare_access (pDst->pDrawable, UXA_ACCESS_RW))
+    {
+	if (pSrc->pDrawable == NULL ||
+	    uxa_prepare_access (pSrc->pDrawable, UXA_ACCESS_RO))
+	{
+	    if (!pMask || pMask->pDrawable == NULL ||
+		uxa_prepare_access (pMask->pDrawable, UXA_ACCESS_RO))
+	    {
+		fbComposite (op,
+			     pSrc,
+			     pMask,
+			     pDst,
+			     xSrc,
+			     ySrc,
+			     xMask,
+			     yMask,
+			     xDst,
+			     yDst,
+			     width,
+			     height);
+		if (pMask && pMask->pDrawable != NULL)
+		    uxa_finish_access (pMask->pDrawable);
+	    }
+	    if (pSrc->pDrawable != NULL)
+		uxa_finish_access (pSrc->pDrawable);
+	}
+	uxa_finish_access (pDst->pDrawable);
+    }
 }
 
 void
@@ -333,9 +368,10 @@ uxa_check_add_traps (PicturePtr	pPicture,
 {
     UXA_FALLBACK(("to pict %p (%c)\n",
 		  uxa_drawable_location(pPicture->pDrawable)));
-    uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW);
-    fbAddTraps (pPicture, x_off, y_off, ntrap, traps);
-    uxa_finish_access(pPicture->pDrawable);
+    if (uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW)) {
+	fbAddTraps (pPicture, x_off, y_off, ntrap, traps);
+	uxa_finish_access(pPicture->pDrawable);
+    }
 }
 
 /**
@@ -350,7 +386,9 @@ uxa_get_pixmap_first_pixel (PixmapPtr pPixmap)
     CARD32 pixel;
     void *fb;
 
-    uxa_prepare_access (&pPixmap->drawable, UXA_ACCESS_RO);
+    if (!uxa_prepare_access (&pPixmap->drawable, UXA_ACCESS_RO))
+	return 0;
+
     fb = pPixmap->devPrivate.ptr;
 
     switch (pPixmap->drawable.bitsPerPixel) {
diff --git a/uxa/uxa.c b/uxa/uxa.c
index 102717d..4aeb5e4 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -140,7 +140,7 @@ uxa_get_offscreen_pixmap (DrawablePtr drawable, int *xp, int *yp)
  * It deals with waiting for synchronization with the card, determining if
  * PrepareAccess() is necessary, and working around PrepareAccess() failure.
  */
-void
+Bool
 uxa_prepare_access(DrawablePtr pDrawable, uxa_access_t access)
 {
     ScreenPtr	    pScreen = pDrawable->pScreen;
@@ -149,10 +149,11 @@ uxa_prepare_access(DrawablePtr pDrawable, uxa_access_t access)
     Bool	    offscreen = uxa_pixmap_is_offscreen(pPixmap);
 
     if (!offscreen)
-	return;
+	return TRUE;
 
     if (uxa_screen->info->prepare_access)
-	(*uxa_screen->info->prepare_access) (pPixmap, access);
+	return (*uxa_screen->info->prepare_access) (pPixmap, access);
+    return TRUE;
 }
 
 /**
@@ -209,10 +210,11 @@ uxa_validate_gc (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
 		 * allocated pixmap.  This isn't a problem yet, since we don't
 		 * put pixmaps in FB until at least one accelerated UXA op.
 		 */
-		uxa_prepare_access(&pOldTile->drawable, UXA_ACCESS_RO);
-		pNewTile = fb24_32ReformatTile (pOldTile,
-						pDrawable->bitsPerPixel);
-		uxa_finish_access(&pOldTile->drawable);
+		if (uxa_prepare_access(&pOldTile->drawable, UXA_ACCESS_RO)) {
+		    pNewTile = fb24_32ReformatTile (pOldTile,
+						    pDrawable->bitsPerPixel);
+		    uxa_finish_access(&pOldTile->drawable);
+		}
 	    }
 	    if (pNewTile)
 	    {
@@ -227,9 +229,10 @@ uxa_validate_gc (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
 	if (!pGC->tileIsPixel && FbEvenTile (pGC->tile.pixmap->drawable.width *
 					     pDrawable->bitsPerPixel))
 	{
-	    uxa_prepare_access(&pGC->tile.pixmap->drawable, UXA_ACCESS_RW);
-	    fbPadPixmap (pGC->tile.pixmap);
-	    uxa_finish_access(&pGC->tile.pixmap->drawable);
+	    if (uxa_prepare_access(&pGC->tile.pixmap->drawable, UXA_ACCESS_RW)) {
+		fbPadPixmap (pGC->tile.pixmap);
+		uxa_finish_access(&pGC->tile.pixmap->drawable);
+	    }
 	}
 	/* Mask out the GCTile change notification, now that we've done FB's
 	 * job for it.
@@ -276,14 +279,22 @@ uxa_create_gc (GCPtr pGC)
     return TRUE;
 }
 
-void
+Bool
 uxa_prepare_access_window(WindowPtr pWin)
 {
-    if (pWin->backgroundState == BackgroundPixmap) 
-        uxa_prepare_access(&pWin->background.pixmap->drawable, UXA_ACCESS_RO);
+    if (pWin->backgroundState == BackgroundPixmap) {
+        if (!uxa_prepare_access(&pWin->background.pixmap->drawable, UXA_ACCESS_RO))
+	    return FALSE;
+    }
 
-    if (pWin->borderIsPixel == FALSE)
-        uxa_prepare_access(&pWin->border.pixmap->drawable, UXA_ACCESS_RO);
+    if (pWin->borderIsPixel == FALSE) {
+        if (!uxa_prepare_access(&pWin->border.pixmap->drawable, UXA_ACCESS_RO)) {
+	    if (pWin->backgroundState == BackgroundPixmap)
+		uxa_finish_access(&pWin->background.pixmap->drawable);
+	    return FALSE;
+	}
+    }
+    return TRUE;
 }
 
 void
@@ -301,7 +312,8 @@ uxa_change_window_attributes(WindowPtr pWin, unsigned long mask)
 {
     Bool ret;
 
-    uxa_prepare_access_window(pWin);
+    if (!uxa_prepare_access_window(pWin))
+	return FALSE;
     ret = fbChangeWindowAttributes(pWin, mask);
     uxa_finish_access_window(pWin);
     return ret;
@@ -311,7 +323,8 @@ static RegionPtr
 uxa_bitmap_to_region(PixmapPtr pPix)
 {
   RegionPtr ret;
-  uxa_prepare_access(&pPix->drawable, UXA_ACCESS_RO);
+  if (!uxa_prepare_access(&pPix->drawable, UXA_ACCESS_RO))
+    return NULL;
   ret = fbPixmapToRegion(pPix);
   uxa_finish_access(&pPix->drawable);
   return ret;
commit 90b28a56553d809374fa6d9b9529b7a8b583488c
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Dec 15 15:41:28 2008 -0800

    Handle drm_bo_map failure in 965 video and composite paths.
    
    These two paths allocate a number of objects directly.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/i965_render.c b/src/i965_render.c
index 3b0ee35..00cb051 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1065,7 +1065,13 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
     surface_state_bo = dri_bo_alloc (pI830->bufmgr, "surface_state",
 				     3 * sizeof (brw_surface_state_padded),
 				     4096);
-    dri_bo_map (surface_state_bo, 1);
+    if (dri_bo_map (surface_state_bo, 1) != 0) {
+	dri_bo_unreference (surface_state_bo);
+	dri_bo_unreference (render_state->vertex_buffer_bo);
+	render_state->vertex_buffer_bo = NULL;
+
+	return FALSE;
+    }
     /* Set up the state buffer for the destination surface */
     i965_set_picture_surface_state(surface_state_bo, 0,
 				   pDstPicture, pDst, TRUE);
@@ -1083,7 +1089,15 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
     /* Set up the binding table of surface indices to surface state. */
     binding_table_bo = dri_bo_alloc (pI830->bufmgr, "binding_table",
 				     3 * sizeof (uint32_t), 4096);
-    dri_bo_map (binding_table_bo, 1);
+    if (dri_bo_map (binding_table_bo, 1) != 0) {
+	dri_bo_unreference(binding_table_bo);
+	dri_bo_unreference(surface_state_bo);
+	dri_bo_unreference (render_state->vertex_buffer_bo);
+	render_state->vertex_buffer_bo = NULL;
+
+	return FALSE;
+    }
+
     binding_table = binding_table_bo->virtual;
     binding_table[0] = 0 * sizeof (brw_surface_state_padded) + surface_state_bo->offset;
     dri_bo_emit_reloc (binding_table_bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
@@ -1495,7 +1509,9 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
 	_emit_batch_header_for_composite (pScrn);
 
     /* Map the vertex_buffer buffer object so we can write to it. */
-    dri_bo_map (render_state->vertex_buffer_bo, 1);
+    if (dri_bo_map (render_state->vertex_buffer_bo, 1) != 0)
+	return;		/* XXX what else to do here? */
+
     vb = render_state->vertex_buffer_bo->virtual;
 
     i = render_state->vb_offset;
diff --git a/src/i965_video.c b/src/i965_video.c
index 7e84ae0..e9f5ced 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -343,6 +343,25 @@ intel_emit_reloc(drm_intel_bo *bo, uint32_t offset,
     return target_bo->offset + target_offset;
 }
 
+static int
+intel_alloc_and_map(I830Ptr i830, char *name, int size,
+		    drm_intel_bo **bop, void *virtualp)
+{
+    drm_intel_bo    *bo;
+
+    bo = drm_intel_bo_alloc(i830->bufmgr, name, size, 4096);
+    if (!bo)
+	return -1;
+    if (drm_intel_bo_map(bo, TRUE) != 0) {
+	drm_intel_bo_unreference(bo);
+	return -1;
+    }
+    *bop = bo;
+    *(void **) virtualp = bo->virtual;
+    memset (bo->virtual, 0, size);
+    return 0;
+}
+
 static drm_intel_bo *
 i965_create_dst_surface_state(ScrnInfoPtr scrn,
 			      PixmapPtr pixmap)
@@ -352,13 +371,10 @@ i965_create_dst_surface_state(ScrnInfoPtr scrn,
     drm_intel_bo *pixmap_bo = i830_get_pixmap_bo(pixmap);
     drm_intel_bo *surf_bo;
 
-    surf_bo = drm_intel_bo_alloc(pI830->bufmgr,
-				    "textured video surface state",
-				    4096, 4096);
-    drm_intel_bo_map(surf_bo, TRUE);
-    dest_surf_state = surf_bo->virtual;
+    if (intel_alloc_and_map(pI830, "textured video surface state", 4096,
+			    &surf_bo, &dest_surf_state) != 0)
+	return NULL;
 
-    memset(dest_surf_state, 0, sizeof(*dest_surf_state));
     dest_surf_state->ss0.surface_type = BRW_SURFACE_2D;
     dest_surf_state->ss0.data_return_format = BRW_SURFACERETURNFORMAT_FLOAT32;
     if (pI830->cpp == 2) {
@@ -408,14 +424,11 @@ i965_create_src_surface_state(ScrnInfoPtr scrn,
     drm_intel_bo *surface_bo;
     struct brw_surface_state *src_surf_state;
 
-    surface_bo = drm_intel_bo_alloc(pI830->bufmgr,
-				    "textured video surface state",
-				    4096, 4096);
-    drm_intel_bo_map(surface_bo, TRUE);
-    src_surf_state = surface_bo->virtual;
+    if (intel_alloc_and_map(pI830, "textured video surface state", 4096,
+			    &surface_bo, &src_surf_state) != 0)
+	return NULL;
 
     /* Set up the source surface state buffer */
-    memset(src_surf_state, 0, sizeof(struct brw_surface_state));
     src_surf_state->ss0.surface_type = BRW_SURFACE_2D;
     src_surf_state->ss0.surface_format = src_surf_format;
     src_surf_state->ss0.writedisable_alpha = 0;
@@ -449,11 +462,9 @@ i965_create_binding_table(ScrnInfoPtr scrn, drm_intel_bo **surf_bos, int n_surf)
 
     /* Set up a binding table for our surfaces.  Only the PS will use it */
 
-    bind_bo = drm_intel_bo_alloc(pI830->bufmgr,
-				 "textured video binding table",
-				 4096, 4096);
-    drm_intel_bo_map(bind_bo, TRUE);
-    binding_table = bind_bo->virtual;
+    if (intel_alloc_and_map(pI830, "textured video binding table", 4096,
+			    &bind_bo, &binding_table) != 0)
+	return NULL;
 
     for (i = 0; i < n_surf; i++)
 	binding_table[i] = intel_emit_reloc(bind_bo, i * sizeof(uint32_t),
@@ -471,13 +482,9 @@ i965_create_sampler_state(ScrnInfoPtr scrn)
     drm_intel_bo *sampler_bo;
     struct brw_sampler_state *sampler_state;
 
-    sampler_bo = drm_intel_bo_alloc(pI830->bufmgr,
-				    "textured video sampler state",
-				    4096, 4096);
-    drm_intel_bo_map(sampler_bo, TRUE);
-    sampler_state = sampler_bo->virtual;
-
-    memset(sampler_state, 0, sizeof(struct brw_sampler_state));
+    if (intel_alloc_and_map(pI830, "textured video sampler state", 4096,
+			    &sampler_bo, &sampler_state) != 0)
+	return NULL;
 
     sampler_state->ss0.min_filter = BRW_MAPFILTER_LINEAR;
     sampler_state->ss0.mag_filter = BRW_MAPFILTER_LINEAR;
@@ -496,13 +503,11 @@ i965_create_vs_state(ScrnInfoPtr scrn)
     drm_intel_bo *vs_bo;
     struct brw_vs_unit_state *vs_state;
 
-    vs_bo = drm_intel_bo_alloc(pI830->bufmgr, "textured video vs state",
-			       4096, 4096);
-    drm_intel_bo_map(vs_bo, TRUE);
-    vs_state = vs_bo->virtual;
+    if (intel_alloc_and_map(pI830, "textured video vs state", 4096,
+			    &vs_bo, &vs_state) != 0)
+	return NULL;
 
     /* Set up the vertex shader to be disabled (passthrough) */
-    memset(vs_state, 0, sizeof(*vs_state));
     vs_state->thread4.nr_urb_entries = URB_VS_ENTRIES;
     vs_state->thread4.urb_entry_allocation_size = URB_VS_ENTRY_SIZE - 1;
     vs_state->vs6.vs_enable = 0;
@@ -521,6 +526,9 @@ i965_create_program(ScrnInfoPtr scrn, const uint32_t *program,
 
     prog_bo = drm_intel_bo_alloc(pI830->bufmgr, "textured video program",
 				 program_size, 4096);
+    if (!prog_bo)
+	return NULL;
+
     drm_intel_bo_subdata(prog_bo, 0, program_size, program);
 
     return prog_bo;
@@ -536,16 +544,20 @@ i965_create_sf_state(ScrnInfoPtr scrn)
     kernel_bo = i965_create_program(scrn, &sf_kernel_static[0][0],
 				    sizeof(sf_kernel_static));
 
-    sf_bo = drm_intel_bo_alloc(pI830->bufmgr, "textured video sf state",
-			       4096, 4096);
-    drm_intel_bo_map(sf_bo, TRUE);
-    sf_state = sf_bo->virtual;
+    if (!kernel_bo)
+	return NULL;
+
+    if (intel_alloc_and_map(pI830, "textured video sf state", 4096,
+			    &sf_bo, &sf_state) != 0)
+    {
+	drm_intel_bo_unreference(kernel_bo);
+	return NULL;
+    }
 
     /* Set up the SF kernel to do coord interp: for each attribute,
      * calculate dA/dx and dA/dy.  Hand these interpolation coefficients
      * back to SF which then hands pixels off to WM.
      */
-    memset(sf_state, 0, sizeof(*sf_state));
     sf_state->thread0.grf_reg_count = BRW_GRF_BLOCKS(SF_KERNEL_NUM_GRF);
     sf_state->thread0.kernel_start_pointer =
 	intel_emit_reloc(sf_bo, offsetof(struct brw_sf_unit_state, thread0),
@@ -595,13 +607,15 @@ i965_create_wm_state(ScrnInfoPtr scrn, drm_intel_bo *sampler_bo, Bool is_packed)
 	kernel_bo = i965_create_program(scrn, &ps_kernel_planar_static[0][0],
 					sizeof(ps_kernel_planar_static));
     }
+    if (!kernel_bo)
+	return NULL;
 
-    wm_bo = drm_intel_bo_alloc(pI830->bufmgr, "textured video wm state",
-			       4096, 4096);
-    drm_intel_bo_map(wm_bo, TRUE);
-    wm_state = wm_bo->virtual;
+    if (intel_alloc_and_map(pI830, "textured video wm state", sizeof (*wm_state),
+			    &wm_bo, &wm_state)) {
+	drm_intel_bo_unreference(kernel_bo);
+	return NULL;
+    }
 
-    memset(wm_state, 0, sizeof (*wm_state));
     wm_state->thread0.grf_reg_count = BRW_GRF_BLOCKS(PS_KERNEL_NUM_GRF);
     wm_state->thread0.kernel_start_pointer =
 	intel_emit_reloc(wm_bo, offsetof(struct brw_wm_unit_state, thread0),
@@ -647,12 +661,10 @@ i965_create_cc_vp_state(ScrnInfoPtr scrn)
     drm_intel_bo *cc_vp_bo;
     struct brw_cc_viewport *cc_viewport;
 
-    cc_vp_bo = drm_intel_bo_alloc(pI830->bufmgr, "textured video cc viewport",
-				  4096, 4096);
-    drm_intel_bo_map(cc_vp_bo, TRUE);
-    cc_viewport = cc_vp_bo->virtual;
+    if (intel_alloc_and_map(pI830, "textured video cc viewport", 4096,
+			    &cc_vp_bo, &cc_viewport) != 0)
+	return NULL;
 
-    memset (cc_viewport, 0, sizeof (*cc_viewport));
     cc_viewport->min_depth = -1.e35;
     cc_viewport->max_depth = 1.e35;
 
@@ -668,11 +680,14 @@ i965_create_cc_state(ScrnInfoPtr scrn)
     struct brw_cc_unit_state *cc_state;
 
     cc_vp_bo = i965_create_cc_vp_state(scrn);
+    if (!cc_vp_bo)
+	return NULL;
 
-    cc_bo = drm_intel_bo_alloc(pI830->bufmgr, "textured video cc state",
-			       4096, 4096);
-    drm_intel_bo_map(cc_bo, TRUE);
-    cc_state = cc_bo->virtual;
+    if (intel_alloc_and_map(pI830, "textured video cc state", sizeof(*cc_state),
+			    &cc_bo, &cc_state) != 0) {
+	drm_intel_bo_unreference(cc_vp_bo);
+	return NULL;
+    }
 
     /* Color calculator state */
     memset(cc_state, 0, sizeof(*cc_state));
@@ -809,44 +824,84 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 
     /* Upload kernels */
     surf_bos[0] = i965_create_dst_surface_state(pScrn, pPixmap);
+    if (!surf_bos[0])
+	return;
 
     for (src_surf = 0; src_surf < n_src_surf; src_surf++) {
-	surf_bos[src_surf + 1] =
+	drm_intel_bo *surf_bo =
 	    i965_create_src_surface_state(pScrn,
 					  src_surf_base[src_surf],
 					  src_width[src_surf],
 					  src_height[src_surf],
 					  src_pitch[src_surf],
 					  src_surf_format);
+	if (!surf_bo) {
+	    int	q;
+	    for(q = 0; q < src_surf + 1; q++)
+		drm_intel_bo_unreference(surf_bos[q]);
+	    return;
+	}
+	surf_bos[src_surf + 1] = surf_bo;
     }
     bind_bo = i965_create_binding_table(pScrn, surf_bos, n_src_surf + 1);
     for (i = 0; i < n_src_surf + 1; i++) {
 	drm_intel_bo_unreference(surf_bos[i]);
 	surf_bos[i] = NULL;
     }
+    if (!bind_bo)
+	return;
 
     if (pI830->video.gen4_sampler_bo == NULL)
 	pI830->video.gen4_sampler_bo = i965_create_sampler_state(pScrn);
-    if (pI830->video.gen4_sip_kernel_bo == NULL)
+    if (pI830->video.gen4_sip_kernel_bo == NULL) {
 	pI830->video.gen4_sip_kernel_bo =
 	    i965_create_program(pScrn, &sip_kernel_static[0][0],
 				sizeof(sip_kernel_static));
+	if (!pI830->video.gen4_sip_kernel_bo) {
+	    drm_intel_bo_unreference(bind_bo);
+	    return;
+	}
+    }
 
-    if (pI830->video.gen4_vs_bo == NULL)
+    if (pI830->video.gen4_vs_bo == NULL) {
 	pI830->video.gen4_vs_bo = i965_create_vs_state(pScrn);
-    if (pI830->video.gen4_sf_bo == NULL)
+	if (!pI830->video.gen4_vs_bo) {
+	    drm_intel_bo_unreference(bind_bo);
+	    return;
+	}
+    }
+    if (pI830->video.gen4_sf_bo == NULL) {
 	pI830->video.gen4_sf_bo = i965_create_sf_state(pScrn);
+	if (!pI830->video.gen4_sf_bo) {
+	    drm_intel_bo_unreference(bind_bo);
+	    return;
+	}
+    }
     if (pI830->video.gen4_wm_packed_bo == NULL) {
 	pI830->video.gen4_wm_packed_bo =
 	    i965_create_wm_state(pScrn, pI830->video.gen4_sampler_bo, TRUE);
+	if (!pI830->video.gen4_wm_packed_bo) {
+	    drm_intel_bo_unreference(bind_bo);
+	    return;
+	}
     }
+
     if (pI830->video.gen4_wm_planar_bo == NULL) {
 	pI830->video.gen4_wm_planar_bo =
 	    i965_create_wm_state(pScrn, pI830->video.gen4_sampler_bo, FALSE);
+	if (!pI830->video.gen4_wm_planar_bo) {
+	    drm_intel_bo_unreference(bind_bo);
+	    return;
+	}
     }
 
-    if (pI830->video.gen4_cc_bo == NULL)
+    if (pI830->video.gen4_cc_bo == NULL) {
 	pI830->video.gen4_cc_bo = i965_create_cc_state(pScrn);
+	if (!pI830->video.gen4_cc_bo) {
+	    drm_intel_bo_unreference(bind_bo);
+	    return;
+	}
+    }
 
     {
 	BEGIN_BATCH(2);
@@ -1033,11 +1088,10 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 
 	pbox++;
 
-	vb_bo = drm_intel_bo_alloc(pI830->bufmgr, "textured video vb",
-				   4096, 4096);
-	drm_intel_bo_map(vb_bo, TRUE);
+	if (intel_alloc_and_map(pI830, "textured video vb", 4096,
+				&vb_bo, &vb) != 0)
+	    break;
 
-	vb = vb_bo->virtual;
 	i = 0;
 	vb[i++] = (box_x2 - dxo) * src_scale_x;
 	vb[i++] = (box_y2 - dyo) * src_scale_y;
commit 8237faf8f3ca73ecdf0ef009a7d361b318726f6f
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Dec 15 15:35:35 2008 -0800

    Resize framebuffer on screen size change (requires UXA and DRI2)
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/i830.h b/src/i830.h
index a769a1c..25bf482 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -95,6 +95,7 @@ void i830_uxa_block_handler (ScreenPtr pScreen);
 
 #if defined(I830_USE_UXA) || defined(I830_USE_EXA)
 dri_bo *i830_get_pixmap_bo (PixmapPtr pixmap);
+void i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo);
 #endif
 
 #ifdef I830_USE_XAA
@@ -267,6 +268,8 @@ typedef struct _I830CrtcPrivateRec {
     
     int			    dpms_mode;
     
+    int			    x, y;
+
     /* Lookup table values to be set when the CRTC is enabled */
     uint8_t lut_r[256], lut_g[256], lut_b[256];
 
@@ -468,6 +471,8 @@ typedef struct _I830Rec {
    int drmMinor;
    Bool allocate_classic_textures;
 
+   Bool can_resize;
+
    Bool want_vblank_interrupts;
 #ifdef DAMAGE
    DamagePtr pDamage;
@@ -907,6 +912,10 @@ Bool i830_unbind_all_memory(ScrnInfoPtr pScrn);
 Bool I830BindAGPMemory(ScrnInfoPtr pScrn);
 Bool I830UnbindAGPMemory(ScrnInfoPtr pScrn);
 
+i830_memory *
+i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
+			  Bool secondary);
+
 /* i830_modes.c */
 DisplayModePtr i830_ddc_get_modes(xf86OutputPtr output);
 
diff --git a/src/i830_display.c b/src/i830_display.c
index 4e4ff34..50fbc4d 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -387,12 +387,14 @@ i830PipeSetBase(xf86CrtcPtr crtc, int x, int y)
     I830CrtcPrivatePtr	intel_crtc = crtc->driver_private;
     int pipe = intel_crtc->pipe;
     int plane = intel_crtc->plane;
-    unsigned long Start, Offset;
+    unsigned long Start, Offset, Stride;
     int dspbase = (plane == 0 ? DSPABASE : DSPBBASE);
     int dspsurf = (plane == 0 ? DSPASURF : DSPBSURF);
     int dsptileoff = (plane == 0 ? DSPATILEOFF : DSPBTILEOFF);
+    int dspstride = (plane == 0) ? DSPASTRIDE : DSPBSTRIDE;
 
     Offset = ((y * pScrn->displayWidth + x) * pI830->cpp);
+    Stride = pScrn->displayWidth * pI830->cpp;
     if (pI830->front_buffer == NULL) {
 	/* During startup we may be called as part of monitor detection while
 	 * there is no memory allocation done, so just supply a dummy base
@@ -403,6 +405,7 @@ i830PipeSetBase(xf86CrtcPtr crtc, int x, int y)
 	/* offset is done by shadow painting code, not here */
 	Start = (char *)crtc->rotatedData - (char *)pI830->FbBase;
 	Offset = 0;
+	Stride = intel_crtc->rotate_mem->pitch;
     } else if (I830IsPrimary(pScrn)) {
 	Start = pI830->front_buffer->offset;
     } else {
@@ -410,6 +413,10 @@ i830PipeSetBase(xf86CrtcPtr crtc, int x, int y)
 	Start = pI8301->front_buffer_2->offset;
     }
 
+    crtc->x = x;
+    crtc->y = y;
+
+    OUTREG(dspstride, Stride);
     if (IS_I965G(pI830)) {
         OUTREG(dspbase, Offset);
 	POSTING_READ(dspbase);
@@ -1199,7 +1206,6 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
     int vsync_reg = (pipe == 0) ? VSYNC_A : VSYNC_B;
     int pipesrc_reg = (pipe == 0) ? PIPEASRC : PIPEBSRC;
     int dspcntr_reg = (plane == 0) ? DSPACNTR : DSPBCNTR;
-    int dspstride_reg = (plane == 0) ? DSPASTRIDE : DSPBSTRIDE;
     int dsppos_reg = (plane == 0) ? DSPAPOS : DSPBPOS;
     int dspsize_reg = (plane == 0) ? DSPASIZE : DSPBSIZE;
     int i, num_outputs = 0;
@@ -1494,7 +1500,6 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
 	((adjusted_mode->CrtcVBlankEnd - 1) << 16));
     OUTREG(vsync_reg, (adjusted_mode->CrtcVSyncStart - 1) |
 	((adjusted_mode->CrtcVSyncEnd - 1) << 16));
-    OUTREG(dspstride_reg, pScrn->displayWidth * pI830->cpp);
     /* pipesrc and dspsize control the size that is scaled from, which should
      * always be the user's requested size.
      */
@@ -1640,10 +1645,28 @@ i830_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
 static void
 i830_crtc_set_origin(xf86CrtcPtr crtc, int x, int y)
 {
-    i830PipeSetBase(crtc, x, y);
+    if (crtc->enabled)
+	i830PipeSetBase(crtc, x, y);
 }
 #endif
 
+/* The screen bo has changed, reset each active crtc to point at
+ * the same location that it currently points at, but in the new bo
+ */
+void
+i830_set_new_crtc_bo(ScrnInfoPtr pScrn)
+{
+    xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+    int			i;
+
+    for (i = 0; i < xf86_config->num_crtc; i++) {
+	xf86CrtcPtr crtc = xf86_config->crtc[i];
+
+	if (crtc->enabled && !crtc->transform_in_use)
+	    i830PipeSetBase(crtc, crtc->x, crtc->y);
+    }
+}
+
 void
 i830DescribeOutputConfiguration(ScrnInfoPtr pScrn)
 {
diff --git a/src/i830_display.h b/src/i830_display.h
index 1eeb7f1..8d767b1 100644
--- a/src/i830_display.h
+++ b/src/i830_display.h
@@ -31,6 +31,7 @@
 void i830PipeSetBase(xf86CrtcPtr crtc, int x, int y);
 void i830WaitForVblank(ScrnInfoPtr pScrn);
 void i830DescribeOutputConfiguration(ScrnInfoPtr pScrn);
+void i830_set_new_crtc_bo(ScrnInfoPtr pScrn);
 
 xf86CrtcPtr i830GetLoadDetectPipe(xf86OutputPtr output, DisplayModePtr mode, int *dpms_mode);
 void i830ReleaseLoadDetectPipe(xf86OutputPtr output, int dpms_mode);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 27d8694..3e27b07 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1085,11 +1085,108 @@ I830IsPrimary(ScrnInfoPtr pScrn)
    return TRUE;
 }
 
+
+/*
+ * Adjust *width to allow for tiling if possible
+ */
+Bool
+i830_tiled_width(I830Ptr i830, int *width, int cpp)
+{
+    Bool    tiled = FALSE;
+
+    /*
+     * Adjust the display width to allow for front buffer tiling if possible
+     */
+    if (i830->tiling) {
+	if (IS_I965G(i830)) {
+	    int tile_pixels = 512 / cpp;
+	    *width = (*width + tile_pixels - 1) &
+		~(tile_pixels - 1);
+	    tiled = TRUE;
+	} else {
+	    /* Good pitches to allow tiling.  Don't care about pitches < 1024
+	     * pixels.
+	     */
+	    static const int pitches[] = {
+		1024,
+		2048,
+		4096,
+		8192,
+		0
+	    };
+	    int i;
+
+	    for (i = 0; pitches[i] != 0; i++) {
+		if (pitches[i] >= *width) {
+		    *width = pitches[i];
+		    tiled = TRUE;
+		    break;
+		}
+	    }
+	}
+    }
+    return tiled;
+}
+
+/*
+ * Pad to accelerator requirement
+ */
+int
+i830_pad_drawable_width(int width, int cpp)
+{
+    return (width + 63) & ~63;
+}
+
 static Bool
 i830_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 {
+    I830Ptr	i830 = I830PTR(scrn);
+    int		old_x = scrn->virtualX;
+    int		old_y = scrn->virtualY;
+    int		old_width = scrn->displayWidth;
+
+    if (old_x == width && old_y == height)
+	return TRUE;
+
     scrn->virtualX = width;
     scrn->virtualY = height;
+#ifdef DRI2
+    if (i830->can_resize && i830->front_buffer)
+    {
+	i830_memory *new_front, *old_front;
+	BoxRec	    mem_box;
+	Bool	    tiled;
+	ScreenPtr   screen = screenInfo.screens[scrn->scrnIndex];
+
+	scrn->displayWidth = i830_pad_drawable_width(width, i830->cpp);
+	tiled = i830_tiled_width(i830, &scrn->displayWidth, i830->cpp);
+	xf86DrvMsg(scrn->scrnIndex, X_INFO, "Allocate new frame buffer %dx%d stride %d\n",
+		   width, height, scrn->displayWidth);
+	I830Sync(scrn);
+	i830WaitForVblank(scrn);
+	new_front = i830_allocate_framebuffer(scrn, i830, &mem_box, FALSE);
+	if (!new_front) {
+	    scrn->virtualX = old_x;
+	    scrn->virtualY = old_y;
+	    scrn->displayWidth = old_width;
+	    return FALSE;
+	}
+	old_front = i830->front_buffer;
+	i830->front_buffer = new_front;
+	i830_set_pixmap_bo(screen->GetScreenPixmap(screen),
+			   new_front->bo);
+	scrn->fbOffset = i830->front_buffer->offset;
+	screen->ModifyPixmapHeader(screen->GetScreenPixmap(screen),
+				   width, height, -1, -1, scrn->displayWidth * i830->cpp,
+				   NULL);
+	xf86DrvMsg(scrn->scrnIndex, X_INFO, "New front buffer at 0x%lx\n",
+		   i830->front_buffer->offset);
+	i830_set_new_crtc_bo(scrn);
+	I830Sync(scrn);
+	i830WaitForVblank(scrn);
+	i830_free_memory(scrn, old_front);
+    }
+#endif
     return TRUE;
 }
 
@@ -1487,8 +1584,7 @@ I830PreInitCrtcConfig(ScrnInfoPtr pScrn)
     /* See i830_exa.c comments for why we limit the framebuffer size like this.
      */
     if (IS_I965G(pI830)) {
-	max_width = 8192;
-	max_height = 8192;
+	max_height = max_width = min(16384 / pI830->cpp, 8192);
     } else {
 	max_width = 2048;
 	max_height = 2048;
@@ -1595,7 +1691,16 @@ I830AccelMethodInit(ScrnInfoPtr pScrn)
     I830SetupOutputs(pScrn);
 
     SaveHWState(pScrn);
-    if (!xf86InitialConfiguration (pScrn, FALSE))
+    pI830->can_resize = FALSE;
+    if (pI830->accel == ACCEL_UXA && pI830->directRenderingType != DRI_XF86DRI)
+	pI830->can_resize = TRUE;
+
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+	       "Resizable framebuffer: %s (%d %d)\n",
+	       pI830->can_resize ? "available" : "not available",
+	       pI830->directRenderingType, pI830->accel);
+
+    if (!xf86InitialConfiguration (pScrn, pI830->can_resize))
     {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n");
 	RestoreHWState(pScrn);
@@ -2729,7 +2834,6 @@ failed:
 	    tiled ? "T" : "Unt");
     return FALSE;
 }
-
 /*
  * Try to allocate memory in several ways:
  *  1) If direct rendering is enabled, try to allocate enough memory for tiled
@@ -2744,39 +2848,9 @@ i830_memory_init(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     int savedDisplayWidth = pScrn->displayWidth;
-    int i;
     Bool tiled = FALSE;
 
-    /*
-     * Adjust the display width to allow for front buffer tiling if possible
-     */
-    if (pI830->tiling) {
-	if (IS_I965G(pI830)) {
-	    int tile_pixels = 512 / pI830->cpp;
-	    pScrn->displayWidth = (pScrn->displayWidth + tile_pixels - 1) &
-		~(tile_pixels - 1);
-	    tiled = TRUE;
-	} else {
-	    /* Good pitches to allow tiling.  Don't care about pitches < 1024
-	     * pixels.
-	     */
-	    static const int pitches[] = {
-		1024,
-		2048,
-		4096,
-		8192,
-		0
-	    };
-
-	    for (i = 0; pitches[i] != 0; i++) {
-		if (pitches[i] >= pScrn->displayWidth) {
-		    pScrn->displayWidth = pitches[i];
-		    tiled = TRUE;
-		    break;
-		}
-	    }
-	}
-    }
+    tiled = i830_tiled_width(pI830, &pScrn->displayWidth, pI830->cpp);
     /* Set up our video memory allocator for the chosen videoRam */
     if (!i830_allocator_init(pScrn, 0, pScrn->videoRam * KB(1))) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -2997,7 +3071,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    if (!pI830->use_drm_mode)
        hwp = VGAHWPTR(pScrn);
 
-   pScrn->displayWidth = (pScrn->virtualX + 63) & ~63;
+   pScrn->displayWidth = i830_pad_drawable_width(pScrn->virtualX, pI830->cpp);
 
    /*
     * The "VideoRam" config file parameter specifies the maximum amount of
@@ -3061,8 +3135,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     */
    if (pI830->directRenderingType == DRI_NONE && pI830->SWCursor)
        pI830->directRenderingType = DRI_DISABLED;
-
-   if (pI830->directRenderingType == DRI_NONE && I830DRIScreenInit(pScreen))
+   if (!pI830->can_resize && pI830->directRenderingType == DRI_NONE && I830DRIScreenInit(pScreen))
        pI830->directRenderingType = DRI_XF86DRI;
 
    if (pI830->directRenderingType == DRI_XF86DRI) {
diff --git a/src/i830_exa.c b/src/i830_exa.c
index aeffedd..b300fdc 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -758,6 +758,32 @@ i830_get_pixmap_bo(PixmapPtr pixmap)
     return NULL;
 }
 
+void
+i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pixmap->drawable.pScreen->myNum];
+    I830Ptr i830 = I830PTR(pScrn);
+    dri_bo  *old_bo = i830_get_pixmap_bo (pixmap);
+
+    if (old_bo)
+	dri_bo_unreference (old_bo);
+#if I830_USE_UXA
+    if (i830->accel == ACCEL_UXA) {
+	dri_bo_reference(bo);
+	dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, bo);
+    }
+#endif
+#ifdef XF86DRM_MODE
+    if (i830->accel == ACCEL_EXA) {
+	struct i830_exa_pixmap_priv *driver_priv =
+	    exaGetPixmapDriverPrivate(pixmap);
+	if (driver_priv) {
+	    dri_bo_reference(bo);
+	    driver_priv->bo = bo;
+	}
+    }
+#endif
+}
 #if defined(I830_USE_UXA)
 
 static void
@@ -893,6 +919,7 @@ void i830_uxa_create_screen_resources(ScreenPtr pScreen)
     if (bo != NULL) {
 	PixmapPtr   pixmap = pScreen->GetScreenPixmap(pScreen);
 	i830_uxa_set_pixmap_bo (pixmap, bo);
+	dri_bo_reference(bo);
     }
 }
 
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 2dee0bf..b6d8026 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1130,7 +1130,7 @@ IsTileable(ScrnInfoPtr pScrn, int pitch)
  * \param pI830 I830Ptr for the screen being allocated.
  * \param FbMemBox
  */
-static i830_memory *
+i830_memory *
 i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
 			  Bool secondary)
 {
@@ -1152,10 +1152,14 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
     /* We'll allocate the fb such that the root window will fit regardless of
      * rotation.
      */
-    if (!pI830->use_drm_mode && pScrn->virtualX > pScrn->virtualY)
-	fb_height = pScrn->virtualX;
-    else
-	fb_height = pScrn->virtualY;
+    fb_height = pScrn->virtualY;
+    if (!pI830->can_resize)
+    {
+	if (!pI830->use_drm_mode && pScrn->virtualX > pScrn->virtualY)
+	    fb_height = pScrn->virtualX;
+	else
+	    fb_height = pScrn->virtualY;
+    }
 
     FbMemBox->x1 = 0;
     FbMemBox->x2 = pScrn->displayWidth;
@@ -2115,114 +2119,8 @@ Bool i830_allocate_xvmc_buffer(ScrnInfoPtr pScrn, const char *name,
 }
 #endif
 
-#if 0
-static i830_memory *
-i830_allocate_framebuffer_new(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox)
-{
-    unsigned int pitch = pScrn->displayWidth * pI830->cpp;
-    unsigned long minspace, avail;
-    int cacheLines;
-    int align;
-    long size, fb_height;
-    char *name;
-    int flags;
-    i830_memory *front_buffer = NULL;
-    Bool tiling;
-
-    flags = ALLOW_SHARING;
-
-    /* Clear everything first. */
-    memset(FbMemBox, 0, sizeof(*FbMemBox));
-
-    fb_height = pScrn->virtualY;
-
-    FbMemBox->x1 = 0;
-    FbMemBox->x2 = pScrn->displayWidth;
-    FbMemBox->y1 = 0;
-    FbMemBox->y2 = fb_height;
-
-    /* Calculate how much framebuffer memory to allocate.  For the
-     * initial allocation, calculate a reasonable minimum.  This is
-     * enough for the virtual screen size, plus some pixmap cache
-     * space if we're using XAA.
-     */
-    minspace = pitch * pScrn->virtualY;
-    avail = pScrn->videoRam * 1024;
-    cacheLines = 0;
-
-    size = pitch * (fb_height + cacheLines);
-    size = ROUND_TO_PAGE(size);
-
-    name = "front buffer";
-
-    /* Front buffer tiling has to be disabled with G965 XAA because some of the
-     * acceleration operations (non-XY COLOR_BLT) can't be done to tiled
-     * buffers.
-     */
-    if (!(pI830->accel == ACCEL_EXA) && IS_I965G(pI830))
-	tiling = FALSE;
-    else
-	tiling = pI830->tiling;
-
-    if (pI830->use_drm_mode)
-      tiling = FALSE;
-
-    /* Attempt to allocate it tiled first if we have page flipping on. */
-    if (tiling && IsTileable(pScrn, pitch)) {
-	/* XXX: probably not the case on 965 */
-	if (IS_I9XX(pI830))
-	    align = MB(1);
-	else
-	    align = KB(512);
-	front_buffer = i830_allocate_memory_tiled(pScrn, name, size,
-						  pitch, align, flags,
-						  TILE_XMAJOR);
-    }
-
-    /* If not, attempt it linear */
-    if (front_buffer == NULL) {
-	front_buffer = i830_allocate_memory(pScrn, name, size, KB(64), flags);
-    }
-
-    if (front_buffer == NULL) {
-	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to allocate "
-		   "framebuffer. Is your VideoRAM set too low?\n");
-
-	return NULL;
-    }
-
-    return front_buffer;
-}
-#endif
 uint32_t
 i830_create_new_fb(ScrnInfoPtr pScrn, int width, int height, int *pitch)
 {
     return 0;
-
-#if 0
-    I830Ptr pI830 = I830PTR(pScrn);
-    i830_memory *old_buffer;
-
-    pScrn->virtualX = width;
-    pScrn->virtualY = height;
-    pScrn->displayWidth = (pScrn->virtualX + 63) & ~63;
-
-    *pitch = pScrn->displayWidth * pI830->cpp;
-
-    old_buffer = pI830->front_buffer;
-
-    pI830->front_buffer =
-	i830_allocate_framebuffer_new(pScrn, pI830, &pI830->FbMemBox);
-
-    ErrorF("old front size %08lx, new front size %08lx\n",
-	   old_buffer->bo->size, pI830->front_buffer->bo->size);
-    ErrorF("old front offset %08lx, new front offset %08lx\n",
-	   old_buffer->bo->offset, pI830->front_buffer->bo->offset);
-
-    i830_free_memory(pScrn, old_buffer);
-
-    i830_update_front_offset(pScrn);
-
-    return pI830->front_buffer->bo->handle;
-#endif
 }
commit 21bd4e8974e4c0e83f5f95adb0fc17290444caf5
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Dec 15 15:19:00 2008 -0800

    Make i830_allocate_memory take tiling parameters.
    
    This eliminates the separate i830_allocate_memory_tiled function which means
    that all memory objects will have tiling parameters set correctly.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/i830.h b/src/i830.h
index 3381c3c..a769a1c 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -141,6 +141,8 @@ enum tile_format {
     TILE_YMAJOR
 };
 
+#define PITCH_NONE 0
+
 /** Record of a linear allocation in the aperture. */
 typedef struct _i830_memory i830_memory;
 struct _i830_memory {
@@ -843,13 +845,9 @@ Bool i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset,
 			 unsigned long size);
 void i830_allocator_fini(ScrnInfoPtr pScrn);
 i830_memory * i830_allocate_memory(ScrnInfoPtr pScrn, const char *name,
-				   unsigned long size, unsigned long alignment,
-				   int flags);
-i830_memory *i830_allocate_memory_tiled(ScrnInfoPtr pScrn, const char *name,
-					unsigned long size,
-					unsigned long pitch,
-					unsigned long alignment, int flags,
-					enum tile_format tile_format);
+				   unsigned long size, unsigned long pitch,
+				   unsigned long alignment, int flags,
+				   enum tile_format tile_format);
 void i830_describe_allocations(ScrnInfoPtr pScrn, int verbosity,
 			       const char *prefix);
 void i830_reset_allocations(ScrnInfoPtr pScrn);
@@ -870,6 +868,13 @@ extern uint32_t i830_create_new_fb(ScrnInfoPtr pScrn, int width, int height,
 				   int *pitch);
 extern Bool I830IsPrimary(ScrnInfoPtr pScrn);
 
+Bool
+i830_tiled_width(I830Ptr i830, int *width, int cpp);
+
+int
+i830_pad_drawable_width(int width, int cpp);
+
+
 extern Bool I830I2CInit(ScrnInfoPtr pScrn, I2CBusPtr *bus_ptr, int i2c_reg,
 			char *name);
 
diff --git a/src/i830_display.c b/src/i830_display.c
index 7a9999a..4e4ff34 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1571,12 +1571,14 @@ i830_crtc_shadow_allocate (xf86CrtcPtr crtc, int width, int height)
     unsigned long rotate_pitch;
     int align = KB(4), size;
 
-    rotate_pitch = pScrn->displayWidth * pI830->cpp;
+    width = i830_pad_drawable_width(width, pI830->cpp);
+    rotate_pitch = width * pI830->cpp;
     size = rotate_pitch * height;
 
     assert(intel_crtc->rotate_mem == NULL);
     intel_crtc->rotate_mem = i830_allocate_memory(pScrn, "rotated crtc",
-						  size, align, 0);
+						  size, rotate_pitch, align,
+						  0, TILE_NONE);
     if (intel_crtc->rotate_mem == NULL) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		   "Couldn't allocate shadow memory for rotated CRTC\n");
@@ -1595,13 +1597,13 @@ i830_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 {
     ScrnInfoPtr pScrn = crtc->scrn;
     I830Ptr pI830 = I830PTR(pScrn);
-    unsigned long rotate_pitch;
+    int rotate_pitch;
     PixmapPtr rotate_pixmap;
 
     if (!data)
 	data = i830_crtc_shadow_allocate (crtc, width, height);
     
-    rotate_pitch = pScrn->displayWidth * pI830->cpp;
+    rotate_pitch = i830_pad_drawable_width(width, pI830->cpp) * pI830->cpp;
 
     rotate_pixmap = GetScratchPixmapHeader(pScrn->pScreen,
 					   width, height,
diff --git a/src/i830_memory.c b/src/i830_memory.c
index f3baa60..2dee0bf 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -120,7 +120,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 static i830_memory *
 i830_allocate_aperture(ScrnInfoPtr pScrn, const char *name,
-		       long size, unsigned long alignment, int flags);
+		       unsigned long size, unsigned long pitch,
+		       unsigned long alignment, int flags,
+		       enum tile_format tile_format);
 
 static int i830_set_tiling(ScrnInfoPtr pScrn, unsigned int offset,
 			   unsigned int pitch, unsigned int size,
@@ -493,8 +495,9 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
 	/* Create the aperture allocation */
 	pI830->memory_manager =
 	    i830_allocate_aperture(pScrn, "DRI memory manager",
-				   mmsize, GTT_PAGE_SIZE,
-				   ALIGN_BOTH_ENDS | NEED_NON_STOLEN);
+				   mmsize, 0, GTT_PAGE_SIZE,
+				   ALIGN_BOTH_ENDS | NEED_NON_STOLEN,
+				   TILE_NONE);
 
 	if (pI830->memory_manager != NULL) {
 	    if (!pI830->use_drm_mode) {
@@ -637,7 +640,9 @@ i830_get_stolen_physical(ScrnInfoPtr pScrn, unsigned long offset,
  */
 static i830_memory *
 i830_allocate_aperture(ScrnInfoPtr pScrn, const char *name,
-		       long size, unsigned long alignment, int flags)
+		       unsigned long size, unsigned long pitch,
+		       unsigned long alignment, int flags,
+		       enum tile_format tile_format)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     i830_memory *mem, *scan;
@@ -659,6 +664,9 @@ i830_allocate_aperture(ScrnInfoPtr pScrn, const char *name,
     mem->size = size;
     mem->allocated_size = size;
     mem->alignment = alignment;
+    mem->tiling = tile_format;
+    mem->pitch = pitch;
+    mem->fence_nr = -1;
 
     if (alignment < GTT_PAGE_SIZE)
 	alignment = GTT_PAGE_SIZE;
@@ -753,10 +761,14 @@ i830_allocate_agp_memory(ScrnInfoPtr pScrn, i830_memory *mem, int flags)
 #ifdef XF86DRI
 static i830_memory *
 i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
-			unsigned long size, unsigned long align, int flags)
+			unsigned long size, unsigned long pitch,
+			unsigned long align, int flags,
+			enum tile_format tile_format)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     i830_memory *mem;
+    uint32_t bo_tiling_mode = I915_TILING_NONE;
+    int	    ret;
 
     assert((flags & NEED_PHYSICAL_ADDR) == 0);
 
@@ -788,9 +800,33 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
     mem->size = size;
     mem->allocated_size = size;
     mem->alignment = align;
+    mem->tiling = tile_format;
+    mem->pitch = pitch;
+    mem->fence_nr = -1;
     if (flags & NEED_LIFETIME_FIXED)
 	mem->lifetime_fixed_offset = TRUE;
 
+    switch (tile_format) {
+    case TILE_XMAJOR:
+	bo_tiling_mode = I915_TILING_X;
+	break;
+    case TILE_YMAJOR:
+	bo_tiling_mode = I915_TILING_Y;
+	break;
+    case TILE_NONE:
+    default:
+	bo_tiling_mode = I915_TILING_NONE;
+	break;
+    }
+
+    ret = dri_bo_set_tiling(mem->bo, &bo_tiling_mode);
+    if (ret != 0 || (bo_tiling_mode == I915_TILING_NONE && tile_format != TILE_NONE)) {
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		   "Failed to set tiling on %s: %s\n",
+		   mem->name,
+		   ret == 0 ? "rejected by kernel" : strerror(errno));
+	mem->tiling = TILE_NONE;
+    }
     /* Bind it if we currently control the VT */
     if (pScrn->vtSema || pI830->use_drm_mode) {
 	if (!i830_bind_memory(pScrn, mem)) {
@@ -812,7 +848,7 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
 }
 #endif /* XF86DRI */
 
-/* Allocates video memory at the given size and alignment.
+/* Allocates video memory at the given size, pitch, alignment and tile format.
  *
  * The memory will be bound automatically when the driver is in control of the
  * VT.  When the kernel memory manager is available and compatible with flags
@@ -832,22 +868,51 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
  */
 i830_memory *
 i830_allocate_memory(ScrnInfoPtr pScrn, const char *name,
-		     unsigned long size, unsigned long alignment, int flags)
+		     unsigned long size, unsigned long pitch,
+		     unsigned long alignment, int flags,
+		     enum tile_format tile_format)
 {
     i830_memory *mem;
-
 #ifdef XF86DRI
     I830Ptr pI830 = I830PTR(pScrn);
+#endif
 
+    /* Manage tile alignment and size constraints */
+    if (tile_format != TILE_NONE) {
+	/* Only allocate page-sized increments. */
+	size = ALIGN(size, GTT_PAGE_SIZE);
+
+	/* Check for maximum tiled region size */
+	if (IS_I9XX(pI830)) {
+	    if (size > MB(128))
+		return NULL;
+	} else {
+	    if (size > MB(64))
+		return NULL;
+	}
+
+	/* round to size necessary for the fence register to work */
+	size = i830_get_fence_size(pScrn, size);
+	if (IS_I965G(pI830)) {
+	    if (alignment < GTT_PAGE_SIZE)
+		alignment = GTT_PAGE_SIZE;
+	} else {
+	    /* The offset has to be aligned to at least the size of the fence
+	     * region.
+	     */
+	    alignment = size;
+	}
+    }
+#ifdef XF86DRI
     if (pI830->use_drm_mode || (pI830->memory_manager &&
 				!(flags & NEED_PHYSICAL_ADDR) &&
 				!(flags & NEED_LIFETIME_FIXED)))
     {
-	return i830_allocate_memory_bo(pScrn, name, size, alignment, flags);
+	return i830_allocate_memory_bo(pScrn, name, size, pitch, alignment, flags, tile_format);
     } else
 #endif /* XF86DRI */
     {
-	mem = i830_allocate_aperture(pScrn, name, size, alignment, flags);
+	mem = i830_allocate_aperture(pScrn, name, size, pitch, alignment, flags, tile_format);
 	if (mem == NULL)
 	    return NULL;
 
@@ -867,88 +932,6 @@ i830_allocate_memory(ScrnInfoPtr pScrn, const char *name,
     return mem;
 }
 
-/* Allocate a tiled region with the given size and pitch.
- *
- * As is, we might miss out on tiling some allocations on older hardware with
- * large framebuffer size and a small aperture size, where the first
- * allocations use a large alignment even though we've got fences to spare, and
- * the later allocations can't find enough aperture space left.  We could do
- * some search across all allocation options to fix this, probably, but that
- * would be another rewrite.
- */
-i830_memory *
-i830_allocate_memory_tiled(ScrnInfoPtr pScrn, const char *name,
-			   unsigned long size, unsigned long pitch,
-			   unsigned long alignment, int flags,
-			   enum tile_format tile_format)
-{
-    I830Ptr pI830 = I830PTR(pScrn);
-    unsigned long aper_size;
-    unsigned long aper_align;
-    i830_memory *mem;
-
-    if (tile_format == TILE_NONE)
-	return i830_allocate_memory(pScrn, name, size, alignment, flags);
-
-    /* Only allocate page-sized increments. */
-    size = ALIGN(size, GTT_PAGE_SIZE);
-
-    /* Check for maximum tiled region size */
-    if (IS_I9XX(pI830)) {
-	if (size > MB(128))
-	    return NULL;
-    } else {
-	if (size > MB(64))
-	    return NULL;
-    }
-
-    aper_size = i830_get_fence_size(pScrn, size);
-    if (IS_I965G(pI830)) {
-	aper_align = GTT_PAGE_SIZE;
-    } else {
-	/* The offset has to be aligned to at least the size of the fence
-	 * region.
-	 */
-	aper_align = aper_size;
-    }
-    if (aper_align < alignment)
-	aper_align = alignment;
-
-    mem = i830_allocate_memory(pScrn, name, aper_size, aper_align, flags);
-    if (mem == NULL)
-	return NULL;
-    mem->size = size;
-    mem->tiling = tile_format;
-    mem->pitch = pitch;
-    mem->fence_nr = -1;
-
-#ifdef XF86DRI
-    if (mem->bo != 0) {
-	uint32_t    tiling_mode = I915_TILING_NONE;
-	int	    ret;
-
-	if (tile_format == TILE_XMAJOR)
-	    tiling_mode = I915_TILING_X;
-	else
-	    tiling_mode = I915_TILING_Y;
-
-	ret = dri_bo_set_tiling(mem->bo, &tiling_mode);
-	if (ret != 0 || tiling_mode == I915_TILING_NONE) {
-		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-			   "Failed to set tiling on %s: %s\n",
-			   mem->name,
-			   ret == 0 ? "rejected by kernel" : strerror(errno));
-		i830_free_memory(pScrn, mem);
-		return i830_allocate_memory(pScrn, name, size, alignment,
-					    flags);
-	    return FALSE;
-	}
-    }
-#endif
-
-    return mem;
-}
-
 void
 i830_describe_allocations(ScrnInfoPtr pScrn, int verbosity, const char *prefix)
 {
@@ -1042,9 +1025,9 @@ i830_allocate_ringbuffer(ScrnInfoPtr pScrn)
      * the ringbuffer since init time, so allocate it fixed for its lifetime.
      */
     pI830->LpRing->mem = i830_allocate_memory(pScrn, "ring buffer",
-					      PRIMARY_RINGBUFFER_SIZE,
+					      PRIMARY_RINGBUFFER_SIZE, PITCH_NONE,
 					      GTT_PAGE_SIZE,
-					      NEED_LIFETIME_FIXED);
+					      NEED_LIFETIME_FIXED, TILE_NONE);
     if (pI830->LpRing->mem == NULL) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		   "Failed to allocate Ring Buffer space\n");
@@ -1080,8 +1063,8 @@ i830_allocate_overlay(ScrnInfoPtr pScrn)
     }
 
     pI830->overlay_regs = i830_allocate_memory(pScrn, "overlay registers",
-					       OVERLAY_SIZE, GTT_PAGE_SIZE,
-					       flags);
+					       OVERLAY_SIZE, PITCH_NONE, GTT_PAGE_SIZE,
+					       flags, TILE_NONE);
     if (pI830->overlay_regs == NULL) {
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 		   "Failed to allocate Overlay register space.\n");
@@ -1159,7 +1142,7 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
     char *name;
     int flags;
     i830_memory *front_buffer = NULL;
-    Bool tiling;
+    enum tile_format tile_format = TILE_NONE;
 
     flags = ALLOW_SHARING;
 
@@ -1233,33 +1216,34 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox,
      * acceleration operations (non-XY COLOR_BLT) can't be done to tiled
      * buffers.
      */
-    if ((pI830->accel <= ACCEL_XAA && IS_I965G(pI830)) || pI830->use_drm_mode)
-	tiling = FALSE;
-    else
-	tiling = pI830->tiling;
+    if (pI830->tiling)
+	tile_format = TILE_XMAJOR;
+    if (pI830->accel == ACCEL_XAA && IS_I965G(pI830))
+	tile_format = TILE_NONE;
+    if (pI830->use_drm_mode)
+	tile_format = TILE_NONE;
+
+    if (!IsTileable(pScrn, pitch))
+	tile_format = TILE_NONE;
 
-    if (!i830_check_display_stride(pScrn, pitch, tiling)) {
+    if (!i830_check_display_stride(pScrn, pitch, tile_format != TILE_NONE)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Front buffer stride %d kB "
 		"exceed display limit\n", pitch/1024);
 	return NULL;
     }
 
     /* Attempt to allocate it tiled first if we have page flipping on. */
-    if (tiling && IsTileable(pScrn, pitch)) {
+    if (tile_format != TILE_NONE) {
 	/* XXX: probably not the case on 965 */
 	if (IS_I9XX(pI830))
 	    align = MB(1);
 	else
 	    align = KB(512);
-	front_buffer = i830_allocate_memory_tiled(pScrn, name, size,
-						  pitch, align, flags,
-						  TILE_XMAJOR);
-    }
-
-    /* If not, attempt it linear */
-    if (front_buffer == NULL) {
-	front_buffer = i830_allocate_memory(pScrn, name, size, KB(64), flags);
-    }
+    } else
+	align = KB(64);
+    front_buffer = i830_allocate_memory(pScrn, name, size,
+					pitch, align, flags,
+					tile_format);
 
     if (front_buffer == NULL) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to allocate "
@@ -1303,8 +1287,8 @@ i830_allocate_cursor_buffers(ScrnInfoPtr pScrn)
     size = xf86_config->num_crtc * (HWCURSOR_SIZE + HWCURSOR_SIZE_ARGB);
 
     pI830->cursor_mem = i830_allocate_memory(pScrn, "HW cursors",
-					     size, GTT_PAGE_SIZE,
-					     flags);
+					     size, PITCH_NONE, GTT_PAGE_SIZE,
+					     flags, TILE_NONE);
     if (pI830->cursor_mem != NULL)
 	return TRUE;
 
@@ -1318,14 +1302,18 @@ i830_allocate_cursor_buffers(ScrnInfoPtr pScrn)
 	pI830->cursor_mem_classic[i] = i830_allocate_memory (pScrn, 
 							     "Core cursor",
 							     HWCURSOR_SIZE,
+							     PITCH_NONE,
 							     GTT_PAGE_SIZE,
-							     flags);
+							     flags,
+							     TILE_NONE);
 	if (!pI830->cursor_mem_classic[i])
 	    return FALSE;
 	pI830->cursor_mem_argb[i] = i830_allocate_memory (pScrn, "ARGB cursor",
 							  HWCURSOR_SIZE_ARGB,
+							  PITCH_NONE,
 							  GTT_PAGE_SIZE,
-							  flags);
+							  flags,
+							  TILE_NONE);
 	if (!pI830->cursor_mem_argb[i])
 	    return FALSE;
 
@@ -1370,7 +1358,9 @@ static void i830_setup_fb_compression(ScrnInfoPtr pScrn)
      */
     pI830->compressed_front_buffer =
 	i830_allocate_memory(pScrn, "compressed frame buffer",
-			     compressed_size, KB(4), NEED_PHYSICAL_ADDR);
+			     compressed_size, PITCH_NONE,
+			     KB(4), NEED_PHYSICAL_ADDR,
+			     TILE_NONE);
 
     if (!pI830->compressed_front_buffer) {
 	pI830->fb_compression = FALSE;
@@ -1380,8 +1370,10 @@ static void i830_setup_fb_compression(ScrnInfoPtr pScrn)
     if (!IS_GM45(pI830)) {
 	pI830->compressed_ll_buffer =
 	    i830_allocate_memory(pScrn, "compressed ll buffer",
-				 FBC_LL_SIZE + FBC_LL_PAD, KB(4),
-				 NEED_PHYSICAL_ADDR);
+				 FBC_LL_SIZE + FBC_LL_PAD,
+				 PITCH_NONE, KB(4),
+				 NEED_PHYSICAL_ADDR,
+				 TILE_NONE);
 	if (!pI830->compressed_ll_buffer) {
 	    i830_free_memory(pScrn, pI830->compressed_front_buffer);
 	    pI830->fb_compression = FALSE;
@@ -1435,7 +1427,8 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 
     if (pI830->memory_manager == NULL) {
 	pI830->fake_bufmgr_mem = i830_allocate_memory(pScrn, "fake bufmgr",
-						      MB(1), GTT_PAGE_SIZE, 0);
+						      MB(1), PITCH_NONE, GTT_PAGE_SIZE, 0,
+						      TILE_NONE);
 	if (pI830->fake_bufmgr_mem == NULL) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 		       "Failed to allocate fake bufmgr space.\n");
@@ -1450,7 +1443,8 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 	pI830->gen4_render_state_mem =
 	    i830_allocate_memory(pScrn, "exa G965 state buffer",
 				 gen4_render_state_size(pScrn),
-				 GTT_PAGE_SIZE, 0);
+				 PITCH_NONE,
+				 GTT_PAGE_SIZE, 0, TILE_NONE);
 	if (pI830->gen4_render_state_mem == NULL) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 		    "Failed to allocate exa state buffer for 965.\n");
@@ -1500,7 +1494,8 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 	     */
 	    pI830->exa_offscreen =
 		i830_allocate_memory(pScrn, "exa offscreen",
-				     size, 1, NEED_LIFETIME_FIXED);
+				     size, PITCH_NONE, 1, NEED_LIFETIME_FIXED,
+				     TILE_NONE);
 	    if (pI830->exa_offscreen == NULL) {
 		xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 			   "Failed to allocate EXA offscreen memory.\n");
@@ -1517,12 +1512,14 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 	 */
 	pI830->xaa_scratch =
 	    i830_allocate_memory(pScrn, "xaa scratch", MAX_SCRATCH_BUFFER_SIZE,
-				 GTT_PAGE_SIZE, NEED_LIFETIME_FIXED);
+				 PITCH_NONE, GTT_PAGE_SIZE, NEED_LIFETIME_FIXED,
+				 TILE_NONE);
 	if (pI830->xaa_scratch == NULL) {
 	    pI830->xaa_scratch =
 		i830_allocate_memory(pScrn, "xaa scratch",
-				     MIN_SCRATCH_BUFFER_SIZE, GTT_PAGE_SIZE,
-				     NEED_LIFETIME_FIXED);
+				     MIN_SCRATCH_BUFFER_SIZE, PITCH_NONE,
+				     GTT_PAGE_SIZE, NEED_LIFETIME_FIXED,
+				     TILE_NONE);
 	    if (pI830->xaa_scratch == NULL) {
 		xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 			   "Failed to allocate scratch buffer space\n");
@@ -1536,13 +1533,15 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 	{
 	    pI830->xaa_scratch_2 =
 		i830_allocate_memory(pScrn, "xaa scratch 2",
-				     MAX_SCRATCH_BUFFER_SIZE, GTT_PAGE_SIZE,
-				     NEED_LIFETIME_FIXED);
+				     MAX_SCRATCH_BUFFER_SIZE, PITCH_NONE,
+				     GTT_PAGE_SIZE, NEED_LIFETIME_FIXED,
+				     TILE_NONE);
 	    if (pI830->xaa_scratch_2 == NULL) {
 		pI830->xaa_scratch_2 =
 		    i830_allocate_memory(pScrn, "xaa scratch 2",
-					 MIN_SCRATCH_BUFFER_SIZE,
-					 GTT_PAGE_SIZE, NEED_LIFETIME_FIXED);
+					 MIN_SCRATCH_BUFFER_SIZE, PITCH_NONE,
+					 GTT_PAGE_SIZE, NEED_LIFETIME_FIXED,
+					 TILE_NONE);
 		if (pI830->xaa_scratch_2 == NULL) {
 		    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 			       "Failed to allocate secondary scratch "
@@ -1577,6 +1576,7 @@ i830_allocate_backbuffer(ScrnInfoPtr pScrn, i830_memory **buffer,
     unsigned int pitch = pScrn->displayWidth * pI830->cpp;
     unsigned long size;
     int height;
+    enum tile_format tile_format = TILE_NONE;;
 
     if (pI830->rotation & (RR_Rotate_0 | RR_Rotate_180))
 	height = pScrn->virtualY;
@@ -1587,22 +1587,18 @@ i830_allocate_backbuffer(ScrnInfoPtr pScrn, i830_memory **buffer,
     if (pI830->tiling && IsTileable(pScrn, pitch))
     {
 	size = ROUND_TO_PAGE(pitch * ALIGN(height, 16));
-	*buffer = i830_allocate_memory_tiled(pScrn, name, size, pitch,
-					     GTT_PAGE_SIZE,
-					     ALIGN_BOTH_ENDS |
-					     ALLOW_SHARING,
-					     TILE_XMAJOR);
+	tile_format = TILE_XMAJOR;
     }
-
-    /* Otherwise, just allocate it linear.  The offset must stay constant
-     * currently because we don't ever update the DRI maps after screen init.
-     */
-    if (*buffer == NULL) {
+    else
+    {
 	size = ROUND_TO_PAGE(pitch * height);
-	*buffer = i830_allocate_memory(pScrn, name, size, GTT_PAGE_SIZE,
-				       ALIGN_BOTH_ENDS |
-				       ALLOW_SHARING);
+	tile_format = TILE_NONE;
     }
+    *buffer = i830_allocate_memory(pScrn, name, size, pitch,
+				   GTT_PAGE_SIZE,
+				   ALIGN_BOTH_ENDS |
+				   ALLOW_SHARING,
+				   tile_format);
 
     if (*buffer == NULL) {
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
@@ -1620,42 +1616,27 @@ i830_allocate_depthbuffer(ScrnInfoPtr pScrn)
     unsigned long size;
     unsigned int pitch = pScrn->displayWidth * pI830->cpp;
     int height;
+    int flags;
+    enum tile_format tile_format = TILE_NONE;
 
-    /* XXX: this rotation stuff is bogus */
-    if (pI830->rotation & (RR_Rotate_0 | RR_Rotate_180))
-	height = pScrn->virtualY;
-    else
-	height = pScrn->virtualX;
+    height = pScrn->virtualY;
 
     /* First try allocating it tiled */
+    flags = ALLOW_SHARING;
     if (pI830->tiling && IsTileable(pScrn, pitch))
     {
-	enum tile_format tile_format;
-
-	size = ROUND_TO_PAGE(pitch * ALIGN(height, 16));
-
 	/* The 965 requires that the depth buffer be in Y Major format, while
 	 * the rest appear to fail when handed that format.
 	 */
 	tile_format = IS_I965G(pI830) ? TILE_YMAJOR: TILE_XMAJOR;
-
-	pI830->depth_buffer =
-	    i830_allocate_memory_tiled(pScrn, "depth buffer", size, pitch,
-				       GTT_PAGE_SIZE,
-				       ALIGN_BOTH_ENDS |
-				       ALLOW_SHARING,
-				       tile_format);
+	height = ALIGN(height, 16);
+	flags |= ALIGN_BOTH_ENDS;
     }
+    size = ROUND_TO_PAGE(pitch * height);
 
-    /* Otherwise, allocate it linear. The offset must stay constant
-     * currently because we don't ever update the DRI maps after screen init.
-     */
-    if (pI830->depth_buffer == NULL) {
-	size = ROUND_TO_PAGE(pitch * height);
-	pI830->depth_buffer =
-	    i830_allocate_memory(pScrn, "depth buffer", size, GTT_PAGE_SIZE,
-				 ALLOW_SHARING);
-    }
+    pI830->depth_buffer =
+	    i830_allocate_memory(pScrn, "depth buffer", size, pitch,
+				 GTT_PAGE_SIZE, flags, tile_format);
 
     if (pI830->depth_buffer == NULL) {
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
@@ -1696,9 +1677,11 @@ i830_allocate_texture_memory(ScrnInfoPtr pScrn)
 	 * made conditional on DRM version.
 	 */
 	pI830->textures = i830_allocate_memory(pScrn, "classic textures", size,
+					       PITCH_NONE,
 					       GTT_PAGE_SIZE,
 					       ALLOW_SHARING |
-					       NEED_LIFETIME_FIXED);
+					       NEED_LIFETIME_FIXED,
+					       TILE_NONE);
 	if (pI830->textures == NULL) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 		       "Failed to allocate texture space.\n");
@@ -1723,7 +1706,8 @@ i830_allocate_hwstatus(ScrnInfoPtr pScrn)
     if (HWS_NEED_NONSTOLEN(pI830))
 	    flags |= NEED_NON_STOLEN;
     pI830->hw_status = i830_allocate_memory(pScrn, "HW status",
-	    HWSTATUS_PAGE_SIZE, GTT_PAGE_SIZE, flags);
+	    HWSTATUS_PAGE_SIZE, PITCH_NONE, GTT_PAGE_SIZE, flags,
+					    TILE_NONE);
     if (pI830->hw_status == NULL) {
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 		"Failed to allocate hw status page.\n");
@@ -1738,8 +1722,10 @@ i830_allocate_pwrctx(ScrnInfoPtr pScrn)
     I830Ptr pI830 = I830PTR(pScrn);
 
     pI830->power_context = i830_allocate_memory(pScrn, "power context",
-						PWRCTX_SIZE, GTT_PAGE_SIZE,
-						NEED_LIFETIME_FIXED);
+						PWRCTX_SIZE, PITCH_NONE,
+						GTT_PAGE_SIZE,
+						NEED_LIFETIME_FIXED,
+						TILE_NONE);
     if (!pI830->power_context) {
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 		"Failed to allocate power context.\n");
@@ -1805,6 +1791,11 @@ i830_set_tiling(ScrnInfoPtr pScrn, unsigned int offset,
 
     assert(tile_format != TILE_NONE);
 
+    if (pI830->need_sync) {
+	I830Sync(pScrn);
+	pI830->need_sync = FALSE;
+    }
+
     if (IS_I965G(pI830))
 	max_fence = FENCE_NEW_NR;
     else
@@ -2108,8 +2099,8 @@ Bool i830_allocate_xvmc_buffer(ScrnInfoPtr pScrn, const char *name,
                                i830_memory **buffer, unsigned long size,
                                int flags)
 {
-    *buffer = i830_allocate_memory(pScrn, name, size,
-                                   GTT_PAGE_SIZE, flags);
+    *buffer = i830_allocate_memory(pScrn, name, size, PITCH_NONE,
+                                   GTT_PAGE_SIZE, flags, TILE_NONE);
 
     if (!*buffer) {
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
diff --git a/src/i830_video.c b/src/i830_video.c
index 87fa020..8a3718d 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2389,8 +2389,9 @@ I830PutImage(ScrnInfoPtr pScrn,
     }
 
     if (pPriv->buf == NULL) {
-	pPriv->buf = i830_allocate_memory(pScrn, "xv buffer", alloc_size, 16,
-					  0);
+	pPriv->buf = i830_allocate_memory(pScrn, "xv buffer",
+					  alloc_size, 0, 16,
+					  0, TILE_NONE);
     }
 
     if (pPriv->buf == NULL)
@@ -2724,7 +2725,7 @@ I830AllocateSurface(ScrnInfoPtr pScrn,
     fbpitch = pI830->cpp * pScrn->displayWidth;
     size = pitch * h;
 
-    pPriv->buf = i830_allocate_memory(pScrn, "xv surface buffer", size, 16, 0);
+    pPriv->buf = i830_allocate_memory(pScrn, "xv surface buffer", size, 0, 16, 0, TILE_NONE);
     if (pPriv->buf == NULL) {
 	xfree(surface->pitches);
 	xfree(surface->offsets);
diff --git a/src/i965_hwmc.c b/src/i965_hwmc.c
index 1c293d1..99e86f5 100644
--- a/src/i965_hwmc.c
+++ b/src/i965_hwmc.c
@@ -49,7 +49,7 @@ static int alloc_drm_memory_tiled(ScrnInfoPtr pScrn,
 	char *name, size_t size, unsigned long pitch, unsigned long alignment)
 {
     I830Ptr pI830 = I830PTR(pScrn);
-    if ((mem->buffer = i830_allocate_memory_tiled(pScrn, 
+    if ((mem->buffer = i830_allocate_memory(pScrn,
 	    name, size, pitch,
 	    GTT_PAGE_SIZE, ALIGN_BOTH_ENDS, TILE_XMAJOR)) == NULL) {
 	ErrorF("Fail to alloc \n");
@@ -75,8 +75,8 @@ static int alloc_drm_memory(ScrnInfoPtr pScrn,
 {
     I830Ptr pI830 = I830PTR(pScrn);
     if ((mem->buffer = i830_allocate_memory(pScrn, 
-	    name, size, 
-	    GTT_PAGE_SIZE, ALIGN_BOTH_ENDS)) == NULL) {
+	    name, size, PITCH_NONE, GTT_PAGE_SIZE,
+	    ALIGN_BOTH_ENDS, TILE_NONE)) == NULL) {
 	ErrorF("Fail to alloc \n");
 	return BadAlloc;
     }
commit 1f61e97904dfe5f8c08bb9f284cfdfe878f7e541
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Dec 31 22:56:57 2008 +0800

    UXA: Fallback to dri_bo_map() if pin failed
    
    This fixes VT switch issue with UXA after Eric's
    aae4008096399a0e84abc7c016b35092caf9db25 on 2D side.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index 636aa0a..aeffedd 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -785,11 +785,15 @@ i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access)
 	    i830->need_sync = FALSE;
 	}
 
-	if (drm_intel_bo_pin(bo, 4096) != 0)
-	    return FALSE;
-
-	drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW);
-	pixmap->devPrivate.ptr = pI830->FbBase + bo->offset;
+	if (drm_intel_bo_pin(bo, 4096) != 0) {
+	    /* happen in vt switched */
+	    if (dri_bo_map(bo, access == UXA_ACCESS_RW) != 0)
+		return FALSE;
+	    pixmap->devPrivate.ptr = bo->virtual;
+	} else {
+	    drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW);
+	    pixmap->devPrivate.ptr = pI830->FbBase + bo->offset;
+	}
     }
     return TRUE;
 }
@@ -804,7 +808,10 @@ i830_uxa_finish_access (PixmapPtr pixmap)
 	ScrnInfoPtr scrn = xf86Screens[screen->myNum];
 	I830Ptr i830 = I830PTR(scrn);
 
-	drm_intel_bo_unpin(bo);
+	if (bo->virtual)
+	    dri_bo_unmap(bo);
+	else
+	    drm_intel_bo_unpin(bo);
 
 	pixmap->devPrivate.ptr = NULL;
 	if (bo == i830->front_buffer->bo)
commit 830bf916724afd21b7947f797c22a8c8aab7a0a4
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 29 13:42:44 2008 -0800

    Don't touch the pipestat regs for detecting FIFO underrun. The kernel owns them.
    
    Since we don't perform any synchronization with the kernel on these regs, we
    could race with the kernel to write stale values and end up not having vblank
    interrupts enabled when somebody was waiting on one.

diff --git a/src/i830_display.c b/src/i830_display.c
index 2e5d55a..7a9999a 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1202,7 +1202,6 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
     int dspstride_reg = (plane == 0) ? DSPASTRIDE : DSPBSTRIDE;
     int dsppos_reg = (plane == 0) ? DSPAPOS : DSPBPOS;
     int dspsize_reg = (plane == 0) ? DSPASIZE : DSPBSIZE;
-    int pipestat_reg = (pipe == 0) ? PIPEASTAT : PIPEBSTAT;
     int i, num_outputs = 0;
     int refclk;
     intel_clock_t clock;
@@ -1514,9 +1513,6 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
 #endif
     
     i830WaitForVblank(pScrn);
-
-    /* Clear any FIFO underrun status that may have occurred normally */
-    OUTREG(pipestat_reg, INREG(pipestat_reg) | FIFO_UNDERRUN);
 }
 
 
diff --git a/src/i830_driver.c b/src/i830_driver.c
index c5d16a2..27d8694 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2495,10 +2495,6 @@ RestoreHWState(ScrnInfoPtr pScrn)
        OUTREG(FBC_CONTROL, pI830->saveFBC_CONTROL);
    }
 
-   /* Clear any FIFO underrun status that may have occurred normally */
-   OUTREG(PIPEASTAT, INREG(PIPEASTAT) | FIFO_UNDERRUN);
-   OUTREG(PIPEBSTAT, INREG(PIPEBSTAT) | FIFO_UNDERRUN);
-
    vgaHWRestore(pScrn, vgaReg, VGA_SR_FONTS);
    vgaHWLock(hwp);
 
@@ -2619,7 +2615,6 @@ I830BlockHandler(int i,
     ScreenPtr pScreen = screenInfo.screens[i];
     ScrnInfoPtr pScrn = xf86Screens[i];
     I830Ptr pI830 = I830PTR(pScrn);
-    xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
 
     pScreen->BlockHandler = pI830->BlockHandler;
 
@@ -2656,26 +2651,6 @@ I830BlockHandler(int i,
     if (pI830->accel == ACCEL_UXA)
 	i830_uxa_block_handler (pScreen);
 #endif
-    /*
-     * Check for FIFO underruns at block time (which amounts to just
-     * periodically).  If this happens, it means our DSPARB or some other
-     * memory arbitration setting is wrong for the current configuration
-     * (except for mode setting, where it may occur naturally).
-     * Check & ack the condition.
-     */
-    if (!pI830->use_drm_mode && pScrn->vtSema && !DSPARB_HWCONTROL(pI830)) {
-	if (xf86_config->crtc[0]->enabled &&
-		(INREG(PIPEASTAT) & FIFO_UNDERRUN)) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "underrun on pipe A!\n");
-	    OUTREG(PIPEASTAT, INREG(PIPEASTAT) | FIFO_UNDERRUN);
-	}
-	if (xf86_config->num_crtc > 1 &&
-		xf86_config->crtc[1]->enabled &&
-		(INREG(PIPEBSTAT) & FIFO_UNDERRUN)) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "underrun on pipe B!\n");
-	    OUTREG(PIPEBSTAT, INREG(PIPEBSTAT) | FIFO_UNDERRUN);
-	}
-    }
 
     I830VideoBlockHandler(i, blockData, pTimeout, pReadmask);
 }
commit d96f774d1bb39640486c72338fe8b19ee1ceaa23
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 29 13:57:24 2008 -0800

    warning fix.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 16ddc41..c5d16a2 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2583,7 +2583,6 @@ void
 IntelEmitInvarientState(ScrnInfoPtr pScrn)
 {
    I830Ptr pI830 = I830PTR(pScrn);
-   uint32_t ctx_addr;
 
    if (pI830->accel == ACCEL_NONE)
       return;
commit 59b0fbb9be880d489374b141f818948a2721a2ef
Author: Henry unbongo <henryunbongo at yahoo.com>
Date:   Mon Dec 29 13:54:38 2008 -0800

    Add support for SDVO LVDS.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 6d2d8b1..0750166 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1904,6 +1904,14 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
 	dev_priv->controlled_output = SDVO_OUTPUT_RGB1;
         output->subpixel_order = SubPixelHorizontalRGB;
 	name_prefix="VGA";
+    } else if (dev_priv->caps.output_flags & SDVO_OUTPUT_LVDS0) {
+	dev_priv->controlled_output = SDVO_OUTPUT_LVDS0;
+        output->subpixel_order = SubPixelHorizontalRGB;
+	name_prefix="LVDS";
+    } else if (dev_priv->caps.output_flags & SDVO_OUTPUT_LVDS1) {
+	dev_priv->controlled_output = SDVO_OUTPUT_LVDS1;
+        output->subpixel_order = SubPixelHorizontalRGB;
+	name_prefix="LVDS";
     }
     else
     {
commit 750d8e105831718d4a44a145fdb87571fa9f9d8e
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 29 12:44:26 2008 -0800

    Fix compile failure after 45f45c73469f1bd46a1b6fb206f2e9e5e4fd66b3

diff --git a/src/i830_memory.c b/src/i830_memory.c
index fa22782..f3baa60 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -346,7 +346,6 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
     pI830->exa_offscreen = NULL;
     pI830->gen4_render_state_mem = NULL;
     pI830->overlay_regs = NULL;
-    pI830->logical_context = NULL;
     pI830->power_context = NULL;
 #ifdef XF86DRI
     pI830->back_buffer = NULL;
commit 45f45c73469f1bd46a1b6fb206f2e9e5e4fd66b3
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 29 11:26:11 2008 -0800

    Remove logical context setup.
    
    This should be a noop.  If it wasn't a noop, it means that on pre-g33 chipsets
    we were spamming some data into a page of system memory because we used a
    virtual instead of a physical address.  It was also supposed to not work when
    we submit it from a batchbuffer, as we have been doing for some time now.
    This code has existed since about the beginning of the driver's existence,
    with no justification.

diff --git a/src/i830.h b/src/i830.h
index 80d6d7b..3381c3c 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -452,8 +452,6 @@ typedef struct _I830Rec {
    void (*PointerMoved)(int, int, int);
    CreateScreenResourcesProcPtr    CreateScreenResources;
 
-   i830_memory *logical_context;
-
    i830_memory *power_context;
 
 #ifdef XF86DRI
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 90fa507..16ddc41 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2604,17 +2604,6 @@ IntelEmitInvarientState(ScrnInfoPtr pScrn)
    if (*pI830->last_3d != LAST_3D_OTHER)
       return;
 
-   ctx_addr = pI830->logical_context->offset;
-   assert((pI830->logical_context->offset & 2047) == 0);
-   {
-      BEGIN_BATCH(2);
-      OUT_BATCH(MI_SET_CONTEXT);
-      OUT_BATCH(pI830->logical_context->offset |
-		CTXT_NO_RESTORE |
-		CTXT_PALETTE_SAVE_DISABLE | CTXT_PALETTE_RESTORE_DISABLE);
-      ADVANCE_BATCH();
-   }
-
    if (!IS_I965G(pI830))
    {
       if (IS_I9XX(pI830))
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 2053d06..fa22782 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1434,15 +1434,6 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 	pI830->SWCursor = TRUE;
     }
 
-    /* Space for the X Server's 3D context.  32k is fine for right now. */
-    pI830->logical_context = i830_allocate_memory(pScrn, "logical 3D context",
-						  KB(32), GTT_PAGE_SIZE, 0);
-    if (pI830->logical_context == NULL) {
-	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		   "Failed to allocate logical context space.\n");
-	return FALSE;
-    }
-
     if (pI830->memory_manager == NULL) {
 	pI830->fake_bufmgr_mem = i830_allocate_memory(pScrn, "fake bufmgr",
 						      MB(1), GTT_PAGE_SIZE, 0);
commit 3544bbe22d8cf2640289e1e4febe755a47f26631
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 29 10:41:02 2008 -0800

    Add PCI write posting to LeaveVT path when we're about to wait on write results.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 6fed32d..90fa507 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2339,6 +2339,7 @@ RestoreHWState(ScrnInfoPtr pScrn)
       OUTREG(DPLL_A_MD, pI830->saveDPLL_A_MD);
    else
       OUTREG(DPLL_A, pI830->saveDPLL_A);
+   POSTING_READ(DPLL_A);
    i830_dpll_settle();
 
    /* Restore mode config */
@@ -2362,6 +2363,7 @@ RestoreHWState(ScrnInfoPtr pScrn)
    }
 
    OUTREG(PIPEACONF, pI830->savePIPEACONF);
+   POSTING_READ(PIPEACONF);
    i830WaitForVblank(pScrn);
 
    /*
@@ -2374,12 +2376,14 @@ RestoreHWState(ScrnInfoPtr pScrn)
        DISPPLANE_SEL_PIPE_A) {
        OUTREG(DSPACNTR, pI830->saveDSPACNTR);
        OUTREG(DSPABASE, INREG(DSPABASE));
+       POSTING_READ(DSPABASE);
        i830WaitForVblank(pScrn);
    }
    if ((pI830->saveDSPBCNTR & DISPPLANE_SEL_PIPE_MASK) ==
        DISPPLANE_SEL_PIPE_A) {
        OUTREG(DSPBCNTR, pI830->saveDSPBCNTR);
        OUTREG(DSPBBASE, INREG(DSPBBASE));
+       POSTING_READ(DSPBBASE);
        i830WaitForVblank(pScrn);
    }
 
@@ -2403,6 +2407,7 @@ RestoreHWState(ScrnInfoPtr pScrn)
 	 OUTREG(DPLL_B_MD, pI830->saveDPLL_B_MD);
       else
 	 OUTREG(DPLL_B, pI830->saveDPLL_B);
+      POSTING_READ(DPLL_B);
       i830_dpll_settle();
    
       /* Restore mode config */
@@ -2425,6 +2430,7 @@ RestoreHWState(ScrnInfoPtr pScrn)
       }
 
       OUTREG(PIPEBCONF, pI830->savePIPEBCONF);
+      POSTING_READ(PIPEBCONF);
       i830WaitForVblank(pScrn);
 
       /*
commit 7b67914b23b54d4d9566190440a3430e40615aa8
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Mar 28 15:51:50 2008 -0700

    Add SDVO LVDS register definitions.

diff --git a/src/i830_sdvo_regs.h b/src/i830_sdvo_regs.h
index 5d5bf98..6988d49 100644
--- a/src/i830_sdvo_regs.h
+++ b/src/i830_sdvo_regs.h
@@ -530,6 +530,52 @@ struct i830_sdvo_hdtv_resolution_reply {
 # define SDVO_MONITOR_STATE_SUSPEND				(1 << 6)
 # define SDVO_MONITOR_STATE_OFF					(1 << 7)
 
+#define SDVO_CMD_GET_MAX_PANEL_POWER_SEQUENCING		0x2d
+#define SDVO_CMD_GET_PANEL_POWER_SEQUENCING		0x2e
+#define SDVO_CMD_SET_PANEL_POWER_SEQUENCING		0x2f
+/**
+ * The panel power sequencing parameters are in units of milliseconds.
+ * The high fields are bits 8:9 of the 10-bit values.
+ */
+struct sdvo_panel_power_sequencing {
+    uint8_t t0;
+    uint8_t t1;
+    uint8_t t2;
+    uint8_t t3;
+    uint8_t t4;
+
+    unsigned int t0_high:2;
+    unsigned int t1_high:2;
+    unsigned int t2_high:2;
+    unsigned int t3_high:2;
+
+    unsigned int t4_high:2;
+    unsigned int pad:6;
+} __attribute__((packed));
+
+#define SDVO_CMD_GET_MAX_BACKLIGHT_LEVEL		0x30
+struct sdvo_max_backlight_reply {
+    uint8_t max_value;
+    uint8_t default_value;
+} __attribute__((packed));
+
+#define SDVO_CMD_GET_BACKLIGHT_LEVEL			0x31
+#define SDVO_CMD_SET_BACKLIGHT_LEVEL			0x32
+
+#define SDVO_CMD_GET_AMBIENT_LIGHT			0x33
+struct sdvo_get_ambient_light_reply {
+    uint16_t trip_low;
+    uint16_t trip_high;
+    uint16_t value;
+} __attribute__((packed));
+#define SDVO_CMD_SET_AMBIENT_LIGHT			0x34
+struct sdvo_set_ambient_light_reply {
+    uint16_t trip_low;
+    uint16_t trip_high;
+    unsigned int enable:1;
+    unsigned int pad:7;
+} __attribute__((packed));
+
 /* Set display power state */
 #define SDVO_CMD_SET_DISPLAY_POWER_STATE		0x7d
 # define SDVO_DISPLAY_STATE_ON				(1 << 0)
@@ -580,6 +626,15 @@ struct i830_sdvo_enhancement_limits_reply {
     uint16_t default_value;
 } __attribute__((packed));
 
+#define SDVO_CMD_GET_LVDS_PANEL_INFORMATION		0x7f
+#define SDVO_CMD_SET_LVDS_PANEL_INFORMATION		0x80
+# define SDVO_LVDS_COLOR_DEPTH_18			(0 << 0)
+# define SDVO_LVDS_COLOR_DEPTH_24			(1 << 0)
+# define SDVO_LVDS_CONNECTOR_SPWG			(0 << 2)
+# define SDVO_LVDS_CONNECTOR_OPENLDI			(1 << 2)
+# define SDVO_LVDS_SINGLE_CHANNEL			(0 << 4)
+# define SDVO_LVDS_DUAL_CHANNEL				(1 << 4)
+
 #define SDVO_CMD_GET_FLICKER_FILTER			0x4e
 #define SDVO_CMD_SET_FLICKER_FILTER			0x4f
 #define SDVO_CMD_GET_ADAPTIVE_FLICKER_FITER		0x50
commit 8464fc285d7b22fd45b7af616fd52aa15e16638a
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 29 09:51:45 2008 -0800

    Rely on libdrm 2.4.3 and stop checking for xf86drmMode.h.

diff --git a/configure.ac b/configure.ac
index 7dbcd47..ca13eab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,11 +113,9 @@ if test x$DRI != xno; then
 	AC_CHECK_FILE([${sdkdir}/damage.h],
                       [have_damage_h="yes"], [have_damage_h="no"])
 	if test x$KMS != xno; then
-		AC_CHECK_HEADER(xf86drmMode.h,
-				[DRM_MODE=yes],[DRM_MODE=no]
-				[#include "stdint.h"])
 		dnl exaGetPixmapDriverPrivate required for DRM_MODE.
-		PKG_CHECK_MODULES(DRM_MODE, [xorg-server >= 1.5], [], [DRM_MODE=no])
+		PKG_CHECK_MODULES(DRM_MODE, [xorg-server >= 1.5],
+					    [DRM_MODE=yes], [DRM_MODE=no])
 		if test "x$DRM_MODE" = xyes; then
 	   		AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting])
 		fi
@@ -224,7 +222,7 @@ if test "x$GCC" = "xyes"; then
 	-Wnested-externs -fno-strict-aliasing"
 fi
 
-PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.2])
+PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.3])
 AM_CONDITIONAL(DRI, test x$DRI = xyes)
 if test "$DRI" = yes; then
         PKG_CHECK_MODULES(DRI, [xf86driproto glproto])
commit c1dde7ac06ce6470c74198b2560ee67d28fb0aea
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 22 16:49:57 2008 -0800

    Remove old mergedfb includes and defines, which bother spatch.

diff --git a/src/i830.h b/src/i830.h
index 5e50753..80d6d7b 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -107,12 +107,6 @@ typedef struct _I830OutputRec I830OutputRec, *I830OutputPtr;
 #include "i830_sdvo.h"
 #include "i2c_vid.h"
 
-/* I830 Video support */
-#define NEED_REPLIES				/* ? */
-#define EXTENSION_PROC_ARGS void *
-#include "extnsionst.h" 			/* required */
-#include <X11/extensions/panoramiXproto.h> 	/* required */
-
 /*
  * The mode handling is based upon the VESA driver written by
  * Paulo César Pereira de Andrade <pcpa at conectiva.com.br>.
commit 75799d2834be84b016391ec95b221df32380e3e7
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Tue Dec 30 00:55:30 2008 +0800

    Bug #18004: Add Aopen 915GM LVDS quirk

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 6704376..a82a6e6 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -237,6 +237,7 @@ static void quirk_broken_acpi_lid (I830Ptr pI830)
 /* keep this list sorted by OEM, then by chip ID */
 static i830_quirk i830_quirk_list[] = {
     /* Aopen mini pc */
+    { PCI_CHIP_I915_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
     { PCI_CHIP_I945_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
     { PCI_CHIP_I965_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
     { PCI_CHIP_I965_GM, 0x8086, 0x1999, quirk_ignore_lvds },
commit cfaaf6af777ad8e56da5a077bdc01f4f2d7bc4d6
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Dec 29 21:17:44 2008 +0800

    Don't count vertex buffer in second aperture size check
    
    With batch flush notify vertex buffer will be unreferenced,
    so don't count it in later aperture check. Also adding
    uninitialized vertex buffer check in batch flush notify.

diff --git a/src/i965_render.c b/src/i965_render.c
index df3814f..3b0ee35 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1015,11 +1015,8 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
 	    /* If the command still won't fit in an empty batch, then it's
 	     * just plain too big for the hardware---fallback to software.
 	     */
-	    if (dri_bufmgr_check_aperture_space (bo_table, NUM_BO) < 0) {
-		dri_bo_unreference (render_state->vertex_buffer_bo);
-		render_state->vertex_buffer_bo = NULL;
+	    if (dri_bufmgr_check_aperture_space (bo_table, 1) < 0)
 		return FALSE;
-	    }
 	}
     }
 
@@ -1588,8 +1585,10 @@ i965_batch_flush_notify(ScrnInfoPtr pScrn)
     /* Once a batch is emitted, we never want to map again any buffer
      * object being referenced by that batch, (which would be very
      * expensive). */
-    dri_bo_unreference (render_state->vertex_buffer_bo);
-    render_state->vertex_buffer_bo = NULL;
+    if (render_state->vertex_buffer_bo) {
+	dri_bo_unreference (render_state->vertex_buffer_bo);
+	render_state->vertex_buffer_bo = NULL;
+    }
 }
 
 /**
commit b710a688a7383df320f9d4e765b48331310a4d1d
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Dec 29 12:50:25 2008 +1000

    intel/kms: disable overlay when it needs physical address
    
    We can't do phy address allocations, need kernel support for this.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/src/i830_memory.c b/src/i830_memory.c
index ca15964..2053d06 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1074,8 +1074,11 @@ i830_allocate_overlay(ScrnInfoPtr pScrn)
     if (OVERLAY_NOEXIST(pI830))
 	return TRUE;
 
-    if (!OVERLAY_NOPHYSICAL(pI830))
+    if (!OVERLAY_NOPHYSICAL(pI830)) {
+	if (pI830->use_drm_mode)
+            return TRUE;
 	flags |= NEED_PHYSICAL_ADDR;
+    }
 
     pI830->overlay_regs = i830_allocate_memory(pScrn, "overlay registers",
 					       OVERLAY_SIZE, GTT_PAGE_SIZE,
commit 649374b88b330838133d78be1953ce8b18ddd2c6
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Dec 29 12:48:11 2008 +1000

    intel: don't call enter/leave VT for KMS enabled systems
    
    Signed-off-by: Dave Airlie <airlied at linux.ie>

diff --git a/src/i830_driver.c b/src/i830_driver.c
index d3b539a..6fed32d 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3587,7 +3587,7 @@ I830LeaveVT(int scrnIndex, int flags)
       i830_unbind_all_memory(pScrn);
 
 #ifdef XF86DRI
-   if (pI830->memory_manager) {
+   if (pI830->memory_manager && !pI830->use_drm_mode) {
       int ret;
 
       /* Tell the kernel to evict all buffer objects and block GTT usage while
@@ -3630,7 +3630,7 @@ I830EnterVT(int scrnIndex, int flags)
    pI830->leaving = FALSE;
 
 #ifdef XF86DRI
-   if (pI830->memory_manager) {
+   if (pI830->memory_manager && !pI830->use_drm_mode) {
       int ret;
 
       /* Tell the kernel that we're back in control and ready for GTT
commit 408f7139354a942f29334795b5480a0b6bb6142a
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Dec 29 12:47:30 2008 +1000

    exa: fix map gtt call to use current API

diff --git a/src/i830_exa.c b/src/i830_exa.c
index df2a5ab..636aa0a 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -540,7 +540,7 @@ static Bool I830EXAPrepareAccess(PixmapPtr pPix, int index)
 	I830Sync(scrn);
 	i830->need_sync = FALSE;
     }
-    if (dri_gem_bo_map_gtt(driver_priv->bo)) {
+    if (drm_intel_gem_bo_map_gtt(driver_priv->bo)) {
 	xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: bo map failed\n",
 		   __FUNCTION__);
 	return FALSE;
commit fcd280b730f86ea54ecd89d3e037e71f8375b5f5
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Dec 29 10:05:17 2008 +0800

    Bug #19239: Add a quirk for broken ACPI lid state
    
    For broken hardware/bios with incorrect ACPI LID state,
    there's machine that can not be fixed in ACPI way, customed
    DSDT that reprogram _LID method to read EC state. Although
    this is ACPI issue, this quirk can be used to work around that.

diff --git a/src/i830.h b/src/i830.h
index 8ad5c69..5e50753 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -1035,6 +1035,7 @@ extern const int I830CopyROP[16];
 #define QUIRK_RESET_MODES		0x00000020
 #define QUIRK_PFIT_SAFE			0x00000040
 #define QUIRK_IGNORE_CRT		0x00000080
+#define QUIRK_BROKEN_ACPI_LID		0x00000100
 extern void i830_fixup_devices(ScrnInfoPtr);
 
 #endif /* _I830_H_ */
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index c6002eb..df92dea 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -401,6 +401,9 @@ i830_lvds_acpi_lid_open(xf86OutputPtr output)
     char state[64];
     enum lid_status ret = LID_UNKNOWN;
 
+    if (pI830->quirk_flag & QUIRK_BROKEN_ACPI_LID)
+	goto out;
+
     button_dir = opendir(ACPI_BUTTON);
     /* If acpi button driver is not loaded, bypass ACPI check method */
     if (button_dir == NULL)
diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 68e39ee..6704376 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -227,6 +227,13 @@ static void quirk_ivch_dvob (I830Ptr pI830)
 	pI830->quirk_flag |= QUIRK_IVCH_NEED_DVOB;
 }
 
+/* For broken hw/bios for incorrect acpi _LID state that
+   can't be fixed with customed DSDT or other way */
+static void quirk_broken_acpi_lid (I830Ptr pI830)
+{
+	pI830->quirk_flag |= QUIRK_BROKEN_ACPI_LID;
+}
+
 /* keep this list sorted by OEM, then by chip ID */
 static i830_quirk i830_quirk_list[] = {
     /* Aopen mini pc */
@@ -347,6 +354,9 @@ static i830_quirk i830_quirk_list[] = {
     /* Asus Eee Box has no LVDS */
     { PCI_CHIP_I945_GME, 0x1043, 0x1252, quirk_ignore_lvds },
 
+    /* #19239: Mirrus Centrino laptop */
+    { PCI_CHIP_I915_GM, 0x1584, 0x9800, quirk_broken_acpi_lid },
+
     { 0, 0, 0, NULL },
 };
 
commit 6b9f421b792c701e909d81ae2b6e6a47fb069b0b
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Dec 29 11:51:58 2008 +1000

    modeset: transformPresent is a new API member

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 8c73fda..4994251 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -148,7 +148,9 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 	crtc->x = x;
 	crtc->y = y;
 	crtc->rotation = rotation;
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,5,99,0,0)
 	crtc->transformPresent = FALSE;
+#endif
 
 	output_ids = xcalloc(sizeof(uint32_t), xf86_config->num_output);
 	if (!output_ids) {
commit a320541e51818833a6a445707835fbf70e9babd4
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Dec 29 11:34:51 2008 +1000

    modeset: fix xf86CrtcRotate API change across server versions

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index a85eb06..8c73fda 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -29,6 +29,8 @@
 #include "config.h"
 #endif
 
+#include "xorgVersion.h"
+
 #ifdef XF86DRM_MODE
 #include "i830.h"
 #include "sarea.h"
@@ -167,9 +169,13 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 		output_count++;
 	}
 
-	if (!xf86CrtcRotate(crtc)) {
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,5,99,0,0)
+	if (!xf86CrtcRotate(crtc, mode, rotation))
 		goto done;
-	}
+#else
+	if (!xf86CrtcRotate(crtc))
+		goto done;
+#endif
 
 	drmmode_ConvertToKMode(crtc->scrn, &kmode, mode);
 
commit e38fd84fcccc18284b649a60b4cfd8e24eaf059d
Author: Ma Ling <ling.ma at intel.com>
Date:   Mon Dec 22 10:35:52 2008 +0800

    SDVO: reset pixel repeat in avi frame
    
    For #19115, the root cause  is  avi_if.u.avi.PR in
    i830_sdvo_set_avi_infoframe() belongs to element for
    interlaced mode based on CEA_861B, but currently we
    don't support interlaced mode. So it should be set as 0.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 256d16d..6d2d8b1 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -947,7 +947,6 @@ static void i830_sdvo_set_avi_infoframe(xf86OutputPtr output,
 	.len = DIP_LEN_AVI,
     };
 
-    avi_if.u.avi.PR = i830_sdvo_get_pixel_multiplier(mode) - 1;
     avi_if.checksum = i830_sdvo_calc_hbuf_csum((uint8_t *)&avi_if,
 					4 + avi_if.len);
     i830_sdvo_set_hdmi_buf(output, 1, (uint8_t *)&avi_if, 4 + avi_if.len,
commit d8e89b26ef5ef2c15e5d34162b14d279a7f0bb1c
Author: Zou Nan hai <nanhai.zou at intel.com>
Date:   Fri Dec 19 09:34:14 2008 +0800

     [965-xvmc] remove the vblank wait code, drm not support mutlple client
    to wait on vblank now.

diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
index c197e35..4b73caa 100644
--- a/src/xvmc/intel_xvmc.c
+++ b/src/xvmc/intel_xvmc.c
@@ -757,13 +757,6 @@ _X_EXPORT Status XvMCPutSurface(Display *display,XvMCSurface *surface,
     }
     intel_surf->last_draw = draw;
     /* fill intel_surf->data */
-    if (1)
-    {
-	drmVBlank vbl;
-	vbl.request.type = DRM_VBLANK_RELATIVE;
-	vbl.request.sequence = 1;
-	drmWaitVBlank(xvmc_driver->fd, &vbl);
-    }
     ret = (xvmc_driver->put_surface)(display, surface, draw, srcx, srcy,
 	    srcw, srch, destx, desty, destw, desth, flags, &intel_surf->data);
     if (ret) {
commit aae4008096399a0e84abc7c016b35092caf9db25
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Dec 17 14:25:22 2008 -0800

    uxa: Do a hack to use the aperture mapping instead of bo_map in sw fallbacks.
    
    Because of how fallbacky the uxa rendering core is, and our inability (without
    wfb in userland or page faulting in the kernel) to tell the kernel just where
    we're going to fall back, the clflush overhead can become outrageous, for
    example with emacs and xcompmgr.  Instead of using drm_intel_bo_map, pin the
    buffer and do the fallback to the aperture mapping.  This gets us the bad old
    performance that fb is designed for, instead of bad new performance.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index 3e3487e..df2a5ab 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -785,17 +785,11 @@ i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access)
 	    i830->need_sync = FALSE;
 	}
 
-	/* For tiled front buffer, short-circuit to the GTT mapping. */
-	if (i830_pixmap_tiled(pixmap)) {
-	    drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW);
-
-	    pixmap->devPrivate.ptr = pI830->FbBase + bo->offset;
-	} else {
-	    if (dri_bo_map (bo, access == UXA_ACCESS_RW) != 0)
-		return FALSE;
+	if (drm_intel_bo_pin(bo, 4096) != 0)
+	    return FALSE;
 
-	    pixmap->devPrivate.ptr = bo->virtual;
-	}
+	drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW);
+	pixmap->devPrivate.ptr = pI830->FbBase + bo->offset;
     }
     return TRUE;
 }
@@ -810,8 +804,7 @@ i830_uxa_finish_access (PixmapPtr pixmap)
 	ScrnInfoPtr scrn = xf86Screens[screen->myNum];
 	I830Ptr i830 = I830PTR(scrn);
 
-	if (!i830_pixmap_tiled(pixmap))
-	    dri_bo_unmap(bo);
+	drm_intel_bo_unpin(bo);
 
 	pixmap->devPrivate.ptr = NULL;
 	if (bo == i830->front_buffer->bo)
commit 74bc420940de4ed02705211ddebbc4033c032242
Author: Peter Alfredsen <loki_val at gentoo.org>
Date:   Fri Dec 19 08:10:06 2008 +0800

    xvmc: fix up needed libs

diff --git a/configure.ac b/configure.ac
index 31c14a8..7dbcd47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,6 +248,7 @@ if test "$XVMC" = yes && test "$DRI" = no; then
 fi
 if test "$XVMC" = yes; then
 	PKG_CHECK_MODULES(XVMCLIB, [xvmc], [XVMC=yes], [XVMC=no])
+	PKG_CHECK_MODULES(XEXT, [xext])
 fi
 AC_MSG_CHECKING([whether to include XvMC support])
 AC_MSG_RESULT([$XVMC])
diff --git a/src/xvmc/Makefile.am b/src/xvmc/Makefile.am
index 0060190..9e62683 100644
--- a/src/xvmc/Makefile.am
+++ b/src/xvmc/Makefile.am
@@ -7,7 +7,7 @@ libI810XvMC_la_SOURCES = I810XvMC.c \
 libI810XvMC_la_CFLAGS = @WARN_CFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ \
 	-I$(top_srcdir)/src -DTRUE=1 -DFALSE=0
 libI810XvMC_la_LDFLAGS = -version-number 1:0:0
-libI810XvMC_la_LIBADD = @DRI_LIBS@ 
+libI810XvMC_la_LIBADD = @DRI_LIBS@ @DRM_LIBS@ @XVMCLIB_LIBS@
 
 libIntelXvMC_la_SOURCES = intel_xvmc.c \
         intel_xvmc.h                   \
@@ -27,7 +27,7 @@ libIntelXvMC_la_SOURCES = intel_xvmc.c \
 libIntelXvMC_la_CFLAGS = @XORG_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ \
 	@XVMCLIB_CFLAGS@ -I$(top_srcdir)/src -DTRUE=1 -DFALSE=0
 libIntelXvMC_la_LDFLAGS = -version-number 1:0:0
-libIntelXvMC_la_LIBADD = @DRI_LIBS@
+libIntelXvMC_la_LIBADD = @DRI_LIBS@ @DRM_LIBS@ @XVMCLIB_LIBS@ @XEXT_LIBS@ -lpthread
 
 INTEL_G4A =                         \
         dual_prime_igd.g4a              \
commit 555eea5411cf8c725df5f1b4cb80198fa6a1225b
Author: Zou Nan hai <nanhai.zou at intel.com>
Date:   Wed Dec 17 13:55:07 2008 +0800

     wait vblank before render to fix tearing

diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
index dbde22f..c197e35 100644
--- a/src/xvmc/intel_xvmc.c
+++ b/src/xvmc/intel_xvmc.c
@@ -757,7 +757,7 @@ _X_EXPORT Status XvMCPutSurface(Display *display,XvMCSurface *surface,
     }
     intel_surf->last_draw = draw;
     /* fill intel_surf->data */
-    if (0)
+    if (1)
     {
 	drmVBlank vbl;
 	vbl.request.type = DRM_VBLANK_RELATIVE;
commit ed267072db7c58ee16a458fd3dc24ce3a2d0061d
Author: Robert Noland <rnoland at 2hip.net>
Date:   Wed Dec 17 09:27:30 2008 +0800

    Fix drmOpen for non-linux 965 XvMC
    
    drmOpen by name only works on linux after falling back to groping around
    in /proc.  This doesn't work on other OS.
    
    Signed-off-by: Robert Noland <rnoland at 2hip.net>

diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
index d18c722..dbde22f 100644
--- a/src/xvmc/intel_xvmc.c
+++ b/src/xvmc/intel_xvmc.c
@@ -292,12 +292,6 @@ _X_EXPORT Status XvMCCreateContext(Display *display, XvPortID port,
 
     intel_xvmc_debug_init();
 
-    /* Open DRI Device */
-    if((fd = drmOpen("i915", NULL)) < 0) {
-        XVMC_ERR("DRM Device could not be opened.");
-        return BadValue;
-    }
-
     /*
        Width, Height, and flags are checked against surface_type_id
        and port for validity inside the X server, no need to check
@@ -358,8 +352,6 @@ _X_EXPORT Status XvMCCreateContext(Display *display, XvPortID port,
 	return BadValue;
     }
 
-    xvmc_driver->fd = fd;
-
     XVMC_INFO("decoder type is %s", intel_xvmc_decoder_string(comm->type));
 
     xvmc_driver->sarea_size = comm->sarea_size;
@@ -390,6 +382,16 @@ _X_EXPORT Status XvMCCreateContext(Display *display, XvPortID port,
         return BadValue;
     }
 
+    /* Open DRI Device */
+    if((fd = drmOpen("i915", curBusID)) < 0) {
+        XVMC_ERR("DRM Device could not be opened.");
+        XFree(priv_data);
+        XFree(curBusID);
+        return BadValue;
+    }
+
+    xvmc_driver->fd = fd;
+
     strncpy(xvmc_driver->busID, curBusID, 20);
     xvmc_driver->busID[20] = '\0';
     XFree(curBusID);
commit ecdd706873c1f990f4a78fbaecf7380411edabcd
Author: Eric Anholt <eric at anholt.net>
Date:   Sun Dec 14 16:09:25 2008 -0800

    uxa: Correctly prepare/finishaccess of stipple in ValidateGC (and only it)
    
    This avoids prepare/finish_access_gc overhead when we're not changing things
    (since GCTile is already handled) and get us the RW flag for the prepare on
    of the stipple pixmap so thing will be synced correctly.

diff --git a/uxa/uxa.c b/uxa/uxa.c
index 5b6f537..102717d 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -237,9 +237,16 @@ uxa_validate_gc (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
 	changes &= ~GCTile;
     }
 
-    uxa_prepare_access_gc(pGC);
-    fbValidateGC (pGC, changes, pDrawable);
-    uxa_finish_access_gc(pGC);
+    if (changes & GCStipple && pGC->stipple) {
+	/* We can't inline stipple handling like we do for GCTile because it sets
+	 * fbgc privates.
+	 */
+	uxa_prepare_access(&pGC->stipple->drawable, UXA_ACCESS_RW);
+	fbValidateGC (pGC, changes, pDrawable);
+	uxa_finish_access(&pGC->stipple->drawable);
+    } else {
+	fbValidateGC (pGC, changes, pDrawable);
+    }
 
     pGC->ops = (GCOps *) &uxa_ops;
 }
commit e6479f96e5d8da39fcbb5376c4a66a1f924ec4e4
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Mon Dec 15 14:54:20 2008 -0500

    Quiet some KMS warnings.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 186ff2d..a85eb06 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -214,7 +214,6 @@ drmmode_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
 static void
 drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
 {
-	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
 	ScrnInfoPtr pScrn = crtc->scrn;
 	I830Ptr pI830 = I830PTR(pScrn);
 	int ret;
@@ -318,21 +317,20 @@ drmmode_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 static void
 drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
 {
-	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
-
 	if (rotate_pixmap)
 		FreeScratchPixmapHeader(rotate_pixmap);
 
-	if (data) {
 #if 0
+	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+
+	if (data) {
 		/* Be sure to sync acceleration before the memory gets unbound. */
 		drmModeRmFB(drmmode->fd, drmmode_crtc->rotate_fb_id);
 		drmmode_crtc->rotate_fb_id = 0;
 		dri_bo_unreference(drmmode_crtc->rotate_bo);
 		drmmode_crtc->rotate_bo = NULL;
-#endif
 	}
-
+#endif
 }
 
 static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
@@ -363,8 +361,6 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
 {
 	xf86CrtcPtr crtc;
 	drmmode_crtc_private_ptr drmmode_crtc;
-	I830Ptr pI830 = I830PTR(pScrn);
-	int ret;
 
 	crtc = xf86CrtcCreate(pScrn, &drmmode_crtc_funcs);
 	if (crtc == NULL)
@@ -642,12 +638,12 @@ void drmmode_set_fb(ScrnInfoPtr scrn, drmmode_ptr drmmode, int width,
 
 Bool drmmode_is_rotate_pixmap(ScrnInfoPtr pScrn, pointer pPixData, dri_bo **bo)
 {
-	xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (pScrn);
-	int i;
-
 	return FALSE;
 
 #if 0
+	xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (pScrn);
+	int i;
+
 	for (i = 0; i < config->num_crtc; i++) {
 		xf86CrtcPtr crtc = config->crtc[i];
 		drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
commit 30fb0ef53e19b759715f1ee14b81b11c81d79045
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Tue Dec 16 00:39:45 2008 +0800

    Revert " [965 xvmc] update dual prime g4b files"
    
    This reverts commit ea2b6b405e4c8b1bfb4bc568d0453a39a9194a8f.
    
    Duplicate with Keith's commit. No idea what's diff target
    of this one.

diff --git a/src/xvmc/dual_prime.g4b b/src/xvmc/dual_prime.g4b
index 760cae1..4a1eb4b 100644
--- a/src/xvmc/dual_prime.g4b
+++ b/src/xvmc/dual_prime.g4b
@@ -102,1051 +102,2281 @@
    { 0x00800001, 0x23200169, 0x00000000, 0x00000000 },
    { 0x00800001, 0x23400169, 0x00000000, 0x00000000 },
    { 0x00600001, 0x2e600021, 0x008d0020, 0x00000000 },
-   { 0x00000001, 0x20280061, 0x00000000, 0x00070007 },
-   { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 },
-   { 0x0020000c, 0x202e3dad, 0x00450e6e, 0x00010001 },
-   { 0x00200040, 0x20403421, 0x00450e60, 0x0045002e },
-   { 0x01000005, 0x20000d3c, 0x00210e6e, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000012b },
-   { 0x01000005, 0x20000d3c, 0x00210e70, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x000000de },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000031 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a004 },
+   { 0x00600001, 0x2e800021, 0x008d0020, 0x00000000 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x0020000c, 0x2e6e3dad, 0x0045002e, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x0021002e, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
+   { 0x01000005, 0x20002d3c, 0x00210030, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000007d },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800040, 0x23804629, 0x00b10c40, 0x00b10c41 },
-   { 0x00800040, 0x23a04629, 0x00b10c60, 0x00b10c61 },
-   { 0x00800040, 0x23c04629, 0x00b10c80, 0x00b10c81 },
-   { 0x00800040, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
-   { 0x00800040, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
-   { 0x00800040, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
-   { 0x00800040, 0x24404629, 0x00b10d00, 0x00b10d01 },
-   { 0x00800040, 0x24604629, 0x00b10d20, 0x00b10d21 },
-   { 0x00800040, 0x24804629, 0x00b10d40, 0x00b10d41 },
-   { 0x00800040, 0x24a04629, 0x00b10d60, 0x00b10d61 },
-   { 0x00800040, 0x24c04629, 0x00b10d80, 0x00b10d81 },
-   { 0x00800040, 0x24e04629, 0x00b10da0, 0x00b10da1 },
-   { 0x00800040, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
-   { 0x00800040, 0x25204629, 0x00b10de0, 0x00b10de1 },
-   { 0x00800040, 0x25404629, 0x00b10e00, 0x00b10e01 },
-   { 0x00800040, 0x25604629, 0x00b10e20, 0x00b10e21 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c60 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c80 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca0 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc0 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce0 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d00 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d20 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d40 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d60 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d80 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da0 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc0 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de0 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e00 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e20 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f00 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000092 },
-   { 0x00800040, 0x23804629, 0x00b10c41, 0x00b10c42 },
-   { 0x00800040, 0x23a04629, 0x00b10c61, 0x00b10c62 },
-   { 0x00800040, 0x23c04629, 0x00b10c81, 0x00b10c82 },
-   { 0x00800040, 0x23e04629, 0x00b10ca1, 0x00b10ca2 },
-   { 0x00800040, 0x24004629, 0x00b10cc1, 0x00b10cc2 },
-   { 0x00800040, 0x24204629, 0x00b10ce1, 0x00b10ce2 },
-   { 0x00800040, 0x24404629, 0x00b10d01, 0x00b10d02 },
-   { 0x00800040, 0x24604629, 0x00b10d21, 0x00b10d22 },
-   { 0x00800040, 0x24804629, 0x00b10d41, 0x00b10d42 },
-   { 0x00800040, 0x24a04629, 0x00b10d61, 0x00b10d62 },
-   { 0x00800040, 0x24c04629, 0x00b10d81, 0x00b10d82 },
-   { 0x00800040, 0x24e04629, 0x00b10da1, 0x00b10da2 },
-   { 0x00800040, 0x25004629, 0x00b10dc1, 0x00b10dc2 },
-   { 0x00800040, 0x25204629, 0x00b10de1, 0x00b10de2 },
-   { 0x00800040, 0x25404629, 0x00b10e01, 0x00b10e02 },
-   { 0x00800040, 0x25604629, 0x00b10e21, 0x00b10e22 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c62 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c82 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca2 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc2 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce2 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d02 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d22 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d42 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d62 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d82 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da2 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc2 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de2 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e02 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e22 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f02 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000061 },
-   { 0x00800040, 0x23804629, 0x00b10c42, 0x00b10c43 },
-   { 0x00800040, 0x23a04629, 0x00b10c62, 0x00b10c63 },
-   { 0x00800040, 0x23c04629, 0x00b10c82, 0x00b10c83 },
-   { 0x00800040, 0x23e04629, 0x00b10ca2, 0x00b10ca3 },
-   { 0x00800040, 0x24004629, 0x00b10cc2, 0x00b10cc3 },
-   { 0x00800040, 0x24204629, 0x00b10ce2, 0x00b10ce3 },
-   { 0x00800040, 0x24404629, 0x00b10d02, 0x00b10d03 },
-   { 0x00800040, 0x24604629, 0x00b10d22, 0x00b10d23 },
-   { 0x00800040, 0x24804629, 0x00b10d42, 0x00b10d43 },
-   { 0x00800040, 0x24a04629, 0x00b10d62, 0x00b10d63 },
-   { 0x00800040, 0x24c04629, 0x00b10d82, 0x00b10d83 },
-   { 0x00800040, 0x24e04629, 0x00b10da2, 0x00b10da3 },
-   { 0x00800040, 0x25004629, 0x00b10dc2, 0x00b10dc3 },
-   { 0x00800040, 0x25204629, 0x00b10de2, 0x00b10de3 },
-   { 0x00800040, 0x25404629, 0x00b10e02, 0x00b10e03 },
-   { 0x00800040, 0x25604629, 0x00b10e22, 0x00b10e23 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c62 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c82 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca2 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc2 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce2 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d02 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d22 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d42 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d62 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d82 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da2 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc2 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de2 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e02 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e22 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f02 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c63 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c83 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca3 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc3 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce3 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d03 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d23 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d43 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d63 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d83 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da3 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc3 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de3 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e03 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e23 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f03 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000030 },
-   { 0x00800040, 0x23804629, 0x00b10c43, 0x00b10c44 },
-   { 0x00800040, 0x23a04629, 0x00b10c63, 0x00b10c64 },
-   { 0x00800040, 0x23c04629, 0x00b10c83, 0x00b10c84 },
-   { 0x00800040, 0x23e04629, 0x00b10ca3, 0x00b10ca4 },
-   { 0x00800040, 0x24004629, 0x00b10cc3, 0x00b10cc4 },
-   { 0x00800040, 0x24204629, 0x00b10ce3, 0x00b10ce4 },
-   { 0x00800040, 0x24404629, 0x00b10d03, 0x00b10d04 },
-   { 0x00800040, 0x24604629, 0x00b10d23, 0x00b10d24 },
-   { 0x00800040, 0x24804629, 0x00b10d43, 0x00b10d44 },
-   { 0x00800040, 0x24a04629, 0x00b10d63, 0x00b10d64 },
-   { 0x00800040, 0x24c04629, 0x00b10d83, 0x00b10d84 },
-   { 0x00800040, 0x24e04629, 0x00b10da3, 0x00b10da4 },
-   { 0x00800040, 0x25004629, 0x00b10dc3, 0x00b10dc4 },
-   { 0x00800040, 0x25204629, 0x00b10de3, 0x00b10de4 },
-   { 0x00800040, 0x25404629, 0x00b10e03, 0x00b10e04 },
-   { 0x00800040, 0x25604629, 0x00b10e23, 0x00b10e24 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c63 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c83 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca3 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc3 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce3 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d03 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d23 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d43 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d63 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d83 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da3 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc3 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de3 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e03 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e23 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f03 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c64 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c84 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca4 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc4 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce4 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d04 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d24 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d44 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d64 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d84 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da4 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc4 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de4 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e04 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e24 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f04 },
-   { 0x80800008, 0x23802d29, 0x00b10380, 0x00020002 },
-   { 0x80800008, 0x23a02d29, 0x00b103a0, 0x00020002 },
-   { 0x80800008, 0x23c02d29, 0x00b103c0, 0x00020002 },
-   { 0x80800008, 0x23e02d29, 0x00b103e0, 0x00020002 },
-   { 0x80800008, 0x24002d29, 0x00b10400, 0x00020002 },
-   { 0x80800008, 0x24202d29, 0x00b10420, 0x00020002 },
-   { 0x80800008, 0x24402d29, 0x00b10440, 0x00020002 },
-   { 0x80800008, 0x24602d29, 0x00b10460, 0x00020002 },
-   { 0x80800008, 0x24802d29, 0x00b10480, 0x00020002 },
-   { 0x80800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
-   { 0x80800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
-   { 0x80800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
-   { 0x80800008, 0x25002d29, 0x00b10500, 0x00020002 },
-   { 0x80800008, 0x25202d29, 0x00b10520, 0x00020002 },
-   { 0x80800008, 0x25402d29, 0x00b10540, 0x00020002 },
-   { 0x80800008, 0x25602d29, 0x00b10560, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x000000e5 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
-   { 0x00000041, 0x20581c21, 0x00210058, 0x00000011 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
+   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
+   { 0x00800040, 0x2c004629, 0x00b109c1, 0x00b10a01 },
+   { 0x00800040, 0x2c204629, 0x00b10a01, 0x00b10a41 },
+   { 0x00800040, 0x2c404629, 0x00b10a41, 0x00b10a81 },
+   { 0x00800040, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
+   { 0x00800040, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
+   { 0x00800040, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
+   { 0x00800040, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
+   { 0x00800040, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c2 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a02 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a42 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a82 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac2 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b02 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b42 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b82 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a02 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a42 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a82 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac2 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b02 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b42 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b82 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00800040, 0x2c004629, 0x00b109c2, 0x00b10a02 },
+   { 0x00800040, 0x2c204629, 0x00b10a02, 0x00b10a42 },
+   { 0x00800040, 0x2c404629, 0x00b10a42, 0x00b10a82 },
+   { 0x00800040, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
+   { 0x00800040, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
+   { 0x00800040, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
+   { 0x00800040, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
+   { 0x00800040, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c3 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a03 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a43 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a83 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac3 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b03 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b43 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b83 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a03 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a43 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a83 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac3 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b03 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b43 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b83 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+   { 0x00800040, 0x2c004629, 0x00b109c3, 0x00b10a03 },
+   { 0x00800040, 0x2c204629, 0x00b10a03, 0x00b10a43 },
+   { 0x00800040, 0x2c404629, 0x00b10a43, 0x00b10a83 },
+   { 0x00800040, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
+   { 0x00800040, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
+   { 0x00800040, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
+   { 0x00800040, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
+   { 0x00800040, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c4 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a04 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a44 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a84 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac4 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b04 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b44 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b84 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a04 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a44 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a84 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac4 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b04 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b44 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b84 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc4 },
+   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
+   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
+   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
+   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
+   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
+   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
+   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
+   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000009a },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c41 },
-   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c61 },
-   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10c81 },
-   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
-   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
-   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
-   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d01 },
-   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d21 },
-   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d41 },
-   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d61 },
-   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10d81 },
-   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10da1 },
-   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
-   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10de1 },
-   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e01 },
-   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10e21 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
-   { 0x80800042, 0x23804629, 0x00b10c41, 0x00b10c42 },
-   { 0x80800042, 0x23a04629, 0x00b10c61, 0x00b10c62 },
-   { 0x80800042, 0x23c04629, 0x00b10c81, 0x00b10c82 },
-   { 0x80800042, 0x23e04629, 0x00b10ca1, 0x00b10ca2 },
-   { 0x80800042, 0x24004629, 0x00b10cc1, 0x00b10cc2 },
-   { 0x80800042, 0x24204629, 0x00b10ce1, 0x00b10ce2 },
-   { 0x80800042, 0x24404629, 0x00b10d01, 0x00b10d02 },
-   { 0x80800042, 0x24604629, 0x00b10d21, 0x00b10d22 },
-   { 0x80800042, 0x24804629, 0x00b10d41, 0x00b10d42 },
-   { 0x80800042, 0x24a04629, 0x00b10d61, 0x00b10d62 },
-   { 0x80800042, 0x24c04629, 0x00b10d81, 0x00b10d82 },
-   { 0x80800042, 0x24e04629, 0x00b10da1, 0x00b10da2 },
-   { 0x80800042, 0x25004629, 0x00b10dc1, 0x00b10dc2 },
-   { 0x80800042, 0x25204629, 0x00b10de1, 0x00b10de2 },
-   { 0x80800042, 0x25404629, 0x00b10e01, 0x00b10e02 },
-   { 0x80800042, 0x25604629, 0x00b10e21, 0x00b10e22 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
-   { 0x80800042, 0x23804629, 0x00b10c42, 0x00b10c43 },
-   { 0x80800042, 0x23a04629, 0x00b10c62, 0x00b10c63 },
-   { 0x80800042, 0x23c04629, 0x00b10c82, 0x00b10c83 },
-   { 0x80800042, 0x23e04629, 0x00b10ca2, 0x00b10ca3 },
-   { 0x80800042, 0x24004629, 0x00b10cc2, 0x00b10cc3 },
-   { 0x80800042, 0x24204629, 0x00b10ce2, 0x00b10ce3 },
-   { 0x80800042, 0x24404629, 0x00b10d02, 0x00b10d03 },
-   { 0x80800042, 0x24604629, 0x00b10d22, 0x00b10d23 },
-   { 0x80800042, 0x24804629, 0x00b10d42, 0x00b10d43 },
-   { 0x80800042, 0x24a04629, 0x00b10d62, 0x00b10d63 },
-   { 0x80800042, 0x24c04629, 0x00b10d82, 0x00b10d83 },
-   { 0x80800042, 0x24e04629, 0x00b10da2, 0x00b10da3 },
-   { 0x80800042, 0x25004629, 0x00b10dc2, 0x00b10dc3 },
-   { 0x80800042, 0x25204629, 0x00b10de2, 0x00b10de3 },
-   { 0x80800042, 0x25404629, 0x00b10e02, 0x00b10e03 },
-   { 0x80800042, 0x25604629, 0x00b10e22, 0x00b10e23 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
-   { 0x80800042, 0x23804629, 0x00b10c43, 0x00b10c44 },
-   { 0x80800042, 0x23a04629, 0x00b10c63, 0x00b10c64 },
-   { 0x80800042, 0x23c04629, 0x00b10c83, 0x00b10c84 },
-   { 0x80800042, 0x23e04629, 0x00b10ca3, 0x00b10ca4 },
-   { 0x80800042, 0x24004629, 0x00b10cc3, 0x00b10cc4 },
-   { 0x80800042, 0x24204629, 0x00b10ce3, 0x00b10ce4 },
-   { 0x80800042, 0x24404629, 0x00b10d03, 0x00b10d04 },
-   { 0x80800042, 0x24604629, 0x00b10d23, 0x00b10d24 },
-   { 0x80800042, 0x24804629, 0x00b10d43, 0x00b10d44 },
-   { 0x80800042, 0x24a04629, 0x00b10d63, 0x00b10d64 },
-   { 0x80800042, 0x24c04629, 0x00b10d83, 0x00b10d84 },
-   { 0x80800042, 0x24e04629, 0x00b10da3, 0x00b10da4 },
-   { 0x80800042, 0x25004629, 0x00b10dc3, 0x00b10dc4 },
-   { 0x80800042, 0x25204629, 0x00b10de3, 0x00b10de4 },
-   { 0x80800042, 0x25404629, 0x00b10e03, 0x00b10e04 },
-   { 0x80800042, 0x25604629, 0x00b10e23, 0x00b10e24 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b109c2 },
+   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a02 },
+   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a42 },
+   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10a82 },
+   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10ac2 },
+   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b02 },
+   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b42 },
+   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10b82 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b109c3 },
+   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a03 },
+   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a43 },
+   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10a83 },
+   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10ac3 },
+   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b03 },
+   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b43 },
+   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10b83 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b109c4 },
+   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a04 },
+   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a44 },
+   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10a84 },
+   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10ac4 },
+   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b04 },
+   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b44 },
+   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10b84 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000068 },
+   { 0x01000005, 0x20002d3c, 0x00210030, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000035 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b10a01 },
+   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a41 },
+   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a81 },
+   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
+   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
+   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
+   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
+   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b10a02 },
+   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a42 },
+   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a82 },
+   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
+   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
+   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
+   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
+   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b10a03 },
+   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a43 },
+   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a83 },
+   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
+   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
+   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
+   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
+   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x00800001, 0x2c000229, 0x00b109c1, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a01, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a41, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a81, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac1, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b01, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b41, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b81, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x00800001, 0x2c000229, 0x00b109c2, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a02, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a42, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a82, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac2, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b02, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b42, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b82, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00800001, 0x2c000229, 0x00b109c3, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a03, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a43, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a83, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac3, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b03, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b43, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b83, 0x00000000 },
+   { 0x00600001, 0x26800021, 0x008d0c00, 0x00000000 },
+   { 0x00600001, 0x26c00021, 0x008d0c20, 0x00000000 },
+   { 0x00600001, 0x27000021, 0x008d0c40, 0x00000000 },
+   { 0x00600001, 0x27400021, 0x008d0c60, 0x00000000 },
+   { 0x00600001, 0x27800021, 0x008d0c80, 0x00000000 },
+   { 0x00600001, 0x27c00021, 0x008d0ca0, 0x00000000 },
+   { 0x00600001, 0x28000021, 0x008d0cc0, 0x00000000 },
+   { 0x00600001, 0x28400021, 0x008d0ce0, 0x00000000 },
+   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20000e3c, 0x0021003f, 0x00000004 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210036, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000007d },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
+   { 0x00800040, 0x2c004629, 0x00b109c1, 0x00b10a01 },
+   { 0x00800040, 0x2c204629, 0x00b10a01, 0x00b10a41 },
+   { 0x00800040, 0x2c404629, 0x00b10a41, 0x00b10a81 },
+   { 0x00800040, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
+   { 0x00800040, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
+   { 0x00800040, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
+   { 0x00800040, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
+   { 0x00800040, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c2 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a02 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a42 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a82 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac2 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b02 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b42 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b82 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a02 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a42 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a82 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac2 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b02 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b42 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b82 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00800040, 0x2c004629, 0x00b109c2, 0x00b10a02 },
+   { 0x00800040, 0x2c204629, 0x00b10a02, 0x00b10a42 },
+   { 0x00800040, 0x2c404629, 0x00b10a42, 0x00b10a82 },
+   { 0x00800040, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
+   { 0x00800040, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
+   { 0x00800040, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
+   { 0x00800040, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
+   { 0x00800040, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c3 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a03 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a43 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a83 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac3 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b03 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b43 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b83 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a03 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a43 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a83 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac3 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b03 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b43 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b83 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+   { 0x00800040, 0x2c004629, 0x00b109c3, 0x00b10a03 },
+   { 0x00800040, 0x2c204629, 0x00b10a03, 0x00b10a43 },
+   { 0x00800040, 0x2c404629, 0x00b10a43, 0x00b10a83 },
+   { 0x00800040, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
+   { 0x00800040, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
+   { 0x00800040, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
+   { 0x00800040, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
+   { 0x00800040, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c4 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a04 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a44 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a84 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac4 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b04 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b44 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b84 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a04 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a44 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a84 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac4 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b04 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b44 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b84 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc4 },
+   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
+   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
+   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
+   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
+   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
+   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
+   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
+   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000009a },
-   { 0x01000005, 0x20000d3c, 0x00210e70, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000004e },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000011 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a004 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c60 },
-   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c80 },
-   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10ca0 },
-   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10cc0 },
-   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10ce0 },
-   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10d00 },
-   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d20 },
-   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d40 },
-   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d60 },
-   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d80 },
-   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10da0 },
-   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10dc0 },
-   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10de0 },
-   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10e00 },
-   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e20 },
-   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10f00 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
-   { 0x80800042, 0x23804629, 0x00b10c41, 0x00b10c61 },
-   { 0x80800042, 0x23a04629, 0x00b10c61, 0x00b10c81 },
-   { 0x80800042, 0x23c04629, 0x00b10c81, 0x00b10ca1 },
-   { 0x80800042, 0x23e04629, 0x00b10ca1, 0x00b10cc1 },
-   { 0x80800042, 0x24004629, 0x00b10cc1, 0x00b10ce1 },
-   { 0x80800042, 0x24204629, 0x00b10ce1, 0x00b10d01 },
-   { 0x80800042, 0x24404629, 0x00b10d01, 0x00b10d21 },
-   { 0x80800042, 0x24604629, 0x00b10d21, 0x00b10d41 },
-   { 0x80800042, 0x24804629, 0x00b10d41, 0x00b10d61 },
-   { 0x80800042, 0x24a04629, 0x00b10d61, 0x00b10d81 },
-   { 0x80800042, 0x24c04629, 0x00b10d81, 0x00b10da1 },
-   { 0x80800042, 0x24e04629, 0x00b10da1, 0x00b10dc1 },
-   { 0x80800042, 0x25004629, 0x00b10dc1, 0x00b10de1 },
-   { 0x80800042, 0x25204629, 0x00b10de1, 0x00b10e01 },
-   { 0x80800042, 0x25404629, 0x00b10e01, 0x00b10e21 },
-   { 0x80800042, 0x25604629, 0x00b10e21, 0x00b10f01 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
-   { 0x80800042, 0x23804629, 0x00b10c42, 0x00b10c62 },
-   { 0x80800042, 0x23a04629, 0x00b10c62, 0x00b10c82 },
-   { 0x80800042, 0x23c04629, 0x00b10c82, 0x00b10ca2 },
-   { 0x80800042, 0x23e04629, 0x00b10ca2, 0x00b10cc2 },
-   { 0x80800042, 0x24004629, 0x00b10cc2, 0x00b10ce2 },
-   { 0x80800042, 0x24204629, 0x00b10ce2, 0x00b10d02 },
-   { 0x80800042, 0x24404629, 0x00b10d02, 0x00b10d22 },
-   { 0x80800042, 0x24604629, 0x00b10d22, 0x00b10d42 },
-   { 0x80800042, 0x24804629, 0x00b10d42, 0x00b10d62 },
-   { 0x80800042, 0x24a04629, 0x00b10d62, 0x00b10d82 },
-   { 0x80800042, 0x24c04629, 0x00b10d82, 0x00b10da2 },
-   { 0x80800042, 0x24e04629, 0x00b10da2, 0x00b10dc2 },
-   { 0x80800042, 0x25004629, 0x00b10dc2, 0x00b10de2 },
-   { 0x80800042, 0x25204629, 0x00b10de2, 0x00b10e02 },
-   { 0x80800042, 0x25404629, 0x00b10e02, 0x00b10e22 },
-   { 0x80800042, 0x25604629, 0x00b10e22, 0x00b10f02 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
-   { 0x80800042, 0x23804629, 0x00b10c43, 0x00b10c63 },
-   { 0x80800042, 0x23a04629, 0x00b10c63, 0x00b10c83 },
-   { 0x80800042, 0x23c04629, 0x00b10c83, 0x00b10ca3 },
-   { 0x80800042, 0x23e04629, 0x00b10ca3, 0x00b10cc3 },
-   { 0x80800042, 0x24004629, 0x00b10cc3, 0x00b10ce3 },
-   { 0x80800042, 0x24204629, 0x00b10ce3, 0x00b10d03 },
-   { 0x80800042, 0x24404629, 0x00b10d03, 0x00b10d23 },
-   { 0x80800042, 0x24604629, 0x00b10d23, 0x00b10d43 },
-   { 0x80800042, 0x24804629, 0x00b10d43, 0x00b10d63 },
-   { 0x80800042, 0x24a04629, 0x00b10d63, 0x00b10d83 },
-   { 0x80800042, 0x24c04629, 0x00b10d83, 0x00b10da3 },
-   { 0x80800042, 0x24e04629, 0x00b10da3, 0x00b10dc3 },
-   { 0x80800042, 0x25004629, 0x00b10dc3, 0x00b10de3 },
-   { 0x80800042, 0x25204629, 0x00b10de3, 0x00b10e03 },
-   { 0x80800042, 0x25404629, 0x00b10e03, 0x00b10e23 },
-   { 0x80800042, 0x25604629, 0x00b10e23, 0x00b10f03 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b109c2 },
+   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a02 },
+   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a42 },
+   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10a82 },
+   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10ac2 },
+   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b02 },
+   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b42 },
+   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10b82 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b109c3 },
+   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a03 },
+   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a43 },
+   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10a83 },
+   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10ac3 },
+   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b03 },
+   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b43 },
+   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10b83 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b109c4 },
+   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a04 },
+   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a44 },
+   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10a84 },
+   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10ac4 },
+   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b04 },
+   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b44 },
+   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10b84 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000068 },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000035 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b10a01 },
+   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a41 },
+   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a81 },
+   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
+   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
+   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
+   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
+   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b10a02 },
+   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a42 },
+   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a82 },
+   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
+   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
+   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
+   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
+   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b10a03 },
+   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a43 },
+   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a83 },
+   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
+   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
+   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
+   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
+   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x00800001, 0x2c000229, 0x00b109c1, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a01, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a41, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a81, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac1, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b01, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b41, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b81, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x00800001, 0x2c000229, 0x00b109c2, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a02, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a42, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a82, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac2, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b02, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b42, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b82, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00800001, 0x2c000229, 0x00b109c3, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a03, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a43, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a83, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac3, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b03, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b43, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b83, 0x00000000 },
+   { 0x00600001, 0x26a00021, 0x008d0c00, 0x00000000 },
+   { 0x00600001, 0x26e00021, 0x008d0c20, 0x00000000 },
+   { 0x00600001, 0x27200021, 0x008d0c40, 0x00000000 },
+   { 0x00600001, 0x27600021, 0x008d0c60, 0x00000000 },
+   { 0x00600001, 0x27a00021, 0x008d0c80, 0x00000000 },
+   { 0x00600001, 0x27e00021, 0x008d0ca0, 0x00000000 },
+   { 0x00600001, 0x28200021, 0x008d0cc0, 0x00000000 },
+   { 0x00600001, 0x28600021, 0x008d0ce0, 0x00000000 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x0020000c, 0x2e6e3dad, 0x0045002e, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x0021002e, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
+   { 0x01000005, 0x20002d3c, 0x00210030, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000076 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
+   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000011 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
+   { 0x00800040, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
+   { 0x00800040, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac2 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae2 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b02 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b22 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae2 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b02 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b22 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b42 },
+   { 0x00800040, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
+   { 0x00800040, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b62 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b82 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba2 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc2 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b82 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba2 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc2 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
+   { 0x00800040, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
+   { 0x00800040, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac3 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae3 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b03 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b23 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae3 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b03 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b23 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b43 },
+   { 0x00800040, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
+   { 0x00800040, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b63 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b83 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba3 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc3 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b83 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba3 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc3 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac3, 0x00ad0ae3 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae3, 0x00ad0b03 },
+   { 0x00800040, 0x2a004629, 0x00ad0b03, 0x00ad0b23 },
+   { 0x00800040, 0x2a204629, 0x00ad0b23, 0x00ad0b43 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac4 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae4 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b04 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b24 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae4 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b04 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b24 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b44 },
+   { 0x00800040, 0x2a404629, 0x00ad0b63, 0x00ad0b83 },
+   { 0x00800040, 0x2a604629, 0x00ad0b83, 0x00ad0ba3 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba3, 0x00ad0bc3 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc3, 0x00ad0be3 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b64 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b84 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba4 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc4 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b84 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba4 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc4 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be4 },
+   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
+   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
+   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
+   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
+   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
+   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000082 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x23800229, 0x00b10c40, 0x00000000 },
-   { 0x00800001, 0x23a00229, 0x00b10c60, 0x00000000 },
-   { 0x00800001, 0x23c00229, 0x00b10c80, 0x00000000 },
-   { 0x00800001, 0x23e00229, 0x00b10ca0, 0x00000000 },
-   { 0x00800001, 0x24000229, 0x00b10cc0, 0x00000000 },
-   { 0x00800001, 0x24200229, 0x00b10ce0, 0x00000000 },
-   { 0x00800001, 0x24400229, 0x00b10d00, 0x00000000 },
-   { 0x00800001, 0x24600229, 0x00b10d20, 0x00000000 },
-   { 0x00800001, 0x24800229, 0x00b10d40, 0x00000000 },
-   { 0x00800001, 0x24a00229, 0x00b10d60, 0x00000000 },
-   { 0x00800001, 0x24c00229, 0x00b10d80, 0x00000000 },
-   { 0x00800001, 0x24e00229, 0x00b10da0, 0x00000000 },
-   { 0x00800001, 0x25000229, 0x00b10dc0, 0x00000000 },
-   { 0x00800001, 0x25200229, 0x00b10de0, 0x00000000 },
-   { 0x00800001, 0x25400229, 0x00b10e00, 0x00000000 },
-   { 0x00800001, 0x25600229, 0x00b10e20, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
-   { 0x00800001, 0x23800229, 0x00b10c41, 0x00000000 },
-   { 0x00800001, 0x23a00229, 0x00b10c61, 0x00000000 },
-   { 0x00800001, 0x23c00229, 0x00b10c81, 0x00000000 },
-   { 0x00800001, 0x23e00229, 0x00b10ca1, 0x00000000 },
-   { 0x00800001, 0x24000229, 0x00b10cc1, 0x00000000 },
-   { 0x00800001, 0x24200229, 0x00b10ce1, 0x00000000 },
-   { 0x00800001, 0x24400229, 0x00b10d01, 0x00000000 },
-   { 0x00800001, 0x24600229, 0x00b10d21, 0x00000000 },
-   { 0x00800001, 0x24800229, 0x00b10d41, 0x00000000 },
-   { 0x00800001, 0x24a00229, 0x00b10d61, 0x00000000 },
-   { 0x00800001, 0x24c00229, 0x00b10d81, 0x00000000 },
-   { 0x00800001, 0x24e00229, 0x00b10da1, 0x00000000 },
-   { 0x00800001, 0x25000229, 0x00b10dc1, 0x00000000 },
-   { 0x00800001, 0x25200229, 0x00b10de1, 0x00000000 },
-   { 0x00800001, 0x25400229, 0x00b10e01, 0x00000000 },
-   { 0x00800001, 0x25600229, 0x00b10e21, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
-   { 0x00800001, 0x23800229, 0x00b10c42, 0x00000000 },
-   { 0x00800001, 0x23a00229, 0x00b10c62, 0x00000000 },
-   { 0x00800001, 0x23c00229, 0x00b10c82, 0x00000000 },
-   { 0x00800001, 0x23e00229, 0x00b10ca2, 0x00000000 },
-   { 0x00800001, 0x24000229, 0x00b10cc2, 0x00000000 },
-   { 0x00800001, 0x24200229, 0x00b10ce2, 0x00000000 },
-   { 0x00800001, 0x24400229, 0x00b10d02, 0x00000000 },
-   { 0x00800001, 0x24600229, 0x00b10d22, 0x00000000 },
-   { 0x00800001, 0x24800229, 0x00b10d42, 0x00000000 },
-   { 0x00800001, 0x24a00229, 0x00b10d62, 0x00000000 },
-   { 0x00800001, 0x24c00229, 0x00b10d82, 0x00000000 },
-   { 0x00800001, 0x24e00229, 0x00b10da2, 0x00000000 },
-   { 0x00800001, 0x25000229, 0x00b10dc2, 0x00000000 },
-   { 0x00800001, 0x25200229, 0x00b10de2, 0x00000000 },
-   { 0x00800001, 0x25400229, 0x00b10e02, 0x00000000 },
-   { 0x00800001, 0x25600229, 0x00b10e22, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
-   { 0x00800001, 0x23800229, 0x00b10c43, 0x00000000 },
-   { 0x00800001, 0x23a00229, 0x00b10c63, 0x00000000 },
-   { 0x00800001, 0x23c00229, 0x00b10c83, 0x00000000 },
-   { 0x00800001, 0x23e00229, 0x00b10ca3, 0x00000000 },
-   { 0x00800001, 0x24000229, 0x00b10cc3, 0x00000000 },
-   { 0x00800001, 0x24200229, 0x00b10ce3, 0x00000000 },
-   { 0x00800001, 0x24400229, 0x00b10d03, 0x00000000 },
-   { 0x00800001, 0x24600229, 0x00b10d23, 0x00000000 },
-   { 0x00800001, 0x24800229, 0x00b10d43, 0x00000000 },
-   { 0x00800001, 0x24a00229, 0x00b10d63, 0x00000000 },
-   { 0x00800001, 0x24c00229, 0x00b10d83, 0x00000000 },
-   { 0x00800001, 0x24e00229, 0x00b10da3, 0x00000000 },
-   { 0x00800001, 0x25000229, 0x00b10dc3, 0x00000000 },
-   { 0x00800001, 0x25200229, 0x00b10de3, 0x00000000 },
-   { 0x00800001, 0x25400229, 0x00b10e03, 0x00000000 },
-   { 0x00800001, 0x25600229, 0x00b10e23, 0x00000000 },
-   { 0x00802001, 0x26800021, 0x00b10380, 0x00000000 },
-   { 0x00802001, 0x26c00021, 0x00b103c0, 0x00000000 },
-   { 0x00802001, 0x27000021, 0x00b10400, 0x00000000 },
-   { 0x00802001, 0x27400021, 0x00b10440, 0x00000000 },
-   { 0x00802001, 0x27800021, 0x00b10480, 0x00000000 },
-   { 0x00802001, 0x27c00021, 0x00b104c0, 0x00000000 },
-   { 0x00802001, 0x28000021, 0x00b10500, 0x00000000 },
-   { 0x00802001, 0x28400021, 0x00b10540, 0x00000000 },
-   { 0x0020000c, 0x202e3dad, 0x00450e72, 0x00010001 },
-   { 0x00200040, 0x20403421, 0x00450e60, 0x0045002e },
-   { 0x01000005, 0x20000d3c, 0x00210e72, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000012b },
-   { 0x01000005, 0x20000d3c, 0x00210e74, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x000000de },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000031 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a007 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ac2 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0ae2 },
+   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b02 },
+   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b22 },
+   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b62 },
+   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0b82 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0ba2 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0bc2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ac3 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0ae3 },
+   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b03 },
+   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b23 },
+   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b63 },
+   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0b83 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0ba3 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac4 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae4 },
+   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b04 },
+   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b24 },
+   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b64 },
+   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b84 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba4 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc4 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000058 },
+   { 0x01000005, 0x20002d3c, 0x00210030, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002d },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800040, 0x23804629, 0x00b10c40, 0x00b10c41 },
-   { 0x00800040, 0x23a04629, 0x00b10c60, 0x00b10c61 },
-   { 0x00800040, 0x23c04629, 0x00b10c80, 0x00b10c81 },
-   { 0x00800040, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
-   { 0x00800040, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
-   { 0x00800040, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
-   { 0x00800040, 0x24404629, 0x00b10d00, 0x00b10d01 },
-   { 0x00800040, 0x24604629, 0x00b10d20, 0x00b10d21 },
-   { 0x00800040, 0x24804629, 0x00b10d40, 0x00b10d41 },
-   { 0x00800040, 0x24a04629, 0x00b10d60, 0x00b10d61 },
-   { 0x00800040, 0x24c04629, 0x00b10d80, 0x00b10d81 },
-   { 0x00800040, 0x24e04629, 0x00b10da0, 0x00b10da1 },
-   { 0x00800040, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
-   { 0x00800040, 0x25204629, 0x00b10de0, 0x00b10de1 },
-   { 0x00800040, 0x25404629, 0x00b10e00, 0x00b10e01 },
-   { 0x00800040, 0x25604629, 0x00b10e20, 0x00b10e21 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c60 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c80 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca0 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc0 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce0 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d00 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d20 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d40 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d60 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d80 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da0 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc0 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de0 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e00 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e20 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f00 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000092 },
-   { 0x00800040, 0x23804629, 0x00b10c41, 0x00b10c42 },
-   { 0x00800040, 0x23a04629, 0x00b10c61, 0x00b10c62 },
-   { 0x00800040, 0x23c04629, 0x00b10c81, 0x00b10c82 },
-   { 0x00800040, 0x23e04629, 0x00b10ca1, 0x00b10ca2 },
-   { 0x00800040, 0x24004629, 0x00b10cc1, 0x00b10cc2 },
-   { 0x00800040, 0x24204629, 0x00b10ce1, 0x00b10ce2 },
-   { 0x00800040, 0x24404629, 0x00b10d01, 0x00b10d02 },
-   { 0x00800040, 0x24604629, 0x00b10d21, 0x00b10d22 },
-   { 0x00800040, 0x24804629, 0x00b10d41, 0x00b10d42 },
-   { 0x00800040, 0x24a04629, 0x00b10d61, 0x00b10d62 },
-   { 0x00800040, 0x24c04629, 0x00b10d81, 0x00b10d82 },
-   { 0x00800040, 0x24e04629, 0x00b10da1, 0x00b10da2 },
-   { 0x00800040, 0x25004629, 0x00b10dc1, 0x00b10dc2 },
-   { 0x00800040, 0x25204629, 0x00b10de1, 0x00b10de2 },
-   { 0x00800040, 0x25404629, 0x00b10e01, 0x00b10e02 },
-   { 0x00800040, 0x25604629, 0x00b10e21, 0x00b10e22 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c62 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c82 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca2 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc2 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce2 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d02 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d22 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d42 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d62 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d82 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da2 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc2 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de2 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e02 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e22 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f02 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000061 },
-   { 0x00800040, 0x23804629, 0x00b10c42, 0x00b10c43 },
-   { 0x00800040, 0x23a04629, 0x00b10c62, 0x00b10c63 },
-   { 0x00800040, 0x23c04629, 0x00b10c82, 0x00b10c83 },
-   { 0x00800040, 0x23e04629, 0x00b10ca2, 0x00b10ca3 },
-   { 0x00800040, 0x24004629, 0x00b10cc2, 0x00b10cc3 },
-   { 0x00800040, 0x24204629, 0x00b10ce2, 0x00b10ce3 },
-   { 0x00800040, 0x24404629, 0x00b10d02, 0x00b10d03 },
-   { 0x00800040, 0x24604629, 0x00b10d22, 0x00b10d23 },
-   { 0x00800040, 0x24804629, 0x00b10d42, 0x00b10d43 },
-   { 0x00800040, 0x24a04629, 0x00b10d62, 0x00b10d63 },
-   { 0x00800040, 0x24c04629, 0x00b10d82, 0x00b10d83 },
-   { 0x00800040, 0x24e04629, 0x00b10da2, 0x00b10da3 },
-   { 0x00800040, 0x25004629, 0x00b10dc2, 0x00b10dc3 },
-   { 0x00800040, 0x25204629, 0x00b10de2, 0x00b10de3 },
-   { 0x00800040, 0x25404629, 0x00b10e02, 0x00b10e03 },
-   { 0x00800040, 0x25604629, 0x00b10e22, 0x00b10e23 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c62 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c82 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca2 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc2 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce2 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d02 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d22 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d42 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d62 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d82 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da2 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc2 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de2 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e02 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e22 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f02 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c63 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c83 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca3 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc3 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce3 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d03 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d23 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d43 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d63 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d83 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da3 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc3 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de3 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e03 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e23 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f03 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000030 },
-   { 0x00800040, 0x23804629, 0x00b10c43, 0x00b10c44 },
-   { 0x00800040, 0x23a04629, 0x00b10c63, 0x00b10c64 },
-   { 0x00800040, 0x23c04629, 0x00b10c83, 0x00b10c84 },
-   { 0x00800040, 0x23e04629, 0x00b10ca3, 0x00b10ca4 },
-   { 0x00800040, 0x24004629, 0x00b10cc3, 0x00b10cc4 },
-   { 0x00800040, 0x24204629, 0x00b10ce3, 0x00b10ce4 },
-   { 0x00800040, 0x24404629, 0x00b10d03, 0x00b10d04 },
-   { 0x00800040, 0x24604629, 0x00b10d23, 0x00b10d24 },
-   { 0x00800040, 0x24804629, 0x00b10d43, 0x00b10d44 },
-   { 0x00800040, 0x24a04629, 0x00b10d63, 0x00b10d64 },
-   { 0x00800040, 0x24c04629, 0x00b10d83, 0x00b10d84 },
-   { 0x00800040, 0x24e04629, 0x00b10da3, 0x00b10da4 },
-   { 0x00800040, 0x25004629, 0x00b10dc3, 0x00b10dc4 },
-   { 0x00800040, 0x25204629, 0x00b10de3, 0x00b10de4 },
-   { 0x00800040, 0x25404629, 0x00b10e03, 0x00b10e04 },
-   { 0x00800040, 0x25604629, 0x00b10e23, 0x00b10e24 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c63 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c83 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca3 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc3 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce3 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d03 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d23 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d43 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d63 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d83 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da3 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc3 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de3 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e03 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e23 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f03 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c64 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c84 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca4 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc4 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce4 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d04 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d24 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d44 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d64 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d84 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da4 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc4 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de4 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e04 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e24 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f04 },
-   { 0x80800008, 0x23802d29, 0x00b10380, 0x00020002 },
-   { 0x80800008, 0x23a02d29, 0x00b103a0, 0x00020002 },
-   { 0x80800008, 0x23c02d29, 0x00b103c0, 0x00020002 },
-   { 0x80800008, 0x23e02d29, 0x00b103e0, 0x00020002 },
-   { 0x80800008, 0x24002d29, 0x00b10400, 0x00020002 },
-   { 0x80800008, 0x24202d29, 0x00b10420, 0x00020002 },
-   { 0x80800008, 0x24402d29, 0x00b10440, 0x00020002 },
-   { 0x80800008, 0x24602d29, 0x00b10460, 0x00020002 },
-   { 0x80800008, 0x24802d29, 0x00b10480, 0x00020002 },
-   { 0x80800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
-   { 0x80800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
-   { 0x80800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
-   { 0x80800008, 0x25002d29, 0x00b10500, 0x00020002 },
-   { 0x80800008, 0x25202d29, 0x00b10520, 0x00020002 },
-   { 0x80800008, 0x25402d29, 0x00b10540, 0x00020002 },
-   { 0x80800008, 0x25602d29, 0x00b10560, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x000000e5 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
-   { 0x00000041, 0x20581c21, 0x00210058, 0x00000011 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
+   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
+   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
+   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
+   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
+   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
+   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
+   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
+   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac3 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae3 },
+   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b03 },
+   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b23 },
+   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b63 },
+   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b83 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba3 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c41 },
-   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c61 },
-   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10c81 },
-   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
-   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
-   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
-   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d01 },
-   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d21 },
-   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d41 },
-   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d61 },
-   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10d81 },
-   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10da1 },
-   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
-   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10de1 },
-   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e01 },
-   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10e21 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
-   { 0x80800042, 0x23804629, 0x00b10c41, 0x00b10c42 },
-   { 0x80800042, 0x23a04629, 0x00b10c61, 0x00b10c62 },
-   { 0x80800042, 0x23c04629, 0x00b10c81, 0x00b10c82 },
-   { 0x80800042, 0x23e04629, 0x00b10ca1, 0x00b10ca2 },
-   { 0x80800042, 0x24004629, 0x00b10cc1, 0x00b10cc2 },
-   { 0x80800042, 0x24204629, 0x00b10ce1, 0x00b10ce2 },
-   { 0x80800042, 0x24404629, 0x00b10d01, 0x00b10d02 },
-   { 0x80800042, 0x24604629, 0x00b10d21, 0x00b10d22 },
-   { 0x80800042, 0x24804629, 0x00b10d41, 0x00b10d42 },
-   { 0x80800042, 0x24a04629, 0x00b10d61, 0x00b10d62 },
-   { 0x80800042, 0x24c04629, 0x00b10d81, 0x00b10d82 },
-   { 0x80800042, 0x24e04629, 0x00b10da1, 0x00b10da2 },
-   { 0x80800042, 0x25004629, 0x00b10dc1, 0x00b10dc2 },
-   { 0x80800042, 0x25204629, 0x00b10de1, 0x00b10de2 },
-   { 0x80800042, 0x25404629, 0x00b10e01, 0x00b10e02 },
-   { 0x80800042, 0x25604629, 0x00b10e21, 0x00b10e22 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
-   { 0x80800042, 0x23804629, 0x00b10c42, 0x00b10c43 },
-   { 0x80800042, 0x23a04629, 0x00b10c62, 0x00b10c63 },
-   { 0x80800042, 0x23c04629, 0x00b10c82, 0x00b10c83 },
-   { 0x80800042, 0x23e04629, 0x00b10ca2, 0x00b10ca3 },
-   { 0x80800042, 0x24004629, 0x00b10cc2, 0x00b10cc3 },
-   { 0x80800042, 0x24204629, 0x00b10ce2, 0x00b10ce3 },
-   { 0x80800042, 0x24404629, 0x00b10d02, 0x00b10d03 },
-   { 0x80800042, 0x24604629, 0x00b10d22, 0x00b10d23 },
-   { 0x80800042, 0x24804629, 0x00b10d42, 0x00b10d43 },
-   { 0x80800042, 0x24a04629, 0x00b10d62, 0x00b10d63 },
-   { 0x80800042, 0x24c04629, 0x00b10d82, 0x00b10d83 },
-   { 0x80800042, 0x24e04629, 0x00b10da2, 0x00b10da3 },
-   { 0x80800042, 0x25004629, 0x00b10dc2, 0x00b10dc3 },
-   { 0x80800042, 0x25204629, 0x00b10de2, 0x00b10de3 },
-   { 0x80800042, 0x25404629, 0x00b10e02, 0x00b10e03 },
-   { 0x80800042, 0x25604629, 0x00b10e22, 0x00b10e23 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
-   { 0x80800042, 0x23804629, 0x00b10c43, 0x00b10c44 },
-   { 0x80800042, 0x23a04629, 0x00b10c63, 0x00b10c64 },
-   { 0x80800042, 0x23c04629, 0x00b10c83, 0x00b10c84 },
-   { 0x80800042, 0x23e04629, 0x00b10ca3, 0x00b10ca4 },
-   { 0x80800042, 0x24004629, 0x00b10cc3, 0x00b10cc4 },
-   { 0x80800042, 0x24204629, 0x00b10ce3, 0x00b10ce4 },
-   { 0x80800042, 0x24404629, 0x00b10d03, 0x00b10d04 },
-   { 0x80800042, 0x24604629, 0x00b10d23, 0x00b10d24 },
-   { 0x80800042, 0x24804629, 0x00b10d43, 0x00b10d44 },
-   { 0x80800042, 0x24a04629, 0x00b10d63, 0x00b10d64 },
-   { 0x80800042, 0x24c04629, 0x00b10d83, 0x00b10d84 },
-   { 0x80800042, 0x24e04629, 0x00b10da3, 0x00b10da4 },
-   { 0x80800042, 0x25004629, 0x00b10dc3, 0x00b10dc4 },
-   { 0x80800042, 0x25204629, 0x00b10de3, 0x00b10de4 },
-   { 0x80800042, 0x25404629, 0x00b10e03, 0x00b10e04 },
-   { 0x80800042, 0x25604629, 0x00b10e23, 0x00b10e24 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x00800001, 0x29c00229, 0x00ad0ac1, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae1, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b01, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b21, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b61, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b81, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba1, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc1, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac2, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae2, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b02, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b22, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b62, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b82, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba2, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc2, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac3, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae3, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b03, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b23, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b63, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b83, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba3, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc3, 0x00000000 },
+   { 0x00600001, 0x28800129, 0x008d09c0, 0x00000000 },
+   { 0x00600001, 0x28a00129, 0x008d09e0, 0x00000000 },
+   { 0x00600001, 0x28c00129, 0x008d0a00, 0x00000000 },
+   { 0x00600001, 0x28e00129, 0x008d0a20, 0x00000000 },
+   { 0x00600001, 0x29000129, 0x008d0a40, 0x00000000 },
+   { 0x00600001, 0x29200129, 0x008d0a60, 0x00000000 },
+   { 0x00600001, 0x29400129, 0x008d0a80, 0x00000000 },
+   { 0x00600001, 0x29600129, 0x008d0aa0, 0x00000000 },
+   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00040004 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000076 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
+   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
+   { 0x00800040, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
+   { 0x00800040, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
+   { 0x00800040, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac2 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae2 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b02 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b22 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae2 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b02 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b22 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b42 },
+   { 0x00800040, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
+   { 0x00800040, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b62 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b82 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba2 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc2 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b82 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba2 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc2 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
+   { 0x00800040, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
+   { 0x00800040, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac3 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae3 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b03 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b23 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae3 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b03 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b23 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b43 },
+   { 0x00800040, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
+   { 0x00800040, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b63 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b83 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba3 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc3 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b83 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba3 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc3 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac3, 0x00ad0ae3 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae3, 0x00ad0b03 },
+   { 0x00800040, 0x2a004629, 0x00ad0b03, 0x00ad0b23 },
+   { 0x00800040, 0x2a204629, 0x00ad0b23, 0x00ad0b43 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac4 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae4 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b04 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b24 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae4 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b04 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b24 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b44 },
+   { 0x00800040, 0x2a404629, 0x00ad0b63, 0x00ad0b83 },
+   { 0x00800040, 0x2a604629, 0x00ad0b83, 0x00ad0ba3 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba3, 0x00ad0bc3 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc3, 0x00ad0be3 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b64 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b84 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba4 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc4 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b84 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba4 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc4 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be4 },
+   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
+   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
+   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
+   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
+   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
+   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000082 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ac2 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0ae2 },
+   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b02 },
+   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b22 },
+   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b62 },
+   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0b82 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0ba2 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0bc2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ac3 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0ae3 },
+   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b03 },
+   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b23 },
+   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b63 },
+   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0b83 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0ba3 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac4 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae4 },
+   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b04 },
+   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b24 },
+   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b64 },
+   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b84 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba4 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc4 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000058 },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002d },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
+   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
+   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
+   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
+   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
+   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
+   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
+   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
+   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac3 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae3 },
+   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b03 },
+   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b23 },
+   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b63 },
+   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b83 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba3 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x00800001, 0x29c00229, 0x00ad0ac1, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae1, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b01, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b21, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b61, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b81, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba1, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc1, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac2, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae2, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b02, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b22, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b62, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b82, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba2, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc2, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac3, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae3, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b03, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b23, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b63, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b83, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba3, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc3, 0x00000000 },
+   { 0x00600001, 0x28900129, 0x008d09c0, 0x00000000 },
+   { 0x00600001, 0x28b00129, 0x008d09e0, 0x00000000 },
+   { 0x00600001, 0x28d00129, 0x008d0a00, 0x00000000 },
+   { 0x00600001, 0x28f00129, 0x008d0a20, 0x00000000 },
+   { 0x00600001, 0x29100129, 0x008d0a40, 0x00000000 },
+   { 0x00600001, 0x29300129, 0x008d0a60, 0x00000000 },
+   { 0x00600001, 0x29500129, 0x008d0a80, 0x00000000 },
+   { 0x00600001, 0x29700129, 0x008d0aa0, 0x00000000 },
+   { 0x00600001, 0x20200021, 0x008d0e80, 0x00000000 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00000001, 0x20280061, 0x00000000, 0x0007000f },
+   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210032, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000007d },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
+   { 0x00800040, 0x2c004629, 0x00b109c1, 0x00b10a01 },
+   { 0x00800040, 0x2c204629, 0x00b10a01, 0x00b10a41 },
+   { 0x00800040, 0x2c404629, 0x00b10a41, 0x00b10a81 },
+   { 0x00800040, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
+   { 0x00800040, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
+   { 0x00800040, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
+   { 0x00800040, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
+   { 0x00800040, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c2 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a02 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a42 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a82 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac2 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b02 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b42 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b82 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a02 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a42 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a82 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac2 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b02 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b42 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b82 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00800040, 0x2c004629, 0x00b109c2, 0x00b10a02 },
+   { 0x00800040, 0x2c204629, 0x00b10a02, 0x00b10a42 },
+   { 0x00800040, 0x2c404629, 0x00b10a42, 0x00b10a82 },
+   { 0x00800040, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
+   { 0x00800040, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
+   { 0x00800040, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
+   { 0x00800040, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
+   { 0x00800040, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c3 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a03 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a43 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a83 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac3 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b03 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b43 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b83 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a03 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a43 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a83 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac3 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b03 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b43 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b83 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+   { 0x00800040, 0x2c004629, 0x00b109c3, 0x00b10a03 },
+   { 0x00800040, 0x2c204629, 0x00b10a03, 0x00b10a43 },
+   { 0x00800040, 0x2c404629, 0x00b10a43, 0x00b10a83 },
+   { 0x00800040, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
+   { 0x00800040, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
+   { 0x00800040, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
+   { 0x00800040, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
+   { 0x00800040, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c4 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a04 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a44 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a84 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac4 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b04 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b44 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b84 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a04 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a44 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a84 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac4 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b04 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b44 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b84 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc4 },
+   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
+   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
+   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
+   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
+   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
+   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
+   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
+   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000009a },
-   { 0x01000005, 0x20000d3c, 0x00210e74, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000004e },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000011 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a007 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c60 },
-   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c80 },
-   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10ca0 },
-   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10cc0 },
-   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10ce0 },
-   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10d00 },
-   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d20 },
-   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d40 },
-   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d60 },
-   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d80 },
-   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10da0 },
-   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10dc0 },
-   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10de0 },
-   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10e00 },
-   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e20 },
-   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10f00 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
-   { 0x80800042, 0x23804629, 0x00b10c41, 0x00b10c61 },
-   { 0x80800042, 0x23a04629, 0x00b10c61, 0x00b10c81 },
-   { 0x80800042, 0x23c04629, 0x00b10c81, 0x00b10ca1 },
-   { 0x80800042, 0x23e04629, 0x00b10ca1, 0x00b10cc1 },
-   { 0x80800042, 0x24004629, 0x00b10cc1, 0x00b10ce1 },
-   { 0x80800042, 0x24204629, 0x00b10ce1, 0x00b10d01 },
-   { 0x80800042, 0x24404629, 0x00b10d01, 0x00b10d21 },
-   { 0x80800042, 0x24604629, 0x00b10d21, 0x00b10d41 },
-   { 0x80800042, 0x24804629, 0x00b10d41, 0x00b10d61 },
-   { 0x80800042, 0x24a04629, 0x00b10d61, 0x00b10d81 },
-   { 0x80800042, 0x24c04629, 0x00b10d81, 0x00b10da1 },
-   { 0x80800042, 0x24e04629, 0x00b10da1, 0x00b10dc1 },
-   { 0x80800042, 0x25004629, 0x00b10dc1, 0x00b10de1 },
-   { 0x80800042, 0x25204629, 0x00b10de1, 0x00b10e01 },
-   { 0x80800042, 0x25404629, 0x00b10e01, 0x00b10e21 },
-   { 0x80800042, 0x25604629, 0x00b10e21, 0x00b10f01 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
-   { 0x80800042, 0x23804629, 0x00b10c42, 0x00b10c62 },
-   { 0x80800042, 0x23a04629, 0x00b10c62, 0x00b10c82 },
-   { 0x80800042, 0x23c04629, 0x00b10c82, 0x00b10ca2 },
-   { 0x80800042, 0x23e04629, 0x00b10ca2, 0x00b10cc2 },
-   { 0x80800042, 0x24004629, 0x00b10cc2, 0x00b10ce2 },
-   { 0x80800042, 0x24204629, 0x00b10ce2, 0x00b10d02 },
-   { 0x80800042, 0x24404629, 0x00b10d02, 0x00b10d22 },
-   { 0x80800042, 0x24604629, 0x00b10d22, 0x00b10d42 },
-   { 0x80800042, 0x24804629, 0x00b10d42, 0x00b10d62 },
-   { 0x80800042, 0x24a04629, 0x00b10d62, 0x00b10d82 },
-   { 0x80800042, 0x24c04629, 0x00b10d82, 0x00b10da2 },
-   { 0x80800042, 0x24e04629, 0x00b10da2, 0x00b10dc2 },
-   { 0x80800042, 0x25004629, 0x00b10dc2, 0x00b10de2 },
-   { 0x80800042, 0x25204629, 0x00b10de2, 0x00b10e02 },
-   { 0x80800042, 0x25404629, 0x00b10e02, 0x00b10e22 },
-   { 0x80800042, 0x25604629, 0x00b10e22, 0x00b10f02 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
-   { 0x80800042, 0x23804629, 0x00b10c43, 0x00b10c63 },
-   { 0x80800042, 0x23a04629, 0x00b10c63, 0x00b10c83 },
-   { 0x80800042, 0x23c04629, 0x00b10c83, 0x00b10ca3 },
-   { 0x80800042, 0x23e04629, 0x00b10ca3, 0x00b10cc3 },
-   { 0x80800042, 0x24004629, 0x00b10cc3, 0x00b10ce3 },
-   { 0x80800042, 0x24204629, 0x00b10ce3, 0x00b10d03 },
-   { 0x80800042, 0x24404629, 0x00b10d03, 0x00b10d23 },
-   { 0x80800042, 0x24604629, 0x00b10d23, 0x00b10d43 },
-   { 0x80800042, 0x24804629, 0x00b10d43, 0x00b10d63 },
-   { 0x80800042, 0x24a04629, 0x00b10d63, 0x00b10d83 },
-   { 0x80800042, 0x24c04629, 0x00b10d83, 0x00b10da3 },
-   { 0x80800042, 0x24e04629, 0x00b10da3, 0x00b10dc3 },
-   { 0x80800042, 0x25004629, 0x00b10dc3, 0x00b10de3 },
-   { 0x80800042, 0x25204629, 0x00b10de3, 0x00b10e03 },
-   { 0x80800042, 0x25404629, 0x00b10e03, 0x00b10e23 },
-   { 0x80800042, 0x25604629, 0x00b10e23, 0x00b10f03 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b109c2 },
+   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a02 },
+   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a42 },
+   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10a82 },
+   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10ac2 },
+   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b02 },
+   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b42 },
+   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10b82 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b109c3 },
+   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a03 },
+   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a43 },
+   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10a83 },
+   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10ac3 },
+   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b03 },
+   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b43 },
+   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10b83 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b109c4 },
+   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a04 },
+   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a44 },
+   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10a84 },
+   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10ac4 },
+   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b04 },
+   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b44 },
+   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10b84 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000068 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000035 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b10a01 },
+   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a41 },
+   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a81 },
+   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
+   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
+   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
+   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
+   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b10a02 },
+   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a42 },
+   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a82 },
+   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
+   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
+   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
+   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
+   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b10a03 },
+   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a43 },
+   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a83 },
+   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
+   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
+   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
+   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
+   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x00800001, 0x2c000229, 0x00b109c1, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a01, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a41, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a81, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac1, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b01, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b41, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b81, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x00800001, 0x2c000229, 0x00b109c2, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a02, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a42, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a82, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac2, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b02, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b42, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b82, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00800001, 0x2c000229, 0x00b109c3, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a03, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a43, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a83, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac3, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b03, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b43, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b83, 0x00000000 },
+   { 0x00600001, 0x23800021, 0x008d0c00, 0x00000000 },
+   { 0x00600001, 0x23c00021, 0x008d0c20, 0x00000000 },
+   { 0x00600001, 0x24000021, 0x008d0c40, 0x00000000 },
+   { 0x00600001, 0x24400021, 0x008d0c60, 0x00000000 },
+   { 0x00600001, 0x24800021, 0x008d0c80, 0x00000000 },
+   { 0x00600001, 0x24c00021, 0x008d0ca0, 0x00000000 },
+   { 0x00600001, 0x25000021, 0x008d0cc0, 0x00000000 },
+   { 0x00600001, 0x25400021, 0x008d0ce0, 0x00000000 },
+   { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20000c3c, 0x00210054, 0x00000008 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
+   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000007d },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000011 },
+   { 0x00800040, 0x2c004629, 0x00b109c1, 0x00b10a01 },
+   { 0x00800040, 0x2c204629, 0x00b10a01, 0x00b10a41 },
+   { 0x00800040, 0x2c404629, 0x00b10a41, 0x00b10a81 },
+   { 0x00800040, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
+   { 0x00800040, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
+   { 0x00800040, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
+   { 0x00800040, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
+   { 0x00800040, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c2 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a02 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a42 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a82 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac2 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b02 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b42 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b82 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a02 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a42 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a82 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac2 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b02 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b42 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b82 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00800040, 0x2c004629, 0x00b109c2, 0x00b10a02 },
+   { 0x00800040, 0x2c204629, 0x00b10a02, 0x00b10a42 },
+   { 0x00800040, 0x2c404629, 0x00b10a42, 0x00b10a82 },
+   { 0x00800040, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
+   { 0x00800040, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
+   { 0x00800040, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
+   { 0x00800040, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
+   { 0x00800040, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c3 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a03 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a43 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a83 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac3 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b03 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b43 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b83 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a03 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a43 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a83 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac3 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b03 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b43 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b83 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+   { 0x00800040, 0x2c004629, 0x00b109c3, 0x00b10a03 },
+   { 0x00800040, 0x2c204629, 0x00b10a03, 0x00b10a43 },
+   { 0x00800040, 0x2c404629, 0x00b10a43, 0x00b10a83 },
+   { 0x00800040, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
+   { 0x00800040, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
+   { 0x00800040, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
+   { 0x00800040, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
+   { 0x00800040, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c4 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a04 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a44 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a84 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac4 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b04 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b44 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b84 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a04 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a44 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a84 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac4 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b04 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b44 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b84 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc4 },
+   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
+   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
+   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
+   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
+   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
+   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
+   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
+   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000009a },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x23800229, 0x00b10c40, 0x00000000 },
-   { 0x00800001, 0x23a00229, 0x00b10c60, 0x00000000 },
-   { 0x00800001, 0x23c00229, 0x00b10c80, 0x00000000 },
-   { 0x00800001, 0x23e00229, 0x00b10ca0, 0x00000000 },
-   { 0x00800001, 0x24000229, 0x00b10cc0, 0x00000000 },
-   { 0x00800001, 0x24200229, 0x00b10ce0, 0x00000000 },
-   { 0x00800001, 0x24400229, 0x00b10d00, 0x00000000 },
-   { 0x00800001, 0x24600229, 0x00b10d20, 0x00000000 },
-   { 0x00800001, 0x24800229, 0x00b10d40, 0x00000000 },
-   { 0x00800001, 0x24a00229, 0x00b10d60, 0x00000000 },
-   { 0x00800001, 0x24c00229, 0x00b10d80, 0x00000000 },
-   { 0x00800001, 0x24e00229, 0x00b10da0, 0x00000000 },
-   { 0x00800001, 0x25000229, 0x00b10dc0, 0x00000000 },
-   { 0x00800001, 0x25200229, 0x00b10de0, 0x00000000 },
-   { 0x00800001, 0x25400229, 0x00b10e00, 0x00000000 },
-   { 0x00800001, 0x25600229, 0x00b10e20, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
-   { 0x00800001, 0x23800229, 0x00b10c41, 0x00000000 },
-   { 0x00800001, 0x23a00229, 0x00b10c61, 0x00000000 },
-   { 0x00800001, 0x23c00229, 0x00b10c81, 0x00000000 },
-   { 0x00800001, 0x23e00229, 0x00b10ca1, 0x00000000 },
-   { 0x00800001, 0x24000229, 0x00b10cc1, 0x00000000 },
-   { 0x00800001, 0x24200229, 0x00b10ce1, 0x00000000 },
-   { 0x00800001, 0x24400229, 0x00b10d01, 0x00000000 },
-   { 0x00800001, 0x24600229, 0x00b10d21, 0x00000000 },
-   { 0x00800001, 0x24800229, 0x00b10d41, 0x00000000 },
-   { 0x00800001, 0x24a00229, 0x00b10d61, 0x00000000 },
-   { 0x00800001, 0x24c00229, 0x00b10d81, 0x00000000 },
-   { 0x00800001, 0x24e00229, 0x00b10da1, 0x00000000 },
-   { 0x00800001, 0x25000229, 0x00b10dc1, 0x00000000 },
-   { 0x00800001, 0x25200229, 0x00b10de1, 0x00000000 },
-   { 0x00800001, 0x25400229, 0x00b10e01, 0x00000000 },
-   { 0x00800001, 0x25600229, 0x00b10e21, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
-   { 0x00800001, 0x23800229, 0x00b10c42, 0x00000000 },
-   { 0x00800001, 0x23a00229, 0x00b10c62, 0x00000000 },
-   { 0x00800001, 0x23c00229, 0x00b10c82, 0x00000000 },
-   { 0x00800001, 0x23e00229, 0x00b10ca2, 0x00000000 },
-   { 0x00800001, 0x24000229, 0x00b10cc2, 0x00000000 },
-   { 0x00800001, 0x24200229, 0x00b10ce2, 0x00000000 },
-   { 0x00800001, 0x24400229, 0x00b10d02, 0x00000000 },
-   { 0x00800001, 0x24600229, 0x00b10d22, 0x00000000 },
-   { 0x00800001, 0x24800229, 0x00b10d42, 0x00000000 },
-   { 0x00800001, 0x24a00229, 0x00b10d62, 0x00000000 },
-   { 0x00800001, 0x24c00229, 0x00b10d82, 0x00000000 },
-   { 0x00800001, 0x24e00229, 0x00b10da2, 0x00000000 },
-   { 0x00800001, 0x25000229, 0x00b10dc2, 0x00000000 },
-   { 0x00800001, 0x25200229, 0x00b10de2, 0x00000000 },
-   { 0x00800001, 0x25400229, 0x00b10e02, 0x00000000 },
-   { 0x00800001, 0x25600229, 0x00b10e22, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
-   { 0x00800001, 0x23800229, 0x00b10c43, 0x00000000 },
-   { 0x00800001, 0x23a00229, 0x00b10c63, 0x00000000 },
-   { 0x00800001, 0x23c00229, 0x00b10c83, 0x00000000 },
-   { 0x00800001, 0x23e00229, 0x00b10ca3, 0x00000000 },
-   { 0x00800001, 0x24000229, 0x00b10cc3, 0x00000000 },
-   { 0x00800001, 0x24200229, 0x00b10ce3, 0x00000000 },
-   { 0x00800001, 0x24400229, 0x00b10d03, 0x00000000 },
-   { 0x00800001, 0x24600229, 0x00b10d23, 0x00000000 },
-   { 0x00800001, 0x24800229, 0x00b10d43, 0x00000000 },
-   { 0x00800001, 0x24a00229, 0x00b10d63, 0x00000000 },
-   { 0x00800001, 0x24c00229, 0x00b10d83, 0x00000000 },
-   { 0x00800001, 0x24e00229, 0x00b10da3, 0x00000000 },
-   { 0x00800001, 0x25000229, 0x00b10dc3, 0x00000000 },
-   { 0x00800001, 0x25200229, 0x00b10de3, 0x00000000 },
-   { 0x00800001, 0x25400229, 0x00b10e03, 0x00000000 },
-   { 0x00800001, 0x25600229, 0x00b10e23, 0x00000000 },
-   { 0x80800042, 0x23802529, 0x00b10380, 0x00b10680 },
-   { 0x80800042, 0x23a02529, 0x00b103a0, 0x00b106a0 },
-   { 0x80800042, 0x23c02529, 0x00b103c0, 0x00b106c0 },
-   { 0x80800042, 0x23e02529, 0x00b103e0, 0x00b106e0 },
-   { 0x80800042, 0x24002529, 0x00b10400, 0x00b10700 },
-   { 0x80800042, 0x24202529, 0x00b10420, 0x00b10720 },
-   { 0x80800042, 0x24402529, 0x00b10440, 0x00b10740 },
-   { 0x80800042, 0x24602529, 0x00b10460, 0x00b10760 },
-   { 0x80800042, 0x24802529, 0x00b10480, 0x00b10780 },
-   { 0x80800042, 0x24a02529, 0x00b104a0, 0x00b107a0 },
-   { 0x80800042, 0x24c02529, 0x00b104c0, 0x00b107c0 },
-   { 0x80800042, 0x24e02529, 0x00b104e0, 0x00b107e0 },
-   { 0x80800042, 0x25002529, 0x00b10500, 0x00b10800 },
-   { 0x80800042, 0x25202529, 0x00b10520, 0x00b10820 },
-   { 0x80800042, 0x25402529, 0x00b10540, 0x00b10840 },
-   { 0x80800042, 0x25602529, 0x00b10560, 0x00b10860 },
-   { 0x00200008, 0x20200c21, 0x00450e60, 0x00000001 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450e6e, 0x00010001 },
-   { 0x0020000c, 0x202e3dad, 0x00450e6e, 0x00010001 },
-   { 0x00200040, 0x20403421, 0x00450020, 0x0045002e },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007000f },
-   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
-   { 0x00800031, 0x2ac01d29, 0x008d0040, 0x0414a005 },
-   { 0x00800031, 0x2b401d29, 0x008d0040, 0x0414a006 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b109c2 },
+   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a02 },
+   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a42 },
+   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10a82 },
+   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10ac2 },
+   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b02 },
+   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b42 },
+   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10b82 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b109c3 },
+   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a03 },
+   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a43 },
+   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10a83 },
+   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10ac3 },
+   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b03 },
+   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b43 },
+   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10b83 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b109c4 },
+   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a04 },
+   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a44 },
+   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10a84 },
+   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10ac4 },
+   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b04 },
+   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b44 },
+   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10b84 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000068 },
+   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000035 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x25800229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x25a00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x25c00229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x25e00229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x26000229, 0x00ad0b40, 0x00000000 },
-   { 0x00800001, 0x26200229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x26400229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x26600229, 0x00ad0ba0, 0x00000000 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x00800001, 0x25800229, 0x00ad0ac1, 0x00000000 },
-   { 0x00800001, 0x25a00229, 0x00ad0ae1, 0x00000000 },
-   { 0x00800001, 0x25c00229, 0x00ad0b01, 0x00000000 },
-   { 0x00800001, 0x25e00229, 0x00ad0b21, 0x00000000 },
-   { 0x00800001, 0x26000229, 0x00ad0b41, 0x00000000 },
-   { 0x00800001, 0x26200229, 0x00ad0b61, 0x00000000 },
-   { 0x00800001, 0x26400229, 0x00ad0b81, 0x00000000 },
-   { 0x00800001, 0x26600229, 0x00ad0ba1, 0x00000000 },
+   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b10a01 },
+   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a41 },
+   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a81 },
+   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
+   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
+   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
+   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
+   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x00800001, 0x25800229, 0x00ad0ac2, 0x00000000 },
-   { 0x00800001, 0x25a00229, 0x00ad0ae2, 0x00000000 },
-   { 0x00800001, 0x25c00229, 0x00ad0b02, 0x00000000 },
-   { 0x00800001, 0x25e00229, 0x00ad0b22, 0x00000000 },
-   { 0x00800001, 0x26000229, 0x00ad0b42, 0x00000000 },
-   { 0x00800001, 0x26200229, 0x00ad0b62, 0x00000000 },
-   { 0x00800001, 0x26400229, 0x00ad0b82, 0x00000000 },
-   { 0x00800001, 0x26600229, 0x00ad0ba2, 0x00000000 },
+   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b10a02 },
+   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a42 },
+   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a82 },
+   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
+   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
+   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
+   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
+   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x00800001, 0x25800229, 0x00ad0ac3, 0x00000000 },
-   { 0x00800001, 0x25a00229, 0x00ad0ae3, 0x00000000 },
-   { 0x00800001, 0x25c00229, 0x00ad0b03, 0x00000000 },
-   { 0x00800001, 0x25e00229, 0x00ad0b23, 0x00000000 },
-   { 0x00800001, 0x26000229, 0x00ad0b43, 0x00000000 },
-   { 0x00800001, 0x26200229, 0x00ad0b63, 0x00000000 },
-   { 0x00800001, 0x26400229, 0x00ad0b83, 0x00000000 },
-   { 0x00800001, 0x26600229, 0x00ad0ba3, 0x00000000 },
-   { 0x00800001, 0x2f400231, 0x00b20580, 0x00000000 },
-   { 0x00800001, 0x2f500231, 0x00b205a0, 0x00000000 },
-   { 0x00800001, 0x2f600231, 0x00b205c0, 0x00000000 },
-   { 0x00800001, 0x2f700231, 0x00b205e0, 0x00000000 },
-   { 0x00800001, 0x2f800231, 0x00b20600, 0x00000000 },
-   { 0x00800001, 0x2f900231, 0x00b20620, 0x00000000 },
-   { 0x00800001, 0x2fa00231, 0x00b20640, 0x00000000 },
-   { 0x00800001, 0x2fb00231, 0x00b20660, 0x00000000 },
-   { 0x0020000c, 0x2e723dad, 0x00450e72, 0x00010001 },
-   { 0x0020000c, 0x202e3dad, 0x00450e72, 0x00010001 },
-   { 0x00200040, 0x20403421, 0x00450020, 0x0045002e },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007000f },
-   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
-   { 0x00800031, 0x2ac01d29, 0x008d0040, 0x0414a008 },
-   { 0x00800031, 0x2b401d29, 0x008d0040, 0x0414a009 },
+   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b10a03 },
+   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a43 },
+   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a83 },
+   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
+   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
+   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
+   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
+   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x25800229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x25a00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x25c00229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x25e00229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x26000229, 0x00ad0b40, 0x00000000 },
-   { 0x00800001, 0x26200229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x26400229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x26600229, 0x00ad0ba0, 0x00000000 },
+   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x00800001, 0x25800229, 0x00ad0ac1, 0x00000000 },
-   { 0x00800001, 0x25a00229, 0x00ad0ae1, 0x00000000 },
-   { 0x00800001, 0x25c00229, 0x00ad0b01, 0x00000000 },
-   { 0x00800001, 0x25e00229, 0x00ad0b21, 0x00000000 },
-   { 0x00800001, 0x26000229, 0x00ad0b41, 0x00000000 },
-   { 0x00800001, 0x26200229, 0x00ad0b61, 0x00000000 },
-   { 0x00800001, 0x26400229, 0x00ad0b81, 0x00000000 },
-   { 0x00800001, 0x26600229, 0x00ad0ba1, 0x00000000 },
+   { 0x00800001, 0x2c000229, 0x00b109c1, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a01, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a41, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a81, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac1, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b01, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b41, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b81, 0x00000000 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x00800001, 0x25800229, 0x00ad0ac2, 0x00000000 },
-   { 0x00800001, 0x25a00229, 0x00ad0ae2, 0x00000000 },
-   { 0x00800001, 0x25c00229, 0x00ad0b02, 0x00000000 },
-   { 0x00800001, 0x25e00229, 0x00ad0b22, 0x00000000 },
-   { 0x00800001, 0x26000229, 0x00ad0b42, 0x00000000 },
-   { 0x00800001, 0x26200229, 0x00ad0b62, 0x00000000 },
-   { 0x00800001, 0x26400229, 0x00ad0b82, 0x00000000 },
-   { 0x00800001, 0x26600229, 0x00ad0ba2, 0x00000000 },
+   { 0x00800001, 0x2c000229, 0x00b109c2, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a02, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a42, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a82, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac2, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b02, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b42, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b82, 0x00000000 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x00800001, 0x25800229, 0x00ad0ac3, 0x00000000 },
-   { 0x00800001, 0x25a00229, 0x00ad0ae3, 0x00000000 },
-   { 0x00800001, 0x25c00229, 0x00ad0b03, 0x00000000 },
-   { 0x00800001, 0x25e00229, 0x00ad0b23, 0x00000000 },
-   { 0x00800001, 0x26000229, 0x00ad0b43, 0x00000000 },
-   { 0x00800001, 0x26200229, 0x00ad0b63, 0x00000000 },
-   { 0x00800001, 0x26400229, 0x00ad0b83, 0x00000000 },
-   { 0x00800001, 0x26600229, 0x00ad0ba3, 0x00000000 },
-   { 0x80800042, 0x25804529, 0x00b10580, 0x00b10f40 },
-   { 0x80800042, 0x25a04529, 0x00b105a0, 0x00b10f50 },
-   { 0x80800042, 0x25c04529, 0x00b105c0, 0x00b10f60 },
-   { 0x80800042, 0x25e04529, 0x00b105e0, 0x00b10f70 },
-   { 0x80800042, 0x26004529, 0x00b10600, 0x00b10f80 },
-   { 0x80800042, 0x26204529, 0x00b10620, 0x00b10f90 },
-   { 0x80800042, 0x26404529, 0x00b10640, 0x00b10fa0 },
-   { 0x80800042, 0x26604529, 0x00b10660, 0x00b10fb0 },
+   { 0x00800001, 0x2c000229, 0x00b109c3, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a03, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a43, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a83, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac3, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b03, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b43, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b83, 0x00000000 },
+   { 0x80800042, 0x23802529, 0x00b10680, 0x00b10380 },
+   { 0x80800042, 0x23a02529, 0x00b106a0, 0x00b10c00 },
+   { 0x80800042, 0x23c02529, 0x00b106c0, 0x00b103c0 },
+   { 0x80800042, 0x23e02529, 0x00b106e0, 0x00b10c20 },
+   { 0x80800042, 0x24002529, 0x00b10700, 0x00b10400 },
+   { 0x80800042, 0x24202529, 0x00b10720, 0x00b10c40 },
+   { 0x80800042, 0x24402529, 0x00b10740, 0x00b10440 },
+   { 0x80800042, 0x24602529, 0x00b10760, 0x00b10c60 },
+   { 0x80800042, 0x24802529, 0x00b10780, 0x00b10480 },
+   { 0x80800042, 0x24a02529, 0x00b107a0, 0x00b10c80 },
+   { 0x80800042, 0x24c02529, 0x00b107c0, 0x00b104c0 },
+   { 0x80800042, 0x24e02529, 0x00b107e0, 0x00b10ca0 },
+   { 0x80800042, 0x25002529, 0x00b10800, 0x00b10500 },
+   { 0x80800042, 0x25202529, 0x00b10820, 0x00b10cc0 },
+   { 0x80800042, 0x25402529, 0x00b10840, 0x00b10540 },
+   { 0x80800042, 0x25602529, 0x00b10860, 0x00b10ce0 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210032, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000076 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
+   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
+   { 0x00800040, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
+   { 0x00800040, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
+   { 0x00800040, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac2 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae2 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b02 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b22 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae2 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b02 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b22 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b42 },
+   { 0x00800040, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
+   { 0x00800040, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b62 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b82 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba2 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc2 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b82 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba2 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc2 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
+   { 0x00800040, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
+   { 0x00800040, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac3 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae3 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b03 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b23 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae3 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b03 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b23 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b43 },
+   { 0x00800040, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
+   { 0x00800040, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b63 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b83 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba3 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc3 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b83 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba3 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc3 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac3, 0x00ad0ae3 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae3, 0x00ad0b03 },
+   { 0x00800040, 0x2a004629, 0x00ad0b03, 0x00ad0b23 },
+   { 0x00800040, 0x2a204629, 0x00ad0b23, 0x00ad0b43 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac4 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae4 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b04 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b24 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae4 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b04 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b24 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b44 },
+   { 0x00800040, 0x2a404629, 0x00ad0b63, 0x00ad0b83 },
+   { 0x00800040, 0x2a604629, 0x00ad0b83, 0x00ad0ba3 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba3, 0x00ad0bc3 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc3, 0x00ad0be3 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b64 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b84 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba4 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc4 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b84 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba4 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc4 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be4 },
+   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
+   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
+   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
+   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
+   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
+   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000082 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ac2 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0ae2 },
+   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b02 },
+   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b22 },
+   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b62 },
+   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0b82 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0ba2 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0bc2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ac3 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0ae3 },
+   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b03 },
+   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b23 },
+   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b63 },
+   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0b83 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0ba3 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac4 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae4 },
+   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b04 },
+   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b24 },
+   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b64 },
+   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b84 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba4 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc4 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000058 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002d },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
+   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
+   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
+   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
+   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
+   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
+   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
+   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
+   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac3 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae3 },
+   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b03 },
+   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b23 },
+   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b63 },
+   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b83 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba3 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x00800001, 0x29c00229, 0x00ad0ac1, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae1, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b01, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b21, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b61, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b81, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba1, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc1, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac2, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae2, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b02, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b22, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b62, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b82, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba2, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc2, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac3, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae3, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b03, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b23, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b63, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b83, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba3, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc3, 0x00000000 },
+   { 0x00600001, 0x25800129, 0x008d09c0, 0x00000000 },
+   { 0x00600001, 0x25a00129, 0x008d09e0, 0x00000000 },
+   { 0x00600001, 0x25c00129, 0x008d0a00, 0x00000000 },
+   { 0x00600001, 0x25e00129, 0x008d0a20, 0x00000000 },
+   { 0x00600001, 0x26000129, 0x008d0a40, 0x00000000 },
+   { 0x00600001, 0x26200129, 0x008d0a60, 0x00000000 },
+   { 0x00600001, 0x26400129, 0x008d0a80, 0x00000000 },
+   { 0x00600001, 0x26600129, 0x008d0aa0, 0x00000000 },
+   { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00080008 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
+   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000076 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
+   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
+   { 0x00800040, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
+   { 0x00800040, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
+   { 0x00800040, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac2 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae2 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b02 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b22 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae2 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b02 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b22 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b42 },
+   { 0x00800040, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
+   { 0x00800040, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b62 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b82 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba2 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc2 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b82 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba2 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc2 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
+   { 0x00800040, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
+   { 0x00800040, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac3 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae3 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b03 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b23 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae3 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b03 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b23 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b43 },
+   { 0x00800040, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
+   { 0x00800040, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b63 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b83 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba3 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc3 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b83 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba3 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc3 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac3, 0x00ad0ae3 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae3, 0x00ad0b03 },
+   { 0x00800040, 0x2a004629, 0x00ad0b03, 0x00ad0b23 },
+   { 0x00800040, 0x2a204629, 0x00ad0b23, 0x00ad0b43 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac4 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae4 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b04 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b24 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae4 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b04 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b24 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b44 },
+   { 0x00800040, 0x2a404629, 0x00ad0b63, 0x00ad0b83 },
+   { 0x00800040, 0x2a604629, 0x00ad0b83, 0x00ad0ba3 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba3, 0x00ad0bc3 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc3, 0x00ad0be3 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b64 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b84 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba4 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc4 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b84 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba4 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc4 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be4 },
+   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
+   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
+   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
+   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
+   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
+   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000082 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ac2 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0ae2 },
+   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b02 },
+   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b22 },
+   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b62 },
+   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0b82 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0ba2 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0bc2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ac3 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0ae3 },
+   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b03 },
+   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b23 },
+   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b63 },
+   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0b83 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0ba3 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac4 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae4 },
+   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b04 },
+   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b24 },
+   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b64 },
+   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b84 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba4 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc4 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000058 },
+   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002d },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
+   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
+   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
+   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
+   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
+   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
+   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
+   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
+   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac3 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae3 },
+   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b03 },
+   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b23 },
+   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b63 },
+   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b83 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba3 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc3 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+   { 0x00800001, 0x29c00229, 0x00ad0ac1, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae1, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b01, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b21, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b61, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b81, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba1, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc1, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac2, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae2, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b02, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b22, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b62, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b82, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba2, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc2, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac3, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae3, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b03, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b23, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b63, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b83, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba3, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc3, 0x00000000 },
+   { 0x00600001, 0x25900129, 0x008d09c0, 0x00000000 },
+   { 0x00600001, 0x25b00129, 0x008d09e0, 0x00000000 },
+   { 0x00600001, 0x25d00129, 0x008d0a00, 0x00000000 },
+   { 0x00600001, 0x25f00129, 0x008d0a20, 0x00000000 },
+   { 0x00600001, 0x26100129, 0x008d0a40, 0x00000000 },
+   { 0x00600001, 0x26300129, 0x008d0a60, 0x00000000 },
+   { 0x00600001, 0x26500129, 0x008d0a80, 0x00000000 },
+   { 0x00600001, 0x26700129, 0x008d0aa0, 0x00000000 },
+   { 0x80800042, 0x25802529, 0x00b10880, 0x00b10580 },
+   { 0x80800042, 0x25a02529, 0x00b108a0, 0x00b105a0 },
+   { 0x80800042, 0x25c02529, 0x00b108c0, 0x00b105c0 },
+   { 0x80800042, 0x25e02529, 0x00b108e0, 0x00b105e0 },
+   { 0x80800042, 0x26002529, 0x00b10900, 0x00b10600 },
+   { 0x80800042, 0x26202529, 0x00b10920, 0x00b10620 },
+   { 0x80800042, 0x26402529, 0x00b10940, 0x00b10640 },
+   { 0x80800042, 0x26602529, 0x00b10960, 0x00b10660 },
    { 0x00600001, 0x20200021, 0x008d0980, 0x00000000 },
    { 0x00800001, 0x458101f1, 0x00000000, 0x00000000 },
    { 0x00800001, 0x45a101f1, 0x00000000, 0x00000000 },
@@ -1254,4 +2484,3 @@
    { 0x00800001, 0x20500232, 0x00b20660, 0x00000000 },
    { 0x00800031, 0x24001d28, 0x008d0020, 0x05302002 },
    { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
-   { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/src/xvmc/dual_prime_igd.g4b b/src/xvmc/dual_prime_igd.g4b
index f838d7b..6477d06 100644
--- a/src/xvmc/dual_prime_igd.g4b
+++ b/src/xvmc/dual_prime_igd.g4b
@@ -102,367 +102,937 @@
    { 0x00800001, 0x23200169, 0x00000000, 0x00000000 },
    { 0x00800001, 0x23400169, 0x00000000, 0x00000000 },
    { 0x00600001, 0x2e600021, 0x008d0020, 0x00000000 },
-   { 0x00000001, 0x20280061, 0x00000000, 0x00070007 },
-   { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 },
-   { 0x0020000c, 0x202e3dad, 0x00450e6e, 0x00010001 },
-   { 0x00200040, 0x20403421, 0x00450e60, 0x0045002e },
-   { 0x01000005, 0x20000d3c, 0x00210e6e, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000005f },
-   { 0x01000005, 0x20000d3c, 0x00210e70, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000048 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a004 },
-   { 0x00800040, 0x23804629, 0x00b10c40, 0x00b10c41 },
-   { 0x00800040, 0x23a04629, 0x00b10c60, 0x00b10c61 },
-   { 0x00800040, 0x23c04629, 0x00b10c80, 0x00b10c81 },
-   { 0x00800040, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
-   { 0x00800040, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
-   { 0x00800040, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
-   { 0x00800040, 0x24404629, 0x00b10d00, 0x00b10d01 },
-   { 0x00800040, 0x24604629, 0x00b10d20, 0x00b10d21 },
-   { 0x00800040, 0x24804629, 0x00b10d40, 0x00b10d41 },
-   { 0x00800040, 0x24a04629, 0x00b10d60, 0x00b10d61 },
-   { 0x00800040, 0x24c04629, 0x00b10d80, 0x00b10d81 },
-   { 0x00800040, 0x24e04629, 0x00b10da0, 0x00b10da1 },
-   { 0x00800040, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
-   { 0x00800040, 0x25204629, 0x00b10de0, 0x00b10de1 },
-   { 0x00800040, 0x25404629, 0x00b10e00, 0x00b10e01 },
-   { 0x00800040, 0x25604629, 0x00b10e20, 0x00b10e21 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c60 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c80 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca0 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc0 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce0 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d00 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d20 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d40 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d60 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d80 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da0 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc0 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de0 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e00 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e20 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f00 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
-   { 0x80800008, 0x23802d29, 0x00b10380, 0x00020002 },
-   { 0x80800008, 0x23a02d29, 0x00b103a0, 0x00020002 },
-   { 0x80800008, 0x23c02d29, 0x00b103c0, 0x00020002 },
-   { 0x80800008, 0x23e02d29, 0x00b103e0, 0x00020002 },
-   { 0x80800008, 0x24002d29, 0x00b10400, 0x00020002 },
-   { 0x80800008, 0x24202d29, 0x00b10420, 0x00020002 },
-   { 0x80800008, 0x24402d29, 0x00b10440, 0x00020002 },
-   { 0x80800008, 0x24602d29, 0x00b10460, 0x00020002 },
-   { 0x80800008, 0x24802d29, 0x00b10480, 0x00020002 },
-   { 0x80800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
-   { 0x80800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
-   { 0x80800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
-   { 0x80800008, 0x25002d29, 0x00b10500, 0x00020002 },
-   { 0x80800008, 0x25202d29, 0x00b10520, 0x00020002 },
-   { 0x80800008, 0x25402d29, 0x00b10540, 0x00020002 },
-   { 0x80800008, 0x25602d29, 0x00b10560, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000043 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
-   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c41 },
-   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c61 },
-   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10c81 },
-   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
-   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
-   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
-   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d01 },
-   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d21 },
-   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d41 },
-   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d61 },
-   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10d81 },
-   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10da1 },
-   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
-   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10de1 },
-   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e01 },
-   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10e21 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002e },
-   { 0x01000005, 0x20000d3c, 0x00210e70, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a004 },
-   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c60 },
-   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c80 },
-   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10ca0 },
-   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10cc0 },
-   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10ce0 },
-   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10d00 },
-   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d20 },
-   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d40 },
-   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d60 },
-   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d80 },
-   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10da0 },
-   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10dc0 },
-   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10de0 },
-   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10e00 },
-   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e20 },
-   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10f00 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000014 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
-   { 0x00800001, 0x23800229, 0x00b10c40, 0x00000000 },
-   { 0x00800001, 0x23a00229, 0x00b10c60, 0x00000000 },
-   { 0x00800001, 0x23c00229, 0x00b10c80, 0x00000000 },
-   { 0x00800001, 0x23e00229, 0x00b10ca0, 0x00000000 },
-   { 0x00800001, 0x24000229, 0x00b10cc0, 0x00000000 },
-   { 0x00800001, 0x24200229, 0x00b10ce0, 0x00000000 },
-   { 0x00800001, 0x24400229, 0x00b10d00, 0x00000000 },
-   { 0x00800001, 0x24600229, 0x00b10d20, 0x00000000 },
-   { 0x00800001, 0x24800229, 0x00b10d40, 0x00000000 },
-   { 0x00800001, 0x24a00229, 0x00b10d60, 0x00000000 },
-   { 0x00800001, 0x24c00229, 0x00b10d80, 0x00000000 },
-   { 0x00800001, 0x24e00229, 0x00b10da0, 0x00000000 },
-   { 0x00800001, 0x25000229, 0x00b10dc0, 0x00000000 },
-   { 0x00800001, 0x25200229, 0x00b10de0, 0x00000000 },
-   { 0x00800001, 0x25400229, 0x00b10e00, 0x00000000 },
-   { 0x00800001, 0x25600229, 0x00b10e20, 0x00000000 },
-   { 0x00802001, 0x26800021, 0x00b10380, 0x00000000 },
-   { 0x00802001, 0x26c00021, 0x00b103c0, 0x00000000 },
-   { 0x00802001, 0x27000021, 0x00b10400, 0x00000000 },
-   { 0x00802001, 0x27400021, 0x00b10440, 0x00000000 },
-   { 0x00802001, 0x27800021, 0x00b10480, 0x00000000 },
-   { 0x00802001, 0x27c00021, 0x00b104c0, 0x00000000 },
-   { 0x00802001, 0x28000021, 0x00b10500, 0x00000000 },
-   { 0x00802001, 0x28400021, 0x00b10540, 0x00000000 },
-   { 0x0020000c, 0x202e3dad, 0x00450e72, 0x00010001 },
-   { 0x00200040, 0x20403421, 0x00450e60, 0x0045002e },
-   { 0x01000005, 0x20000d3c, 0x00210e72, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000005f },
-   { 0x01000005, 0x20000d3c, 0x00210e74, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000048 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a007 },
-   { 0x00800040, 0x23804629, 0x00b10c40, 0x00b10c41 },
-   { 0x00800040, 0x23a04629, 0x00b10c60, 0x00b10c61 },
-   { 0x00800040, 0x23c04629, 0x00b10c80, 0x00b10c81 },
-   { 0x00800040, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
-   { 0x00800040, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
-   { 0x00800040, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
-   { 0x00800040, 0x24404629, 0x00b10d00, 0x00b10d01 },
-   { 0x00800040, 0x24604629, 0x00b10d20, 0x00b10d21 },
-   { 0x00800040, 0x24804629, 0x00b10d40, 0x00b10d41 },
-   { 0x00800040, 0x24a04629, 0x00b10d60, 0x00b10d61 },
-   { 0x00800040, 0x24c04629, 0x00b10d80, 0x00b10d81 },
-   { 0x00800040, 0x24e04629, 0x00b10da0, 0x00b10da1 },
-   { 0x00800040, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
-   { 0x00800040, 0x25204629, 0x00b10de0, 0x00b10de1 },
-   { 0x00800040, 0x25404629, 0x00b10e00, 0x00b10e01 },
-   { 0x00800040, 0x25604629, 0x00b10e20, 0x00b10e21 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c60 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c80 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca0 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc0 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce0 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d00 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d20 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d40 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d60 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d80 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da0 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc0 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de0 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e00 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e20 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f00 },
-   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
-   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
-   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
-   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
-   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
-   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
-   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
-   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
-   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
-   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
-   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
-   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
-   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
-   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
-   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
-   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
-   { 0x80800008, 0x23802d29, 0x00b10380, 0x00020002 },
-   { 0x80800008, 0x23a02d29, 0x00b103a0, 0x00020002 },
-   { 0x80800008, 0x23c02d29, 0x00b103c0, 0x00020002 },
-   { 0x80800008, 0x23e02d29, 0x00b103e0, 0x00020002 },
-   { 0x80800008, 0x24002d29, 0x00b10400, 0x00020002 },
-   { 0x80800008, 0x24202d29, 0x00b10420, 0x00020002 },
-   { 0x80800008, 0x24402d29, 0x00b10440, 0x00020002 },
-   { 0x80800008, 0x24602d29, 0x00b10460, 0x00020002 },
-   { 0x80800008, 0x24802d29, 0x00b10480, 0x00020002 },
-   { 0x80800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
-   { 0x80800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
-   { 0x80800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
-   { 0x80800008, 0x25002d29, 0x00b10500, 0x00020002 },
-   { 0x80800008, 0x25202d29, 0x00b10520, 0x00020002 },
-   { 0x80800008, 0x25402d29, 0x00b10540, 0x00020002 },
-   { 0x80800008, 0x25602d29, 0x00b10560, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000043 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
-   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c41 },
-   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c61 },
-   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10c81 },
-   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
-   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
-   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
-   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d01 },
-   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d21 },
-   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d41 },
-   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d61 },
-   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10d81 },
-   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10da1 },
-   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
-   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10de1 },
-   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e01 },
-   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10e21 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002e },
-   { 0x01000005, 0x20000d3c, 0x00210e74, 0x00000001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a007 },
-   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c60 },
-   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c80 },
-   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10ca0 },
-   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10cc0 },
-   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10ce0 },
-   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10d00 },
-   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d20 },
-   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d40 },
-   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d60 },
-   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d80 },
-   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10da0 },
-   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10dc0 },
-   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10de0 },
-   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10e00 },
-   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e20 },
-   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10f00 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000014 },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
-   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
-   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
-   { 0x00800001, 0x23800229, 0x00b10c40, 0x00000000 },
-   { 0x00800001, 0x23a00229, 0x00b10c60, 0x00000000 },
-   { 0x00800001, 0x23c00229, 0x00b10c80, 0x00000000 },
-   { 0x00800001, 0x23e00229, 0x00b10ca0, 0x00000000 },
-   { 0x00800001, 0x24000229, 0x00b10cc0, 0x00000000 },
-   { 0x00800001, 0x24200229, 0x00b10ce0, 0x00000000 },
-   { 0x00800001, 0x24400229, 0x00b10d00, 0x00000000 },
-   { 0x00800001, 0x24600229, 0x00b10d20, 0x00000000 },
-   { 0x00800001, 0x24800229, 0x00b10d40, 0x00000000 },
-   { 0x00800001, 0x24a00229, 0x00b10d60, 0x00000000 },
-   { 0x00800001, 0x24c00229, 0x00b10d80, 0x00000000 },
-   { 0x00800001, 0x24e00229, 0x00b10da0, 0x00000000 },
-   { 0x00800001, 0x25000229, 0x00b10dc0, 0x00000000 },
-   { 0x00800001, 0x25200229, 0x00b10de0, 0x00000000 },
-   { 0x00800001, 0x25400229, 0x00b10e00, 0x00000000 },
-   { 0x00800001, 0x25600229, 0x00b10e20, 0x00000000 },
-   { 0x80800042, 0x23802529, 0x00b10380, 0x00b10680 },
-   { 0x80800042, 0x23a02529, 0x00b103a0, 0x00b106a0 },
-   { 0x80800042, 0x23c02529, 0x00b103c0, 0x00b106c0 },
-   { 0x80800042, 0x23e02529, 0x00b103e0, 0x00b106e0 },
-   { 0x80800042, 0x24002529, 0x00b10400, 0x00b10700 },
-   { 0x80800042, 0x24202529, 0x00b10420, 0x00b10720 },
-   { 0x80800042, 0x24402529, 0x00b10440, 0x00b10740 },
-   { 0x80800042, 0x24602529, 0x00b10460, 0x00b10760 },
-   { 0x80800042, 0x24802529, 0x00b10480, 0x00b10780 },
-   { 0x80800042, 0x24a02529, 0x00b104a0, 0x00b107a0 },
-   { 0x80800042, 0x24c02529, 0x00b104c0, 0x00b107c0 },
-   { 0x80800042, 0x24e02529, 0x00b104e0, 0x00b107e0 },
-   { 0x80800042, 0x25002529, 0x00b10500, 0x00b10800 },
-   { 0x80800042, 0x25202529, 0x00b10520, 0x00b10820 },
-   { 0x80800042, 0x25402529, 0x00b10540, 0x00b10840 },
-   { 0x80800042, 0x25602529, 0x00b10560, 0x00b10860 },
-   { 0x00200008, 0x20200c21, 0x00450e60, 0x00000001 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450e6e, 0x00010001 },
-   { 0x0020000c, 0x202e3dad, 0x00450e6e, 0x00010001 },
-   { 0x00200040, 0x20403421, 0x00450020, 0x0045002e },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x008d0040, 0x0414a005 },
-   { 0x00800031, 0x2b401d29, 0x008d0040, 0x0414a006 },
-   { 0x00800001, 0x25800229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x25a00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x25c00229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x25e00229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x26000229, 0x00ad0b40, 0x00000000 },
-   { 0x00800001, 0x26200229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x26400229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x26600229, 0x00ad0ba0, 0x00000000 },
-   { 0x00800001, 0x2f400231, 0x00b20580, 0x00000000 },
-   { 0x00800001, 0x2f500231, 0x00b205a0, 0x00000000 },
-   { 0x00800001, 0x2f600231, 0x00b205c0, 0x00000000 },
-   { 0x00800001, 0x2f700231, 0x00b205e0, 0x00000000 },
-   { 0x00800001, 0x2f800231, 0x00b20600, 0x00000000 },
-   { 0x00800001, 0x2f900231, 0x00b20620, 0x00000000 },
-   { 0x00800001, 0x2fa00231, 0x00b20640, 0x00000000 },
-   { 0x00800001, 0x2fb00231, 0x00b20660, 0x00000000 },
-   { 0x0020000c, 0x2e723dad, 0x00450e72, 0x00010001 },
-   { 0x0020000c, 0x202e3dad, 0x00450e72, 0x00010001 },
-   { 0x00200040, 0x20403421, 0x00450020, 0x0045002e },
-   { 0x00000001, 0x20480061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x008d0040, 0x0414a008 },
-   { 0x00800031, 0x2b401d29, 0x008d0040, 0x0414a009 },
-   { 0x00800001, 0x25800229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x25a00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x25c00229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x25e00229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x26000229, 0x00ad0b40, 0x00000000 },
-   { 0x00800001, 0x26200229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x26400229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x26600229, 0x00ad0ba0, 0x00000000 },
-   { 0x80800042, 0x25804529, 0x00b10580, 0x00b10f40 },
-   { 0x80800042, 0x25a04529, 0x00b105a0, 0x00b10f50 },
-   { 0x80800042, 0x25c04529, 0x00b105c0, 0x00b10f60 },
-   { 0x80800042, 0x25e04529, 0x00b105e0, 0x00b10f70 },
-   { 0x80800042, 0x26004529, 0x00b10600, 0x00b10f80 },
-   { 0x80800042, 0x26204529, 0x00b10620, 0x00b10f90 },
-   { 0x80800042, 0x26404529, 0x00b10640, 0x00b10fa0 },
-   { 0x80800042, 0x26604529, 0x00b10660, 0x00b10fb0 },
+   { 0x00600001, 0x2e800021, 0x008d0020, 0x00000000 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x0020000c, 0x2e6e3dad, 0x0045002e, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x0021002e, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+   { 0x01000005, 0x20002d3c, 0x00210030, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
+   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
+   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
+   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
+   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
+   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
+   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
+   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
+   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+   { 0x01000005, 0x20002d3c, 0x00210030, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
+   { 0x00600001, 0x26800021, 0x008d0c00, 0x00000000 },
+   { 0x00600001, 0x26c00021, 0x008d0c20, 0x00000000 },
+   { 0x00600001, 0x27000021, 0x008d0c40, 0x00000000 },
+   { 0x00600001, 0x27400021, 0x008d0c60, 0x00000000 },
+   { 0x00600001, 0x27800021, 0x008d0c80, 0x00000000 },
+   { 0x00600001, 0x27c00021, 0x008d0ca0, 0x00000000 },
+   { 0x00600001, 0x28000021, 0x008d0cc0, 0x00000000 },
+   { 0x00600001, 0x28400021, 0x008d0ce0, 0x00000000 },
+   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20000e3c, 0x0021003f, 0x00000004 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210036, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
+   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
+   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
+   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
+   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
+   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
+   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
+   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
+   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
+   { 0x00600001, 0x26a00021, 0x008d0c00, 0x00000000 },
+   { 0x00600001, 0x26e00021, 0x008d0c20, 0x00000000 },
+   { 0x00600001, 0x27200021, 0x008d0c40, 0x00000000 },
+   { 0x00600001, 0x27600021, 0x008d0c60, 0x00000000 },
+   { 0x00600001, 0x27a00021, 0x008d0c80, 0x00000000 },
+   { 0x00600001, 0x27e00021, 0x008d0ca0, 0x00000000 },
+   { 0x00600001, 0x28200021, 0x008d0cc0, 0x00000000 },
+   { 0x00600001, 0x28600021, 0x008d0ce0, 0x00000000 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x0020000c, 0x2e6e3dad, 0x0045002e, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x0021002e, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
+   { 0x01000005, 0x20002d3c, 0x00210030, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000028 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
+   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
+   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
+   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
+   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
+   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
+   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
+   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000028 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001c },
+   { 0x01000005, 0x20002d3c, 0x00210030, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000f },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
+   { 0x00600001, 0x28800129, 0x008d09c0, 0x00000000 },
+   { 0x00600001, 0x28a00129, 0x008d09e0, 0x00000000 },
+   { 0x00600001, 0x28c00129, 0x008d0a00, 0x00000000 },
+   { 0x00600001, 0x28e00129, 0x008d0a20, 0x00000000 },
+   { 0x00600001, 0x29000129, 0x008d0a40, 0x00000000 },
+   { 0x00600001, 0x29200129, 0x008d0a60, 0x00000000 },
+   { 0x00600001, 0x29400129, 0x008d0a80, 0x00000000 },
+   { 0x00600001, 0x29600129, 0x008d0aa0, 0x00000000 },
+   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00040004 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000028 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
+   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
+   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
+   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
+   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
+   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
+   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
+   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000028 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001c },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000f },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
+   { 0x00600001, 0x28900129, 0x008d09c0, 0x00000000 },
+   { 0x00600001, 0x28b00129, 0x008d09e0, 0x00000000 },
+   { 0x00600001, 0x28d00129, 0x008d0a00, 0x00000000 },
+   { 0x00600001, 0x28f00129, 0x008d0a20, 0x00000000 },
+   { 0x00600001, 0x29100129, 0x008d0a40, 0x00000000 },
+   { 0x00600001, 0x29300129, 0x008d0a60, 0x00000000 },
+   { 0x00600001, 0x29500129, 0x008d0a80, 0x00000000 },
+   { 0x00600001, 0x29700129, 0x008d0aa0, 0x00000000 },
+   { 0x00600001, 0x20200021, 0x008d0e80, 0x00000000 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00000001, 0x20280061, 0x00000000, 0x0007000f },
+   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210032, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
+   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
+   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
+   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
+   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
+   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
+   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
+   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
+   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
+   { 0x00600001, 0x23800021, 0x008d0c00, 0x00000000 },
+   { 0x00600001, 0x23c00021, 0x008d0c20, 0x00000000 },
+   { 0x00600001, 0x24000021, 0x008d0c40, 0x00000000 },
+   { 0x00600001, 0x24400021, 0x008d0c60, 0x00000000 },
+   { 0x00600001, 0x24800021, 0x008d0c80, 0x00000000 },
+   { 0x00600001, 0x24c00021, 0x008d0ca0, 0x00000000 },
+   { 0x00600001, 0x25000021, 0x008d0cc0, 0x00000000 },
+   { 0x00600001, 0x25400021, 0x008d0ce0, 0x00000000 },
+   { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20000c3c, 0x00210054, 0x00000008 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
+   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
+   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
+   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
+   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
+   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
+   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
+   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
+   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
+   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
+   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
+   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
+   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
+   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
+   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
+   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
+   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
+   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
+   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
+   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
+   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
+   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
+   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
+   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
+   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
+   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
+   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
+   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
+   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
+   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
+   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
+   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
+   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
+   { 0x80800042, 0x23802529, 0x00b10680, 0x00b10380 },
+   { 0x80800042, 0x23a02529, 0x00b106a0, 0x00b10c00 },
+   { 0x80800042, 0x23c02529, 0x00b106c0, 0x00b103c0 },
+   { 0x80800042, 0x23e02529, 0x00b106e0, 0x00b10c20 },
+   { 0x80800042, 0x24002529, 0x00b10700, 0x00b10400 },
+   { 0x80800042, 0x24202529, 0x00b10720, 0x00b10c40 },
+   { 0x80800042, 0x24402529, 0x00b10740, 0x00b10440 },
+   { 0x80800042, 0x24602529, 0x00b10760, 0x00b10c60 },
+   { 0x80800042, 0x24802529, 0x00b10780, 0x00b10480 },
+   { 0x80800042, 0x24a02529, 0x00b107a0, 0x00b10c80 },
+   { 0x80800042, 0x24c02529, 0x00b107c0, 0x00b104c0 },
+   { 0x80800042, 0x24e02529, 0x00b107e0, 0x00b10ca0 },
+   { 0x80800042, 0x25002529, 0x00b10800, 0x00b10500 },
+   { 0x80800042, 0x25202529, 0x00b10820, 0x00b10cc0 },
+   { 0x80800042, 0x25402529, 0x00b10840, 0x00b10540 },
+   { 0x80800042, 0x25602529, 0x00b10860, 0x00b10ce0 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210032, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000028 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
+   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
+   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
+   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
+   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
+   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
+   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
+   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000028 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001c },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000f },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
+   { 0x00600001, 0x25800129, 0x008d09c0, 0x00000000 },
+   { 0x00600001, 0x25a00129, 0x008d09e0, 0x00000000 },
+   { 0x00600001, 0x25c00129, 0x008d0a00, 0x00000000 },
+   { 0x00600001, 0x25e00129, 0x008d0a20, 0x00000000 },
+   { 0x00600001, 0x26000129, 0x008d0a40, 0x00000000 },
+   { 0x00600001, 0x26200129, 0x008d0a60, 0x00000000 },
+   { 0x00600001, 0x26400129, 0x008d0a80, 0x00000000 },
+   { 0x00600001, 0x26600129, 0x008d0aa0, 0x00000000 },
+   { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
+   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00080008 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
+   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000028 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
+   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
+   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
+   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
+   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
+   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
+   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
+   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
+   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
+   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
+   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
+   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
+   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
+   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
+   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
+   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
+   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000028 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001c },
+   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000f },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
+   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
+   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
+   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
+   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
+   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
+   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
+   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
+   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
+   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
+   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
+   { 0x00600001, 0x25900129, 0x008d09c0, 0x00000000 },
+   { 0x00600001, 0x25b00129, 0x008d09e0, 0x00000000 },
+   { 0x00600001, 0x25d00129, 0x008d0a00, 0x00000000 },
+   { 0x00600001, 0x25f00129, 0x008d0a20, 0x00000000 },
+   { 0x00600001, 0x26100129, 0x008d0a40, 0x00000000 },
+   { 0x00600001, 0x26300129, 0x008d0a60, 0x00000000 },
+   { 0x00600001, 0x26500129, 0x008d0a80, 0x00000000 },
+   { 0x00600001, 0x26700129, 0x008d0aa0, 0x00000000 },
+   { 0x80800042, 0x25802529, 0x00b10880, 0x00b10580 },
+   { 0x80800042, 0x25a02529, 0x00b108a0, 0x00b105a0 },
+   { 0x80800042, 0x25c02529, 0x00b108c0, 0x00b105c0 },
+   { 0x80800042, 0x25e02529, 0x00b108e0, 0x00b105e0 },
+   { 0x80800042, 0x26002529, 0x00b10900, 0x00b10600 },
+   { 0x80800042, 0x26202529, 0x00b10920, 0x00b10620 },
+   { 0x80800042, 0x26402529, 0x00b10940, 0x00b10640 },
+   { 0x80800042, 0x26602529, 0x00b10960, 0x00b10660 },
    { 0x00600001, 0x20200021, 0x008d0980, 0x00000000 },
    { 0x00800001, 0x458101f1, 0x00000000, 0x00000000 },
    { 0x00800001, 0x45a101f1, 0x00000000, 0x00000000 },
@@ -570,4 +1140,3 @@
    { 0x00800001, 0x20500232, 0x00b20660, 0x00000000 },
    { 0x00800031, 0x24001d28, 0x008d0020, 0x05302002 },
    { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
-   { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
commit ea2b6b405e4c8b1bfb4bc568d0453a39a9194a8f
Author: Zou Nan hai <nanhai.zou at intel.com>
Date:   Mon Dec 15 09:19:43 2008 +0800

     [965 xvmc] update dual prime g4b files

diff --git a/src/xvmc/dual_prime.g4b b/src/xvmc/dual_prime.g4b
index 4a1eb4b..760cae1 100644
--- a/src/xvmc/dual_prime.g4b
+++ b/src/xvmc/dual_prime.g4b
@@ -102,2281 +102,1051 @@
    { 0x00800001, 0x23200169, 0x00000000, 0x00000000 },
    { 0x00800001, 0x23400169, 0x00000000, 0x00000000 },
    { 0x00600001, 0x2e600021, 0x008d0020, 0x00000000 },
-   { 0x00600001, 0x2e800021, 0x008d0020, 0x00000000 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x0020000c, 0x2e6e3dad, 0x0045002e, 0x00010001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
-   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x0021002e, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
-   { 0x01000005, 0x20002d3c, 0x00210030, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000007d },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
-   { 0x00800040, 0x2c004629, 0x00b109c1, 0x00b10a01 },
-   { 0x00800040, 0x2c204629, 0x00b10a01, 0x00b10a41 },
-   { 0x00800040, 0x2c404629, 0x00b10a41, 0x00b10a81 },
-   { 0x00800040, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
-   { 0x00800040, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
-   { 0x00800040, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
-   { 0x00800040, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
-   { 0x00800040, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c2 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a02 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a42 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a82 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac2 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b02 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b42 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b82 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a02 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a42 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a82 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac2 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b02 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b42 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b82 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00800040, 0x2c004629, 0x00b109c2, 0x00b10a02 },
-   { 0x00800040, 0x2c204629, 0x00b10a02, 0x00b10a42 },
-   { 0x00800040, 0x2c404629, 0x00b10a42, 0x00b10a82 },
-   { 0x00800040, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
-   { 0x00800040, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
-   { 0x00800040, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
-   { 0x00800040, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
-   { 0x00800040, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c3 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a03 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a43 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a83 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac3 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b03 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b43 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b83 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a03 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a43 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a83 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac3 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b03 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b43 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b83 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
-   { 0x00800040, 0x2c004629, 0x00b109c3, 0x00b10a03 },
-   { 0x00800040, 0x2c204629, 0x00b10a03, 0x00b10a43 },
-   { 0x00800040, 0x2c404629, 0x00b10a43, 0x00b10a83 },
-   { 0x00800040, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
-   { 0x00800040, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
-   { 0x00800040, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
-   { 0x00800040, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
-   { 0x00800040, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c4 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a04 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a44 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a84 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac4 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b04 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b44 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b84 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a04 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a44 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a84 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac4 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b04 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b44 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b84 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc4 },
-   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
-   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
-   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
-   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
-   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
-   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
-   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
-   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000009a },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b109c2 },
-   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a02 },
-   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a42 },
-   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10a82 },
-   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10ac2 },
-   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b02 },
-   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b42 },
-   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10b82 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b109c3 },
-   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a03 },
-   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a43 },
-   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10a83 },
-   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10ac3 },
-   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b03 },
-   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b43 },
-   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10b83 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b109c4 },
-   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a04 },
-   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a44 },
-   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10a84 },
-   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10ac4 },
-   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b04 },
-   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b44 },
-   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10b84 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000068 },
-   { 0x01000005, 0x20002d3c, 0x00210030, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000035 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b10a01 },
-   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a41 },
-   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a81 },
-   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
-   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
-   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
-   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
-   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b10a02 },
-   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a42 },
-   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a82 },
-   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
-   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
-   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
-   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
-   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b10a03 },
-   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a43 },
-   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a83 },
-   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
-   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
-   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
-   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
-   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000001, 0x20280061, 0x00000000, 0x00070007 },
+   { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 },
+   { 0x0020000c, 0x202e3dad, 0x00450e6e, 0x00010001 },
+   { 0x00200040, 0x20403421, 0x00450e60, 0x0045002e },
+   { 0x01000005, 0x20000d3c, 0x00210e6e, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000012b },
+   { 0x01000005, 0x20000d3c, 0x00210e70, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x000000de },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000031 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a004 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x00800001, 0x2c000229, 0x00b109c1, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a01, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a41, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a81, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac1, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b01, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b41, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b81, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x00800001, 0x2c000229, 0x00b109c2, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a02, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a42, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a82, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac2, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b02, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b42, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b82, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x00800001, 0x2c000229, 0x00b109c3, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a03, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a43, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a83, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac3, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b03, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b43, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b83, 0x00000000 },
-   { 0x00600001, 0x26800021, 0x008d0c00, 0x00000000 },
-   { 0x00600001, 0x26c00021, 0x008d0c20, 0x00000000 },
-   { 0x00600001, 0x27000021, 0x008d0c40, 0x00000000 },
-   { 0x00600001, 0x27400021, 0x008d0c60, 0x00000000 },
-   { 0x00600001, 0x27800021, 0x008d0c80, 0x00000000 },
-   { 0x00600001, 0x27c00021, 0x008d0ca0, 0x00000000 },
-   { 0x00600001, 0x28000021, 0x008d0cc0, 0x00000000 },
-   { 0x00600001, 0x28400021, 0x008d0ce0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00010001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x02000005, 0x20000e3c, 0x0021003f, 0x00000004 },
-   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210036, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000007d },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
+   { 0x00800040, 0x23804629, 0x00b10c40, 0x00b10c41 },
+   { 0x00800040, 0x23a04629, 0x00b10c60, 0x00b10c61 },
+   { 0x00800040, 0x23c04629, 0x00b10c80, 0x00b10c81 },
+   { 0x00800040, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
+   { 0x00800040, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
+   { 0x00800040, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
+   { 0x00800040, 0x24404629, 0x00b10d00, 0x00b10d01 },
+   { 0x00800040, 0x24604629, 0x00b10d20, 0x00b10d21 },
+   { 0x00800040, 0x24804629, 0x00b10d40, 0x00b10d41 },
+   { 0x00800040, 0x24a04629, 0x00b10d60, 0x00b10d61 },
+   { 0x00800040, 0x24c04629, 0x00b10d80, 0x00b10d81 },
+   { 0x00800040, 0x24e04629, 0x00b10da0, 0x00b10da1 },
+   { 0x00800040, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
+   { 0x00800040, 0x25204629, 0x00b10de0, 0x00b10de1 },
+   { 0x00800040, 0x25404629, 0x00b10e00, 0x00b10e01 },
+   { 0x00800040, 0x25604629, 0x00b10e20, 0x00b10e21 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c60 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c80 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca0 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc0 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce0 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d00 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d20 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d40 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d60 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d80 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da0 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc0 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de0 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e00 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e20 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f00 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000092 },
+   { 0x00800040, 0x23804629, 0x00b10c41, 0x00b10c42 },
+   { 0x00800040, 0x23a04629, 0x00b10c61, 0x00b10c62 },
+   { 0x00800040, 0x23c04629, 0x00b10c81, 0x00b10c82 },
+   { 0x00800040, 0x23e04629, 0x00b10ca1, 0x00b10ca2 },
+   { 0x00800040, 0x24004629, 0x00b10cc1, 0x00b10cc2 },
+   { 0x00800040, 0x24204629, 0x00b10ce1, 0x00b10ce2 },
+   { 0x00800040, 0x24404629, 0x00b10d01, 0x00b10d02 },
+   { 0x00800040, 0x24604629, 0x00b10d21, 0x00b10d22 },
+   { 0x00800040, 0x24804629, 0x00b10d41, 0x00b10d42 },
+   { 0x00800040, 0x24a04629, 0x00b10d61, 0x00b10d62 },
+   { 0x00800040, 0x24c04629, 0x00b10d81, 0x00b10d82 },
+   { 0x00800040, 0x24e04629, 0x00b10da1, 0x00b10da2 },
+   { 0x00800040, 0x25004629, 0x00b10dc1, 0x00b10dc2 },
+   { 0x00800040, 0x25204629, 0x00b10de1, 0x00b10de2 },
+   { 0x00800040, 0x25404629, 0x00b10e01, 0x00b10e02 },
+   { 0x00800040, 0x25604629, 0x00b10e21, 0x00b10e22 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c62 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c82 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca2 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc2 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce2 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d02 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d22 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d42 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d62 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d82 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da2 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc2 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de2 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e02 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e22 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f02 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000061 },
+   { 0x00800040, 0x23804629, 0x00b10c42, 0x00b10c43 },
+   { 0x00800040, 0x23a04629, 0x00b10c62, 0x00b10c63 },
+   { 0x00800040, 0x23c04629, 0x00b10c82, 0x00b10c83 },
+   { 0x00800040, 0x23e04629, 0x00b10ca2, 0x00b10ca3 },
+   { 0x00800040, 0x24004629, 0x00b10cc2, 0x00b10cc3 },
+   { 0x00800040, 0x24204629, 0x00b10ce2, 0x00b10ce3 },
+   { 0x00800040, 0x24404629, 0x00b10d02, 0x00b10d03 },
+   { 0x00800040, 0x24604629, 0x00b10d22, 0x00b10d23 },
+   { 0x00800040, 0x24804629, 0x00b10d42, 0x00b10d43 },
+   { 0x00800040, 0x24a04629, 0x00b10d62, 0x00b10d63 },
+   { 0x00800040, 0x24c04629, 0x00b10d82, 0x00b10d83 },
+   { 0x00800040, 0x24e04629, 0x00b10da2, 0x00b10da3 },
+   { 0x00800040, 0x25004629, 0x00b10dc2, 0x00b10dc3 },
+   { 0x00800040, 0x25204629, 0x00b10de2, 0x00b10de3 },
+   { 0x00800040, 0x25404629, 0x00b10e02, 0x00b10e03 },
+   { 0x00800040, 0x25604629, 0x00b10e22, 0x00b10e23 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c62 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c82 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca2 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc2 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce2 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d02 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d22 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d42 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d62 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d82 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da2 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc2 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de2 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e02 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e22 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f02 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c63 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c83 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca3 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc3 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce3 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d03 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d23 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d43 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d63 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d83 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da3 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc3 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de3 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e03 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e23 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f03 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000030 },
+   { 0x00800040, 0x23804629, 0x00b10c43, 0x00b10c44 },
+   { 0x00800040, 0x23a04629, 0x00b10c63, 0x00b10c64 },
+   { 0x00800040, 0x23c04629, 0x00b10c83, 0x00b10c84 },
+   { 0x00800040, 0x23e04629, 0x00b10ca3, 0x00b10ca4 },
+   { 0x00800040, 0x24004629, 0x00b10cc3, 0x00b10cc4 },
+   { 0x00800040, 0x24204629, 0x00b10ce3, 0x00b10ce4 },
+   { 0x00800040, 0x24404629, 0x00b10d03, 0x00b10d04 },
+   { 0x00800040, 0x24604629, 0x00b10d23, 0x00b10d24 },
+   { 0x00800040, 0x24804629, 0x00b10d43, 0x00b10d44 },
+   { 0x00800040, 0x24a04629, 0x00b10d63, 0x00b10d64 },
+   { 0x00800040, 0x24c04629, 0x00b10d83, 0x00b10d84 },
+   { 0x00800040, 0x24e04629, 0x00b10da3, 0x00b10da4 },
+   { 0x00800040, 0x25004629, 0x00b10dc3, 0x00b10dc4 },
+   { 0x00800040, 0x25204629, 0x00b10de3, 0x00b10de4 },
+   { 0x00800040, 0x25404629, 0x00b10e03, 0x00b10e04 },
+   { 0x00800040, 0x25604629, 0x00b10e23, 0x00b10e24 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c63 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c83 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca3 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc3 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce3 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d03 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d23 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d43 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d63 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d83 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da3 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc3 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de3 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e03 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e23 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f03 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c64 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c84 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca4 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc4 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce4 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d04 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d24 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d44 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d64 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d84 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da4 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc4 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de4 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e04 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e24 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f04 },
+   { 0x80800008, 0x23802d29, 0x00b10380, 0x00020002 },
+   { 0x80800008, 0x23a02d29, 0x00b103a0, 0x00020002 },
+   { 0x80800008, 0x23c02d29, 0x00b103c0, 0x00020002 },
+   { 0x80800008, 0x23e02d29, 0x00b103e0, 0x00020002 },
+   { 0x80800008, 0x24002d29, 0x00b10400, 0x00020002 },
+   { 0x80800008, 0x24202d29, 0x00b10420, 0x00020002 },
+   { 0x80800008, 0x24402d29, 0x00b10440, 0x00020002 },
+   { 0x80800008, 0x24602d29, 0x00b10460, 0x00020002 },
+   { 0x80800008, 0x24802d29, 0x00b10480, 0x00020002 },
+   { 0x80800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+   { 0x80800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+   { 0x80800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+   { 0x80800008, 0x25002d29, 0x00b10500, 0x00020002 },
+   { 0x80800008, 0x25202d29, 0x00b10520, 0x00020002 },
+   { 0x80800008, 0x25402d29, 0x00b10540, 0x00020002 },
+   { 0x80800008, 0x25602d29, 0x00b10560, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x000000e5 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
+   { 0x00000041, 0x20581c21, 0x00210058, 0x00000011 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
-   { 0x00800040, 0x2c004629, 0x00b109c1, 0x00b10a01 },
-   { 0x00800040, 0x2c204629, 0x00b10a01, 0x00b10a41 },
-   { 0x00800040, 0x2c404629, 0x00b10a41, 0x00b10a81 },
-   { 0x00800040, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
-   { 0x00800040, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
-   { 0x00800040, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
-   { 0x00800040, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
-   { 0x00800040, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c2 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a02 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a42 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a82 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac2 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b02 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b42 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b82 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a02 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a42 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a82 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac2 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b02 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b42 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b82 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00800040, 0x2c004629, 0x00b109c2, 0x00b10a02 },
-   { 0x00800040, 0x2c204629, 0x00b10a02, 0x00b10a42 },
-   { 0x00800040, 0x2c404629, 0x00b10a42, 0x00b10a82 },
-   { 0x00800040, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
-   { 0x00800040, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
-   { 0x00800040, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
-   { 0x00800040, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
-   { 0x00800040, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c3 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a03 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a43 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a83 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac3 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b03 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b43 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b83 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a03 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a43 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a83 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac3 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b03 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b43 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b83 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
-   { 0x00800040, 0x2c004629, 0x00b109c3, 0x00b10a03 },
-   { 0x00800040, 0x2c204629, 0x00b10a03, 0x00b10a43 },
-   { 0x00800040, 0x2c404629, 0x00b10a43, 0x00b10a83 },
-   { 0x00800040, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
-   { 0x00800040, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
-   { 0x00800040, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
-   { 0x00800040, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
-   { 0x00800040, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c4 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a04 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a44 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a84 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac4 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b04 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b44 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b84 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a04 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a44 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a84 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac4 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b04 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b44 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b84 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc4 },
-   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
-   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
-   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
-   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
-   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
-   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
-   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
-   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
+   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c41 },
+   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c61 },
+   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10c81 },
+   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
+   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
+   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
+   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d01 },
+   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d21 },
+   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d41 },
+   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d61 },
+   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10d81 },
+   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10da1 },
+   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
+   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10de1 },
+   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e01 },
+   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10e21 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
+   { 0x80800042, 0x23804629, 0x00b10c41, 0x00b10c42 },
+   { 0x80800042, 0x23a04629, 0x00b10c61, 0x00b10c62 },
+   { 0x80800042, 0x23c04629, 0x00b10c81, 0x00b10c82 },
+   { 0x80800042, 0x23e04629, 0x00b10ca1, 0x00b10ca2 },
+   { 0x80800042, 0x24004629, 0x00b10cc1, 0x00b10cc2 },
+   { 0x80800042, 0x24204629, 0x00b10ce1, 0x00b10ce2 },
+   { 0x80800042, 0x24404629, 0x00b10d01, 0x00b10d02 },
+   { 0x80800042, 0x24604629, 0x00b10d21, 0x00b10d22 },
+   { 0x80800042, 0x24804629, 0x00b10d41, 0x00b10d42 },
+   { 0x80800042, 0x24a04629, 0x00b10d61, 0x00b10d62 },
+   { 0x80800042, 0x24c04629, 0x00b10d81, 0x00b10d82 },
+   { 0x80800042, 0x24e04629, 0x00b10da1, 0x00b10da2 },
+   { 0x80800042, 0x25004629, 0x00b10dc1, 0x00b10dc2 },
+   { 0x80800042, 0x25204629, 0x00b10de1, 0x00b10de2 },
+   { 0x80800042, 0x25404629, 0x00b10e01, 0x00b10e02 },
+   { 0x80800042, 0x25604629, 0x00b10e21, 0x00b10e22 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
+   { 0x80800042, 0x23804629, 0x00b10c42, 0x00b10c43 },
+   { 0x80800042, 0x23a04629, 0x00b10c62, 0x00b10c63 },
+   { 0x80800042, 0x23c04629, 0x00b10c82, 0x00b10c83 },
+   { 0x80800042, 0x23e04629, 0x00b10ca2, 0x00b10ca3 },
+   { 0x80800042, 0x24004629, 0x00b10cc2, 0x00b10cc3 },
+   { 0x80800042, 0x24204629, 0x00b10ce2, 0x00b10ce3 },
+   { 0x80800042, 0x24404629, 0x00b10d02, 0x00b10d03 },
+   { 0x80800042, 0x24604629, 0x00b10d22, 0x00b10d23 },
+   { 0x80800042, 0x24804629, 0x00b10d42, 0x00b10d43 },
+   { 0x80800042, 0x24a04629, 0x00b10d62, 0x00b10d63 },
+   { 0x80800042, 0x24c04629, 0x00b10d82, 0x00b10d83 },
+   { 0x80800042, 0x24e04629, 0x00b10da2, 0x00b10da3 },
+   { 0x80800042, 0x25004629, 0x00b10dc2, 0x00b10dc3 },
+   { 0x80800042, 0x25204629, 0x00b10de2, 0x00b10de3 },
+   { 0x80800042, 0x25404629, 0x00b10e02, 0x00b10e03 },
+   { 0x80800042, 0x25604629, 0x00b10e22, 0x00b10e23 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+   { 0x80800042, 0x23804629, 0x00b10c43, 0x00b10c44 },
+   { 0x80800042, 0x23a04629, 0x00b10c63, 0x00b10c64 },
+   { 0x80800042, 0x23c04629, 0x00b10c83, 0x00b10c84 },
+   { 0x80800042, 0x23e04629, 0x00b10ca3, 0x00b10ca4 },
+   { 0x80800042, 0x24004629, 0x00b10cc3, 0x00b10cc4 },
+   { 0x80800042, 0x24204629, 0x00b10ce3, 0x00b10ce4 },
+   { 0x80800042, 0x24404629, 0x00b10d03, 0x00b10d04 },
+   { 0x80800042, 0x24604629, 0x00b10d23, 0x00b10d24 },
+   { 0x80800042, 0x24804629, 0x00b10d43, 0x00b10d44 },
+   { 0x80800042, 0x24a04629, 0x00b10d63, 0x00b10d64 },
+   { 0x80800042, 0x24c04629, 0x00b10d83, 0x00b10d84 },
+   { 0x80800042, 0x24e04629, 0x00b10da3, 0x00b10da4 },
+   { 0x80800042, 0x25004629, 0x00b10dc3, 0x00b10dc4 },
+   { 0x80800042, 0x25204629, 0x00b10de3, 0x00b10de4 },
+   { 0x80800042, 0x25404629, 0x00b10e03, 0x00b10e04 },
+   { 0x80800042, 0x25604629, 0x00b10e23, 0x00b10e24 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000009a },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b109c2 },
-   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a02 },
-   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a42 },
-   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10a82 },
-   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10ac2 },
-   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b02 },
-   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b42 },
-   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10b82 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b109c3 },
-   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a03 },
-   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a43 },
-   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10a83 },
-   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10ac3 },
-   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b03 },
-   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b43 },
-   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10b83 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b109c4 },
-   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a04 },
-   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a44 },
-   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10a84 },
-   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10ac4 },
-   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b04 },
-   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b44 },
-   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10b84 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000068 },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000035 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b10a01 },
-   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a41 },
-   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a81 },
-   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
-   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
-   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
-   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
-   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b10a02 },
-   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a42 },
-   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a82 },
-   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
-   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
-   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
-   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
-   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b10a03 },
-   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a43 },
-   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a83 },
-   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
-   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
-   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
-   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
-   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x00800001, 0x2c000229, 0x00b109c1, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a01, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a41, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a81, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac1, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b01, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b41, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b81, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x00800001, 0x2c000229, 0x00b109c2, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a02, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a42, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a82, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac2, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b02, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b42, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b82, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x00800001, 0x2c000229, 0x00b109c3, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a03, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a43, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a83, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac3, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b03, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b43, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b83, 0x00000000 },
-   { 0x00600001, 0x26a00021, 0x008d0c00, 0x00000000 },
-   { 0x00600001, 0x26e00021, 0x008d0c20, 0x00000000 },
-   { 0x00600001, 0x27200021, 0x008d0c40, 0x00000000 },
-   { 0x00600001, 0x27600021, 0x008d0c60, 0x00000000 },
-   { 0x00600001, 0x27a00021, 0x008d0c80, 0x00000000 },
-   { 0x00600001, 0x27e00021, 0x008d0ca0, 0x00000000 },
-   { 0x00600001, 0x28200021, 0x008d0cc0, 0x00000000 },
-   { 0x00600001, 0x28600021, 0x008d0ce0, 0x00000000 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x0020000c, 0x2e6e3dad, 0x0045002e, 0x00020002 },
-   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
-   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x0021002e, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
-   { 0x01000005, 0x20002d3c, 0x00210030, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000076 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
-   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
-   { 0x00800040, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
-   { 0x00800040, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
-   { 0x00800040, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac2 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae2 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b02 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b22 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae2 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b02 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b22 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b42 },
-   { 0x00800040, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
-   { 0x00800040, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b62 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b82 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba2 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc2 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b82 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba2 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc2 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
-   { 0x00800040, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
-   { 0x00800040, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac3 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae3 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b03 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b23 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae3 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b03 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b23 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b43 },
-   { 0x00800040, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
-   { 0x00800040, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b63 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b83 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba3 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc3 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b83 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba3 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc3 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac3, 0x00ad0ae3 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae3, 0x00ad0b03 },
-   { 0x00800040, 0x2a004629, 0x00ad0b03, 0x00ad0b23 },
-   { 0x00800040, 0x2a204629, 0x00ad0b23, 0x00ad0b43 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac4 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae4 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b04 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b24 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae4 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b04 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b24 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b44 },
-   { 0x00800040, 0x2a404629, 0x00ad0b63, 0x00ad0b83 },
-   { 0x00800040, 0x2a604629, 0x00ad0b83, 0x00ad0ba3 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba3, 0x00ad0bc3 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc3, 0x00ad0be3 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b64 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b84 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba4 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc4 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b84 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba4 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc4 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be4 },
-   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
-   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
-   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
-   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
-   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
-   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
-   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
-   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000082 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ac2 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0ae2 },
-   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b02 },
-   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b22 },
-   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b62 },
-   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0b82 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0ba2 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ac3 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0ae3 },
-   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b03 },
-   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b23 },
-   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b63 },
-   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0b83 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0ba3 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac4 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae4 },
-   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b04 },
-   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b24 },
-   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b64 },
-   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b84 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba4 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc4 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000058 },
-   { 0x01000005, 0x20002d3c, 0x00210030, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002d },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
-   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
-   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
-   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
-   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
-   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
-   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
-   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
-   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac3 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae3 },
-   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b03 },
-   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b23 },
-   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b63 },
-   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b83 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba3 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x00800001, 0x29c00229, 0x00ad0ac1, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae1, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b01, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b21, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b61, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b81, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba1, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc1, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac2, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae2, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b02, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b22, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b62, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b82, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba2, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc2, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac3, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae3, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b03, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b23, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b63, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b83, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba3, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc3, 0x00000000 },
-   { 0x00600001, 0x28800129, 0x008d09c0, 0x00000000 },
-   { 0x00600001, 0x28a00129, 0x008d09e0, 0x00000000 },
-   { 0x00600001, 0x28c00129, 0x008d0a00, 0x00000000 },
-   { 0x00600001, 0x28e00129, 0x008d0a20, 0x00000000 },
-   { 0x00600001, 0x29000129, 0x008d0a40, 0x00000000 },
-   { 0x00600001, 0x29200129, 0x008d0a60, 0x00000000 },
-   { 0x00600001, 0x29400129, 0x008d0a80, 0x00000000 },
-   { 0x00600001, 0x29600129, 0x008d0aa0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00020002 },
-   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00040004 },
-   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
-   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000076 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
-   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
-   { 0x00800040, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
-   { 0x00800040, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
-   { 0x00800040, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac2 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae2 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b02 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b22 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae2 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b02 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b22 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b42 },
-   { 0x00800040, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
-   { 0x00800040, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b62 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b82 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba2 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc2 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b82 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba2 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc2 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
-   { 0x00800040, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
-   { 0x00800040, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac3 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae3 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b03 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b23 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae3 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b03 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b23 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b43 },
-   { 0x00800040, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
-   { 0x00800040, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b63 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b83 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba3 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc3 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b83 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba3 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc3 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac3, 0x00ad0ae3 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae3, 0x00ad0b03 },
-   { 0x00800040, 0x2a004629, 0x00ad0b03, 0x00ad0b23 },
-   { 0x00800040, 0x2a204629, 0x00ad0b23, 0x00ad0b43 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac4 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae4 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b04 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b24 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae4 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b04 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b24 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b44 },
-   { 0x00800040, 0x2a404629, 0x00ad0b63, 0x00ad0b83 },
-   { 0x00800040, 0x2a604629, 0x00ad0b83, 0x00ad0ba3 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba3, 0x00ad0bc3 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc3, 0x00ad0be3 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b64 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b84 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba4 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc4 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b84 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba4 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc4 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be4 },
-   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
-   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
-   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
-   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
-   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
-   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
-   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
-   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000082 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ac2 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0ae2 },
-   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b02 },
-   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b22 },
-   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b62 },
-   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0b82 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0ba2 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ac3 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0ae3 },
-   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b03 },
-   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b23 },
-   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b63 },
-   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0b83 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0ba3 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac4 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae4 },
-   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b04 },
-   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b24 },
-   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b64 },
-   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b84 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba4 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc4 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000058 },
-   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002d },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
-   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
-   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
-   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
-   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
-   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
-   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
-   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
-   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac3 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae3 },
-   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b03 },
-   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b23 },
-   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b63 },
-   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b83 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba3 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x00800001, 0x29c00229, 0x00ad0ac1, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae1, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b01, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b21, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b61, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b81, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba1, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc1, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac2, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae2, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b02, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b22, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b62, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b82, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba2, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc2, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac3, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae3, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b03, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b23, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b63, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b83, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba3, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc3, 0x00000000 },
-   { 0x00600001, 0x28900129, 0x008d09c0, 0x00000000 },
-   { 0x00600001, 0x28b00129, 0x008d09e0, 0x00000000 },
-   { 0x00600001, 0x28d00129, 0x008d0a00, 0x00000000 },
-   { 0x00600001, 0x28f00129, 0x008d0a20, 0x00000000 },
-   { 0x00600001, 0x29100129, 0x008d0a40, 0x00000000 },
-   { 0x00600001, 0x29300129, 0x008d0a60, 0x00000000 },
-   { 0x00600001, 0x29500129, 0x008d0a80, 0x00000000 },
-   { 0x00600001, 0x29700129, 0x008d0aa0, 0x00000000 },
-   { 0x00600001, 0x20200021, 0x008d0e80, 0x00000000 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00000001, 0x20280061, 0x00000000, 0x0007000f },
-   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00010001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
-   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210032, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000007d },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
+   { 0x01000005, 0x20000d3c, 0x00210e70, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000004e },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000011 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a004 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
+   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c60 },
+   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c80 },
+   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10ca0 },
+   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10cc0 },
+   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10ce0 },
+   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10d00 },
+   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d20 },
+   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d40 },
+   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d60 },
+   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d80 },
+   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10da0 },
+   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10dc0 },
+   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10de0 },
+   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10e00 },
+   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e20 },
+   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10f00 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
+   { 0x80800042, 0x23804629, 0x00b10c41, 0x00b10c61 },
+   { 0x80800042, 0x23a04629, 0x00b10c61, 0x00b10c81 },
+   { 0x80800042, 0x23c04629, 0x00b10c81, 0x00b10ca1 },
+   { 0x80800042, 0x23e04629, 0x00b10ca1, 0x00b10cc1 },
+   { 0x80800042, 0x24004629, 0x00b10cc1, 0x00b10ce1 },
+   { 0x80800042, 0x24204629, 0x00b10ce1, 0x00b10d01 },
+   { 0x80800042, 0x24404629, 0x00b10d01, 0x00b10d21 },
+   { 0x80800042, 0x24604629, 0x00b10d21, 0x00b10d41 },
+   { 0x80800042, 0x24804629, 0x00b10d41, 0x00b10d61 },
+   { 0x80800042, 0x24a04629, 0x00b10d61, 0x00b10d81 },
+   { 0x80800042, 0x24c04629, 0x00b10d81, 0x00b10da1 },
+   { 0x80800042, 0x24e04629, 0x00b10da1, 0x00b10dc1 },
+   { 0x80800042, 0x25004629, 0x00b10dc1, 0x00b10de1 },
+   { 0x80800042, 0x25204629, 0x00b10de1, 0x00b10e01 },
+   { 0x80800042, 0x25404629, 0x00b10e01, 0x00b10e21 },
+   { 0x80800042, 0x25604629, 0x00b10e21, 0x00b10f01 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
+   { 0x80800042, 0x23804629, 0x00b10c42, 0x00b10c62 },
+   { 0x80800042, 0x23a04629, 0x00b10c62, 0x00b10c82 },
+   { 0x80800042, 0x23c04629, 0x00b10c82, 0x00b10ca2 },
+   { 0x80800042, 0x23e04629, 0x00b10ca2, 0x00b10cc2 },
+   { 0x80800042, 0x24004629, 0x00b10cc2, 0x00b10ce2 },
+   { 0x80800042, 0x24204629, 0x00b10ce2, 0x00b10d02 },
+   { 0x80800042, 0x24404629, 0x00b10d02, 0x00b10d22 },
+   { 0x80800042, 0x24604629, 0x00b10d22, 0x00b10d42 },
+   { 0x80800042, 0x24804629, 0x00b10d42, 0x00b10d62 },
+   { 0x80800042, 0x24a04629, 0x00b10d62, 0x00b10d82 },
+   { 0x80800042, 0x24c04629, 0x00b10d82, 0x00b10da2 },
+   { 0x80800042, 0x24e04629, 0x00b10da2, 0x00b10dc2 },
+   { 0x80800042, 0x25004629, 0x00b10dc2, 0x00b10de2 },
+   { 0x80800042, 0x25204629, 0x00b10de2, 0x00b10e02 },
+   { 0x80800042, 0x25404629, 0x00b10e02, 0x00b10e22 },
+   { 0x80800042, 0x25604629, 0x00b10e22, 0x00b10f02 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+   { 0x80800042, 0x23804629, 0x00b10c43, 0x00b10c63 },
+   { 0x80800042, 0x23a04629, 0x00b10c63, 0x00b10c83 },
+   { 0x80800042, 0x23c04629, 0x00b10c83, 0x00b10ca3 },
+   { 0x80800042, 0x23e04629, 0x00b10ca3, 0x00b10cc3 },
+   { 0x80800042, 0x24004629, 0x00b10cc3, 0x00b10ce3 },
+   { 0x80800042, 0x24204629, 0x00b10ce3, 0x00b10d03 },
+   { 0x80800042, 0x24404629, 0x00b10d03, 0x00b10d23 },
+   { 0x80800042, 0x24604629, 0x00b10d23, 0x00b10d43 },
+   { 0x80800042, 0x24804629, 0x00b10d43, 0x00b10d63 },
+   { 0x80800042, 0x24a04629, 0x00b10d63, 0x00b10d83 },
+   { 0x80800042, 0x24c04629, 0x00b10d83, 0x00b10da3 },
+   { 0x80800042, 0x24e04629, 0x00b10da3, 0x00b10dc3 },
+   { 0x80800042, 0x25004629, 0x00b10dc3, 0x00b10de3 },
+   { 0x80800042, 0x25204629, 0x00b10de3, 0x00b10e03 },
+   { 0x80800042, 0x25404629, 0x00b10e03, 0x00b10e23 },
+   { 0x80800042, 0x25604629, 0x00b10e23, 0x00b10f03 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
-   { 0x00800040, 0x2c004629, 0x00b109c1, 0x00b10a01 },
-   { 0x00800040, 0x2c204629, 0x00b10a01, 0x00b10a41 },
-   { 0x00800040, 0x2c404629, 0x00b10a41, 0x00b10a81 },
-   { 0x00800040, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
-   { 0x00800040, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
-   { 0x00800040, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
-   { 0x00800040, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
-   { 0x00800040, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c2 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a02 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a42 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a82 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac2 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b02 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b42 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b82 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a02 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a42 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a82 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac2 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b02 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b42 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b82 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00800040, 0x2c004629, 0x00b109c2, 0x00b10a02 },
-   { 0x00800040, 0x2c204629, 0x00b10a02, 0x00b10a42 },
-   { 0x00800040, 0x2c404629, 0x00b10a42, 0x00b10a82 },
-   { 0x00800040, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
-   { 0x00800040, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
-   { 0x00800040, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
-   { 0x00800040, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
-   { 0x00800040, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c3 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a03 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a43 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a83 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac3 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b03 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b43 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b83 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a03 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a43 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a83 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac3 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b03 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b43 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b83 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
-   { 0x00800040, 0x2c004629, 0x00b109c3, 0x00b10a03 },
-   { 0x00800040, 0x2c204629, 0x00b10a03, 0x00b10a43 },
-   { 0x00800040, 0x2c404629, 0x00b10a43, 0x00b10a83 },
-   { 0x00800040, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
-   { 0x00800040, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
-   { 0x00800040, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
-   { 0x00800040, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
-   { 0x00800040, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c4 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a04 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a44 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a84 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac4 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b04 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b44 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b84 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a04 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a44 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a84 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac4 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b04 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b44 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b84 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc4 },
-   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
-   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
-   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
-   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
-   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
-   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
-   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
-   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000009a },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b109c2 },
-   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a02 },
-   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a42 },
-   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10a82 },
-   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10ac2 },
-   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b02 },
-   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b42 },
-   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10b82 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b109c3 },
-   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a03 },
-   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a43 },
-   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10a83 },
-   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10ac3 },
-   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b03 },
-   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b43 },
-   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10b83 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b109c4 },
-   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a04 },
-   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a44 },
-   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10a84 },
-   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10ac4 },
-   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b04 },
-   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b44 },
-   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10b84 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000068 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000035 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000011 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b10a01 },
-   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a41 },
-   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a81 },
-   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
-   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
-   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
-   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
-   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b10a02 },
-   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a42 },
-   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a82 },
-   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
-   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
-   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
-   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
-   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b10a03 },
-   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a43 },
-   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a83 },
-   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
-   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
-   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
-   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
-   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00800001, 0x23800229, 0x00b10c40, 0x00000000 },
+   { 0x00800001, 0x23a00229, 0x00b10c60, 0x00000000 },
+   { 0x00800001, 0x23c00229, 0x00b10c80, 0x00000000 },
+   { 0x00800001, 0x23e00229, 0x00b10ca0, 0x00000000 },
+   { 0x00800001, 0x24000229, 0x00b10cc0, 0x00000000 },
+   { 0x00800001, 0x24200229, 0x00b10ce0, 0x00000000 },
+   { 0x00800001, 0x24400229, 0x00b10d00, 0x00000000 },
+   { 0x00800001, 0x24600229, 0x00b10d20, 0x00000000 },
+   { 0x00800001, 0x24800229, 0x00b10d40, 0x00000000 },
+   { 0x00800001, 0x24a00229, 0x00b10d60, 0x00000000 },
+   { 0x00800001, 0x24c00229, 0x00b10d80, 0x00000000 },
+   { 0x00800001, 0x24e00229, 0x00b10da0, 0x00000000 },
+   { 0x00800001, 0x25000229, 0x00b10dc0, 0x00000000 },
+   { 0x00800001, 0x25200229, 0x00b10de0, 0x00000000 },
+   { 0x00800001, 0x25400229, 0x00b10e00, 0x00000000 },
+   { 0x00800001, 0x25600229, 0x00b10e20, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
+   { 0x00800001, 0x23800229, 0x00b10c41, 0x00000000 },
+   { 0x00800001, 0x23a00229, 0x00b10c61, 0x00000000 },
+   { 0x00800001, 0x23c00229, 0x00b10c81, 0x00000000 },
+   { 0x00800001, 0x23e00229, 0x00b10ca1, 0x00000000 },
+   { 0x00800001, 0x24000229, 0x00b10cc1, 0x00000000 },
+   { 0x00800001, 0x24200229, 0x00b10ce1, 0x00000000 },
+   { 0x00800001, 0x24400229, 0x00b10d01, 0x00000000 },
+   { 0x00800001, 0x24600229, 0x00b10d21, 0x00000000 },
+   { 0x00800001, 0x24800229, 0x00b10d41, 0x00000000 },
+   { 0x00800001, 0x24a00229, 0x00b10d61, 0x00000000 },
+   { 0x00800001, 0x24c00229, 0x00b10d81, 0x00000000 },
+   { 0x00800001, 0x24e00229, 0x00b10da1, 0x00000000 },
+   { 0x00800001, 0x25000229, 0x00b10dc1, 0x00000000 },
+   { 0x00800001, 0x25200229, 0x00b10de1, 0x00000000 },
+   { 0x00800001, 0x25400229, 0x00b10e01, 0x00000000 },
+   { 0x00800001, 0x25600229, 0x00b10e21, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
+   { 0x00800001, 0x23800229, 0x00b10c42, 0x00000000 },
+   { 0x00800001, 0x23a00229, 0x00b10c62, 0x00000000 },
+   { 0x00800001, 0x23c00229, 0x00b10c82, 0x00000000 },
+   { 0x00800001, 0x23e00229, 0x00b10ca2, 0x00000000 },
+   { 0x00800001, 0x24000229, 0x00b10cc2, 0x00000000 },
+   { 0x00800001, 0x24200229, 0x00b10ce2, 0x00000000 },
+   { 0x00800001, 0x24400229, 0x00b10d02, 0x00000000 },
+   { 0x00800001, 0x24600229, 0x00b10d22, 0x00000000 },
+   { 0x00800001, 0x24800229, 0x00b10d42, 0x00000000 },
+   { 0x00800001, 0x24a00229, 0x00b10d62, 0x00000000 },
+   { 0x00800001, 0x24c00229, 0x00b10d82, 0x00000000 },
+   { 0x00800001, 0x24e00229, 0x00b10da2, 0x00000000 },
+   { 0x00800001, 0x25000229, 0x00b10dc2, 0x00000000 },
+   { 0x00800001, 0x25200229, 0x00b10de2, 0x00000000 },
+   { 0x00800001, 0x25400229, 0x00b10e02, 0x00000000 },
+   { 0x00800001, 0x25600229, 0x00b10e22, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+   { 0x00800001, 0x23800229, 0x00b10c43, 0x00000000 },
+   { 0x00800001, 0x23a00229, 0x00b10c63, 0x00000000 },
+   { 0x00800001, 0x23c00229, 0x00b10c83, 0x00000000 },
+   { 0x00800001, 0x23e00229, 0x00b10ca3, 0x00000000 },
+   { 0x00800001, 0x24000229, 0x00b10cc3, 0x00000000 },
+   { 0x00800001, 0x24200229, 0x00b10ce3, 0x00000000 },
+   { 0x00800001, 0x24400229, 0x00b10d03, 0x00000000 },
+   { 0x00800001, 0x24600229, 0x00b10d23, 0x00000000 },
+   { 0x00800001, 0x24800229, 0x00b10d43, 0x00000000 },
+   { 0x00800001, 0x24a00229, 0x00b10d63, 0x00000000 },
+   { 0x00800001, 0x24c00229, 0x00b10d83, 0x00000000 },
+   { 0x00800001, 0x24e00229, 0x00b10da3, 0x00000000 },
+   { 0x00800001, 0x25000229, 0x00b10dc3, 0x00000000 },
+   { 0x00800001, 0x25200229, 0x00b10de3, 0x00000000 },
+   { 0x00800001, 0x25400229, 0x00b10e03, 0x00000000 },
+   { 0x00800001, 0x25600229, 0x00b10e23, 0x00000000 },
+   { 0x00802001, 0x26800021, 0x00b10380, 0x00000000 },
+   { 0x00802001, 0x26c00021, 0x00b103c0, 0x00000000 },
+   { 0x00802001, 0x27000021, 0x00b10400, 0x00000000 },
+   { 0x00802001, 0x27400021, 0x00b10440, 0x00000000 },
+   { 0x00802001, 0x27800021, 0x00b10480, 0x00000000 },
+   { 0x00802001, 0x27c00021, 0x00b104c0, 0x00000000 },
+   { 0x00802001, 0x28000021, 0x00b10500, 0x00000000 },
+   { 0x00802001, 0x28400021, 0x00b10540, 0x00000000 },
+   { 0x0020000c, 0x202e3dad, 0x00450e72, 0x00010001 },
+   { 0x00200040, 0x20403421, 0x00450e60, 0x0045002e },
+   { 0x01000005, 0x20000d3c, 0x00210e72, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000012b },
+   { 0x01000005, 0x20000d3c, 0x00210e74, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x000000de },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000031 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a007 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x00800001, 0x2c000229, 0x00b109c1, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a01, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a41, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a81, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac1, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b01, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b41, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b81, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x00800001, 0x2c000229, 0x00b109c2, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a02, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a42, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a82, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac2, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b02, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b42, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b82, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x00800001, 0x2c000229, 0x00b109c3, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a03, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a43, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a83, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac3, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b03, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b43, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b83, 0x00000000 },
-   { 0x00600001, 0x23800021, 0x008d0c00, 0x00000000 },
-   { 0x00600001, 0x23c00021, 0x008d0c20, 0x00000000 },
-   { 0x00600001, 0x24000021, 0x008d0c40, 0x00000000 },
-   { 0x00600001, 0x24400021, 0x008d0c60, 0x00000000 },
-   { 0x00600001, 0x24800021, 0x008d0c80, 0x00000000 },
-   { 0x00600001, 0x24c00021, 0x008d0ca0, 0x00000000 },
-   { 0x00600001, 0x25000021, 0x008d0cc0, 0x00000000 },
-   { 0x00600001, 0x25400021, 0x008d0ce0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00010001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x02000005, 0x20000c3c, 0x00210054, 0x00000008 },
-   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
-   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000007d },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
+   { 0x00800040, 0x23804629, 0x00b10c40, 0x00b10c41 },
+   { 0x00800040, 0x23a04629, 0x00b10c60, 0x00b10c61 },
+   { 0x00800040, 0x23c04629, 0x00b10c80, 0x00b10c81 },
+   { 0x00800040, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
+   { 0x00800040, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
+   { 0x00800040, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
+   { 0x00800040, 0x24404629, 0x00b10d00, 0x00b10d01 },
+   { 0x00800040, 0x24604629, 0x00b10d20, 0x00b10d21 },
+   { 0x00800040, 0x24804629, 0x00b10d40, 0x00b10d41 },
+   { 0x00800040, 0x24a04629, 0x00b10d60, 0x00b10d61 },
+   { 0x00800040, 0x24c04629, 0x00b10d80, 0x00b10d81 },
+   { 0x00800040, 0x24e04629, 0x00b10da0, 0x00b10da1 },
+   { 0x00800040, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
+   { 0x00800040, 0x25204629, 0x00b10de0, 0x00b10de1 },
+   { 0x00800040, 0x25404629, 0x00b10e00, 0x00b10e01 },
+   { 0x00800040, 0x25604629, 0x00b10e20, 0x00b10e21 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c60 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c80 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca0 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc0 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce0 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d00 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d20 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d40 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d60 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d80 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da0 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc0 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de0 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e00 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e20 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f00 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000092 },
+   { 0x00800040, 0x23804629, 0x00b10c41, 0x00b10c42 },
+   { 0x00800040, 0x23a04629, 0x00b10c61, 0x00b10c62 },
+   { 0x00800040, 0x23c04629, 0x00b10c81, 0x00b10c82 },
+   { 0x00800040, 0x23e04629, 0x00b10ca1, 0x00b10ca2 },
+   { 0x00800040, 0x24004629, 0x00b10cc1, 0x00b10cc2 },
+   { 0x00800040, 0x24204629, 0x00b10ce1, 0x00b10ce2 },
+   { 0x00800040, 0x24404629, 0x00b10d01, 0x00b10d02 },
+   { 0x00800040, 0x24604629, 0x00b10d21, 0x00b10d22 },
+   { 0x00800040, 0x24804629, 0x00b10d41, 0x00b10d42 },
+   { 0x00800040, 0x24a04629, 0x00b10d61, 0x00b10d62 },
+   { 0x00800040, 0x24c04629, 0x00b10d81, 0x00b10d82 },
+   { 0x00800040, 0x24e04629, 0x00b10da1, 0x00b10da2 },
+   { 0x00800040, 0x25004629, 0x00b10dc1, 0x00b10dc2 },
+   { 0x00800040, 0x25204629, 0x00b10de1, 0x00b10de2 },
+   { 0x00800040, 0x25404629, 0x00b10e01, 0x00b10e02 },
+   { 0x00800040, 0x25604629, 0x00b10e21, 0x00b10e22 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c62 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c82 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca2 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc2 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce2 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d02 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d22 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d42 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d62 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d82 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da2 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc2 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de2 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e02 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e22 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f02 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000061 },
+   { 0x00800040, 0x23804629, 0x00b10c42, 0x00b10c43 },
+   { 0x00800040, 0x23a04629, 0x00b10c62, 0x00b10c63 },
+   { 0x00800040, 0x23c04629, 0x00b10c82, 0x00b10c83 },
+   { 0x00800040, 0x23e04629, 0x00b10ca2, 0x00b10ca3 },
+   { 0x00800040, 0x24004629, 0x00b10cc2, 0x00b10cc3 },
+   { 0x00800040, 0x24204629, 0x00b10ce2, 0x00b10ce3 },
+   { 0x00800040, 0x24404629, 0x00b10d02, 0x00b10d03 },
+   { 0x00800040, 0x24604629, 0x00b10d22, 0x00b10d23 },
+   { 0x00800040, 0x24804629, 0x00b10d42, 0x00b10d43 },
+   { 0x00800040, 0x24a04629, 0x00b10d62, 0x00b10d63 },
+   { 0x00800040, 0x24c04629, 0x00b10d82, 0x00b10d83 },
+   { 0x00800040, 0x24e04629, 0x00b10da2, 0x00b10da3 },
+   { 0x00800040, 0x25004629, 0x00b10dc2, 0x00b10dc3 },
+   { 0x00800040, 0x25204629, 0x00b10de2, 0x00b10de3 },
+   { 0x00800040, 0x25404629, 0x00b10e02, 0x00b10e03 },
+   { 0x00800040, 0x25604629, 0x00b10e22, 0x00b10e23 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c62 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c82 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca2 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc2 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce2 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d02 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d22 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d42 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d62 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d82 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da2 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc2 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de2 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e02 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e22 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f02 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c63 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c83 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca3 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc3 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce3 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d03 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d23 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d43 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d63 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d83 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da3 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc3 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de3 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e03 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e23 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f03 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000030 },
+   { 0x00800040, 0x23804629, 0x00b10c43, 0x00b10c44 },
+   { 0x00800040, 0x23a04629, 0x00b10c63, 0x00b10c64 },
+   { 0x00800040, 0x23c04629, 0x00b10c83, 0x00b10c84 },
+   { 0x00800040, 0x23e04629, 0x00b10ca3, 0x00b10ca4 },
+   { 0x00800040, 0x24004629, 0x00b10cc3, 0x00b10cc4 },
+   { 0x00800040, 0x24204629, 0x00b10ce3, 0x00b10ce4 },
+   { 0x00800040, 0x24404629, 0x00b10d03, 0x00b10d04 },
+   { 0x00800040, 0x24604629, 0x00b10d23, 0x00b10d24 },
+   { 0x00800040, 0x24804629, 0x00b10d43, 0x00b10d44 },
+   { 0x00800040, 0x24a04629, 0x00b10d63, 0x00b10d64 },
+   { 0x00800040, 0x24c04629, 0x00b10d83, 0x00b10d84 },
+   { 0x00800040, 0x24e04629, 0x00b10da3, 0x00b10da4 },
+   { 0x00800040, 0x25004629, 0x00b10dc3, 0x00b10dc4 },
+   { 0x00800040, 0x25204629, 0x00b10de3, 0x00b10de4 },
+   { 0x00800040, 0x25404629, 0x00b10e03, 0x00b10e04 },
+   { 0x00800040, 0x25604629, 0x00b10e23, 0x00b10e24 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c63 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c83 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca3 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc3 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce3 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d03 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d23 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d43 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d63 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d83 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da3 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc3 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de3 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e03 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e23 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f03 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c64 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c84 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca4 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc4 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce4 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d04 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d24 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d44 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d64 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d84 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da4 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc4 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de4 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e04 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e24 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f04 },
+   { 0x80800008, 0x23802d29, 0x00b10380, 0x00020002 },
+   { 0x80800008, 0x23a02d29, 0x00b103a0, 0x00020002 },
+   { 0x80800008, 0x23c02d29, 0x00b103c0, 0x00020002 },
+   { 0x80800008, 0x23e02d29, 0x00b103e0, 0x00020002 },
+   { 0x80800008, 0x24002d29, 0x00b10400, 0x00020002 },
+   { 0x80800008, 0x24202d29, 0x00b10420, 0x00020002 },
+   { 0x80800008, 0x24402d29, 0x00b10440, 0x00020002 },
+   { 0x80800008, 0x24602d29, 0x00b10460, 0x00020002 },
+   { 0x80800008, 0x24802d29, 0x00b10480, 0x00020002 },
+   { 0x80800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+   { 0x80800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+   { 0x80800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+   { 0x80800008, 0x25002d29, 0x00b10500, 0x00020002 },
+   { 0x80800008, 0x25202d29, 0x00b10520, 0x00020002 },
+   { 0x80800008, 0x25402d29, 0x00b10540, 0x00020002 },
+   { 0x80800008, 0x25602d29, 0x00b10560, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x000000e5 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
+   { 0x00000041, 0x20581c21, 0x00210058, 0x00000011 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
-   { 0x00800040, 0x2c004629, 0x00b109c1, 0x00b10a01 },
-   { 0x00800040, 0x2c204629, 0x00b10a01, 0x00b10a41 },
-   { 0x00800040, 0x2c404629, 0x00b10a41, 0x00b10a81 },
-   { 0x00800040, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
-   { 0x00800040, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
-   { 0x00800040, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
-   { 0x00800040, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
-   { 0x00800040, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c2 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a02 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a42 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a82 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac2 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b02 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b42 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b82 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a02 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a42 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a82 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac2 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b02 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b42 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b82 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00800040, 0x2c004629, 0x00b109c2, 0x00b10a02 },
-   { 0x00800040, 0x2c204629, 0x00b10a02, 0x00b10a42 },
-   { 0x00800040, 0x2c404629, 0x00b10a42, 0x00b10a82 },
-   { 0x00800040, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
-   { 0x00800040, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
-   { 0x00800040, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
-   { 0x00800040, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
-   { 0x00800040, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c3 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a03 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a43 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a83 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac3 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b03 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b43 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b83 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a03 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a43 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a83 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac3 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b03 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b43 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b83 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
-   { 0x00800040, 0x2c004629, 0x00b109c3, 0x00b10a03 },
-   { 0x00800040, 0x2c204629, 0x00b10a03, 0x00b10a43 },
-   { 0x00800040, 0x2c404629, 0x00b10a43, 0x00b10a83 },
-   { 0x00800040, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
-   { 0x00800040, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
-   { 0x00800040, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
-   { 0x00800040, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
-   { 0x00800040, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c4 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a04 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a44 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a84 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac4 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b04 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b44 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b84 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a04 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a44 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a84 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac4 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b04 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b44 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b84 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc4 },
-   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
-   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
-   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
-   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
-   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
-   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
-   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
-   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
+   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c41 },
+   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c61 },
+   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10c81 },
+   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
+   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
+   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
+   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d01 },
+   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d21 },
+   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d41 },
+   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d61 },
+   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10d81 },
+   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10da1 },
+   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
+   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10de1 },
+   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e01 },
+   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10e21 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
+   { 0x80800042, 0x23804629, 0x00b10c41, 0x00b10c42 },
+   { 0x80800042, 0x23a04629, 0x00b10c61, 0x00b10c62 },
+   { 0x80800042, 0x23c04629, 0x00b10c81, 0x00b10c82 },
+   { 0x80800042, 0x23e04629, 0x00b10ca1, 0x00b10ca2 },
+   { 0x80800042, 0x24004629, 0x00b10cc1, 0x00b10cc2 },
+   { 0x80800042, 0x24204629, 0x00b10ce1, 0x00b10ce2 },
+   { 0x80800042, 0x24404629, 0x00b10d01, 0x00b10d02 },
+   { 0x80800042, 0x24604629, 0x00b10d21, 0x00b10d22 },
+   { 0x80800042, 0x24804629, 0x00b10d41, 0x00b10d42 },
+   { 0x80800042, 0x24a04629, 0x00b10d61, 0x00b10d62 },
+   { 0x80800042, 0x24c04629, 0x00b10d81, 0x00b10d82 },
+   { 0x80800042, 0x24e04629, 0x00b10da1, 0x00b10da2 },
+   { 0x80800042, 0x25004629, 0x00b10dc1, 0x00b10dc2 },
+   { 0x80800042, 0x25204629, 0x00b10de1, 0x00b10de2 },
+   { 0x80800042, 0x25404629, 0x00b10e01, 0x00b10e02 },
+   { 0x80800042, 0x25604629, 0x00b10e21, 0x00b10e22 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
+   { 0x80800042, 0x23804629, 0x00b10c42, 0x00b10c43 },
+   { 0x80800042, 0x23a04629, 0x00b10c62, 0x00b10c63 },
+   { 0x80800042, 0x23c04629, 0x00b10c82, 0x00b10c83 },
+   { 0x80800042, 0x23e04629, 0x00b10ca2, 0x00b10ca3 },
+   { 0x80800042, 0x24004629, 0x00b10cc2, 0x00b10cc3 },
+   { 0x80800042, 0x24204629, 0x00b10ce2, 0x00b10ce3 },
+   { 0x80800042, 0x24404629, 0x00b10d02, 0x00b10d03 },
+   { 0x80800042, 0x24604629, 0x00b10d22, 0x00b10d23 },
+   { 0x80800042, 0x24804629, 0x00b10d42, 0x00b10d43 },
+   { 0x80800042, 0x24a04629, 0x00b10d62, 0x00b10d63 },
+   { 0x80800042, 0x24c04629, 0x00b10d82, 0x00b10d83 },
+   { 0x80800042, 0x24e04629, 0x00b10da2, 0x00b10da3 },
+   { 0x80800042, 0x25004629, 0x00b10dc2, 0x00b10dc3 },
+   { 0x80800042, 0x25204629, 0x00b10de2, 0x00b10de3 },
+   { 0x80800042, 0x25404629, 0x00b10e02, 0x00b10e03 },
+   { 0x80800042, 0x25604629, 0x00b10e22, 0x00b10e23 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+   { 0x80800042, 0x23804629, 0x00b10c43, 0x00b10c44 },
+   { 0x80800042, 0x23a04629, 0x00b10c63, 0x00b10c64 },
+   { 0x80800042, 0x23c04629, 0x00b10c83, 0x00b10c84 },
+   { 0x80800042, 0x23e04629, 0x00b10ca3, 0x00b10ca4 },
+   { 0x80800042, 0x24004629, 0x00b10cc3, 0x00b10cc4 },
+   { 0x80800042, 0x24204629, 0x00b10ce3, 0x00b10ce4 },
+   { 0x80800042, 0x24404629, 0x00b10d03, 0x00b10d04 },
+   { 0x80800042, 0x24604629, 0x00b10d23, 0x00b10d24 },
+   { 0x80800042, 0x24804629, 0x00b10d43, 0x00b10d44 },
+   { 0x80800042, 0x24a04629, 0x00b10d63, 0x00b10d64 },
+   { 0x80800042, 0x24c04629, 0x00b10d83, 0x00b10d84 },
+   { 0x80800042, 0x24e04629, 0x00b10da3, 0x00b10da4 },
+   { 0x80800042, 0x25004629, 0x00b10dc3, 0x00b10dc4 },
+   { 0x80800042, 0x25204629, 0x00b10de3, 0x00b10de4 },
+   { 0x80800042, 0x25404629, 0x00b10e03, 0x00b10e04 },
+   { 0x80800042, 0x25604629, 0x00b10e23, 0x00b10e24 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000009a },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b109c2 },
-   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a02 },
-   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a42 },
-   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10a82 },
-   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10ac2 },
-   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b02 },
-   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b42 },
-   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10b82 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b109c3 },
-   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a03 },
-   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a43 },
-   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10a83 },
-   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10ac3 },
-   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b03 },
-   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b43 },
-   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10b83 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b109c4 },
-   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a04 },
-   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a44 },
-   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10a84 },
-   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10ac4 },
-   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b04 },
-   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b44 },
-   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10b84 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000068 },
-   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000035 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x01000005, 0x20000d3c, 0x00210e74, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000004e },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000011 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a007 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x2c004629, 0x00b109c1, 0x00b10a01 },
-   { 0x80800042, 0x2c204629, 0x00b10a01, 0x00b10a41 },
-   { 0x80800042, 0x2c404629, 0x00b10a41, 0x00b10a81 },
-   { 0x80800042, 0x2c604629, 0x00b10a81, 0x00b10ac1 },
-   { 0x80800042, 0x2c804629, 0x00b10ac1, 0x00b10b01 },
-   { 0x80800042, 0x2ca04629, 0x00b10b01, 0x00b10b41 },
-   { 0x80800042, 0x2cc04629, 0x00b10b41, 0x00b10b81 },
-   { 0x80800042, 0x2ce04629, 0x00b10b81, 0x00b10bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x2c004629, 0x00b109c2, 0x00b10a02 },
-   { 0x80800042, 0x2c204629, 0x00b10a02, 0x00b10a42 },
-   { 0x80800042, 0x2c404629, 0x00b10a42, 0x00b10a82 },
-   { 0x80800042, 0x2c604629, 0x00b10a82, 0x00b10ac2 },
-   { 0x80800042, 0x2c804629, 0x00b10ac2, 0x00b10b02 },
-   { 0x80800042, 0x2ca04629, 0x00b10b02, 0x00b10b42 },
-   { 0x80800042, 0x2cc04629, 0x00b10b42, 0x00b10b82 },
-   { 0x80800042, 0x2ce04629, 0x00b10b82, 0x00b10bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x2c004629, 0x00b109c3, 0x00b10a03 },
-   { 0x80800042, 0x2c204629, 0x00b10a03, 0x00b10a43 },
-   { 0x80800042, 0x2c404629, 0x00b10a43, 0x00b10a83 },
-   { 0x80800042, 0x2c604629, 0x00b10a83, 0x00b10ac3 },
-   { 0x80800042, 0x2c804629, 0x00b10ac3, 0x00b10b03 },
-   { 0x80800042, 0x2ca04629, 0x00b10b03, 0x00b10b43 },
-   { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b83 },
-   { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x00800001, 0x2c000229, 0x00b109c1, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a01, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a41, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a81, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac1, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b01, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b41, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b81, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x00800001, 0x2c000229, 0x00b109c2, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a02, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a42, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a82, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac2, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b02, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b42, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b82, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x00800001, 0x2c000229, 0x00b109c3, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a03, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a43, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a83, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac3, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b03, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b43, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b83, 0x00000000 },
-   { 0x80800042, 0x23802529, 0x00b10680, 0x00b10380 },
-   { 0x80800042, 0x23a02529, 0x00b106a0, 0x00b10c00 },
-   { 0x80800042, 0x23c02529, 0x00b106c0, 0x00b103c0 },
-   { 0x80800042, 0x23e02529, 0x00b106e0, 0x00b10c20 },
-   { 0x80800042, 0x24002529, 0x00b10700, 0x00b10400 },
-   { 0x80800042, 0x24202529, 0x00b10720, 0x00b10c40 },
-   { 0x80800042, 0x24402529, 0x00b10740, 0x00b10440 },
-   { 0x80800042, 0x24602529, 0x00b10760, 0x00b10c60 },
-   { 0x80800042, 0x24802529, 0x00b10780, 0x00b10480 },
-   { 0x80800042, 0x24a02529, 0x00b107a0, 0x00b10c80 },
-   { 0x80800042, 0x24c02529, 0x00b107c0, 0x00b104c0 },
-   { 0x80800042, 0x24e02529, 0x00b107e0, 0x00b10ca0 },
-   { 0x80800042, 0x25002529, 0x00b10800, 0x00b10500 },
-   { 0x80800042, 0x25202529, 0x00b10820, 0x00b10cc0 },
-   { 0x80800042, 0x25402529, 0x00b10840, 0x00b10540 },
-   { 0x80800042, 0x25602529, 0x00b10860, 0x00b10ce0 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00020002 },
-   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
-   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210032, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000076 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
-   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
-   { 0x00800040, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
-   { 0x00800040, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
-   { 0x00800040, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac2 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae2 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b02 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b22 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae2 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b02 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b22 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b42 },
-   { 0x00800040, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
-   { 0x00800040, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b62 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b82 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba2 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc2 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b82 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba2 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc2 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
-   { 0x00800040, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
-   { 0x00800040, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac3 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae3 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b03 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b23 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae3 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b03 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b23 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b43 },
-   { 0x00800040, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
-   { 0x00800040, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b63 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b83 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba3 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc3 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b83 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba3 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc3 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac3, 0x00ad0ae3 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae3, 0x00ad0b03 },
-   { 0x00800040, 0x2a004629, 0x00ad0b03, 0x00ad0b23 },
-   { 0x00800040, 0x2a204629, 0x00ad0b23, 0x00ad0b43 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac4 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae4 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b04 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b24 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae4 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b04 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b24 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b44 },
-   { 0x00800040, 0x2a404629, 0x00ad0b63, 0x00ad0b83 },
-   { 0x00800040, 0x2a604629, 0x00ad0b83, 0x00ad0ba3 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba3, 0x00ad0bc3 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc3, 0x00ad0be3 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b64 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b84 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba4 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc4 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b84 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba4 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc4 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be4 },
-   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
-   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
-   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
-   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
-   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
-   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
-   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
-   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000082 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ac2 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0ae2 },
-   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b02 },
-   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b22 },
-   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b62 },
-   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0b82 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0ba2 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ac3 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0ae3 },
-   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b03 },
-   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b23 },
-   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b63 },
-   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0b83 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0ba3 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac4 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae4 },
-   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b04 },
-   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b24 },
-   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b64 },
-   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b84 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba4 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc4 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000058 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002d },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
-   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
-   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
-   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
-   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
-   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
-   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
-   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
-   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac3 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae3 },
-   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b03 },
-   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b23 },
-   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b63 },
-   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b83 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba3 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x00800001, 0x29c00229, 0x00ad0ac1, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae1, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b01, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b21, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b61, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b81, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba1, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc1, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac2, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae2, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b02, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b22, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b62, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b82, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba2, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc2, 0x00000000 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac3, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae3, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b03, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b23, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b63, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b83, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba3, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc3, 0x00000000 },
-   { 0x00600001, 0x25800129, 0x008d09c0, 0x00000000 },
-   { 0x00600001, 0x25a00129, 0x008d09e0, 0x00000000 },
-   { 0x00600001, 0x25c00129, 0x008d0a00, 0x00000000 },
-   { 0x00600001, 0x25e00129, 0x008d0a20, 0x00000000 },
-   { 0x00600001, 0x26000129, 0x008d0a40, 0x00000000 },
-   { 0x00600001, 0x26200129, 0x008d0a60, 0x00000000 },
-   { 0x00600001, 0x26400129, 0x008d0a80, 0x00000000 },
-   { 0x00600001, 0x26600129, 0x008d0aa0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00020002 },
-   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00080008 },
-   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
-   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000076 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
-   { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
-   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
+   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c60 },
+   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c80 },
+   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10ca0 },
+   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10cc0 },
+   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10ce0 },
+   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10d00 },
+   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d20 },
+   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d40 },
+   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d60 },
+   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d80 },
+   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10da0 },
+   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10dc0 },
+   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10de0 },
+   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10e00 },
+   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e20 },
+   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10f00 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
+   { 0x80800042, 0x23804629, 0x00b10c41, 0x00b10c61 },
+   { 0x80800042, 0x23a04629, 0x00b10c61, 0x00b10c81 },
+   { 0x80800042, 0x23c04629, 0x00b10c81, 0x00b10ca1 },
+   { 0x80800042, 0x23e04629, 0x00b10ca1, 0x00b10cc1 },
+   { 0x80800042, 0x24004629, 0x00b10cc1, 0x00b10ce1 },
+   { 0x80800042, 0x24204629, 0x00b10ce1, 0x00b10d01 },
+   { 0x80800042, 0x24404629, 0x00b10d01, 0x00b10d21 },
+   { 0x80800042, 0x24604629, 0x00b10d21, 0x00b10d41 },
+   { 0x80800042, 0x24804629, 0x00b10d41, 0x00b10d61 },
+   { 0x80800042, 0x24a04629, 0x00b10d61, 0x00b10d81 },
+   { 0x80800042, 0x24c04629, 0x00b10d81, 0x00b10da1 },
+   { 0x80800042, 0x24e04629, 0x00b10da1, 0x00b10dc1 },
+   { 0x80800042, 0x25004629, 0x00b10dc1, 0x00b10de1 },
+   { 0x80800042, 0x25204629, 0x00b10de1, 0x00b10e01 },
+   { 0x80800042, 0x25404629, 0x00b10e01, 0x00b10e21 },
+   { 0x80800042, 0x25604629, 0x00b10e21, 0x00b10f01 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
+   { 0x80800042, 0x23804629, 0x00b10c42, 0x00b10c62 },
+   { 0x80800042, 0x23a04629, 0x00b10c62, 0x00b10c82 },
+   { 0x80800042, 0x23c04629, 0x00b10c82, 0x00b10ca2 },
+   { 0x80800042, 0x23e04629, 0x00b10ca2, 0x00b10cc2 },
+   { 0x80800042, 0x24004629, 0x00b10cc2, 0x00b10ce2 },
+   { 0x80800042, 0x24204629, 0x00b10ce2, 0x00b10d02 },
+   { 0x80800042, 0x24404629, 0x00b10d02, 0x00b10d22 },
+   { 0x80800042, 0x24604629, 0x00b10d22, 0x00b10d42 },
+   { 0x80800042, 0x24804629, 0x00b10d42, 0x00b10d62 },
+   { 0x80800042, 0x24a04629, 0x00b10d62, 0x00b10d82 },
+   { 0x80800042, 0x24c04629, 0x00b10d82, 0x00b10da2 },
+   { 0x80800042, 0x24e04629, 0x00b10da2, 0x00b10dc2 },
+   { 0x80800042, 0x25004629, 0x00b10dc2, 0x00b10de2 },
+   { 0x80800042, 0x25204629, 0x00b10de2, 0x00b10e02 },
+   { 0x80800042, 0x25404629, 0x00b10e02, 0x00b10e22 },
+   { 0x80800042, 0x25604629, 0x00b10e22, 0x00b10f02 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+   { 0x80800042, 0x23804629, 0x00b10c43, 0x00b10c63 },
+   { 0x80800042, 0x23a04629, 0x00b10c63, 0x00b10c83 },
+   { 0x80800042, 0x23c04629, 0x00b10c83, 0x00b10ca3 },
+   { 0x80800042, 0x23e04629, 0x00b10ca3, 0x00b10cc3 },
+   { 0x80800042, 0x24004629, 0x00b10cc3, 0x00b10ce3 },
+   { 0x80800042, 0x24204629, 0x00b10ce3, 0x00b10d03 },
+   { 0x80800042, 0x24404629, 0x00b10d03, 0x00b10d23 },
+   { 0x80800042, 0x24604629, 0x00b10d23, 0x00b10d43 },
+   { 0x80800042, 0x24804629, 0x00b10d43, 0x00b10d63 },
+   { 0x80800042, 0x24a04629, 0x00b10d63, 0x00b10d83 },
+   { 0x80800042, 0x24c04629, 0x00b10d83, 0x00b10da3 },
+   { 0x80800042, 0x24e04629, 0x00b10da3, 0x00b10dc3 },
+   { 0x80800042, 0x25004629, 0x00b10dc3, 0x00b10de3 },
+   { 0x80800042, 0x25204629, 0x00b10de3, 0x00b10e03 },
+   { 0x80800042, 0x25404629, 0x00b10e03, 0x00b10e23 },
+   { 0x80800042, 0x25604629, 0x00b10e23, 0x00b10f03 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000004a },
-   { 0x00800040, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
-   { 0x00800040, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
-   { 0x00800040, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac2 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae2 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b02 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b22 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae2 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b02 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b22 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b42 },
-   { 0x00800040, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
-   { 0x00800040, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b62 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b82 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba2 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc2 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b82 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba2 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc2 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
-   { 0x00800040, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
-   { 0x00800040, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac3 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae3 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b03 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b23 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae3 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b03 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b23 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b43 },
-   { 0x00800040, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
-   { 0x00800040, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b63 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b83 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba3 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc3 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b83 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba3 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc3 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac3, 0x00ad0ae3 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae3, 0x00ad0b03 },
-   { 0x00800040, 0x2a004629, 0x00ad0b03, 0x00ad0b23 },
-   { 0x00800040, 0x2a204629, 0x00ad0b23, 0x00ad0b43 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac4 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae4 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b04 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b24 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae4 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b04 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b24 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b44 },
-   { 0x00800040, 0x2a404629, 0x00ad0b63, 0x00ad0b83 },
-   { 0x00800040, 0x2a604629, 0x00ad0b83, 0x00ad0ba3 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba3, 0x00ad0bc3 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc3, 0x00ad0be3 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b64 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b84 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba4 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc4 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b84 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba4 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc4 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be4 },
-   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
-   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
-   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
-   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
-   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
-   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
-   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
-   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000082 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
-   { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
+   { 0x00000041, 0x20580c21, 0x00210058, 0x00000011 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ac2 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0ae2 },
-   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b02 },
-   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b22 },
-   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b62 },
-   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0b82 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0ba2 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0bc2 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ac3 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0ae3 },
-   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b03 },
-   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b23 },
-   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b63 },
-   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0b83 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0ba3 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac4 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae4 },
-   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b04 },
-   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b24 },
-   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b64 },
-   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b84 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba4 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc4 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000058 },
-   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002d },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00800001, 0x23800229, 0x00b10c40, 0x00000000 },
+   { 0x00800001, 0x23a00229, 0x00b10c60, 0x00000000 },
+   { 0x00800001, 0x23c00229, 0x00b10c80, 0x00000000 },
+   { 0x00800001, 0x23e00229, 0x00b10ca0, 0x00000000 },
+   { 0x00800001, 0x24000229, 0x00b10cc0, 0x00000000 },
+   { 0x00800001, 0x24200229, 0x00b10ce0, 0x00000000 },
+   { 0x00800001, 0x24400229, 0x00b10d00, 0x00000000 },
+   { 0x00800001, 0x24600229, 0x00b10d20, 0x00000000 },
+   { 0x00800001, 0x24800229, 0x00b10d40, 0x00000000 },
+   { 0x00800001, 0x24a00229, 0x00b10d60, 0x00000000 },
+   { 0x00800001, 0x24c00229, 0x00b10d80, 0x00000000 },
+   { 0x00800001, 0x24e00229, 0x00b10da0, 0x00000000 },
+   { 0x00800001, 0x25000229, 0x00b10dc0, 0x00000000 },
+   { 0x00800001, 0x25200229, 0x00b10de0, 0x00000000 },
+   { 0x00800001, 0x25400229, 0x00b10e00, 0x00000000 },
+   { 0x00800001, 0x25600229, 0x00b10e20, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000032 },
+   { 0x00800001, 0x23800229, 0x00b10c41, 0x00000000 },
+   { 0x00800001, 0x23a00229, 0x00b10c61, 0x00000000 },
+   { 0x00800001, 0x23c00229, 0x00b10c81, 0x00000000 },
+   { 0x00800001, 0x23e00229, 0x00b10ca1, 0x00000000 },
+   { 0x00800001, 0x24000229, 0x00b10cc1, 0x00000000 },
+   { 0x00800001, 0x24200229, 0x00b10ce1, 0x00000000 },
+   { 0x00800001, 0x24400229, 0x00b10d01, 0x00000000 },
+   { 0x00800001, 0x24600229, 0x00b10d21, 0x00000000 },
+   { 0x00800001, 0x24800229, 0x00b10d41, 0x00000000 },
+   { 0x00800001, 0x24a00229, 0x00b10d61, 0x00000000 },
+   { 0x00800001, 0x24c00229, 0x00b10d81, 0x00000000 },
+   { 0x00800001, 0x24e00229, 0x00b10da1, 0x00000000 },
+   { 0x00800001, 0x25000229, 0x00b10dc1, 0x00000000 },
+   { 0x00800001, 0x25200229, 0x00b10de1, 0x00000000 },
+   { 0x00800001, 0x25400229, 0x00b10e01, 0x00000000 },
+   { 0x00800001, 0x25600229, 0x00b10e21, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000021 },
+   { 0x00800001, 0x23800229, 0x00b10c42, 0x00000000 },
+   { 0x00800001, 0x23a00229, 0x00b10c62, 0x00000000 },
+   { 0x00800001, 0x23c00229, 0x00b10c82, 0x00000000 },
+   { 0x00800001, 0x23e00229, 0x00b10ca2, 0x00000000 },
+   { 0x00800001, 0x24000229, 0x00b10cc2, 0x00000000 },
+   { 0x00800001, 0x24200229, 0x00b10ce2, 0x00000000 },
+   { 0x00800001, 0x24400229, 0x00b10d02, 0x00000000 },
+   { 0x00800001, 0x24600229, 0x00b10d22, 0x00000000 },
+   { 0x00800001, 0x24800229, 0x00b10d42, 0x00000000 },
+   { 0x00800001, 0x24a00229, 0x00b10d62, 0x00000000 },
+   { 0x00800001, 0x24c00229, 0x00b10d82, 0x00000000 },
+   { 0x00800001, 0x24e00229, 0x00b10da2, 0x00000000 },
+   { 0x00800001, 0x25000229, 0x00b10dc2, 0x00000000 },
+   { 0x00800001, 0x25200229, 0x00b10de2, 0x00000000 },
+   { 0x00800001, 0x25400229, 0x00b10e02, 0x00000000 },
+   { 0x00800001, 0x25600229, 0x00b10e22, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+   { 0x00800001, 0x23800229, 0x00b10c43, 0x00000000 },
+   { 0x00800001, 0x23a00229, 0x00b10c63, 0x00000000 },
+   { 0x00800001, 0x23c00229, 0x00b10c83, 0x00000000 },
+   { 0x00800001, 0x23e00229, 0x00b10ca3, 0x00000000 },
+   { 0x00800001, 0x24000229, 0x00b10cc3, 0x00000000 },
+   { 0x00800001, 0x24200229, 0x00b10ce3, 0x00000000 },
+   { 0x00800001, 0x24400229, 0x00b10d03, 0x00000000 },
+   { 0x00800001, 0x24600229, 0x00b10d23, 0x00000000 },
+   { 0x00800001, 0x24800229, 0x00b10d43, 0x00000000 },
+   { 0x00800001, 0x24a00229, 0x00b10d63, 0x00000000 },
+   { 0x00800001, 0x24c00229, 0x00b10d83, 0x00000000 },
+   { 0x00800001, 0x24e00229, 0x00b10da3, 0x00000000 },
+   { 0x00800001, 0x25000229, 0x00b10dc3, 0x00000000 },
+   { 0x00800001, 0x25200229, 0x00b10de3, 0x00000000 },
+   { 0x00800001, 0x25400229, 0x00b10e03, 0x00000000 },
+   { 0x00800001, 0x25600229, 0x00b10e23, 0x00000000 },
+   { 0x80800042, 0x23802529, 0x00b10380, 0x00b10680 },
+   { 0x80800042, 0x23a02529, 0x00b103a0, 0x00b106a0 },
+   { 0x80800042, 0x23c02529, 0x00b103c0, 0x00b106c0 },
+   { 0x80800042, 0x23e02529, 0x00b103e0, 0x00b106e0 },
+   { 0x80800042, 0x24002529, 0x00b10400, 0x00b10700 },
+   { 0x80800042, 0x24202529, 0x00b10420, 0x00b10720 },
+   { 0x80800042, 0x24402529, 0x00b10440, 0x00b10740 },
+   { 0x80800042, 0x24602529, 0x00b10460, 0x00b10760 },
+   { 0x80800042, 0x24802529, 0x00b10480, 0x00b10780 },
+   { 0x80800042, 0x24a02529, 0x00b104a0, 0x00b107a0 },
+   { 0x80800042, 0x24c02529, 0x00b104c0, 0x00b107c0 },
+   { 0x80800042, 0x24e02529, 0x00b104e0, 0x00b107e0 },
+   { 0x80800042, 0x25002529, 0x00b10500, 0x00b10800 },
+   { 0x80800042, 0x25202529, 0x00b10520, 0x00b10820 },
+   { 0x80800042, 0x25402529, 0x00b10540, 0x00b10840 },
+   { 0x80800042, 0x25602529, 0x00b10560, 0x00b10860 },
+   { 0x00200008, 0x20200c21, 0x00450e60, 0x00000001 },
+   { 0x0020000c, 0x2e6e3dad, 0x00450e6e, 0x00010001 },
+   { 0x0020000c, 0x202e3dad, 0x00450e6e, 0x00010001 },
+   { 0x00200040, 0x20403421, 0x00450020, 0x0045002e },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007000f },
+   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
+   { 0x00800031, 0x2ac01d29, 0x008d0040, 0x0414a005 },
+   { 0x00800031, 0x2b401d29, 0x008d0040, 0x0414a006 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
+   { 0x00800001, 0x25800229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x25a00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x25c00229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x25e00229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x26000229, 0x00ad0b40, 0x00000000 },
+   { 0x00800001, 0x26200229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x26400229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x26600229, 0x00ad0ba0, 0x00000000 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x80800042, 0x29c04629, 0x00ad0ac1, 0x00ad0ae1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae1, 0x00ad0b01 },
-   { 0x80800042, 0x2a004629, 0x00ad0b01, 0x00ad0b21 },
-   { 0x80800042, 0x2a204629, 0x00ad0b21, 0x00ad0b41 },
-   { 0x80800042, 0x2a404629, 0x00ad0b61, 0x00ad0b81 },
-   { 0x80800042, 0x2a604629, 0x00ad0b81, 0x00ad0ba1 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba1, 0x00ad0bc1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc1, 0x00ad0be1 },
+   { 0x00800001, 0x25800229, 0x00ad0ac1, 0x00000000 },
+   { 0x00800001, 0x25a00229, 0x00ad0ae1, 0x00000000 },
+   { 0x00800001, 0x25c00229, 0x00ad0b01, 0x00000000 },
+   { 0x00800001, 0x25e00229, 0x00ad0b21, 0x00000000 },
+   { 0x00800001, 0x26000229, 0x00ad0b41, 0x00000000 },
+   { 0x00800001, 0x26200229, 0x00ad0b61, 0x00000000 },
+   { 0x00800001, 0x26400229, 0x00ad0b81, 0x00000000 },
+   { 0x00800001, 0x26600229, 0x00ad0ba1, 0x00000000 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac2, 0x00ad0ae2 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae2, 0x00ad0b02 },
-   { 0x80800042, 0x2a004629, 0x00ad0b02, 0x00ad0b22 },
-   { 0x80800042, 0x2a204629, 0x00ad0b22, 0x00ad0b42 },
-   { 0x80800042, 0x2a404629, 0x00ad0b62, 0x00ad0b82 },
-   { 0x80800042, 0x2a604629, 0x00ad0b82, 0x00ad0ba2 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba2, 0x00ad0bc2 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc2, 0x00ad0be2 },
+   { 0x00800001, 0x25800229, 0x00ad0ac2, 0x00000000 },
+   { 0x00800001, 0x25a00229, 0x00ad0ae2, 0x00000000 },
+   { 0x00800001, 0x25c00229, 0x00ad0b02, 0x00000000 },
+   { 0x00800001, 0x25e00229, 0x00ad0b22, 0x00000000 },
+   { 0x00800001, 0x26000229, 0x00ad0b42, 0x00000000 },
+   { 0x00800001, 0x26200229, 0x00ad0b62, 0x00000000 },
+   { 0x00800001, 0x26400229, 0x00ad0b82, 0x00000000 },
+   { 0x00800001, 0x26600229, 0x00ad0ba2, 0x00000000 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac3, 0x00ad0ac3 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae3, 0x00ad0ae3 },
-   { 0x80800042, 0x2a004629, 0x00ad0b03, 0x00ad0b03 },
-   { 0x80800042, 0x2a204629, 0x00ad0b23, 0x00ad0b23 },
-   { 0x80800042, 0x2a404629, 0x00ad0b63, 0x00ad0b63 },
-   { 0x80800042, 0x2a604629, 0x00ad0b83, 0x00ad0b83 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba3 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc3 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
+   { 0x00800001, 0x25800229, 0x00ad0ac3, 0x00000000 },
+   { 0x00800001, 0x25a00229, 0x00ad0ae3, 0x00000000 },
+   { 0x00800001, 0x25c00229, 0x00ad0b03, 0x00000000 },
+   { 0x00800001, 0x25e00229, 0x00ad0b23, 0x00000000 },
+   { 0x00800001, 0x26000229, 0x00ad0b43, 0x00000000 },
+   { 0x00800001, 0x26200229, 0x00ad0b63, 0x00000000 },
+   { 0x00800001, 0x26400229, 0x00ad0b83, 0x00000000 },
+   { 0x00800001, 0x26600229, 0x00ad0ba3, 0x00000000 },
+   { 0x00800001, 0x2f400231, 0x00b20580, 0x00000000 },
+   { 0x00800001, 0x2f500231, 0x00b205a0, 0x00000000 },
+   { 0x00800001, 0x2f600231, 0x00b205c0, 0x00000000 },
+   { 0x00800001, 0x2f700231, 0x00b205e0, 0x00000000 },
+   { 0x00800001, 0x2f800231, 0x00b20600, 0x00000000 },
+   { 0x00800001, 0x2f900231, 0x00b20620, 0x00000000 },
+   { 0x00800001, 0x2fa00231, 0x00b20640, 0x00000000 },
+   { 0x00800001, 0x2fb00231, 0x00b20660, 0x00000000 },
+   { 0x0020000c, 0x2e723dad, 0x00450e72, 0x00010001 },
+   { 0x0020000c, 0x202e3dad, 0x00450e72, 0x00010001 },
+   { 0x00200040, 0x20403421, 0x00450020, 0x0045002e },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007000f },
+   { 0x00000005, 0x20580c21, 0x00210040, 0x00000003 },
+   { 0x00800031, 0x2ac01d29, 0x008d0040, 0x0414a008 },
+   { 0x00800031, 0x2b401d29, 0x008d0040, 0x0414a009 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
+   { 0x00800001, 0x25800229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x25a00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x25c00229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x25e00229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x26000229, 0x00ad0b40, 0x00000000 },
+   { 0x00800001, 0x26200229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x26400229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x26600229, 0x00ad0ba0, 0x00000000 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
-   { 0x00800001, 0x29c00229, 0x00ad0ac1, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae1, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b01, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b21, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b61, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b81, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba1, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc1, 0x00000000 },
+   { 0x00800001, 0x25800229, 0x00ad0ac1, 0x00000000 },
+   { 0x00800001, 0x25a00229, 0x00ad0ae1, 0x00000000 },
+   { 0x00800001, 0x25c00229, 0x00ad0b01, 0x00000000 },
+   { 0x00800001, 0x25e00229, 0x00ad0b21, 0x00000000 },
+   { 0x00800001, 0x26000229, 0x00ad0b41, 0x00000000 },
+   { 0x00800001, 0x26200229, 0x00ad0b61, 0x00000000 },
+   { 0x00800001, 0x26400229, 0x00ad0b81, 0x00000000 },
+   { 0x00800001, 0x26600229, 0x00ad0ba1, 0x00000000 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000011 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac2, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae2, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b02, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b22, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b62, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b82, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba2, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc2, 0x00000000 },
+   { 0x00800001, 0x25800229, 0x00ad0ac2, 0x00000000 },
+   { 0x00800001, 0x25a00229, 0x00ad0ae2, 0x00000000 },
+   { 0x00800001, 0x25c00229, 0x00ad0b02, 0x00000000 },
+   { 0x00800001, 0x25e00229, 0x00ad0b22, 0x00000000 },
+   { 0x00800001, 0x26000229, 0x00ad0b42, 0x00000000 },
+   { 0x00800001, 0x26200229, 0x00ad0b62, 0x00000000 },
+   { 0x00800001, 0x26400229, 0x00ad0b82, 0x00000000 },
+   { 0x00800001, 0x26600229, 0x00ad0ba2, 0x00000000 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000008 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac3, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae3, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b03, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b23, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b63, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b83, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba3, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc3, 0x00000000 },
-   { 0x00600001, 0x25900129, 0x008d09c0, 0x00000000 },
-   { 0x00600001, 0x25b00129, 0x008d09e0, 0x00000000 },
-   { 0x00600001, 0x25d00129, 0x008d0a00, 0x00000000 },
-   { 0x00600001, 0x25f00129, 0x008d0a20, 0x00000000 },
-   { 0x00600001, 0x26100129, 0x008d0a40, 0x00000000 },
-   { 0x00600001, 0x26300129, 0x008d0a60, 0x00000000 },
-   { 0x00600001, 0x26500129, 0x008d0a80, 0x00000000 },
-   { 0x00600001, 0x26700129, 0x008d0aa0, 0x00000000 },
-   { 0x80800042, 0x25802529, 0x00b10880, 0x00b10580 },
-   { 0x80800042, 0x25a02529, 0x00b108a0, 0x00b105a0 },
-   { 0x80800042, 0x25c02529, 0x00b108c0, 0x00b105c0 },
-   { 0x80800042, 0x25e02529, 0x00b108e0, 0x00b105e0 },
-   { 0x80800042, 0x26002529, 0x00b10900, 0x00b10600 },
-   { 0x80800042, 0x26202529, 0x00b10920, 0x00b10620 },
-   { 0x80800042, 0x26402529, 0x00b10940, 0x00b10640 },
-   { 0x80800042, 0x26602529, 0x00b10960, 0x00b10660 },
+   { 0x00800001, 0x25800229, 0x00ad0ac3, 0x00000000 },
+   { 0x00800001, 0x25a00229, 0x00ad0ae3, 0x00000000 },
+   { 0x00800001, 0x25c00229, 0x00ad0b03, 0x00000000 },
+   { 0x00800001, 0x25e00229, 0x00ad0b23, 0x00000000 },
+   { 0x00800001, 0x26000229, 0x00ad0b43, 0x00000000 },
+   { 0x00800001, 0x26200229, 0x00ad0b63, 0x00000000 },
+   { 0x00800001, 0x26400229, 0x00ad0b83, 0x00000000 },
+   { 0x00800001, 0x26600229, 0x00ad0ba3, 0x00000000 },
+   { 0x80800042, 0x25804529, 0x00b10580, 0x00b10f40 },
+   { 0x80800042, 0x25a04529, 0x00b105a0, 0x00b10f50 },
+   { 0x80800042, 0x25c04529, 0x00b105c0, 0x00b10f60 },
+   { 0x80800042, 0x25e04529, 0x00b105e0, 0x00b10f70 },
+   { 0x80800042, 0x26004529, 0x00b10600, 0x00b10f80 },
+   { 0x80800042, 0x26204529, 0x00b10620, 0x00b10f90 },
+   { 0x80800042, 0x26404529, 0x00b10640, 0x00b10fa0 },
+   { 0x80800042, 0x26604529, 0x00b10660, 0x00b10fb0 },
    { 0x00600001, 0x20200021, 0x008d0980, 0x00000000 },
    { 0x00800001, 0x458101f1, 0x00000000, 0x00000000 },
    { 0x00800001, 0x45a101f1, 0x00000000, 0x00000000 },
@@ -2484,3 +1254,4 @@
    { 0x00800001, 0x20500232, 0x00b20660, 0x00000000 },
    { 0x00800031, 0x24001d28, 0x008d0020, 0x05302002 },
    { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
+   { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/src/xvmc/dual_prime_igd.g4b b/src/xvmc/dual_prime_igd.g4b
index 6477d06..f838d7b 100644
--- a/src/xvmc/dual_prime_igd.g4b
+++ b/src/xvmc/dual_prime_igd.g4b
@@ -102,937 +102,367 @@
    { 0x00800001, 0x23200169, 0x00000000, 0x00000000 },
    { 0x00800001, 0x23400169, 0x00000000, 0x00000000 },
    { 0x00600001, 0x2e600021, 0x008d0020, 0x00000000 },
-   { 0x00600001, 0x2e800021, 0x008d0020, 0x00000000 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x0020000c, 0x2e6e3dad, 0x0045002e, 0x00010001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
-   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x0021002e, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
-   { 0x01000005, 0x20002d3c, 0x00210030, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
-   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
-   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
-   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
-   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
-   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
-   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
-   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
-   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
-   { 0x01000005, 0x20002d3c, 0x00210030, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
-   { 0x00600001, 0x26800021, 0x008d0c00, 0x00000000 },
-   { 0x00600001, 0x26c00021, 0x008d0c20, 0x00000000 },
-   { 0x00600001, 0x27000021, 0x008d0c40, 0x00000000 },
-   { 0x00600001, 0x27400021, 0x008d0c60, 0x00000000 },
-   { 0x00600001, 0x27800021, 0x008d0c80, 0x00000000 },
-   { 0x00600001, 0x27c00021, 0x008d0ca0, 0x00000000 },
-   { 0x00600001, 0x28000021, 0x008d0cc0, 0x00000000 },
-   { 0x00600001, 0x28400021, 0x008d0ce0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00010001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x02000005, 0x20000e3c, 0x0021003f, 0x00000004 },
-   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210036, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
-   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
-   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
-   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
-   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
-   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
-   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
-   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
-   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
-   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
-   { 0x00600001, 0x26a00021, 0x008d0c00, 0x00000000 },
-   { 0x00600001, 0x26e00021, 0x008d0c20, 0x00000000 },
-   { 0x00600001, 0x27200021, 0x008d0c40, 0x00000000 },
-   { 0x00600001, 0x27600021, 0x008d0c60, 0x00000000 },
-   { 0x00600001, 0x27a00021, 0x008d0c80, 0x00000000 },
-   { 0x00600001, 0x27e00021, 0x008d0ca0, 0x00000000 },
-   { 0x00600001, 0x28200021, 0x008d0cc0, 0x00000000 },
-   { 0x00600001, 0x28600021, 0x008d0ce0, 0x00000000 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x0020000c, 0x2e6e3dad, 0x0045002e, 0x00020002 },
-   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
-   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x0021002e, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
-   { 0x01000005, 0x20002d3c, 0x00210030, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000028 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
-   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
-   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
-   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
-   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
-   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
-   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
-   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
-   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
-   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000028 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001c },
-   { 0x01000005, 0x20002d3c, 0x00210030, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000f },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
-   { 0x00600001, 0x28800129, 0x008d09c0, 0x00000000 },
-   { 0x00600001, 0x28a00129, 0x008d09e0, 0x00000000 },
-   { 0x00600001, 0x28c00129, 0x008d0a00, 0x00000000 },
-   { 0x00600001, 0x28e00129, 0x008d0a20, 0x00000000 },
-   { 0x00600001, 0x29000129, 0x008d0a40, 0x00000000 },
-   { 0x00600001, 0x29200129, 0x008d0a60, 0x00000000 },
-   { 0x00600001, 0x29400129, 0x008d0a80, 0x00000000 },
-   { 0x00600001, 0x29600129, 0x008d0aa0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00020002 },
-   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00040004 },
-   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
-   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000028 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
-   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
-   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
-   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
-   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
-   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
-   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
-   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
-   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
-   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000028 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001c },
-   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000f },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
-   { 0x00600001, 0x28900129, 0x008d09c0, 0x00000000 },
-   { 0x00600001, 0x28b00129, 0x008d09e0, 0x00000000 },
-   { 0x00600001, 0x28d00129, 0x008d0a00, 0x00000000 },
-   { 0x00600001, 0x28f00129, 0x008d0a20, 0x00000000 },
-   { 0x00600001, 0x29100129, 0x008d0a40, 0x00000000 },
-   { 0x00600001, 0x29300129, 0x008d0a60, 0x00000000 },
-   { 0x00600001, 0x29500129, 0x008d0a80, 0x00000000 },
-   { 0x00600001, 0x29700129, 0x008d0aa0, 0x00000000 },
-   { 0x00600001, 0x20200021, 0x008d0e80, 0x00000000 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00000001, 0x20280061, 0x00000000, 0x0007000f },
-   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00010001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
-   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210032, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
-   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
-   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
-   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
-   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
-   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
-   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
-   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
-   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
-   { 0x00600001, 0x23800021, 0x008d0c00, 0x00000000 },
-   { 0x00600001, 0x23c00021, 0x008d0c20, 0x00000000 },
-   { 0x00600001, 0x24000021, 0x008d0c40, 0x00000000 },
-   { 0x00600001, 0x24400021, 0x008d0c60, 0x00000000 },
-   { 0x00600001, 0x24800021, 0x008d0c80, 0x00000000 },
-   { 0x00600001, 0x24c00021, 0x008d0ca0, 0x00000000 },
-   { 0x00600001, 0x25000021, 0x008d0cc0, 0x00000000 },
-   { 0x00600001, 0x25400021, 0x008d0ce0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00010001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x02000005, 0x20000c3c, 0x00210054, 0x00000008 },
-   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
-   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x00800040, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x00800040, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x00800040, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x00800040, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x00800040, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b109c1 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a01 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a41 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10a81 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10ac1 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b01 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b41 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10b81 },
-   { 0x00800040, 0x2c004529, 0x00b10c00, 0x00b10a01 },
-   { 0x00800040, 0x2c204529, 0x00b10c20, 0x00b10a41 },
-   { 0x00800040, 0x2c404529, 0x00b10c40, 0x00b10a81 },
-   { 0x00800040, 0x2c604529, 0x00b10c60, 0x00b10ac1 },
-   { 0x00800040, 0x2c804529, 0x00b10c80, 0x00b10b01 },
-   { 0x00800040, 0x2ca04529, 0x00b10ca0, 0x00b10b41 },
-   { 0x00800040, 0x2cc04529, 0x00b10cc0, 0x00b10b81 },
-   { 0x00800040, 0x2ce04529, 0x00b10ce0, 0x00b10bc1 },
-   { 0x00800008, 0x2c002d29, 0x00b10c00, 0x00020002 },
-   { 0x00800008, 0x2c202d29, 0x00b10c20, 0x00020002 },
-   { 0x00800008, 0x2c402d29, 0x00b10c40, 0x00020002 },
-   { 0x00800008, 0x2c602d29, 0x00b10c60, 0x00020002 },
-   { 0x00800008, 0x2c802d29, 0x00b10c80, 0x00020002 },
-   { 0x00800008, 0x2ca02d29, 0x00b10ca0, 0x00020002 },
-   { 0x00800008, 0x2cc02d29, 0x00b10cc0, 0x00020002 },
-   { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10a81 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10ac1 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b01 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
-   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
-   { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
-   { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
-   { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
-   { 0x80800042, 0x2c604629, 0x00b10a80, 0x00b10ac0 },
-   { 0x80800042, 0x2c804629, 0x00b10ac0, 0x00b10b00 },
-   { 0x80800042, 0x2ca04629, 0x00b10b00, 0x00b10b40 },
-   { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b80 },
-   { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
-   { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
-   { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
-   { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
-   { 0x00800001, 0x2c600229, 0x00b10a80, 0x00000000 },
-   { 0x00800001, 0x2c800229, 0x00b10ac0, 0x00000000 },
-   { 0x00800001, 0x2ca00229, 0x00b10b00, 0x00000000 },
-   { 0x00800001, 0x2cc00229, 0x00b10b40, 0x00000000 },
-   { 0x00800001, 0x2ce00229, 0x00b10b80, 0x00000000 },
-   { 0x80800042, 0x23802529, 0x00b10680, 0x00b10380 },
-   { 0x80800042, 0x23a02529, 0x00b106a0, 0x00b10c00 },
-   { 0x80800042, 0x23c02529, 0x00b106c0, 0x00b103c0 },
-   { 0x80800042, 0x23e02529, 0x00b106e0, 0x00b10c20 },
-   { 0x80800042, 0x24002529, 0x00b10700, 0x00b10400 },
-   { 0x80800042, 0x24202529, 0x00b10720, 0x00b10c40 },
-   { 0x80800042, 0x24402529, 0x00b10740, 0x00b10440 },
-   { 0x80800042, 0x24602529, 0x00b10760, 0x00b10c60 },
-   { 0x80800042, 0x24802529, 0x00b10780, 0x00b10480 },
-   { 0x80800042, 0x24a02529, 0x00b107a0, 0x00b10c80 },
-   { 0x80800042, 0x24c02529, 0x00b107c0, 0x00b104c0 },
-   { 0x80800042, 0x24e02529, 0x00b107e0, 0x00b10ca0 },
-   { 0x80800042, 0x25002529, 0x00b10800, 0x00b10500 },
-   { 0x80800042, 0x25202529, 0x00b10820, 0x00b10cc0 },
-   { 0x80800042, 0x25402529, 0x00b10840, 0x00b10540 },
-   { 0x80800042, 0x25602529, 0x00b10860, 0x00b10ce0 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00020002 },
-   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
-   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210032, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000028 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
-   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
-   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
-   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
-   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
-   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
-   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
-   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
-   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
-   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000028 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001c },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000f },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
-   { 0x00600001, 0x25800129, 0x008d09c0, 0x00000000 },
-   { 0x00600001, 0x25a00129, 0x008d09e0, 0x00000000 },
-   { 0x00600001, 0x25c00129, 0x008d0a00, 0x00000000 },
-   { 0x00600001, 0x25e00129, 0x008d0a20, 0x00000000 },
-   { 0x00600001, 0x26000129, 0x008d0a40, 0x00000000 },
-   { 0x00600001, 0x26200129, 0x008d0a60, 0x00000000 },
-   { 0x00600001, 0x26400129, 0x008d0a80, 0x00000000 },
-   { 0x00600001, 0x26600129, 0x008d0aa0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00020002 },
-   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
-   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
-   { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00080008 },
-   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
-   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x00000028 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
-   { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x00800040, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ac1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0ae1 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b01 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b21 },
-   { 0x00800040, 0x29c04529, 0x00ad09c0, 0x00ad0ae1 },
-   { 0x00800040, 0x29e04529, 0x00ad09e0, 0x00ad0b01 },
-   { 0x00800040, 0x2a004529, 0x00ad0a00, 0x00ad0b21 },
-   { 0x00800040, 0x2a204529, 0x00ad0a20, 0x00ad0b41 },
-   { 0x00800040, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x00800040, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x00800040, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x00800040, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b61 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0b81 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0ba1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0bc1 },
-   { 0x00800040, 0x2a404529, 0x00ad0a40, 0x00ad0b81 },
-   { 0x00800040, 0x2a604529, 0x00ad0a60, 0x00ad0ba1 },
-   { 0x00800040, 0x2a804529, 0x00ad0a80, 0x00ad0bc1 },
-   { 0x00800040, 0x2aa04529, 0x00ad0aa0, 0x00ad0be1 },
-   { 0x80800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
-   { 0x80800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
-   { 0x80800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
-   { 0x80800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
-   { 0x80800008, 0x2a402d29, 0x00b10a40, 0x00020002 },
-   { 0x80800008, 0x2a602d29, 0x00b10a60, 0x00020002 },
-   { 0x80800008, 0x2a802d29, 0x00b10a80, 0x00020002 },
-   { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x00000028 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b21 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b61 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0b81 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000001c },
-   { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
-   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000f },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
-   { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
-   { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
-   { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
-   { 0x80800042, 0x2a204629, 0x00ad0b20, 0x00ad0b40 },
-   { 0x80800042, 0x2a404629, 0x00ad0b60, 0x00ad0b80 },
-   { 0x80800042, 0x2a604629, 0x00ad0b80, 0x00ad0ba0 },
-   { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0bc0 },
-   { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
-   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
-   { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
-   { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
-   { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
-   { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
-   { 0x00800001, 0x2a200229, 0x00ad0b20, 0x00000000 },
-   { 0x00800001, 0x2a400229, 0x00ad0b60, 0x00000000 },
-   { 0x00800001, 0x2a600229, 0x00ad0b80, 0x00000000 },
-   { 0x00800001, 0x2a800229, 0x00ad0ba0, 0x00000000 },
-   { 0x00800001, 0x2aa00229, 0x00ad0bc0, 0x00000000 },
-   { 0x00600001, 0x25900129, 0x008d09c0, 0x00000000 },
-   { 0x00600001, 0x25b00129, 0x008d09e0, 0x00000000 },
-   { 0x00600001, 0x25d00129, 0x008d0a00, 0x00000000 },
-   { 0x00600001, 0x25f00129, 0x008d0a20, 0x00000000 },
-   { 0x00600001, 0x26100129, 0x008d0a40, 0x00000000 },
-   { 0x00600001, 0x26300129, 0x008d0a60, 0x00000000 },
-   { 0x00600001, 0x26500129, 0x008d0a80, 0x00000000 },
-   { 0x00600001, 0x26700129, 0x008d0aa0, 0x00000000 },
-   { 0x80800042, 0x25802529, 0x00b10880, 0x00b10580 },
-   { 0x80800042, 0x25a02529, 0x00b108a0, 0x00b105a0 },
-   { 0x80800042, 0x25c02529, 0x00b108c0, 0x00b105c0 },
-   { 0x80800042, 0x25e02529, 0x00b108e0, 0x00b105e0 },
-   { 0x80800042, 0x26002529, 0x00b10900, 0x00b10600 },
-   { 0x80800042, 0x26202529, 0x00b10920, 0x00b10620 },
-   { 0x80800042, 0x26402529, 0x00b10940, 0x00b10640 },
-   { 0x80800042, 0x26602529, 0x00b10960, 0x00b10660 },
+   { 0x00000001, 0x20280061, 0x00000000, 0x00070007 },
+   { 0x00600001, 0x20400021, 0x008d0020, 0x00000000 },
+   { 0x0020000c, 0x202e3dad, 0x00450e6e, 0x00010001 },
+   { 0x00200040, 0x20403421, 0x00450e60, 0x0045002e },
+   { 0x01000005, 0x20000d3c, 0x00210e6e, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000005f },
+   { 0x01000005, 0x20000d3c, 0x00210e70, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000048 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a004 },
+   { 0x00800040, 0x23804629, 0x00b10c40, 0x00b10c41 },
+   { 0x00800040, 0x23a04629, 0x00b10c60, 0x00b10c61 },
+   { 0x00800040, 0x23c04629, 0x00b10c80, 0x00b10c81 },
+   { 0x00800040, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
+   { 0x00800040, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
+   { 0x00800040, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
+   { 0x00800040, 0x24404629, 0x00b10d00, 0x00b10d01 },
+   { 0x00800040, 0x24604629, 0x00b10d20, 0x00b10d21 },
+   { 0x00800040, 0x24804629, 0x00b10d40, 0x00b10d41 },
+   { 0x00800040, 0x24a04629, 0x00b10d60, 0x00b10d61 },
+   { 0x00800040, 0x24c04629, 0x00b10d80, 0x00b10d81 },
+   { 0x00800040, 0x24e04629, 0x00b10da0, 0x00b10da1 },
+   { 0x00800040, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
+   { 0x00800040, 0x25204629, 0x00b10de0, 0x00b10de1 },
+   { 0x00800040, 0x25404629, 0x00b10e00, 0x00b10e01 },
+   { 0x00800040, 0x25604629, 0x00b10e20, 0x00b10e21 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c60 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c80 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca0 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc0 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce0 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d00 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d20 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d40 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d60 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d80 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da0 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc0 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de0 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e00 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e20 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f00 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
+   { 0x80800008, 0x23802d29, 0x00b10380, 0x00020002 },
+   { 0x80800008, 0x23a02d29, 0x00b103a0, 0x00020002 },
+   { 0x80800008, 0x23c02d29, 0x00b103c0, 0x00020002 },
+   { 0x80800008, 0x23e02d29, 0x00b103e0, 0x00020002 },
+   { 0x80800008, 0x24002d29, 0x00b10400, 0x00020002 },
+   { 0x80800008, 0x24202d29, 0x00b10420, 0x00020002 },
+   { 0x80800008, 0x24402d29, 0x00b10440, 0x00020002 },
+   { 0x80800008, 0x24602d29, 0x00b10460, 0x00020002 },
+   { 0x80800008, 0x24802d29, 0x00b10480, 0x00020002 },
+   { 0x80800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+   { 0x80800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+   { 0x80800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+   { 0x80800008, 0x25002d29, 0x00b10500, 0x00020002 },
+   { 0x80800008, 0x25202d29, 0x00b10520, 0x00020002 },
+   { 0x80800008, 0x25402d29, 0x00b10540, 0x00020002 },
+   { 0x80800008, 0x25602d29, 0x00b10560, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000043 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
+   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c41 },
+   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c61 },
+   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10c81 },
+   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
+   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
+   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
+   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d01 },
+   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d21 },
+   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d41 },
+   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d61 },
+   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10d81 },
+   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10da1 },
+   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
+   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10de1 },
+   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e01 },
+   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10e21 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002e },
+   { 0x01000005, 0x20000d3c, 0x00210e70, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a004 },
+   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c60 },
+   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c80 },
+   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10ca0 },
+   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10cc0 },
+   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10ce0 },
+   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10d00 },
+   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d20 },
+   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d40 },
+   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d60 },
+   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d80 },
+   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10da0 },
+   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10dc0 },
+   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10de0 },
+   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10e00 },
+   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e20 },
+   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10f00 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000014 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a004 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a004 },
+   { 0x00800001, 0x23800229, 0x00b10c40, 0x00000000 },
+   { 0x00800001, 0x23a00229, 0x00b10c60, 0x00000000 },
+   { 0x00800001, 0x23c00229, 0x00b10c80, 0x00000000 },
+   { 0x00800001, 0x23e00229, 0x00b10ca0, 0x00000000 },
+   { 0x00800001, 0x24000229, 0x00b10cc0, 0x00000000 },
+   { 0x00800001, 0x24200229, 0x00b10ce0, 0x00000000 },
+   { 0x00800001, 0x24400229, 0x00b10d00, 0x00000000 },
+   { 0x00800001, 0x24600229, 0x00b10d20, 0x00000000 },
+   { 0x00800001, 0x24800229, 0x00b10d40, 0x00000000 },
+   { 0x00800001, 0x24a00229, 0x00b10d60, 0x00000000 },
+   { 0x00800001, 0x24c00229, 0x00b10d80, 0x00000000 },
+   { 0x00800001, 0x24e00229, 0x00b10da0, 0x00000000 },
+   { 0x00800001, 0x25000229, 0x00b10dc0, 0x00000000 },
+   { 0x00800001, 0x25200229, 0x00b10de0, 0x00000000 },
+   { 0x00800001, 0x25400229, 0x00b10e00, 0x00000000 },
+   { 0x00800001, 0x25600229, 0x00b10e20, 0x00000000 },
+   { 0x00802001, 0x26800021, 0x00b10380, 0x00000000 },
+   { 0x00802001, 0x26c00021, 0x00b103c0, 0x00000000 },
+   { 0x00802001, 0x27000021, 0x00b10400, 0x00000000 },
+   { 0x00802001, 0x27400021, 0x00b10440, 0x00000000 },
+   { 0x00802001, 0x27800021, 0x00b10480, 0x00000000 },
+   { 0x00802001, 0x27c00021, 0x00b104c0, 0x00000000 },
+   { 0x00802001, 0x28000021, 0x00b10500, 0x00000000 },
+   { 0x00802001, 0x28400021, 0x00b10540, 0x00000000 },
+   { 0x0020000c, 0x202e3dad, 0x00450e72, 0x00010001 },
+   { 0x00200040, 0x20403421, 0x00450e60, 0x0045002e },
+   { 0x01000005, 0x20000d3c, 0x00210e72, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000005f },
+   { 0x01000005, 0x20000d3c, 0x00210e74, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000048 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a007 },
+   { 0x00800040, 0x23804629, 0x00b10c40, 0x00b10c41 },
+   { 0x00800040, 0x23a04629, 0x00b10c60, 0x00b10c61 },
+   { 0x00800040, 0x23c04629, 0x00b10c80, 0x00b10c81 },
+   { 0x00800040, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
+   { 0x00800040, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
+   { 0x00800040, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
+   { 0x00800040, 0x24404629, 0x00b10d00, 0x00b10d01 },
+   { 0x00800040, 0x24604629, 0x00b10d20, 0x00b10d21 },
+   { 0x00800040, 0x24804629, 0x00b10d40, 0x00b10d41 },
+   { 0x00800040, 0x24a04629, 0x00b10d60, 0x00b10d61 },
+   { 0x00800040, 0x24c04629, 0x00b10d80, 0x00b10d81 },
+   { 0x00800040, 0x24e04629, 0x00b10da0, 0x00b10da1 },
+   { 0x00800040, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
+   { 0x00800040, 0x25204629, 0x00b10de0, 0x00b10de1 },
+   { 0x00800040, 0x25404629, 0x00b10e00, 0x00b10e01 },
+   { 0x00800040, 0x25604629, 0x00b10e20, 0x00b10e21 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c60 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c80 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca0 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc0 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce0 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d00 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d20 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d40 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d60 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d80 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da0 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc0 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de0 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e00 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e20 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f00 },
+   { 0x00800040, 0x23804529, 0x00b10380, 0x00b10c61 },
+   { 0x00800040, 0x23a04529, 0x00b103a0, 0x00b10c81 },
+   { 0x00800040, 0x23c04529, 0x00b103c0, 0x00b10ca1 },
+   { 0x00800040, 0x23e04529, 0x00b103e0, 0x00b10cc1 },
+   { 0x00800040, 0x24004529, 0x00b10400, 0x00b10ce1 },
+   { 0x00800040, 0x24204529, 0x00b10420, 0x00b10d01 },
+   { 0x00800040, 0x24404529, 0x00b10440, 0x00b10d21 },
+   { 0x00800040, 0x24604529, 0x00b10460, 0x00b10d41 },
+   { 0x00800040, 0x24804529, 0x00b10480, 0x00b10d61 },
+   { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10d81 },
+   { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10da1 },
+   { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10dc1 },
+   { 0x00800040, 0x25004529, 0x00b10500, 0x00b10de1 },
+   { 0x00800040, 0x25204529, 0x00b10520, 0x00b10e01 },
+   { 0x00800040, 0x25404529, 0x00b10540, 0x00b10e21 },
+   { 0x00800040, 0x25604529, 0x00b10560, 0x00b10f01 },
+   { 0x80800008, 0x23802d29, 0x00b10380, 0x00020002 },
+   { 0x80800008, 0x23a02d29, 0x00b103a0, 0x00020002 },
+   { 0x80800008, 0x23c02d29, 0x00b103c0, 0x00020002 },
+   { 0x80800008, 0x23e02d29, 0x00b103e0, 0x00020002 },
+   { 0x80800008, 0x24002d29, 0x00b10400, 0x00020002 },
+   { 0x80800008, 0x24202d29, 0x00b10420, 0x00020002 },
+   { 0x80800008, 0x24402d29, 0x00b10440, 0x00020002 },
+   { 0x80800008, 0x24602d29, 0x00b10460, 0x00020002 },
+   { 0x80800008, 0x24802d29, 0x00b10480, 0x00020002 },
+   { 0x80800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+   { 0x80800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+   { 0x80800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+   { 0x80800008, 0x25002d29, 0x00b10500, 0x00020002 },
+   { 0x80800008, 0x25202d29, 0x00b10520, 0x00020002 },
+   { 0x80800008, 0x25402d29, 0x00b10540, 0x00020002 },
+   { 0x80800008, 0x25602d29, 0x00b10560, 0x00020002 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000043 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
+   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c41 },
+   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c61 },
+   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10c81 },
+   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10ca1 },
+   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10cc1 },
+   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10ce1 },
+   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d01 },
+   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d21 },
+   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d41 },
+   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d61 },
+   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10d81 },
+   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10da1 },
+   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10dc1 },
+   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10de1 },
+   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e01 },
+   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10e21 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000002e },
+   { 0x01000005, 0x20000d3c, 0x00210e74, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x2f001d29, 0x008d0040, 0x0411a007 },
+   { 0x80800042, 0x23804629, 0x00b10c40, 0x00b10c60 },
+   { 0x80800042, 0x23a04629, 0x00b10c60, 0x00b10c80 },
+   { 0x80800042, 0x23c04629, 0x00b10c80, 0x00b10ca0 },
+   { 0x80800042, 0x23e04629, 0x00b10ca0, 0x00b10cc0 },
+   { 0x80800042, 0x24004629, 0x00b10cc0, 0x00b10ce0 },
+   { 0x80800042, 0x24204629, 0x00b10ce0, 0x00b10d00 },
+   { 0x80800042, 0x24404629, 0x00b10d00, 0x00b10d20 },
+   { 0x80800042, 0x24604629, 0x00b10d20, 0x00b10d40 },
+   { 0x80800042, 0x24804629, 0x00b10d40, 0x00b10d60 },
+   { 0x80800042, 0x24a04629, 0x00b10d60, 0x00b10d80 },
+   { 0x80800042, 0x24c04629, 0x00b10d80, 0x00b10da0 },
+   { 0x80800042, 0x24e04629, 0x00b10da0, 0x00b10dc0 },
+   { 0x80800042, 0x25004629, 0x00b10dc0, 0x00b10de0 },
+   { 0x80800042, 0x25204629, 0x00b10de0, 0x00b10e00 },
+   { 0x80800042, 0x25404629, 0x00b10e00, 0x00b10e20 },
+   { 0x80800042, 0x25604629, 0x00b10e20, 0x00b10f00 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000014 },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007001f },
+   { 0x00800031, 0x2c401d29, 0x008d0040, 0x0418a007 },
+   { 0x00000040, 0x20440c21, 0x00210044, 0x00000008 },
+   { 0x00800031, 0x2d401d29, 0x008d0040, 0x0418a007 },
+   { 0x00800001, 0x23800229, 0x00b10c40, 0x00000000 },
+   { 0x00800001, 0x23a00229, 0x00b10c60, 0x00000000 },
+   { 0x00800001, 0x23c00229, 0x00b10c80, 0x00000000 },
+   { 0x00800001, 0x23e00229, 0x00b10ca0, 0x00000000 },
+   { 0x00800001, 0x24000229, 0x00b10cc0, 0x00000000 },
+   { 0x00800001, 0x24200229, 0x00b10ce0, 0x00000000 },
+   { 0x00800001, 0x24400229, 0x00b10d00, 0x00000000 },
+   { 0x00800001, 0x24600229, 0x00b10d20, 0x00000000 },
+   { 0x00800001, 0x24800229, 0x00b10d40, 0x00000000 },
+   { 0x00800001, 0x24a00229, 0x00b10d60, 0x00000000 },
+   { 0x00800001, 0x24c00229, 0x00b10d80, 0x00000000 },
+   { 0x00800001, 0x24e00229, 0x00b10da0, 0x00000000 },
+   { 0x00800001, 0x25000229, 0x00b10dc0, 0x00000000 },
+   { 0x00800001, 0x25200229, 0x00b10de0, 0x00000000 },
+   { 0x00800001, 0x25400229, 0x00b10e00, 0x00000000 },
+   { 0x00800001, 0x25600229, 0x00b10e20, 0x00000000 },
+   { 0x80800042, 0x23802529, 0x00b10380, 0x00b10680 },
+   { 0x80800042, 0x23a02529, 0x00b103a0, 0x00b106a0 },
+   { 0x80800042, 0x23c02529, 0x00b103c0, 0x00b106c0 },
+   { 0x80800042, 0x23e02529, 0x00b103e0, 0x00b106e0 },
+   { 0x80800042, 0x24002529, 0x00b10400, 0x00b10700 },
+   { 0x80800042, 0x24202529, 0x00b10420, 0x00b10720 },
+   { 0x80800042, 0x24402529, 0x00b10440, 0x00b10740 },
+   { 0x80800042, 0x24602529, 0x00b10460, 0x00b10760 },
+   { 0x80800042, 0x24802529, 0x00b10480, 0x00b10780 },
+   { 0x80800042, 0x24a02529, 0x00b104a0, 0x00b107a0 },
+   { 0x80800042, 0x24c02529, 0x00b104c0, 0x00b107c0 },
+   { 0x80800042, 0x24e02529, 0x00b104e0, 0x00b107e0 },
+   { 0x80800042, 0x25002529, 0x00b10500, 0x00b10800 },
+   { 0x80800042, 0x25202529, 0x00b10520, 0x00b10820 },
+   { 0x80800042, 0x25402529, 0x00b10540, 0x00b10840 },
+   { 0x80800042, 0x25602529, 0x00b10560, 0x00b10860 },
+   { 0x00200008, 0x20200c21, 0x00450e60, 0x00000001 },
+   { 0x0020000c, 0x2e6e3dad, 0x00450e6e, 0x00010001 },
+   { 0x0020000c, 0x202e3dad, 0x00450e6e, 0x00010001 },
+   { 0x00200040, 0x20403421, 0x00450020, 0x0045002e },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x008d0040, 0x0414a005 },
+   { 0x00800031, 0x2b401d29, 0x008d0040, 0x0414a006 },
+   { 0x00800001, 0x25800229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x25a00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x25c00229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x25e00229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x26000229, 0x00ad0b40, 0x00000000 },
+   { 0x00800001, 0x26200229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x26400229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x26600229, 0x00ad0ba0, 0x00000000 },
+   { 0x00800001, 0x2f400231, 0x00b20580, 0x00000000 },
+   { 0x00800001, 0x2f500231, 0x00b205a0, 0x00000000 },
+   { 0x00800001, 0x2f600231, 0x00b205c0, 0x00000000 },
+   { 0x00800001, 0x2f700231, 0x00b205e0, 0x00000000 },
+   { 0x00800001, 0x2f800231, 0x00b20600, 0x00000000 },
+   { 0x00800001, 0x2f900231, 0x00b20620, 0x00000000 },
+   { 0x00800001, 0x2fa00231, 0x00b20640, 0x00000000 },
+   { 0x00800001, 0x2fb00231, 0x00b20660, 0x00000000 },
+   { 0x0020000c, 0x2e723dad, 0x00450e72, 0x00010001 },
+   { 0x0020000c, 0x202e3dad, 0x00450e72, 0x00010001 },
+   { 0x00200040, 0x20403421, 0x00450020, 0x0045002e },
+   { 0x00000001, 0x20480061, 0x00000000, 0x0007000f },
+   { 0x00800031, 0x2ac01d29, 0x008d0040, 0x0414a008 },
+   { 0x00800031, 0x2b401d29, 0x008d0040, 0x0414a009 },
+   { 0x00800001, 0x25800229, 0x00ad0ac0, 0x00000000 },
+   { 0x00800001, 0x25a00229, 0x00ad0ae0, 0x00000000 },
+   { 0x00800001, 0x25c00229, 0x00ad0b00, 0x00000000 },
+   { 0x00800001, 0x25e00229, 0x00ad0b20, 0x00000000 },
+   { 0x00800001, 0x26000229, 0x00ad0b40, 0x00000000 },
+   { 0x00800001, 0x26200229, 0x00ad0b60, 0x00000000 },
+   { 0x00800001, 0x26400229, 0x00ad0b80, 0x00000000 },
+   { 0x00800001, 0x26600229, 0x00ad0ba0, 0x00000000 },
+   { 0x80800042, 0x25804529, 0x00b10580, 0x00b10f40 },
+   { 0x80800042, 0x25a04529, 0x00b105a0, 0x00b10f50 },
+   { 0x80800042, 0x25c04529, 0x00b105c0, 0x00b10f60 },
+   { 0x80800042, 0x25e04529, 0x00b105e0, 0x00b10f70 },
+   { 0x80800042, 0x26004529, 0x00b10600, 0x00b10f80 },
+   { 0x80800042, 0x26204529, 0x00b10620, 0x00b10f90 },
+   { 0x80800042, 0x26404529, 0x00b10640, 0x00b10fa0 },
+   { 0x80800042, 0x26604529, 0x00b10660, 0x00b10fb0 },
    { 0x00600001, 0x20200021, 0x008d0980, 0x00000000 },
    { 0x00800001, 0x458101f1, 0x00000000, 0x00000000 },
    { 0x00800001, 0x45a101f1, 0x00000000, 0x00000000 },
@@ -1140,3 +570,4 @@
    { 0x00800001, 0x20500232, 0x00b20660, 0x00000000 },
    { 0x00800031, 0x24001d28, 0x008d0020, 0x05302002 },
    { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
+   { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
commit d917583c19e2eb20a559eddaa100ce71d8fbe48c
Author: Pierre Willenbrock <pierre at pirsoft.de>
Date:   Mon Dec 15 09:08:30 2008 +0800

    closedir only after finishing use of any results from readdir

diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index b1bf6ee..c6002eb 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -422,7 +422,6 @@ i830_lvds_acpi_lid_open(xf86OutputPtr output)
 	}
 	if (strcmp(lid_dent->d_name, ".") &&
 		strcmp(lid_dent->d_name, "..")) {
-	    closedir(lid_dir);
 	    break;
 	}
     }
@@ -432,6 +431,8 @@ i830_lvds_acpi_lid_open(xf86OutputPtr output)
     strcat(state_name, lid_dent->d_name);
     strcat(state_name, "/state");
 
+    closedir(lid_dir);
+
     if ((fd = open(state_name, O_RDONLY)) == -1) {
 	free(state_name);
 	goto out;
commit 865735d8408ee6b75be8fb1a8ab32b2a53dd3adb
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Dec 12 11:07:20 2008 -0800

    Dump out fence registers by default, add fence end registers as well
    
    In debugging the frame buffer resize code, I needed to see what the server
    was doing to the fence registers, so I added this debug code. Seems useful
    enough to include it.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/i830_debug.c b/src/i830_debug.c
index 8ce6ce6..dc3712b 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -492,17 +492,23 @@ DEBUGSTRING(i830_debug_dspclk_gate_d)
 		      OVLUNIT);
 }
 
-#if 0
-DEBUGSTRING(i810_debug_fence_new)
+#if 1
+DEBUGSTRING(i810_debug_fence_start)
 {
-    char *enable = (val & FENCE_VALID) ? "enabled" : "disabled";
+    char *enable = (val & FENCE_VALID) ? " enabled" : "disabled";
     char format = (val & I965_FENCE_Y_MAJOR) ? 'Y' : 'X';
     int pitch = ((val & 0xffc) >> 2) * 128;
     unsigned int offset = val & 0xfffff000;
 
-    return XNFprintf("%s, %c tile walk, %d pitch, 0x%08x offset",
+    return XNFprintf("%s, %c tile walk, %4d pitch, 0x%08x start",
 		     enable, format, pitch, offset);
 }
+DEBUGSTRING(i810_debug_fence_end)
+{
+    unsigned int end = val & 0xfffff000;
+
+    return XNFprintf("                                   0x%08x end", end);
+}
 #endif
 
 #define DEFINEREG(reg) \
@@ -698,23 +704,26 @@ static struct i830SnapshotRec {
     DEFINEREG(DPD_AUX_CH_DATA4),
     DEFINEREG(DPD_AUX_CH_DATA5),
 
-#if 0
-    DEFINEREG2(FENCE_NEW + 0, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 8, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 16, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 24, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 32, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 40, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 48, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 56, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 64, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 72, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 80, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 88, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 96, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 104, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 112, i810_debug_fence_new),
-    DEFINEREG2(FENCE_NEW + 120, i810_debug_fence_new),
+#define DEFINEFENCE(i) \
+	{ FENCE_NEW+i*8, "FENCE START " #i, i810_debug_fence_start, 0 }, \
+	{ FENCE_NEW+i*8+4, "FENCE END " #i, i810_debug_fence_end, 0 }
+#if 1
+    DEFINEFENCE(0),
+    DEFINEFENCE(1),
+    DEFINEFENCE(2),
+    DEFINEFENCE(3),
+    DEFINEFENCE(4),
+    DEFINEFENCE(5),
+    DEFINEFENCE(6),
+    DEFINEFENCE(7),
+    DEFINEFENCE(8),
+    DEFINEFENCE(9),
+    DEFINEFENCE(10),
+    DEFINEFENCE(11),
+    DEFINEFENCE(12),
+    DEFINEFENCE(13),
+    DEFINEFENCE(14),
+    DEFINEFENCE(15),
 #endif
 };
 #undef DEFINEREG
commit f3e59e59b54696667b127c82327e16b14d7bab22
Author: Zou Nan hai <nanhai.zou at intel.com>
Date:   Fri Dec 12 11:18:25 2008 -0800

    Update binary versions of the dual-prime kernels
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/xvmc/dual_prime.g4b b/src/xvmc/dual_prime.g4b
index 293d2d3..4a1eb4b 100644
--- a/src/xvmc/dual_prime.g4b
+++ b/src/xvmc/dual_prime.g4b
@@ -1,4 +1,106 @@
    { 0x00600001, 0x29800021, 0x008d0020, 0x00000000 },
+   { 0x02000005, 0x20000c3c, 0x00210040, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000030 },
+   { 0x00000040, 0x20480c21, 0x00210988, 0x00000000 },
+   { 0x00800031, 0x20601c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x20801c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x20a01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x20c01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x20e01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21001c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21201c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21401c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21601c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21801c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21a01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21c01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21e01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22001c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22201c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22401c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22601c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22801c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22a01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22c01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22e01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x23001c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x23201c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x23401c21, 0x00b10040, 0x04110203 },
+   { 0x02000005, 0x20002d3c, 0x0021098c, 0x00200020 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00600001, 0x20600169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20800169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20a00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20c00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20e00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21000169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21200169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21400169, 0x00000000, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x0021002c, 0x00100010 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00600001, 0x20700169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20900169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20b00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20d00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20f00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21100169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21300169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21500169, 0x00000000, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x0021002c, 0x00080008 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00600001, 0x21600169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21800169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21a00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21c00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21e00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22000169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22200169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22400169, 0x00000000, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x0021002c, 0x00040004 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00600001, 0x21700169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21900169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21b00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21d00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21f00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22100169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22300169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22500169, 0x00000000, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x0021002c, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000004 },
+   { 0x00800001, 0x22600169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x22800169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x22a00169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x22c00169, 0x00000000, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x0021002c, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000004 },
+   { 0x00800001, 0x22e00169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x23000169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x23200169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x23400169, 0x00000000, 0x00000000 },
    { 0x00600001, 0x2e600021, 0x008d0020, 0x00000000 },
    { 0x00600001, 0x2e800021, 0x008d0020, 0x00000000 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
@@ -6,6 +108,8 @@
    { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
    { 0x01000005, 0x20002d3c, 0x0021002e, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
    { 0x01000005, 0x20002d3c, 0x00210030, 0x00010001 },
@@ -297,14 +401,15 @@
    { 0x00600001, 0x27c00021, 0x008d0ca0, 0x00000000 },
    { 0x00600001, 0x28000021, 0x008d0cc0, 0x00000000 },
    { 0x00600001, 0x28400021, 0x008d0ce0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00010001 },
-   { 0x00200040, 0x2e603421, 0x00450e80, 0x00450e6e },
+   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000001 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x01000005, 0x20002d3c, 0x00210032, 0x00010001 },
+   { 0x02000005, 0x20000e3c, 0x0021003f, 0x00000004 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210036, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000007d },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
    { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
@@ -481,7 +586,7 @@
    { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b44 },
    { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10b84 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000068 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000035 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
    { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
@@ -594,10 +699,12 @@
    { 0x00600001, 0x28200021, 0x008d0cc0, 0x00000000 },
    { 0x00600001, 0x28600021, 0x008d0ce0, 0x00000000 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x0020000c, 0x2e600c21, 0x00210e80, 0x00000001 },
    { 0x0020000c, 0x2e6e3dad, 0x0045002e, 0x00020002 },
-   { 0x00200040, 0x2e603421, 0x00450e60, 0x00450e6e },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
    { 0x01000005, 0x20002d3c, 0x0021002e, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
    { 0x01000005, 0x20002d3c, 0x00210030, 0x00020002 },
@@ -858,14 +965,15 @@
    { 0x00600001, 0x29200129, 0x008d0a60, 0x00000000 },
    { 0x00600001, 0x29400129, 0x008d0a80, 0x00000000 },
    { 0x00600001, 0x29600129, 0x008d0aa0, 0x00000000 },
-   { 0x0020000c, 0x2e600c21, 0x00210e80, 0x00000001 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00020002 },
-   { 0x00200040, 0x2e603421, 0x00450e60, 0x00450e6e },
+   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210032, 0x00020002 },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00040004 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000076 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
    { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
@@ -1027,7 +1135,7 @@
    { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba4 },
    { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc4 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000058 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000002d },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
    { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
@@ -1123,29 +1231,33 @@
    { 0x00600001, 0x29300129, 0x008d0a60, 0x00000000 },
    { 0x00600001, 0x29500129, 0x008d0a80, 0x00000000 },
    { 0x00600001, 0x29700129, 0x008d0aa0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00010001 },
-   { 0x00200040, 0x2e603421, 0x00450e80, 0x00450e6e },
+   { 0x00600001, 0x20200021, 0x008d0e80, 0x00000000 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00000001, 0x20280061, 0x00000000, 0x0007000f },
+   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000040, 0x2e641c21, 0x00210e64, 0x00000001 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x01000005, 0x20002d3c, 0x00210036, 0x00010001 },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210032, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000007d },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -1258,16 +1370,16 @@
    { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000009a },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -1307,22 +1419,22 @@
    { 0x80800042, 0x2cc04629, 0x00b10b43, 0x00b10b44 },
    { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10b84 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000068 },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000035 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -1363,16 +1475,16 @@
    { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -1419,30 +1531,30 @@
    { 0x00600001, 0x24c00021, 0x008d0ca0, 0x00000000 },
    { 0x00600001, 0x25000021, 0x008d0cc0, 0x00000000 },
    { 0x00600001, 0x25400021, 0x008d0ce0, 0x00000000 },
-   { 0x03000010, 0x20003dbc, 0x00210034, 0x00000000 },
-   { 0x00010040, 0x203c3dad, 0x0021003c, 0x00050005 },
    { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00010001 },
-   { 0x00200040, 0x2e603421, 0x00450e80, 0x00450e6e },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20000c3c, 0x00210054, 0x00000008 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
    { 0x01000005, 0x20002d3c, 0x0021003a, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x000000b1 },
    { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000007d },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -1555,16 +1667,16 @@
    { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000009a },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -1607,19 +1719,19 @@
    { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000035 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -1660,16 +1772,16 @@
    { 0x80800042, 0x2ce04629, 0x00b10b83, 0x00b10bc3 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -1725,24 +1837,25 @@
    { 0x80800042, 0x25402529, 0x00b10840, 0x00b10540 },
    { 0x80800042, 0x25602529, 0x00b10860, 0x00b10ce0 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x0020000c, 0x2e600c21, 0x00210e80, 0x00000001 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00020002 },
-   { 0x00200040, 0x2e603421, 0x00450e60, 0x00450e6e },
+   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210036, 0x00020002 },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210032, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00020002 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000076 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
    { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
    { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
@@ -1853,8 +1966,8 @@
    { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000082 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -1894,14 +2007,14 @@
    { 0x80800042, 0x2a804629, 0x00ad0ba3, 0x00ad0ba4 },
    { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc4 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000058 },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00020002 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000002d },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -1942,8 +2055,8 @@
    { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc3 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -1990,23 +2103,25 @@
    { 0x00600001, 0x26200129, 0x008d0a60, 0x00000000 },
    { 0x00600001, 0x26400129, 0x008d0a80, 0x00000000 },
    { 0x00600001, 0x26600129, 0x008d0aa0, 0x00000000 },
-   { 0x0020000c, 0x2e600c21, 0x00210e80, 0x00000001 },
    { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00020002 },
-   { 0x00200040, 0x2e603421, 0x00450e60, 0x00450e6e },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00080008 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
    { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x000000a2 },
    { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000076 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000019 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
    { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
    { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
@@ -2117,8 +2232,8 @@
    { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000082 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -2161,11 +2276,11 @@
    { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000002d },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
@@ -2206,8 +2321,8 @@
    { 0x80800042, 0x2aa04629, 0x00ad0bc3, 0x00ad0bc3 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000005, 0x20580c21, 0x00210e60, 0x00000003 },
    { 0x00000041, 0x20580c21, 0x00210058, 0x00000009 },
    { 0x00000020, 0x34001400, 0x00001400, 0x00210058 },
diff --git a/src/xvmc/dual_prime_igd.g4b b/src/xvmc/dual_prime_igd.g4b
index a411432..6477d06 100644
--- a/src/xvmc/dual_prime_igd.g4b
+++ b/src/xvmc/dual_prime_igd.g4b
@@ -1,4 +1,106 @@
    { 0x00600001, 0x29800021, 0x008d0020, 0x00000000 },
+   { 0x02000005, 0x20000c3c, 0x00210040, 0x00000001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000030 },
+   { 0x00000040, 0x20480c21, 0x00210988, 0x00000000 },
+   { 0x00800031, 0x20601c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x20801c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x20a01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x20c01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x20e01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21001c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21201c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21401c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21601c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21801c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21a01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21c01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x21e01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22001c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22201c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22401c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22601c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22801c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22a01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22c01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x22e01c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x23001c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x23201c21, 0x00b10040, 0x04110203 },
+   { 0x00000040, 0x20480c21, 0x00210048, 0x00000020 },
+   { 0x00800031, 0x23401c21, 0x00b10040, 0x04110203 },
+   { 0x02000005, 0x20002d3c, 0x0021098c, 0x00200020 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00600001, 0x20600169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20800169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20a00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20c00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20e00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21000169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21200169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21400169, 0x00000000, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x0021002c, 0x00100010 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00600001, 0x20700169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20900169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20b00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20d00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x20f00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21100169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21300169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21500169, 0x00000000, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x0021002c, 0x00080008 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00600001, 0x21600169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21800169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21a00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21c00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21e00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22000169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22200169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22400169, 0x00000000, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x0021002c, 0x00040004 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 },
+   { 0x00600001, 0x21700169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21900169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21b00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21d00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x21f00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22100169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22300169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x22500169, 0x00000000, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x0021002c, 0x00020002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000004 },
+   { 0x00800001, 0x22600169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x22800169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x22a00169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x22c00169, 0x00000000, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x0021002c, 0x00010001 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000004 },
+   { 0x00800001, 0x22e00169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x23000169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x23200169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x23400169, 0x00000000, 0x00000000 },
    { 0x00600001, 0x2e600021, 0x008d0020, 0x00000000 },
    { 0x00600001, 0x2e800021, 0x008d0020, 0x00000000 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
@@ -6,6 +108,8 @@
    { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
    { 0x01000005, 0x20002d3c, 0x0021002e, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
    { 0x01000005, 0x20002d3c, 0x00210030, 0x00010001 },
@@ -129,14 +233,15 @@
    { 0x00600001, 0x27c00021, 0x008d0ca0, 0x00000000 },
    { 0x00600001, 0x28000021, 0x008d0cc0, 0x00000000 },
    { 0x00600001, 0x28400021, 0x008d0ce0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00010001 },
-   { 0x00200040, 0x2e603421, 0x00450e80, 0x00450e6e },
+   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000001 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x01000005, 0x20002d3c, 0x00210032, 0x00010001 },
+   { 0x02000005, 0x20000e3c, 0x0021003f, 0x00000004 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210036, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
    { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
@@ -205,7 +310,7 @@
    { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
    { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
    { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
@@ -258,10 +363,12 @@
    { 0x00600001, 0x28200021, 0x008d0cc0, 0x00000000 },
    { 0x00600001, 0x28600021, 0x008d0ce0, 0x00000000 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x0020000c, 0x2e600c21, 0x00210e80, 0x00000001 },
    { 0x0020000c, 0x2e6e3dad, 0x0045002e, 0x00020002 },
-   { 0x00200040, 0x2e603421, 0x00450e60, 0x00450e6e },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00010001 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
    { 0x01000005, 0x20002d3c, 0x0021002e, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
    { 0x01000005, 0x20002d3c, 0x00210030, 0x00020002 },
@@ -354,14 +461,15 @@
    { 0x00600001, 0x29200129, 0x008d0a60, 0x00000000 },
    { 0x00600001, 0x29400129, 0x008d0a80, 0x00000000 },
    { 0x00600001, 0x29600129, 0x008d0aa0, 0x00000000 },
-   { 0x0020000c, 0x2e600c21, 0x00210e80, 0x00000001 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00020002 },
-   { 0x00200040, 0x2e603421, 0x00450e60, 0x00450e6e },
+   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210032, 0x00020002 },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00040004 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210038, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000028 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
    { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
@@ -415,7 +523,7 @@
    { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
    { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000001c },
-   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
+   { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000000f },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
    { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
@@ -451,29 +559,33 @@
    { 0x00600001, 0x29300129, 0x008d0a60, 0x00000000 },
    { 0x00600001, 0x29500129, 0x008d0a80, 0x00000000 },
    { 0x00600001, 0x29700129, 0x008d0aa0, 0x00000000 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00010001 },
-   { 0x00200040, 0x2e603421, 0x00450e80, 0x00450e6e },
+   { 0x00600001, 0x20200021, 0x008d0e80, 0x00000000 },
+   { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+   { 0x00000001, 0x20280061, 0x00000000, 0x0007000f },
+   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00010001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000040, 0x2e641c21, 0x00210e64, 0x00000001 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x01000005, 0x20002d3c, 0x00210036, 0x00010001 },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210032, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
    { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
    { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
    { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
@@ -508,16 +620,16 @@
    { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
    { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
    { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
@@ -527,22 +639,22 @@
    { 0x80800042, 0x2cc04629, 0x00b10b40, 0x00b10b41 },
    { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10b81 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00010001 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
    { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
    { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
    { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
@@ -553,16 +665,16 @@
    { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
    { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
    { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
@@ -579,30 +691,30 @@
    { 0x00600001, 0x24c00021, 0x008d0ca0, 0x00000000 },
    { 0x00600001, 0x25000021, 0x008d0cc0, 0x00000000 },
    { 0x00600001, 0x25400021, 0x008d0ce0, 0x00000000 },
-   { 0x03000010, 0x20003dbc, 0x00210034, 0x00000000 },
-   { 0x00010040, 0x203c3dad, 0x0021003c, 0x00050005 },
    { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00010001 },
-   { 0x00200040, 0x2e603421, 0x00450e80, 0x00450e6e },
+   { 0x00200040, 0x2e6034a5, 0x00450e80, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+   { 0x02000005, 0x20000c3c, 0x00210054, 0x00000008 },
+   { 0x00010040, 0x2e641ca5, 0x00210e64, 0x00000001 },
    { 0x01000005, 0x20002d3c, 0x0021003a, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
    { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
    { 0x00800040, 0x2c004629, 0x00b109c0, 0x00b10a00 },
    { 0x00800040, 0x2c204629, 0x00b10a00, 0x00b10a40 },
    { 0x00800040, 0x2c404629, 0x00b10a40, 0x00b10a80 },
@@ -637,16 +749,16 @@
    { 0x00800008, 0x2ce02d29, 0x00b10ce0, 0x00020002 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b109c1 },
    { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a01 },
    { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a41 },
@@ -659,19 +771,19 @@
    { 0x01000005, 0x20002d3c, 0x0021003c, 0x00010001 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2bc01d29, 0x008d0e60, 0x0411a007 },
    { 0x80800042, 0x2c004629, 0x00b109c0, 0x00b10a00 },
    { 0x80800042, 0x2c204629, 0x00b10a00, 0x00b10a40 },
    { 0x80800042, 0x2c404629, 0x00b10a40, 0x00b10a80 },
@@ -682,16 +794,16 @@
    { 0x80800042, 0x2ce04629, 0x00b10b80, 0x00b10bc0 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
-   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x29c01d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a001d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a401d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
-   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a004 },
+   { 0x00800031, 0x2a801d29, 0x008d0e60, 0x0411a007 },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
-   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a004 },
+   { 0x00800031, 0x2ac01d29, 0x008d0e60, 0x0418a007 },
    { 0x00800001, 0x2c000229, 0x00b109c0, 0x00000000 },
    { 0x00800001, 0x2c200229, 0x00b10a00, 0x00000000 },
    { 0x00800001, 0x2c400229, 0x00b10a40, 0x00000000 },
@@ -717,22 +829,23 @@
    { 0x80800042, 0x25402529, 0x00b10840, 0x00b10540 },
    { 0x80800042, 0x25602529, 0x00b10860, 0x00b10ce0 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x0020000c, 0x2e600c21, 0x00210e80, 0x00000001 },
-   { 0x0020000c, 0x2e6e3dad, 0x00450036, 0x00020002 },
-   { 0x00200040, 0x2e603421, 0x00450e60, 0x00450e6e },
+   { 0x0020000c, 0x2e6e3dad, 0x00450032, 0x00020002 },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
-   { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000001 },
-   { 0x01000005, 0x20002d3c, 0x00210036, 0x00020002 },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00020002 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+   { 0x01000005, 0x20002d3c, 0x00210032, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00020002 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000028 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
    { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
    { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
    { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
@@ -767,8 +880,8 @@
    { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000028 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
    { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
    { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
@@ -778,14 +891,14 @@
    { 0x80800042, 0x2a804629, 0x00ad0ba0, 0x00ad0ba1 },
    { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0bc1 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000001c },
-   { 0x01000005, 0x20002d3c, 0x00210038, 0x00020002 },
+   { 0x01000005, 0x20002d3c, 0x00210034, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000000f },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
    { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
    { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
    { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
@@ -796,8 +909,8 @@
    { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
    { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
    { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
@@ -814,21 +927,23 @@
    { 0x00600001, 0x26200129, 0x008d0a60, 0x00000000 },
    { 0x00600001, 0x26400129, 0x008d0a80, 0x00000000 },
    { 0x00600001, 0x26600129, 0x008d0aa0, 0x00000000 },
-   { 0x0020000c, 0x2e600c21, 0x00210e80, 0x00000001 },
    { 0x0020000c, 0x2e6e3dad, 0x0045003a, 0x00020002 },
-   { 0x00200040, 0x2e603421, 0x00450e60, 0x00450e6e },
+   { 0x0020000c, 0x2e601ca5, 0x00450e80, 0x00000001 },
+   { 0x00200040, 0x2e6034a5, 0x00450e60, 0x00450e6e },
    { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+   { 0x02000005, 0x20002e3c, 0x0021003f, 0x00080008 },
+   { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
    { 0x01000005, 0x20002d3c, 0x0021003a, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000036 },
    { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x00000028 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
    { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
    { 0x00800040, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
    { 0x00800040, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
    { 0x00800040, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
@@ -863,8 +978,8 @@
    { 0x80800008, 0x2aa02d29, 0x00b10aa0, 0x00020002 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x00000028 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ac1 },
    { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0ae1 },
    { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b01 },
@@ -877,11 +992,11 @@
    { 0x01000005, 0x20002d3c, 0x0021003c, 0x00020002 },
    { 0x00010020, 0x34001c00, 0x00001400, 0x0000000f },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
-   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a005 },
-   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a006 },
+   { 0x00800031, 0x2b401d29, 0x00ad0e60, 0x0411a008 },
+   { 0x00800031, 0x2be01d29, 0x00ad0e60, 0x0411a009 },
    { 0x80800042, 0x29c04629, 0x00ad0ac0, 0x00ad0ae0 },
    { 0x80800042, 0x29e04629, 0x00ad0ae0, 0x00ad0b00 },
    { 0x80800042, 0x2a004629, 0x00ad0b00, 0x00ad0b20 },
@@ -892,8 +1007,8 @@
    { 0x80800042, 0x2aa04629, 0x00ad0bc0, 0x00ad0be0 },
    { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
    { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
-   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a005 },
-   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a006 },
+   { 0x00800031, 0x2ac01d29, 0x00ad0e60, 0x0414a008 },
+   { 0x00800031, 0x2b601d29, 0x00ad0e60, 0x0414a009 },
    { 0x00800001, 0x29c00229, 0x00ad0ac0, 0x00000000 },
    { 0x00800001, 0x29e00229, 0x00ad0ae0, 0x00000000 },
    { 0x00800001, 0x2a000229, 0x00ad0b00, 0x00000000 },
commit 80d588e9c49719ec494e705edfc14c78908bbc3f
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Fri Dec 12 18:27:29 2008 +0800

    Don't warn on ring enabled in GEM

diff --git a/src/i830_debug.c b/src/i830_debug.c
index 17ee40f..8ce6ce6 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -1762,7 +1762,7 @@ i830_check_error_state(ScrnInfoPtr pScrn)
 	errors++;
     }
     temp = INREG(LP_RING + RING_LEN);
-    if (temp & 1) {
+    if (!pI830->memory_manager && (temp & 1)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 		   "PRB0_CTL (0x%08lx) indicates ring buffer enabled\n", temp);
 	errors++;
commit 60c4ee9ece8ea57e61b1590dfeb69d08555e465c
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Fri Dec 12 18:00:09 2008 +0800

    Fix directRenderingType check
    
    Don't miss classic texture memory allocation in DRI.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 7590257..d3b539a 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1557,21 +1557,14 @@ I830AccelMethodInit(ScrnInfoPtr pScrn)
 	pI830->directRenderingType = DRI_DISABLED;
 
 #ifdef XF86DRI
-    if (pI830->directRenderingType == DRI_XF86DRI) {
-	if ((pI830->accel == ACCEL_NONE) || pI830->SWCursor) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "DRI is disabled because it "
-		       "needs HW cursor and 2D acceleration.\n");
-	    pI830->directRenderingType = DRI_DISABLED;
-	} else if (pScrn->depth != 16 && pScrn->depth != 24) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "DRI is disabled because it "
-		       "runs only at depths 16 and 24.\n");
-	    pI830->directRenderingType = DRI_DISABLED;
-	}
-
-	if (pI830->directRenderingType == DRI_XF86DRI) {
-	   pI830->allocate_classic_textures =
-	      xf86ReturnOptValBool(pI830->Options, OPTION_LEGACY3D, TRUE);
-	}
+    if (pI830->accel == ACCEL_NONE) {
+	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "DRI is disabled because it "
+		"needs 2D acceleration.\n");
+	pI830->directRenderingType = DRI_DISABLED;
+    } else if (pScrn->depth != 16 && pScrn->depth != 24) {
+	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "DRI is disabled because it "
+		"runs only at depths 16 and 24.\n");
+	pI830->directRenderingType = DRI_DISABLED;
     }
 #endif /* XF86DRI */
 
@@ -1691,14 +1684,6 @@ I830XvInit(ScrnInfoPtr pScrn)
     xf86DrvMsg(pScrn->scrnIndex, from, "video overlay key set to 0x%x\n",
 	       pI830->colorKey);
 #endif
-#ifdef INTEL_XVMC
-    pI830->XvMCEnabled = FALSE;
-    from =  (pI830->directRenderingType != DRI_DISABLED &&
-	     xf86GetOptValBool(pI830->Options, OPTION_XVMC,
-			       &pI830->XvMCEnabled)) ? X_CONFIG : X_DEFAULT;
-    xf86DrvMsg(pScrn->scrnIndex, from, "Intel XvMC decoder %sabled\n",
-	       pI830->XvMCEnabled ? "en" : "dis");
-#endif
 }
 
 static void
@@ -3105,8 +3090,16 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    /* If DRI hasn't been explicitly disabled, try to initialize it.
     * It will be used by the memory allocator.
     */
+   if (pI830->directRenderingType == DRI_NONE && pI830->SWCursor)
+       pI830->directRenderingType = DRI_DISABLED;
+
    if (pI830->directRenderingType == DRI_NONE && I830DRIScreenInit(pScreen))
        pI830->directRenderingType = DRI_XF86DRI;
+
+   if (pI830->directRenderingType == DRI_XF86DRI) {
+       pI830->allocate_classic_textures =
+	   xf86ReturnOptValBool(pI830->Options, OPTION_LEGACY3D, TRUE);
+   }
 #endif
 
    /* Enable tiling by default */
@@ -3262,7 +3255,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     * is called.   fbScreenInit will eventually call into the drivers
     * InitGLXVisuals call back.
     */
-
    if (pI830->directRenderingType == DRI_XF86DRI) {
       if (pI830->accel == ACCEL_NONE || pI830->SWCursor || (pI830->StolenOnly && I830IsPrimary(pScrn))) {
 	 xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "DRI is disabled because it "
@@ -3426,6 +3418,14 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    xf86DPMSInit(pScreen, xf86DPMSSet, 0);
 
 #ifdef I830_XV
+#ifdef INTEL_XVMC
+    pI830->XvMCEnabled = FALSE;
+    from =  (pI830->directRenderingType == DRI_XF86DRI &&
+	     xf86GetOptValBool(pI830->Options, OPTION_XVMC,
+			       &pI830->XvMCEnabled)) ? X_CONFIG : X_DEFAULT;
+    xf86DrvMsg(pScrn->scrnIndex, from, "Intel XvMC decoder %sabled\n",
+	       pI830->XvMCEnabled ? "en" : "dis");
+#endif
    /* Init video */
    if (pI830->XvEnabled && !pI830->use_drm_mode)
       I830InitVideo(pScreen);
commit edf765155497d89ecac328a5b268ecf60e2f377c
Author: Zou Nan hai <nanhai.zou at intel.com>
Date:   Thu Dec 11 15:41:59 2008 +0800

     [965-xvmc] fix dual prime kernel, flush issue on G4x

diff --git a/src/xvmc/dual_prime.g4a b/src/xvmc/dual_prime.g4a
index f1a8c31..7066a75 100644
--- a/src/xvmc/dual_prime.g4a
+++ b/src/xvmc/dual_prime.g4a
@@ -13,11 +13,11 @@
  * 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
+ * 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.
  *
  * Author:
@@ -26,23 +26,21 @@
  *    Xing Dong sheng <dongsheng.xing at intel.com>
  *
  */
-
-//and (1) g1.4<1>UD g1.4<1,1,1>UD 0xFFFFFFFEUD {align1};
 mov (8) g76.0<1>UD g1.0<8,8,1>UD {align1};
+//mov (8) g77.0<1>UD g2.0<8,8,1>UD {align1};
+
+include(`block_clear.g4i')
 mov (8) g115.0<1>UD g1.0<8,8,1>UD {align1};
 mov (8) g116.0<1>UD g1.0<8,8,1>UD {align1};
-mov(1) g115.8<1>UD 0x007001fUD  { align1 };
-//mov(1) g1.8<1>UD 0x007000fUD  { align1 };
 
-/*first vector---Y---top*/
-//and.nz (1) null g1.31<1,1,1>UB 1UW {align1};
+/* forward---Y---first vector*/
+mov(1) g115.8<1>UD 0x007001fUD  { align1 };
 asr (2) g115.14<1>W g1.14<2,2,1>W 1W {align1};
 add (2) g115.0<1>D g116.0<2,2,1>D g115.14<2,2,1>W {align1};
 and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
-//and.nz (1) null g1.31<1,1,1>UB 1UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-//add (1) g115.4<1>UD g115.4<1,1,1>UD 0UD {align1};
 mov(1) g115.8<1>UD 0x1fUD  { align1 }; //read 1 line, 32 columns.
+and.nz (1) null g1.31<1,1,1>UB 0x1UW {align1};
+(f0) add (1) g115.4<1>D g115.4<1,1,1>D 1D {align1};
 define(`surface',`4')
 define(`mv1',`g1.14')
 define(`mv2',`g1.16')
@@ -56,17 +54,16 @@ mov (8) g62.0<1>UD g101.0<8,8,1>UD {align1};
 mov (8) g64.0<1>UD g102.0<8,8,1>UD {align1};
 mov (8) g66.0<1>UD g103.0<8,8,1>UD {align1};
 
-/*first vector---Y---bottom*/
-asr (2) g115.14<1>W g1.18<2,2,1>W 1W {align1};
-add (2) g115.0<1>UD g116.0<2,2,1>UD g115.14<2,2,1>W {align1};
+/*forward---Y---second vector*/
+asr (2) g115.14<1>W g1.22<2,2,1>W 1W {align1};
+add (2) g115.0<1>D g116.0<2,2,1>D g115.14<2,2,1>W {align1};
 and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
-//and.nz (1) null g1.31<1,1,1>UB 1UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
 mov(1) g115.8<1>UD 0x1fUD { align1 }; //read 1 line, 32 columns.
+and.nz (1) null g1.31<1,1,1>UB 0x4UD {align1};
+(f0) add (1) g115.4<1>D g115.4<1,1,1>D 1D {align1};
 define(`surface',`4')
-define(`mv1',`g1.18')
-define(`mv2',`g1.20')
+define(`mv1',`g1.22')
+define(`mv2',`g1.24')
 include(`motion_field_y.g4i')
 mov (8) g53.0<1>UD g96.0<8,8,1>UD {align1};
 mov (8) g55.0<1>UD g97.0<8,8,1>UD {align1};
@@ -77,14 +74,14 @@ mov (8) g63.0<1>UD g101.0<8,8,1>UD {align1};
 mov (8) g65.0<1>UD g102.0<8,8,1>UD {align1};
 mov (8) g67.0<1>UD g103.0<8,8,1>UD {align1};
 
-/*first vector---UV---top*/
+/*forward---UV---first vector*/
 mov(1) g115.8<1>UD 0x007000fUD  { align1 };
-asr (2) g115.0<1>UD g116.0<1,1,1>UD 1UD {align1}; // x/=2 y/=2 
-asr (2) g115.14<1>W g1.14<2,2,1>W 2W {align1};   // vector/=4
-add (2) g115.0<1>UD g115.0<2,2,1>UD g115.14<2,2,1>W {align1}; // (x,y)+=vector
-and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};  // cut y
-//and.nz (1) null g1.31<1,1,1>UB 1UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+asr (2) g115.14<1>W g1.14<2,2,1>W 2W {align1};
+asr (2) g115.0<1>D g116.0<2,2,1>D 1D {align1};
+add (2) g115.0<1>D g115.0<2,2,1>D g115.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g1.31<1,1,1>UB 0x1UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
 define(`surface_u',`5')
 define(`surface_v',`6')
 define(`mv1',`g1.14')
@@ -99,19 +96,15 @@ mov (8) g73.0<1>UW g83.0<8,8,1>UW {align1};
 mov (8) g74.0<1>UW g84.0<8,8,1>UW {align1};
 mov (8) g75.0<1>UW g85.0<8,8,1>UW {align1};
 
-
-/*first vector---UV---bottom*/
-asr (2) g115.0<1>UD g116.0<1,1,1>UD 1UD {align1}; // x/=2 y/=2 
-asr (2) g115.14<1>W g1.18<2,2,1>W 2W {align1};   // vector/=4
-add (2) g115.0<1>UD g115.0<2,2,1>UD g115.14<2,2,1>W {align1}; // (x,y)+=vector
-and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};  // cut y
-//and.nz (1) null g1.31<1,1,1>UB 1UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-define(`surface_u',`5')
-define(`surface_v',`6')
-define(`mv1',`g1.18')
-define(`mv2',`g1.20')
+/*forward---UV---second vector */
+asr (2) g115.14<1>W g1.22<2,2,1>W 2W {align1};
+asr (2) g115.0<1>D g116.0<2,2,1>D 1D {align1};
+add (2) g115.0<1>D g115.0<2,2,1>D g115.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g1.31<1,1,1>UB 0x4UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`mv1',`g1.24')
+define(`mv2',`g1.26')
 include(`motion_field_uv.g4i')
 mov (8) g68.16<1>UW g78.0<8,8,1>UW {align1};
 mov (8) g69.16<1>UW g79.0<8,8,1>UW {align1};
@@ -122,25 +115,19 @@ mov (8) g73.16<1>UW g83.0<8,8,1>UW {align1};
 mov (8) g74.16<1>UW g84.0<8,8,1>UW {align1};
 mov (8) g75.16<1>UW g85.0<8,8,1>UW {align1};
 
-
-
-/*second vector---Y---top*/
-//mov(1) g115.8<1>UD 0x007001fUD  { align1 };
-//mov(1) g1.8<1>UD 0x007000fUD  { align1 };
-//cmp.g (1) null g1.14<1,1,1>W 0W {align1};
-//(f0) add (1) g1.22<1>W g1.22<1,1,1>W 1W {align1};
-//cmp.g (1) null g1.16<1,1,1>W 0W {align1};
-//(f0) add (1) g1.24<1>W g1.24<1,1,1>W 10W {align1};
-asr (2) g115.14<1>W g1.22<2,2,1>W 1W {align1};
-add (2) g115.0<1>UD g116.0<2,2,1>UD g115.14<2,2,1>W {align1};
+/*backward---Y---first vector */
+mov(8) g1.0<1>UD g116.0<8,8,1>UD {align1};
+mov(1) g115.8<1>UD 0x007001fUD  { align1 };
+mov(1) g1.8<1>UD 0x007000fUD  { align1 };
+asr (2) g115.14<1>W g1.18<2,2,1>W 1W {align1};
+add (2) g115.0<1>D g116.0<2,2,1>D g115.14<2,2,1>W {align1};
 and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
-//and.nz (1) null g1.31<1,1,1>UB 4UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-add (1) g115.4<1>UD g115.4<1,1,1>UD 1D {align1};
 mov(1) g115.8<1>UD 0x1fUD  { align1 }; //read 1 line, 32 columns.
-define(`surface',`4')
-define(`mv1',`g1.22')
-define(`mv2',`g1.24')
+and.nz (1) null g1.31<1,1,1>UB 0x2UW {align1};
+(f0) add (1) g115.4<1>D g115.4<1,1,1>D 1D {align1};
+define(`surface',`7')
+define(`mv1',`g1.18')
+define(`mv2',`g1.20')
 include(`motion_field_y.g4i')
 mov (8) g28.0<1>UD g96.0<8,8,1>UD {align1};
 mov (8) g30.0<1>UD g97.0<8,8,1>UD {align1};
@@ -151,18 +138,14 @@ mov (8) g38.0<1>UD g101.0<8,8,1>UD {align1};
 mov (8) g40.0<1>UD g102.0<8,8,1>UD {align1};
 mov (8) g42.0<1>UD g103.0<8,8,1>UD {align1};
 
-/*second vector---Y---bottom*/
-//cmp.g (1) null g1.18<1,1,1>W 0W {align1};
-//(f0) add (1) g1.26<1>W g1.26<1,1,1>W 1W {align1};
-cmp.g (1) null g1.20<1,1,1>W 0W {align1};
-(f0) add (1) g1.28<1>W g1.28<1,1,1>W 5W {align1};
+/*backward---Y---second vector */
 asr (2) g115.14<1>W g1.26<2,2,1>W 1W {align1};
-add (2) g115.0<1>UD g116.0<2,2,1>UD g115.14<2,2,1>W {align1};
+add (2) g115.0<1>D g116.0<2,2,1>D g115.14<2,2,1>W {align1};
 and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
-//and.nz (1)null g1.31<1,1,1>UB 4UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
 mov(1) g115.8<1>UD 0x1fUD  { align1 }; //read 1 line, 32 columns.
-define(`surface',`4')
+and.nz (1) null g2.20<1,1,1>UD 0x8UD {align1};
+(f0) add (1) g115.4<1>D g115.4<1,1,1>D 1D {align1};
+define(`surface',`7')
 define(`mv1',`g1.26')
 define(`mv2',`g1.28')
 include(`motion_field_y.g4i')
@@ -184,19 +167,18 @@ avg.sat (16) g41.0<1>UW g65.0<16,16,1>UW g102.0<16,16,1>UW {align1};
 avg.sat (16) g42.0<1>UW g66.0<16,16,1>UW g42.0<16,16,1>UW {align1};
 avg.sat (16) g43.0<1>UW g67.0<16,16,1>UW g103.0<16,16,1>UW {align1};
 
-/*second vector---UV---top*/
+/*backward---UV---first vector */
 mov(1) g115.8<1>UD 0x007000fUD  { align1 };
-asr (2) g115.0<1>UD g116.0<1,1,1>UD 1UD {align1}; // x/=2 y/=2 
-asr (2) g115.14<1>W g1.22<2,2,1>W 2W {align1};   // vector/=4
-add (2) g115.0<1>UD g115.0<2,2,1>UD g115.14<2,2,1>W {align1}; // (x,y)+=vector
-and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};  // cut y
-//and.nz (1) null g1.31<1,1,1>UB 4UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-define(`surface_u',`5')
-define(`surface_v',`6')
-define(`mv1',`g1.22')
-define(`mv2',`g1.24')
+asr (2) g115.14<1>W g1.18<2,2,1>W 2W {align1};
+asr (2) g115.0<1>D g116.0<2,2,1>D 1D {align1};
+add (2) g115.0<1>D g115.0<2,2,1>D g115.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g1.31<1,1,1>UB 0x2UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface_u',`8')
+define(`surface_v',`9')
+define(`mv1',`g1.18')
+define(`mv2',`g1.20')
 include(`motion_field_uv.g4i')
 mov (8) g44.0<1>UW g78.0<8,8,1>UW {align1};
 mov (8) g45.0<1>UW g79.0<8,8,1>UW {align1};
@@ -207,15 +189,13 @@ mov (8) g49.0<1>UW g83.0<8,8,1>UW {align1};
 mov (8) g50.0<1>UW g84.0<8,8,1>UW {align1};
 mov (8) g51.0<1>UW g85.0<8,8,1>UW {align1};
 
-/*second vector---UV---bottom*/
-asr (2) g115.0<1>UD g116.0<1,1,1>UD 1UD {align1}; // x/=2 y/=2 
-asr (2) g115.14<1>W g1.26<2,2,1>W 2W {align1};   // vector/=4
-add (2) g115.0<1>UD g115.0<2,2,1>UD g115.14<2,2,1>W {align1}; // (x,y)+=vector
-and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};  // cut y
-//and.nz (1) null g1.31<1,1,1>UB 4UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-define(`surface_u',`5')
-define(`surface_v',`6')
+/*backward---UV---second vector */
+asr (2) g115.14<1>W g1.26<2,2,1>W 2W {align1};
+asr (2) g115.0<1>D g116.0<2,2,1>D 1D {align1};
+add (2) g115.0<1>D g115.0<2,2,1>D g115.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g1.31<1,1,1>UB 0x8UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
 define(`mv1',`g1.26')
 define(`mv2',`g1.28')
 include(`motion_field_uv.g4i')
@@ -236,6 +216,7 @@ avg.sat (16) g48.0<1>UW g72.0<16,16,1>UW g48.0<16,16,1>UW {align1};
 avg.sat (16) g49.0<1>UW g73.0<16,16,1>UW g49.0<16,16,1>UW {align1};
 avg.sat (16) g50.0<1>UW g74.0<16,16,1>UW g50.0<16,16,1>UW {align1};
 avg.sat (16) g51.0<1>UW g75.0<16,16,1>UW g51.0<16,16,1>UW {align1};
+
 include(`addidct.g4i')
 
 //send (16) 0 acc0<1>UW g0<8,8,1>UW 
diff --git a/src/xvmc/dual_prime_igd.g4a b/src/xvmc/dual_prime_igd.g4a
index 4a59cad..e741244 100644
--- a/src/xvmc/dual_prime_igd.g4a
+++ b/src/xvmc/dual_prime_igd.g4a
@@ -13,11 +13,11 @@
  * 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
+ * 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.
  *
  * Author:
@@ -26,23 +26,21 @@
  *    Xing Dong sheng <dongsheng.xing at intel.com>
  *
  */
-
-//and (1) g1.4<1>UD g1.4<1,1,1>UD 0xFFFFFFFEUD {align1};
 mov (8) g76.0<1>UD g1.0<8,8,1>UD {align1};
+//mov (8) g77.0<1>UD g2.0<8,8,1>UD {align1};
+
+include(`block_clear.g4i')
 mov (8) g115.0<1>UD g1.0<8,8,1>UD {align1};
 mov (8) g116.0<1>UD g1.0<8,8,1>UD {align1};
-mov(1) g115.8<1>UD 0x007001fUD  { align1 };
-//mov(1) g1.8<1>UD 0x007000fUD  { align1 };
 
-/*first vector---Y---top*/
-//and.nz (1) null g1.31<1,1,1>UB 1UW {align1};
+/* forward---Y---first vector*/
+mov(1) g115.8<1>UD 0x007001fUD  { align1 };
 asr (2) g115.14<1>W g1.14<2,2,1>W 1W {align1};
 add (2) g115.0<1>D g116.0<2,2,1>D g115.14<2,2,1>W {align1};
 and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
-//and.nz (1) null g1.31<1,1,1>UB 1UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-//add (1) g115.4<1>UD g115.4<1,1,1>UD 0UD {align1};
 mov(1) g115.8<1>UD 0x1fUD  { align1 }; //read 1 line, 32 columns.
+and.nz (1) null g1.31<1,1,1>UB 0x1UW {align1};
+(f0) add (1) g115.4<1>D g115.4<1,1,1>D 1D {align1};
 define(`surface',`4')
 define(`mv1',`g1.14')
 define(`mv2',`g1.16')
@@ -56,17 +54,16 @@ mov (8) g62.0<1>UD g101.0<8,8,1>UD {align1};
 mov (8) g64.0<1>UD g102.0<8,8,1>UD {align1};
 mov (8) g66.0<1>UD g103.0<8,8,1>UD {align1};
 
-/*first vector---Y---bottom*/
-asr (2) g115.14<1>W g1.18<2,2,1>W 1W {align1};
-add (2) g115.0<1>UD g116.0<2,2,1>UD g115.14<2,2,1>W {align1};
+/*forward---Y---second vector*/
+asr (2) g115.14<1>W g1.22<2,2,1>W 1W {align1};
+add (2) g115.0<1>D g116.0<2,2,1>D g115.14<2,2,1>W {align1};
 and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
-//and.nz (1) null g1.31<1,1,1>UB 1UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
 mov(1) g115.8<1>UD 0x1fUD { align1 }; //read 1 line, 32 columns.
+and.nz (1) null g1.31<1,1,1>UB 0x4UD {align1};
+(f0) add (1) g115.4<1>D g115.4<1,1,1>D 1D {align1};
 define(`surface',`4')
-define(`mv1',`g1.18')
-define(`mv2',`g1.20')
+define(`mv1',`g1.22')
+define(`mv2',`g1.24')
 include(`motion_field_y_igd.g4i')
 mov (8) g53.0<1>UD g96.0<8,8,1>UD {align1};
 mov (8) g55.0<1>UD g97.0<8,8,1>UD {align1};
@@ -77,14 +74,14 @@ mov (8) g63.0<1>UD g101.0<8,8,1>UD {align1};
 mov (8) g65.0<1>UD g102.0<8,8,1>UD {align1};
 mov (8) g67.0<1>UD g103.0<8,8,1>UD {align1};
 
-/*first vector---UV---top*/
+/*forward---UV---first vector*/
 mov(1) g115.8<1>UD 0x007000fUD  { align1 };
-asr (2) g115.0<1>UD g116.0<1,1,1>UD 1UD {align1}; // x/=2 y/=2 
-asr (2) g115.14<1>W g1.14<2,2,1>W 2W {align1};   // vector/=4
-add (2) g115.0<1>UD g115.0<2,2,1>UD g115.14<2,2,1>W {align1}; // (x,y)+=vector
-and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};  // cut y
-//and.nz (1) null g1.31<1,1,1>UB 1UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+asr (2) g115.14<1>W g1.14<2,2,1>W 2W {align1};
+asr (2) g115.0<1>D g116.0<2,2,1>D 1D {align1};
+add (2) g115.0<1>D g115.0<2,2,1>D g115.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g1.31<1,1,1>UB 0x1UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
 define(`surface_u',`5')
 define(`surface_v',`6')
 define(`mv1',`g1.14')
@@ -99,19 +96,15 @@ mov (8) g73.0<1>UW g83.0<8,8,1>UW {align1};
 mov (8) g74.0<1>UW g84.0<8,8,1>UW {align1};
 mov (8) g75.0<1>UW g85.0<8,8,1>UW {align1};
 
-
-/*first vector---UV---bottom*/
-asr (2) g115.0<1>UD g116.0<1,1,1>UD 1UD {align1}; // x/=2 y/=2 
-asr (2) g115.14<1>W g1.18<2,2,1>W 2W {align1};   // vector/=4
-add (2) g115.0<1>UD g115.0<2,2,1>UD g115.14<2,2,1>W {align1}; // (x,y)+=vector
-and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};  // cut y
-//and.nz (1) null g1.31<1,1,1>UB 1UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-define(`surface_u',`5')
-define(`surface_v',`6')
-define(`mv1',`g1.18')
-define(`mv2',`g1.20')
+/*forward---UV---second vector */
+asr (2) g115.14<1>W g1.22<2,2,1>W 2W {align1};
+asr (2) g115.0<1>D g116.0<2,2,1>D 1D {align1};
+add (2) g115.0<1>D g115.0<2,2,1>D g115.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g1.31<1,1,1>UB 0x4UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`mv1',`g1.24')
+define(`mv2',`g1.26')
 include(`motion_field_uv_igd.g4i')
 mov (8) g68.16<1>UW g78.0<8,8,1>UW {align1};
 mov (8) g69.16<1>UW g79.0<8,8,1>UW {align1};
@@ -122,25 +115,19 @@ mov (8) g73.16<1>UW g83.0<8,8,1>UW {align1};
 mov (8) g74.16<1>UW g84.0<8,8,1>UW {align1};
 mov (8) g75.16<1>UW g85.0<8,8,1>UW {align1};
 
-
-
-/*second vector---Y---top*/
-//mov(1) g115.8<1>UD 0x007001fUD  { align1 };
-//mov(1) g1.8<1>UD 0x007000fUD  { align1 };
-//cmp.g (1) null g1.14<1,1,1>W 0W {align1};
-//(f0) add (1) g1.22<1>W g1.22<1,1,1>W 1W {align1};
-//cmp.g (1) null g1.16<1,1,1>W 0W {align1};
-//(f0) add (1) g1.24<1>W g1.24<1,1,1>W 10W {align1};
-asr (2) g115.14<1>W g1.22<2,2,1>W 1W {align1};
-add (2) g115.0<1>UD g116.0<2,2,1>UD g115.14<2,2,1>W {align1};
+/*backward---Y---first vector */
+mov(8) g1.0<1>UD g116.0<8,8,1>UD {align1};
+mov(1) g115.8<1>UD 0x007001fUD  { align1 };
+mov(1) g1.8<1>UD 0x007000fUD  { align1 };
+asr (2) g115.14<1>W g1.18<2,2,1>W 1W {align1};
+add (2) g115.0<1>D g116.0<2,2,1>D g115.14<2,2,1>W {align1};
 and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
-//and.nz (1) null g1.31<1,1,1>UB 4UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-add (1) g115.4<1>UD g115.4<1,1,1>UD 1D {align1};
 mov(1) g115.8<1>UD 0x1fUD  { align1 }; //read 1 line, 32 columns.
-define(`surface',`4')
-define(`mv1',`g1.22')
-define(`mv2',`g1.24')
+and.nz (1) null g1.31<1,1,1>UB 0x2UW {align1};
+(f0) add (1) g115.4<1>D g115.4<1,1,1>D 1D {align1};
+define(`surface',`7')
+define(`mv1',`g1.18')
+define(`mv2',`g1.20')
 include(`motion_field_y_igd.g4i')
 mov (8) g28.0<1>UD g96.0<8,8,1>UD {align1};
 mov (8) g30.0<1>UD g97.0<8,8,1>UD {align1};
@@ -151,18 +138,14 @@ mov (8) g38.0<1>UD g101.0<8,8,1>UD {align1};
 mov (8) g40.0<1>UD g102.0<8,8,1>UD {align1};
 mov (8) g42.0<1>UD g103.0<8,8,1>UD {align1};
 
-/*second vector---Y---bottom*/
-//cmp.g (1) null g1.18<1,1,1>W 0W {align1};
-//(f0) add (1) g1.26<1>W g1.26<1,1,1>W 1W {align1};
-cmp.g (1) null g1.20<1,1,1>W 0W {align1};
-(f0) add (1) g1.28<1>W g1.28<1,1,1>W 5W {align1};
+/*backward---Y---second vector */
 asr (2) g115.14<1>W g1.26<2,2,1>W 1W {align1};
-add (2) g115.0<1>UD g116.0<2,2,1>UD g115.14<2,2,1>W {align1};
+add (2) g115.0<1>D g116.0<2,2,1>D g115.14<2,2,1>W {align1};
 and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
-//and.nz (1)null g1.31<1,1,1>UB 4UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
 mov(1) g115.8<1>UD 0x1fUD  { align1 }; //read 1 line, 32 columns.
-define(`surface',`4')
+and.nz (1) null g2.20<1,1,1>UD 0x8UD {align1};
+(f0) add (1) g115.4<1>D g115.4<1,1,1>D 1D {align1};
+define(`surface',`7')
 define(`mv1',`g1.26')
 define(`mv2',`g1.28')
 include(`motion_field_y_igd.g4i')
@@ -184,19 +167,18 @@ avg.sat (16) g41.0<1>UW g65.0<16,16,1>UW g102.0<16,16,1>UW {align1};
 avg.sat (16) g42.0<1>UW g66.0<16,16,1>UW g42.0<16,16,1>UW {align1};
 avg.sat (16) g43.0<1>UW g67.0<16,16,1>UW g103.0<16,16,1>UW {align1};
 
-/*second vector---UV---top*/
+/*backward---UV---first vector */
 mov(1) g115.8<1>UD 0x007000fUD  { align1 };
-asr (2) g115.0<1>UD g116.0<1,1,1>UD 1UD {align1}; // x/=2 y/=2 
-asr (2) g115.14<1>W g1.22<2,2,1>W 2W {align1};   // vector/=4
-add (2) g115.0<1>UD g115.0<2,2,1>UD g115.14<2,2,1>W {align1}; // (x,y)+=vector
-and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};  // cut y
-//and.nz (1) null g1.31<1,1,1>UB 4UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-define(`surface_u',`5')
-define(`surface_v',`6')
-define(`mv1',`g1.22')
-define(`mv2',`g1.24')
+asr (2) g115.14<1>W g1.18<2,2,1>W 2W {align1};
+asr (2) g115.0<1>D g116.0<2,2,1>D 1D {align1};
+add (2) g115.0<1>D g115.0<2,2,1>D g115.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g1.31<1,1,1>UB 0x2UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface_u',`8')
+define(`surface_v',`9')
+define(`mv1',`g1.18')
+define(`mv2',`g1.20')
 include(`motion_field_uv_igd.g4i')
 mov (8) g44.0<1>UW g78.0<8,8,1>UW {align1};
 mov (8) g45.0<1>UW g79.0<8,8,1>UW {align1};
@@ -207,15 +189,13 @@ mov (8) g49.0<1>UW g83.0<8,8,1>UW {align1};
 mov (8) g50.0<1>UW g84.0<8,8,1>UW {align1};
 mov (8) g51.0<1>UW g85.0<8,8,1>UW {align1};
 
-/*second vector---UV---bottom*/
-asr (2) g115.0<1>UD g116.0<1,1,1>UD 1UD {align1}; // x/=2 y/=2 
-asr (2) g115.14<1>W g1.26<2,2,1>W 2W {align1};   // vector/=4
-add (2) g115.0<1>UD g115.0<2,2,1>UD g115.14<2,2,1>W {align1}; // (x,y)+=vector
-and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};  // cut y
-//and.nz (1) null g1.31<1,1,1>UB 4UW {align1};
-//(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
-define(`surface_u',`5')
-define(`surface_v',`6')
+/*backward---UV---second vector */
+asr (2) g115.14<1>W g1.26<2,2,1>W 2W {align1};
+asr (2) g115.0<1>D g116.0<2,2,1>D 1D {align1};
+add (2) g115.0<1>D g115.0<2,2,1>D g115.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g1.31<1,1,1>UB 0x8UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
 define(`mv1',`g1.26')
 define(`mv2',`g1.28')
 include(`motion_field_uv_igd.g4i')
@@ -236,6 +216,7 @@ avg.sat (16) g48.0<1>UW g72.0<16,16,1>UW g48.0<16,16,1>UW {align1};
 avg.sat (16) g49.0<1>UW g73.0<16,16,1>UW g49.0<16,16,1>UW {align1};
 avg.sat (16) g50.0<1>UW g74.0<16,16,1>UW g50.0<16,16,1>UW {align1};
 avg.sat (16) g51.0<1>UW g75.0<16,16,1>UW g51.0<16,16,1>UW {align1};
+
 include(`addidct.g4i')
 
 //send (16) 0 acc0<1>UW g0<8,8,1>UW 
diff --git a/src/xvmc/i965_xvmc.c b/src/xvmc/i965_xvmc.c
index 8ccdd77..31d6896 100644
--- a/src/xvmc/i965_xvmc.c
+++ b/src/xvmc/i965_xvmc.c
@@ -176,6 +176,7 @@ static void flush()
     struct brw_mi_flush flush;
     memset(&flush, 0, sizeof(flush));
     flush.opcode = CMD_MI_FLUSH;
+    flush.flags = (1<<1);
     BATCH_STRUCT(flush);
 }
 
commit 80e2d90139dd99f50beb4f9353599608624b777d
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Thu Dec 11 13:45:17 2008 +0800

    Let lid status be unknown if no acpi lid object found

diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 73993db..b1bf6ee 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -409,11 +409,9 @@ i830_lvds_acpi_lid_open(xf86OutputPtr output)
 
     lid_dir = opendir(ACPI_LID);
 
-    /* if acpi button loaded, but no lid device, assume no panel */
-    if (lid_dir == NULL) {
-	ret = LID_CLOSE;
+    /* no acpi lid object found */
+    if (lid_dir == NULL)
 	goto out;
-    }
 
     while (1) {
 	lid_dent = readdir(lid_dir);
commit 83377b543defdca7226d7c1a7794e4ff3d8b4c84
Author: Bryce Harrington <bryce at canonical.com>
Date:   Thu Dec 11 09:38:27 2008 +0800

    Pipe-A quirk for HP 2730p (bug #18852)

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 9c00e62..68e39ee 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -287,6 +287,8 @@ static i830_quirk i830_quirk_list[] = {
     { PCI_CHIP_I915_GM, 0x103c, 0x099c, quirk_ignore_tv },
     /* HP Compaq 6730s has no TV output */
     { PCI_CHIP_GM45_GM, 0x103c, 0x30e8, quirk_ignore_tv },
+    /* HP Compaq 2730p needs pipe A force quirk (LP: #291555) */
+    { PCI_CHIP_GM45_GM, 0x103c, 0x30eb, quirk_pipea_force },
 
     /* Thinkpad R31 needs pipe A force quirk */
     { PCI_CHIP_I830_M, 0x1014, 0x0505, quirk_pipea_force },
commit 6c4e134a1a30785c2e5c6d57b21fde54a2dd3413
Author: Bryce Harrington <bryce at canonical.com>
Date:   Thu Dec 11 09:34:15 2008 +0800

    PipeA quirk for Quanta/W251U (launchpad bug #244242)

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 1604294..9c00e62 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -326,6 +326,9 @@ static i830_quirk i830_quirk_list[] = {
     /* Sony VGC-LT71DB has no VGA output (bug #17395) */
     { PCI_CHIP_I965_GM, 0x104d, 0x9018, quirk_ignore_crt },
 
+    /* Quanta Gigabyte W251U (See LP: #244242) */
+    { PCI_CHIP_I945_GM, 0x152d, 0x0755, quirk_pipea_force },
+
     /* Ordi Enduro UW31 (See LP: #152416) */
     { PCI_CHIP_I945_GM, 0x1584, 0x9900, quirk_ignore_tv },
 
commit 1e974ff6b8446ecd64677b3c9aba60ca850923cc
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Dec 10 10:54:31 2008 +0800

    Try to always probe SDVOC on 965G/965GM
    
    Detect bit of SDVOC is reserved on 965G/965GM, instead of ignore SDVOC
    this trys to always probe it on these chipsets.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 4f87efb..7590257 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -919,7 +919,9 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
 	    i830_hdmi_init(pScrn, SDVOB);
       }
 
-      if ((INREG(SDVOC) & SDVO_DETECTED) || pI830->force_sdvo_detect) {
+      if ((INREG(SDVOC) & SDVO_DETECTED) || pI830->force_sdvo_detect ||
+	      /* SDVOC detect bit is reserved on 965G/965GM */
+	      (IS_I965G(pI830) && !IS_G4X(pI830))) {
 	 Bool found = i830_sdvo_init(pScrn, SDVOC);
 
 	 if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
commit f5f67e1b54e67b4bfc3db3482b2693211be81d63
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Dec 10 10:36:07 2008 +0800

    bug #17395: Quirk CRT for Sony VGC-LT71DB

diff --git a/src/i830.h b/src/i830.h
index db35c1d..8ad5c69 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -1034,6 +1034,7 @@ extern const int I830CopyROP[16];
 #define QUIRK_IVCH_NEED_DVOB		0x00000010
 #define QUIRK_RESET_MODES		0x00000020
 #define QUIRK_PFIT_SAFE			0x00000040
+#define QUIRK_IGNORE_CRT		0x00000080
 extern void i830_fixup_devices(ScrnInfoPtr);
 
 #endif /* _I830_H_ */
diff --git a/src/i830_crt.c b/src/i830_crt.c
index ad81fbb..605ecf9 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -517,6 +517,9 @@ i830_crt_init(ScrnInfoPtr pScrn)
     I830OutputPrivatePtr    i830_output;
     I830Ptr		    pI830 = I830PTR(pScrn);
 
+    if (pI830->quirk_flag & QUIRK_IGNORE_CRT)
+	return;
+
     output = xf86OutputCreate (pScrn, &i830_crt_output_funcs, "VGA");
     if (!output)
 	return;
diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 54e3af6..1604294 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -194,6 +194,11 @@ static void quirk_ignore_lvds (I830Ptr pI830)
     pI830->quirk_flag |= QUIRK_IGNORE_LVDS;
 }
 
+static void quirk_ignore_crt (I830Ptr pI830)
+{
+    pI830->quirk_flag |= QUIRK_IGNORE_CRT;
+}
+
 static void quirk_mac_mini (I830Ptr pI830)
 {
     pI830->quirk_flag |= QUIRK_IGNORE_MACMINI_LVDS;
@@ -318,6 +323,8 @@ static i830_quirk i830_quirk_list[] = {
     { PCI_CHIP_I830_M, 0x104d, 0x8100, quirk_ivch_dvob },
     /* Sony vaio VGN-SZ4MN (See LP: #212163) */
     { PCI_CHIP_I830_M, 0x104d, 0x81e6, quirk_pipea_force },
+    /* Sony VGC-LT71DB has no VGA output (bug #17395) */
+    { PCI_CHIP_I965_GM, 0x104d, 0x9018, quirk_ignore_crt },
 
     /* Ordi Enduro UW31 (See LP: #152416) */
     { PCI_CHIP_I945_GM, 0x1584, 0x9900, quirk_ignore_tv },
commit d8b764fbd27dc9c8b28386093931b8d38855bd19
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Dec 9 21:51:14 2008 -0800

    Add RandR 1.3 panning support by supporting the crtc set_origin function
    
    RandR 1.3 panning support can use the regular mode setting interface, but
    that's really slow. Providing set_origin makes it nice and snappy.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/i830_display.c b/src/i830_display.c
index 2626612..2e5d55a 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1638,6 +1638,13 @@ i830_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
     }
 }
 
+#if RANDR_13_INTERFACE
+static void
+i830_crtc_set_origin(xf86CrtcPtr crtc, int x, int y)
+{
+    i830PipeSetBase(crtc, x, y);
+}
+#endif
 
 void
 i830DescribeOutputConfiguration(ScrnInfoPtr pScrn)
@@ -1959,6 +1966,9 @@ static const xf86CrtcFuncsRec i830_crtc_funcs = {
 /*    .load_cursor_image = i830_crtc_load_cursor_image, */
     .load_cursor_argb = i830_crtc_load_cursor_argb,
     .destroy = NULL, /* XXX */
+#if RANDR_13_INTERFACE
+    .set_origin = i830_crtc_set_origin,
+#endif
 };
 
 void
commit 4d7a95959d8223aec41550eb19f60b3edd7210a1
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Tue Dec 9 19:48:11 2008 +0800

    Try to add LVDS detect support
    
    This one trys to use lid status for LVDS detect,
    which works when internal panel is not used as primary
    display alone, or there's no internal panel at all.
    ACPI button driver's lid state interface is preferred,
    and SWF state is also checked if ACPI method failed.

diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 1799eab..73993db 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -35,6 +35,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <dirent.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 
@@ -96,6 +97,15 @@ static char *backlight_interfaces[] = {
 
 static int backlight_index;
 
+enum lid_status {
+    LID_UNKNOWN = -1,
+    LID_OPEN,
+    LID_CLOSE,
+};
+
+#define ACPI_BUTTON "/proc/acpi/button/"
+#define ACPI_LID "/proc/acpi/button/lid/"
+
 static Bool
 i830_kernel_backlight_available(xf86OutputPtr output)
 {
@@ -376,6 +386,105 @@ out_err:
 }
 
 /**
+ *  Get lid state from ACPI button driver
+ */
+static int
+i830_lvds_acpi_lid_open(xf86OutputPtr output)
+{
+    ScrnInfoPtr pScrn = output->scrn;
+    I830Ptr pI830 = I830PTR(pScrn);
+    int fd;
+    DIR *button_dir;
+    DIR *lid_dir;
+    struct dirent *lid_dent;
+    char *state_name;
+    char state[64];
+    enum lid_status ret = LID_UNKNOWN;
+
+    button_dir = opendir(ACPI_BUTTON);
+    /* If acpi button driver is not loaded, bypass ACPI check method */
+    if (button_dir == NULL)
+	goto out;
+    closedir(button_dir);
+
+    lid_dir = opendir(ACPI_LID);
+
+    /* if acpi button loaded, but no lid device, assume no panel */
+    if (lid_dir == NULL) {
+	ret = LID_CLOSE;
+	goto out;
+    }
+
+    while (1) {
+	lid_dent = readdir(lid_dir);
+	if (lid_dent == NULL) {
+	    /* no LID object */
+	    closedir(lid_dir);
+	    goto out;
+	}
+	if (strcmp(lid_dent->d_name, ".") &&
+		strcmp(lid_dent->d_name, "..")) {
+	    closedir(lid_dir);
+	    break;
+	}
+    }
+    state_name = malloc(strlen(ACPI_LID) + strlen(lid_dent->d_name) + 7);
+    memset(state_name, 0, sizeof(state_name));
+    strcat(state_name, ACPI_LID);
+    strcat(state_name, lid_dent->d_name);
+    strcat(state_name, "/state");
+
+    if ((fd = open(state_name, O_RDONLY)) == -1) {
+	free(state_name);
+	goto out;
+    }
+    free(state_name);
+    if (read(fd, state, 64) == -1) {
+	close(fd);
+	goto out;
+    }
+    close(fd);
+    if (strstr(state, "open"))
+	ret = LID_OPEN;
+    else if (strstr(state, "closed"))
+	ret = LID_CLOSE;
+    else /* "unsupported" */
+	ret = LID_UNKNOWN;
+
+out:
+    if (pI830->debug_modes && (ret != LID_UNKNOWN))
+	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		"LID switch detect %s with ACPI button\n",
+		ret ? "closed" : "open");
+
+    return ret;
+}
+
+/**
+ * Get LID switch close state from SWF
+ */
+static Bool
+i830_lvds_swf_lid_close(xf86OutputPtr output)
+{
+    ScrnInfoPtr pScrn = output->scrn;
+    I830Ptr pI830 = I830PTR(pScrn);
+    uint32_t swf14 = INREG(SWF14);
+    Bool ret;
+
+    if (swf14 & SWF14_LID_SWITCH_EN)
+	ret = TRUE;
+    else
+	ret = FALSE;
+
+    if (pI830->debug_modes)
+	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		"LID switch detect %s with SWF14 0x%8x\n",
+		ret ? "closed" : "open", swf14);
+
+    return ret;
+}
+
+/**
  * Sets the power state for the panel.
  */
 static void
@@ -765,13 +874,21 @@ i830_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
 
 /**
  * Detect the LVDS connection.
- *
- * This always returns OUTPUT_STATUS_CONNECTED.  This output should only have
- * been set up if the LVDS was actually connected anyway.
  */
 static xf86OutputStatus
 i830_lvds_detect(xf86OutputPtr output)
 {
+    enum lid_status lid;
+
+    lid = i830_lvds_acpi_lid_open(output);
+    if (lid == LID_OPEN)
+	return XF86OutputStatusConnected;
+    else if (lid == LID_CLOSE)
+	return XF86OutputStatusDisconnected;
+
+    if (i830_lvds_swf_lid_close(output))
+	return XF86OutputStatusDisconnected;
+
     return XF86OutputStatusConnected;
 }
 
commit 0fe61b0b7e3bbe8ced1b0ad2be72c438d200c64b
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Tue Dec 9 19:19:58 2008 +0800

    Remove Cappuccino SlimPRO SP625F 855GM LVDS quirk
    
    It breaks bug #18462 on IBM 855GM with same subdevice ids.

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 155cb44..54e3af6 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -229,9 +229,6 @@ static i830_quirk i830_quirk_list[] = {
     { PCI_CHIP_I965_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
     { PCI_CHIP_I965_GM, 0x8086, 0x1999, quirk_ignore_lvds },
 
-    /* Cappuccino SlimPRO SP625F, bz #11368 */
-    { PCI_CHIP_I855_GM, 0x8086, 0x3582, quirk_ignore_lvds },
-
     /* Apple Mac mini has no lvds, but macbook pro does */
     { PCI_CHIP_I945_GM, 0x8086, 0x7270, quirk_mac_mini },
 
commit bea98cdfd93fc1181a06c51e57fcab227ff4827e
Author: Carl Worth <cworth at cworth.org>
Date:   Fri Dec 5 15:42:53 2008 -0800

    Set vertex_buffer_bo to NULL after unreference.
    
    Which is just being tidy. We initially were looking at this code
    path due to a report of a crash on server shutdown which started
    after this unreference call was added. Setting this to NULL
    apparently didn't avoid the crash, but it's a good thing to do
    regardless.

diff --git a/src/i965_render.c b/src/i965_render.c
index a92c964..df3814f 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1635,8 +1635,10 @@ gen4_render_state_cleanup(ScrnInfoPtr pScrn)
     I830Ptr pI830 = I830PTR(pScrn);
     struct gen4_render_state *render_state= pI830->gen4_render_state;
 
-    if (render_state->vertex_buffer_bo)
+    if (render_state->vertex_buffer_bo) {
 	dri_bo_unreference (render_state->vertex_buffer_bo);
+	render_state->vertex_buffer_bo = NULL;
+    }
 
     if (pI830->use_drm_mode) {
 	dri_bo_unmap(pI830->gen4_render_state_mem->bo);
commit ce7efc2e3676c8f80206415480dda91e5e021396
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Dec 4 11:41:02 2008 -0800

    Don't smash fixed_mode if skip_panel_detect is set.
    
    Without this change, setting LVDSFixedMode to false is not effective
    as i830_bios_init calls i830_parse_panel_data which in turns sets
    a fixed_mode. To fix this we still call parse_panel_data to set
    the various lvds_options but we return before setting fixed_mode.

diff --git a/src/i830_bios.c b/src/i830_bios.c
index 007530d..72408f0 100644
--- a/src/i830_bios.c
+++ b/src/i830_bios.c
@@ -109,6 +109,9 @@ parse_panel_data(I830Ptr pI830, struct bdb_header *bdb)
 	lvds_lfp_data_ptrs->ptr[lvds_options->panel_type].dvo_timing_offset;
     timing_ptr = (unsigned char *)bdb + timing_offset;
 
+    if (pI830->skip_panel_detect)
+	return;
+
     fixed_mode = xnfalloc(sizeof(DisplayModeRec));
     memset(fixed_mode, 0, sizeof(*fixed_mode));
 
commit e8b95efbf5d9c3a5b75b2bb8b5b51844b5fcdfbc
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Dec 3 13:49:52 2008 -0800

    i965: Add batch_flush_notify hook to create new vertex-buffer bo
    
    This avoids mapping a buffer object which is being referenced
    by a batch that has already been flushed, (which is a terribly
    expensive operation).
    
    On my machine this brings the performance of x11perf -aa10text
    from 85k back to 150k, (where it was before a recent kernel
    upgrade). Also, before this patch, when I used my X server
    actively performance would drop as low as 15k---hopefully that
    bug is gone with this change.

diff --git a/src/i830.h b/src/i830.h
index c2e043a..db35c1d 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -538,6 +538,8 @@ typedef struct _I830Rec {
 #endif
    CloseScreenProcPtr CloseScreen;
 
+   void (*batch_flush_notify)(ScrnInfoPtr pScrn);
+
 #ifdef I830_USE_EXA
    ExaDriverPtr	EXADriverPtr;
 #endif
@@ -944,6 +946,9 @@ Bool i965_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMask,
 void i965_composite(PixmapPtr pDst, int srcX, int srcY,
 		    int maskX, int maskY, int dstX, int dstY, int w, int h);
 
+void
+i965_batch_flush_notify(ScrnInfoPtr pScrn);
+
 Bool
 i830_get_transformed_coordinates(int x, int y, PictTransformPtr transform,
 				 float *x_out, float *y_out);
diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index 9aa99ed..13d939e 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -201,4 +201,7 @@ intel_batch_flush(ScrnInfoPtr pScrn, Bool flushed)
      */
     if (pI830->memory_manager != NULL)
 	pI830->need_mi_flush = TRUE;
+
+    if (pI830->batch_flush_notify)
+	pI830->batch_flush_notify (pScrn);
 }
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 3327fbf..4f87efb 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3364,6 +3364,11 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
       }
    }
 
+   if (IS_I965G(pI830))
+       pI830->batch_flush_notify = i965_batch_flush_notify;
+   else
+       pI830->batch_flush_notify = NULL;
+
    miInitializeBackingStore(pScreen);
    xf86SetBackingStore(pScreen);
    xf86SetSilkenMouse(pScreen);
diff --git a/src/i965_render.c b/src/i965_render.c
index da6ded6..a92c964 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1000,6 +1000,7 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
 	render_state->vertex_buffer_bo = dri_bo_alloc (pI830->bufmgr, "vb",
 						       sizeof (gen4_vertex_buffer),
 						       4096);
+	render_state->vb_offset = 0;
     }
 
     bo_table[0] = pI830->batch_bo;
@@ -1480,15 +1481,22 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
 	}
     }
 
+    /* We're about to do a BEGIN_BATCH(12) for the vertex setup. And
+     * we first need to ensure that that's not going to cause a flush
+     * since we need to not flush between setting up our vertices in
+     * the VB and emitting them into the batch. */
+    intel_batch_require_space(pScrn, pI830, 12 * 4);
+
     /* If the vertex buffer is too full, then we flush and re-emit all
      * necessary state into the batch for the composite operation. */
     if (render_state->vb_offset + VERTEX_FLOATS_PER_COMPOSITE > VERTEX_BUFFER_SIZE) {
 	dri_bo_unreference (render_state->vertex_buffer_bo);
 	render_state->vertex_buffer_bo = NULL;
-	render_state->vb_offset = 0;
-	_emit_batch_header_for_composite (pScrn);
     }
 
+    if (render_state->vertex_buffer_bo == NULL)
+	_emit_batch_header_for_composite (pScrn);
+
     /* Map the vertex_buffer buffer object so we can write to it. */
     dri_bo_map (render_state->vertex_buffer_bo, 1);
     vb = render_state->vertex_buffer_bo->virtual;
@@ -1571,6 +1579,19 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
 #endif
 }
 
+void
+i965_batch_flush_notify(ScrnInfoPtr pScrn)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    struct gen4_render_state *render_state = pI830->gen4_render_state;
+
+    /* Once a batch is emitted, we never want to map again any buffer
+     * object being referenced by that batch, (which would be very
+     * expensive). */
+    dri_bo_unreference (render_state->vertex_buffer_bo);
+    render_state->vertex_buffer_bo = NULL;
+}
+
 /**
  * Called at EnterVT so we can set up our offsets into the state buffer.
  */
commit 768f317cf0da4cd6682af2e71e71c3e130e05182
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Dec 8 10:33:13 2008 +0800

    Fix DRI2 compiling warning

diff --git a/src/i830_dri.c b/src/i830_dri.c
index daa3ff0..0fe0eca 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1930,7 +1930,7 @@ I830DRI2DestroyBuffers(DrawablePtr pDraw, DRI2BufferPtr buffers, int count)
     }
 }
 
-static unsigned int
+static void
 I830DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion,
 		   DRI2BufferPtr pDestBuffer, DRI2BufferPtr pSrcBuffer)
 {
@@ -1966,7 +1966,6 @@ I830DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion,
 #endif
     drmCommandNone(pI830->drmSubFD, DRM_I915_GEM_THROTTLE);
 
-    return 1;
 }
 
 Bool I830DRI2ScreenInit(ScreenPtr pScreen)
commit 95596f51503bb468364719aec9083d59999e34b7
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Dec 8 10:30:12 2008 +0800

    Fix TV compiling warning

diff --git a/src/i830_tv.c b/src/i830_tv.c
index d507a0c..72d2bd8 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1691,7 +1691,7 @@ i830_tv_init(ScrnInfoPtr pScrn)
     I830OutputPrivatePtr    intel_output;
     struct i830_tv_priv	    *dev_priv;
     uint32_t		    tv_dac_on, tv_dac_off, save_tv_dac;
-    char                    *mon_option_lst = NULL;
+    XF86OptionPtr	    mon_option_lst = NULL;
     char		    *tv_format = NULL;
 
     if (pI830->quirk_flag & QUIRK_IGNORE_TV)


More information about the xorg-commit mailing list