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

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



 .gitignore          |    1 
 configure.ac        |    7 +-
 man/intel.man       |   87 +++++++++++++++++++++-----
 src/brw_structs.h   |   12 ++-
 src/ch7017/ch7017.c |    2 
 src/ch7xxx/ch7xxx.c |    6 -
 src/common.h        |   26 ++++++-
 src/i810_dri.c      |   28 ++++----
 src/i810_driver.c   |   14 ++--
 src/i810_reg.h      |    5 +
 src/i830.h          |   22 +++---
 src/i830_3d.c       |  135 ++++++++++++++++++++++++++++++++++++++--
 src/i830_crt.c      |   41 ++++++------
 src/i830_debug.c    |   84 +++++++++++++++----------
 src/i830_display.c  |  102 +++++++++++++++++++-----------
 src/i830_dri.c      |   28 ++++----
 src/i830_driver.c   |  172 +++++++++++++++++++++++++++++++++++++---------------
 src/i830_dvo.c      |    2 
 src/i830_i2c.c      |    2 
 src/i830_lvds.c     |   79 ++++++++++++++++-------
 src/i830_memory.c   |   25 ++++---
 src/i830_quirks.c   |   25 ++++++-
 src/i830_sdvo.c     |   22 ++++--
 src/i830_tv.c       |    2 
 src/i830_video.c    |   14 ++--
 src/i965_render.c   |    6 +
 src/i965_video.c    |    5 +
 src/ivch/ivch.c     |    3 
 src/sil164/sil164.c |    2 
 src/tfp410/tfp410.c |    2 
 30 files changed, 681 insertions(+), 280 deletions(-)

New commits:
commit 0516e708abf01d1f83e2e8af9abe4c835ed79444
Author: Jesse Barnes <jbarnes@hobbes.virtuousgeek.org>
Date:   Tue Feb 5 17:39:26 2008 -0800

    Fix version bump, should have been 2.2.0.90

diff --git a/configure.ac b/configure.ac
index 1445d51..2b7b540 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-intel],
-        2.2.1.90,
+        2.2.0.90,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-intel)
 

commit 44628efffa6e84e810a26cd201f7312793b5cf63
Author: Jesse Barnes <jbarnes@hobbes.virtuousgeek.org>
Date:   Tue Feb 5 17:35:54 2008 -0800

    Bump version to 2.2.1.90 for 2.2.1 pre-release

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

commit 4398c0a163b348ccca15d705fcad5bc27604919a
Author: Jesse Barnes <jbarnes@hobbes.virtuousgeek.org>
Date:   Tue Feb 5 17:09:19 2008 -0800

    Fix build warnings on 64 bit
    
    Use PRIx32 for printing CARD32 types, and PRIx64 for portably printing uint64_t
    types.  Requires the addition of a new include, inttypes.h, to work.  Hope C99
    is ok with everybody...

diff --git a/src/i830_debug.c b/src/i830_debug.c
index 5e9dafa..196fd23 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -25,6 +25,8 @@
  *
  */
 
+#include <inttypes.h>
+
 #ifdef REG_DUMPER
 #include "reg_dumper/reg_dumper.h"
 
@@ -804,8 +806,8 @@ i830_dump_ring(ScrnInfoPtr pScrn)
     mask = pI830->LpRing->tail_mask;
     
     virt = pI830->LpRing->virtual_start;
-    ErrorF ("Ring at virtual 0x%x head 0x%x tail 0x%x count %d\n",
-	    (unsigned int) virt, head, tail, (((tail + mask + 1) - head) & mask) >> 2);
+    ErrorF ("Ring at virtual %p head 0x%x tail 0x%x count %d\n",
+	    virt, head, tail, (((tail + mask + 1) - head) & mask) >> 2);
     for (ring = (head - 128) & mask; ring != ((head + 4) & mask);
 	 ring = (ring + 4) & mask)
     {
@@ -821,25 +823,25 @@ i830_dump_error_state(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
 
-    ErrorF("pgetbl_ctl: 0x%lx pgetbl_err: 0x%lx\n",
-	   (unsigned long)INREG(PGETBL_CTL), (unsigned long)INREG(PGE_ERR));
+    ErrorF("pgetbl_ctl: 0x%" PRIx32 "getbl_err: 0x%" PRIx32 "\n",
+	   INREG(PGETBL_CTL), INREG(PGE_ERR));
 
-    ErrorF("ipeir: %lx iphdr: %lx\n", (unsigned long)INREG(IPEIR),
-	   (unsigned long)INREG(IPEHR));
+    ErrorF("ipeir: %" PRIx32 " iphdr: %" PRIx32 "\n", INREG(IPEIR),
+	   INREG(IPEHR));
 
-    ErrorF("LP ring tail: %lx head: %lx len: %lx start %lx\n",
-	   (unsigned long)INREG(LP_RING + RING_TAIL),
-	   (unsigned long)INREG(LP_RING + RING_HEAD) & HEAD_ADDR,
-	   (unsigned long)INREG(LP_RING + RING_LEN),
-	   (unsigned long)INREG(LP_RING + RING_START));
+    ErrorF("LP ring tail: %" PRIx32 " head: %" PRIx32 " len: %" PRIx32 " start %" PRIx32 "\n",
+	   INREG(LP_RING + RING_TAIL),
+	   INREG(LP_RING + RING_HEAD) & HEAD_ADDR,
+	   INREG(LP_RING + RING_LEN),
+	   INREG(LP_RING + RING_START));
 
     ErrorF("eir: %x esr: %x emr: %x\n",
 	   INREG16(EIR), INREG16(ESR), INREG16(EMR));
 
     ErrorF("instdone: %x instpm: %x\n", INREG16(INST_DONE), INREG8(INST_PM));
 
-    ErrorF("memmode: %lx instps: %lx\n", (unsigned long)INREG(MEMMODE),
-	   (unsigned long)INREG(INST_PS));
+    ErrorF("memmode: %" PRIx32 " instps: %" PRIx32 "\n", INREG(MEMMODE),
+	   INREG(INST_PS));
 
     ErrorF("hwstam: %x ier: %x imr: %x iir: %x\n",
 	   INREG16(HWSTAM), INREG16(IER), INREG16(IMR), INREG16(IIR));
@@ -851,12 +853,12 @@ i965_dump_error_state(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
 
-    ErrorF("pgetbl_ctl: 0x%lx pgetbl_err: 0x%lx\n",
+    ErrorF("pgetbl_ctl: 0x%" PRIx32 " pgetbl_err: 0x%" PRIx32 "\n",
 	   INREG(PGETBL_CTL), INREG(PGE_ERR));
 
-    ErrorF("ipeir: %lx iphdr: %lx\n", INREG(IPEIR_I965), INREG(IPEHR_I965));
+    ErrorF("ipeir: %" PRIx32 " iphdr: %" PRIx32 "\n", INREG(IPEIR_I965), INREG(IPEHR_I965));
 
-    ErrorF("LP ring tail: %lx head: %lx len: %lx start %lx\n",
+    ErrorF("LP ring tail: %" PRIx32 " head: %" PRIx32 " len: %" PRIx32 " start %" PRIx32 "\n",
 	   INREG(LP_RING + RING_TAIL),
 	   INREG(LP_RING + RING_HEAD) & HEAD_ADDR,
 	   INREG(LP_RING + RING_LEN), INREG(LP_RING + RING_START));
@@ -868,15 +870,15 @@ i965_dump_error_state(ScrnInfoPtr pScrn)
 	   (int)INREG(INST_DONE_1));
     ErrorF("instpm: %x\n", (int)INREG(INST_PM));
 
-    ErrorF("memmode: %lx instps: %lx\n", INREG(MEMMODE), INREG(INST_PS_I965));
+    ErrorF("memmode: %" PRIx32 " instps: %" PRIx32 "\n", INREG(MEMMODE), INREG(INST_PS_I965));
 
     ErrorF("HW Status mask (hwstam): %x\nIRQ enable (ier): %x "
 	   "imr: %x iir: %x\n",
 	   (int)INREG(HWSTAM), (int)INREG(IER), (int)INREG(IMR),
 	   (int)INREG(IIR));
 
-    ErrorF("acthd: %lx dma_fadd_p: %lx\n", INREG(ACTHD), INREG(DMA_FADD_P));
-    ErrorF("ecoskpd: %lx excc: %lx\n", INREG(ECOSKPD), INREG(EXCC));
+    ErrorF("acthd: %" PRIx32 " dma_fadd_p: %" PRIx32 "\n", INREG(ACTHD), INREG(DMA_FADD_P));
+    ErrorF("ecoskpd: %" PRIx32 " excc: %" PRIx32 "\n", INREG(ECOSKPD), INREG(EXCC));
 
     ErrorF("cache_mode: %x/%x\n", (int)INREG(CACHE_MODE_0),
 	   (int)INREG(CACHE_MODE_1));
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 96c8bc0..77ec301 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -97,6 +97,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #endif
 
 #include <assert.h>
+#include <inttypes.h>
 #include <string.h>
 #include <errno.h>
 #include <sys/types.h>
@@ -600,8 +601,8 @@ i830_get_stolen_physical(ScrnInfoPtr pScrn, unsigned long offset,
 
 	if ((scan - offset) != (scan_physical - physical)) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-		       "Non-contiguous GTT entries: (%ld,0x16%llx) vs "
-		       "(%ld,0x%16llx)\n",
+		       "Non-contiguous GTT entries: (%ld,0x16%" PRIx64 ") vs "
+		       "(%ld,0x%" PRIx64 ")\n",
 		       scan, scan_physical, offset, physical);
 	    return -1;
 	}
@@ -949,7 +950,7 @@ i830_describe_allocations(ScrnInfoPtr pScrn, int verbosity, const char *prefix)
 
 	if (mem->bus_addr != 0)
 	    snprintf(phys_suffix, sizeof(phys_suffix),
-		    ", 0x%016llx physical\n", mem->bus_addr);
+		    ", 0x%016" PRIx64 " physical\n", mem->bus_addr);
 	if (mem->tiling == TILE_XMAJOR)
 	    tile_suffix = " X tiled";
 	else if (mem->tiling == TILE_YMAJOR)
diff --git a/src/i830_video.c b/src/i830_video.c
index 9688aaa..a0e40ad 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -50,6 +50,7 @@
 #include "config.h"
 #endif
 
+#include <inttypes.h>
 #include <math.h>
 #include <string.h>
 #include <assert.h>
@@ -462,7 +463,8 @@ i830_overlay_continue(ScrnInfoPtr pScrn, Bool update_filter)
 	flip_addr = pI830->overlay_regs->bus_addr;
     if (update_filter)
 	flip_addr |= OFC_UPDATE;
-    OVERLAY_DEBUG ("overlay_continue cmd 0x%08lx -> 0x%08lx sta 0x%08lx\n",
+    OVERLAY_DEBUG ("overlay_continue cmd 0x%08" PRIx32 " -> 0x%08" PRIx32
+		   " sta 0x%08" PRIx32 "\n",
 		   overlay->OCMD, INREG(OCMD_REGISTER), INREG(DOVSTA));
     BEGIN_LP_RING(4);
     OUT_RING(MI_FLUSH | MI_WRITE_DIRTY_STATE);
@@ -502,7 +504,7 @@ i830_overlay_off(ScrnInfoPtr pScrn)
      */
     {
 	overlay->OCMD &= ~OVERLAY_ENABLE;
-	OVERLAY_DEBUG ("overlay_off cmd 0x%08lx -> 0x%08lx sta 0x%08lx\n",
+	OVERLAY_DEBUG ("overlay_off cmd 0x%08" PRIx32 " -> 0x%08" PRIx32 " sta 0x%08" PRIx32 "\n",
 		       overlay->OCMD, INREG(OCMD_REGISTER), INREG(DOVSTA));
 	BEGIN_LP_RING(6);
 	OUT_RING(MI_FLUSH | MI_WRITE_DIRTY_STATE);
@@ -674,7 +676,7 @@ I830ResetVideo(ScrnInfoPtr pScrn)
     {
 	int i;
 	for (i = 0x30000; i < 0x31000; i += 4)
-	    ErrorF("0x%x 0x%lx\n", i, INREG(i));
+	    ErrorF("0x%x 0x%" PRIx32 "\n", i, INREG(i));
     }
 #endif
 }
@@ -1904,7 +1906,7 @@ i830_display_video(ScrnInfoPtr pScrn, xf86CrtcPtr crtc,
 	overlay->OBUF_1V = pPriv->VBuf1offset;
     }
 
-    OVERLAY_DEBUG("pos: 0x%lx, size: 0x%lx\n",
+    OVERLAY_DEBUG("pos: 0x%" PRIx32 ", size: 0x%" PRIx32 "\n",
 		  overlay->DWINPOS, overlay->DWINSZ);
     OVERLAY_DEBUG("dst: %d x %d, src: %d x %d\n", drw_w, drw_h, src_w, src_h);
 
@@ -2066,7 +2068,7 @@ i830_display_video(ScrnInfoPtr pScrn, xf86CrtcPtr crtc,
 	OCMD |= BUFFER1;
 
     overlay->OCMD = OCMD;
-    OVERLAY_DEBUG("OCMD is 0x%lx\n", OCMD);
+    OVERLAY_DEBUG("OCMD is 0x%" PRIx32 "\n", OCMD);
 
     /* make sure the overlay is on */
     i830_overlay_on (pScrn);

commit f4d8a5bb6c6a84d6b90157d2e25564dc68bfb7bf
Author: Jesse Barnes <jbarnes@hobbes.virtuousgeek.org>
Date:   Tue Feb 5 17:31:58 2008 -0800

    Fix typo in merge
    
    Left a conflict line in...

diff --git a/src/i830_display.c b/src/i830_display.c
index 0496d01..b8c7226 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -663,7 +663,6 @@ i830_use_fb_compression(xf86CrtcPtr crtc)
     return TRUE;
 }
 
->>>>>>> abf4b0c... Only enable FBC if one pipe is active:src/i830_display.c
 /**
  * Sets the power management mode of the pipe and plane.
  *

commit 52557ecc6df12d02b9808895394ca12702373e9b
Author: Jesse Barnes <jbarnes@hobbes.virtuousgeek.org>
Date:   Tue Feb 5 17:30:48 2008 -0800

    Only enable FBC if one pipe is active
    
    Some chips can't support FBC if multiple pipes are active.  So if more than one
    pipe is on or we're going from one->two pipes enabled, make sure FBC is
    disabled.
    
    Intended to fix 13418, 13326, 13152.
    
    Conflicts:
    
    	src/i830_display.c - don't pull in FBC2 code

diff --git a/src/i830_display.c b/src/i830_display.c
index 73cdf8f..0496d01 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -529,36 +529,6 @@ i830_display_tiled(xf86CrtcPtr crtc)
     return FALSE;
 }
 
-static Bool
-i830_use_fb_compression(xf86CrtcPtr crtc)
-{
-    ScrnInfoPtr pScrn = crtc->scrn;
-    I830Ptr pI830 = I830PTR(pScrn);
-    I830CrtcPrivatePtr	intel_crtc = crtc->driver_private;
-    int plane = (intel_crtc->plane == 0 ? FBC_CTL_PLANEA : FBC_CTL_PLANEB);
-
-    if (!pI830->fb_compression)
-	return FALSE;
-
-    if (!i830_display_tiled(crtc))
-	return FALSE;
-
-    /* Pre-965 only supports plane A */
-    if (!IS_I965GM(pI830) && plane != FBC_CTL_PLANEA)
-	return FALSE;
-
-    /* Need 15, 16, or 32 (w/alpha) pixel format */
-    if (!(pScrn->bitsPerPixel == 16 || /* covers 15 bit mode as well */
-	  pScrn->bitsPerPixel == 32)) /* mode_set dtrt if fbc is in use */
-	return FALSE;
-
-    /*
-     * No checks for pixel multiply, incl. horizontal, or interlaced modes
-     * since they're currently unused.
-     */
-    return TRUE;
-}
-
 /*
  * Several restrictions:
  *   - DSP[AB]CNTR - no line duplication && no pixel multiplier
@@ -649,6 +619,51 @@ i830_disable_fb_compression(xf86CrtcPtr crtc)
     xf86DrvMsg(pScrn->scrnIndex, X_INFO, "fbc disabled on plane %c\n", plane);
 }
 
+static Bool
+i830_use_fb_compression(xf86CrtcPtr crtc)
+{
+    ScrnInfoPtr pScrn = crtc->scrn;
+    xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+    I830Ptr pI830 = I830PTR(pScrn);
+    I830CrtcPrivatePtr	intel_crtc = crtc->driver_private;
+    int plane = (intel_crtc->plane == 0 ? FBC_CTL_PLANEA : FBC_CTL_PLANEB);
+    int i, count = 0;
+
+    /* Only available on one pipe at a time */
+    for (i = 0; i < xf86_config->num_crtc; i++) {
+	if (xf86_config->crtc[i]->enabled)
+	    count++;
+    }
+
+    /* Here we disable it to catch one->two pipe enabled configs */
+    if (count > 1) {
+	i830_disable_fb_compression(crtc);
+	return FALSE;
+    }
+
+    if (!pI830->fb_compression)
+	return FALSE;
+
+    if (!i830_display_tiled(crtc))
+	return FALSE;
+
+    /* Pre-965 only supports plane A */
+    if (!IS_I965GM(pI830) && plane != FBC_CTL_PLANEA)
+	return FALSE;
+
+    /* Need 15, 16, or 32 (w/alpha) pixel format */
+    if (!(pScrn->bitsPerPixel == 16 || /* covers 15 bit mode as well */
+	  pScrn->bitsPerPixel == 32)) /* mode_set dtrt if fbc is in use */
+	return FALSE;
+
+    /*
+     * No checks for pixel multiply, incl. horizontal, or interlaced modes
+     * since they're currently unused.
+     */
+    return TRUE;
+}
+
+>>>>>>> abf4b0c... Only enable FBC if one pipe is active:src/i830_display.c
 /**
  * Sets the power management mode of the pipe and plane.
  *

commit e9cb38e25619aa8eb1b7faac5fa3749e4e993997
Author: liuhong <liuhong@devlinux-hong.sh.intel.com>
Date:   Tue Feb 5 11:04:34 2008 +0800

    xf86-video-intel: fix ivch using wrong dvo register
    
    We use the wrong DVO output register for ivch which is used for DVO LVDS.
    Vbios enables DVOB and driver never touches it, so everything seems
    working correctly now.

diff --git a/src/i830_dvo.c b/src/i830_dvo.c
index e6ff6af..e7342b0 100644
--- a/src/i830_dvo.c
+++ b/src/i830_dvo.c
@@ -83,7 +83,7 @@ struct _I830DVODriver i830_dvo_drivers[] =
 	.type = I830_OUTPUT_DVO_LVDS,
 	.modulename = "ivch",
 	.fntablename = "ivch_methods",
-	.dvo_reg = DVOA,
+	.dvo_reg = DVOB,
 	.address = 0x04, /* Might also be 0x44, 0x84, 0xc4 */
 	.symbols = ivch_symbols
     },

commit 02d12583e313898a5f14ff968ac4360bce3eff3d
Author: Jesse Barnes <jbarnes@hobbes.virtuousgeek.org>
Date:   Tue Feb 5 11:36:24 2008 -0800

    Program FBC fence offset register
    
    Just a partial fix for some of the FBC issues people have been seeing.  The
    other half is to disable FBC if both pipes are running.

diff --git a/src/i830.h b/src/i830.h
index 9adbaf7..87d960b 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -616,6 +616,7 @@ typedef struct _I830Rec {
    CARD32 saveFBC_LL_BASE;
    CARD32 saveFBC_CONTROL2;
    CARD32 saveFBC_CONTROL;
+   CARD32 saveFBC_FENCE_OFF;
 
    enum last_3d *last_3d;
 
diff --git a/src/i830_display.c b/src/i830_display.c
index e8de1a4..73cdf8f 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -610,6 +610,7 @@ i830_enable_fb_compression(xf86CrtcPtr crtc)
     OUTREG(FBC_LL_BASE, pI830->compressed_ll_buffer->bus_addr + 6);
     OUTREG(FBC_CONTROL2, FBC_CTL_FENCE_DBL | FBC_CTL_IDLE_FULL |
 	   FBC_CTL_CPU_FENCE | plane);
+    OUTREG(FBC_FENCE_OFF, crtc->y);
 
     /* Zero buffers */
     memset(pI830->FbBase + pI830->compressed_front_buffer->offset, 0,
diff --git a/src/i830_driver.c b/src/i830_driver.c
index dffc630..f9c1dfd 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1932,6 +1932,7 @@ SaveHWState(ScrnInfoPtr pScrn)
        pI830->saveFBC_LL_BASE = INREG(FBC_LL_BASE);
        pI830->saveFBC_CONTROL2 = INREG(FBC_CONTROL2);
        pI830->saveFBC_CONTROL = INREG(FBC_CONTROL);
+       pI830->saveFBC_FENCE_OFF = INREG(FBC_FENCE_OFF);
    }
 
    /* Save video mode information for native mode-setting. */
@@ -2212,6 +2213,7 @@ RestoreHWState(ScrnInfoPtr pScrn)
    if (pI830->fb_compression) {
        OUTREG(FBC_CFB_BASE, pI830->saveFBC_CFB_BASE);
        OUTREG(FBC_LL_BASE, pI830->saveFBC_LL_BASE);
+       OUTREG(FBC_FENCE_OFF, pI830->saveFBC_FENCE_OFF);
        OUTREG(FBC_CONTROL2, pI830->saveFBC_CONTROL2);
        OUTREG(FBC_CONTROL, pI830->saveFBC_CONTROL);
    }

commit 58cb85a7e4c760adc78128bdf605b7885ac32538
Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
Date:   Tue Feb 5 10:34:55 2008 +0800

    Fix last commit on i8xx debug p2 value

diff --git a/src/i830_debug.c b/src/i830_debug.c
index 7fc0726..5e9dafa 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -192,9 +192,9 @@ DEBUGSTRING(i830_debug_dpll)
 	    p1 = ffs((val & DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS) >>
 		     DPLL_FPA01_P1_POST_DIV_SHIFT);
 	    if ((INREG(LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP)
-		p2 = I8XX_P2_LVDS_SLOW;
+		p2 = 7;
 	    else
-		p2 = I8XX_P2_LVDS_FAST;
+		p2 = 14;
 
 	} else {
 	    mode = "DAC/serial";

commit 7e6b43960979829946669314d6523573f79e207d
Author: Hong Liu <hong.liu@intel.com>
Date:   Tue Feb 5 09:10:48 2008 +0800

    Fix PLL reference clk debug dump

diff --git a/src/i830_debug.c b/src/i830_debug.c
index 5b70cd9..7fc0726 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -693,6 +693,19 @@ void i830DumpRegs (ScrnInfoPtr pScrn)
 		xf86DrvMsg (pScrn->scrnIndex, X_WARNING, "p1 out of range\n");
 		break;
 	    }
+	    
+	    switch ((dpll >> 13) & 0x3) {
+	    case 0:
+		ref = 96000;
+		break;
+	    case 3:
+		ref = 100000;
+		break;
+	    default:
+		ref = 0;
+		xf86DrvMsg (pScrn->scrnIndex, X_WARNING, "ref out of range\n");
+		break;
+	    }
 	}
 	else
 	{
@@ -730,18 +743,19 @@ void i830DumpRegs (ScrnInfoPtr pScrn)
 		else
 		    p1 = ((dpll >> 16) & 0x3f) + 2;
 	    }
-	}
-	switch ((dpll >> 13) & 0x3) {
-	case 0:
-	    ref = 96000;
-	    break;
-	case 3:
-	    ref = 100000;
-	    break;
-	default:
-	    ref = 0;
-	    xf86DrvMsg (pScrn->scrnIndex, X_WARNING, "ref out of range\n");
-	    break;
+
+	    switch ((dpll >> 13) & 0x3) {
+	    case 0:
+		ref = 48000;
+		break;
+	    case 3:
+		ref = 66000;
+		break;
+	    default:
+		ref = 0;
+		xf86DrvMsg (pScrn->scrnIndex, X_WARNING, "ref out of range\n");
+		break;
+	    }
 	}
 	if (IS_I965G(pI830)) {
 	    phase = (dpll >> 9) & 0xf;

commit a70b59bd44d14e77c9e522dbe225b62a8bcf3050
Author: Hong Liu <hong.liu@intel.com>
Date:   Tue Feb 5 09:06:14 2008 +0800

    Allow non-strict free order for bo_list

diff --git a/src/i830_memory.c b/src/i830_memory.c
index eed2eca..96c8bc0 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -274,12 +274,16 @@ i830_free_memory(ScrnInfoPtr pScrn, i830_memory *mem)
 	I830Ptr pI830 = I830PTR(pScrn);
 
 	drmBOUnreference(pI830->drmSubFD, &mem->bo);
-	if (pI830->bo_list == mem)
+	if (pI830->bo_list == mem) {
 	    pI830->bo_list = mem->next;
-	if (mem->next)
-	    mem->next->prev = NULL;
-	if (mem->prev)
-	    mem->prev->next = NULL;
+	    if (mem->next)
+		mem->next->prev = NULL;
+	} else {
+	    if (mem->prev)
+		mem->prev->next = mem->next;
+	    if (mem->next)
+		mem->next->prev = mem->prev;
+	}
 	xfree(mem->name);
 	xfree(mem);
 	return;

commit fa841fd05bdebb991f4e4db201e6a260557e2dad
Author: Hong Liu <hong.liu@intel.com>
Date:   Tue Feb 5 08:58:44 2008 +0800

    Bug 10584: Mac Mini EDID data assigned to TMDS output
    
    EDID data for TMDS output got from crt should be applied
    to TMDS output on mac mini.

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 4b04994..c7cbfac 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1100,8 +1100,10 @@ i830_sdvo_get_modes(xf86OutputPtr output)
 {
     ScrnInfoPtr pScrn = output->scrn;
     xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
-    DisplayModePtr modes;
+    DisplayModePtr modes = NULL;
     xf86OutputPtr crt;
+    I830OutputPrivatePtr intel_output;
+    xf86MonPtr edid_mon = NULL;
 
     modes = i830_ddc_get_modes(output);
     if (modes != NULL)
@@ -1113,11 +1115,17 @@ i830_sdvo_get_modes(xf86OutputPtr output)
      * analog when we fail at finding it the right way.
      */
     crt = xf86_config->output[0];
-    if (crt->funcs->detect(crt) == XF86OutputStatusDisconnected) {
-	return crt->funcs->get_modes(crt);
+    intel_output = crt->driver_private;
+    if (intel_output->type == I830_OUTPUT_ANALOG &&
+	crt->funcs->detect(crt) == XF86OutputStatusDisconnected) {
+	edid_mon = xf86OutputGetEDID(crt, intel_output->pDDCBus);
+    }
+    if (edid_mon) {
+	xf86OutputSetEDID(output, edid_mon);
+	modes = xf86OutputGetEDIDModes(output);
     }
 
-    return NULL;
+    return modes;
 }
 
 static void

commit 4e5c7ad8bdee98bd23a7066f57d0942e64a415fd
Author: Hong Liu <hong.liu@intel.com>
Date:   Mon Feb 4 17:14:23 2008 +0800

    Bug 10773: fix i8xx pll p2 value in i830_crtc_clock_get()
    
    Also fix debug dump, slightly modified to use macro instead.

diff --git a/src/i830_debug.c b/src/i830_debug.c
index 8f8ef9b..5b70cd9 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -191,7 +191,11 @@ DEBUGSTRING(i830_debug_dpll)
 	    mode = "LVDS";
 	    p1 = ffs((val & DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS) >>
 		     DPLL_FPA01_P1_POST_DIV_SHIFT);
-	    p2 = 14;
+	    if ((INREG(LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP)
+		p2 = I8XX_P2_LVDS_SLOW;
+	    else
+		p2 = I8XX_P2_LVDS_FAST;
+
 	} else {
 	    mode = "DAC/serial";
 	    if (val & PLL_P1_DIVIDE_BY_TWO) {
diff --git a/src/i830_display.c b/src/i830_display.c
index f61d3c4..e8de1a4 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1623,7 +1623,11 @@ i830_crtc_clock_get(ScrnInfoPtr pScrn, xf86CrtcPtr crtc)
 	if (is_lvds) {
 	    clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS) >>
 			   DPLL_FPA01_P1_POST_DIV_SHIFT);
-	    clock.p2 = 14;
+
+	    if ((INREG(LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP)
+		clock.p2 = I8XX_P2_LVDS_SLOW;
+	    else
+		clock.p2 = I8XX_P2_LVDS_FAST;
 
 	    if ((dpll & PLL_REF_INPUT_MASK) == PLLB_REF_INPUT_SPREADSPECTRUMIN)
 		i8xx_clock(66000, &clock); /* XXX: might not be 66MHz */

commit ba619ef92b1b1303d8cf76ebd68dea978d17eb7a
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com>
Date:   Thu Jan 31 22:47:18 2008 -0200

    Make sure symbols used by other modules are public.
    
    These symbols must be explicitly exported, otherwise if compiled with
    hidden symbols, LoaderSymbol (and dlopen) will fail to find them.

diff --git a/src/ch7017/ch7017.c b/src/ch7017/ch7017.c
index 6fc3422..76f9cf7 100644
--- a/src/ch7017/ch7017.c
+++ b/src/ch7017/ch7017.c
@@ -313,7 +313,7 @@ ch7017_restore(I2CDevPtr d)
     ch7017_write(priv, CH7017_POWER_MANAGEMENT, priv->save_power_management);
 }
 
-I830I2CVidOutputRec ch7017_methods = {
+_X_EXPORT I830I2CVidOutputRec ch7017_methods = {
     .init = ch7017_init,
     .detect = ch7017_detect,
     .mode_valid = ch7017_mode_valid,
diff --git a/src/ch7xxx/ch7xxx.c b/src/ch7xxx/ch7xxx.c
index da02ad2..51fa78e 100644
--- a/src/ch7xxx/ch7xxx.c
+++ b/src/ch7xxx/ch7xxx.c
@@ -306,7 +306,7 @@ ch7xxx_restore(I2CDevPtr d)
     ch7xxx_write(dev_priv, CH7xxx_PM, dev_priv->save_PM);
 }
 
-I830I2CVidOutputRec CH7xxxVidOutput = {
+_X_EXPORT I830I2CVidOutputRec CH7xxxVidOutput = {
     .init = ch7xxx_init,
     .detect = ch7xxx_detect,
     .mode_valid = ch7xxx_mode_valid,
diff --git a/src/ivch/ivch.c b/src/ivch/ivch.c
index eb5dc21..820919f 100644
--- a/src/ivch/ivch.c
+++ b/src/ivch/ivch.c
@@ -358,7 +358,7 @@ ivch_restore(I2CDevPtr d)
 }
 
 
-I830I2CVidOutputRec ivch_methods = {
+_X_EXPORT I830I2CVidOutputRec ivch_methods = {
     .init = ivch_init,
     .dpms = ivch_dpms,
     .save = ivch_save,
diff --git a/src/sil164/sil164.c b/src/sil164/sil164.c
index 12fe8e2..f7d414a 100644
--- a/src/sil164/sil164.c
+++ b/src/sil164/sil164.c
@@ -237,7 +237,7 @@ sil164_restore(I2CDevPtr d)
 }
 
 
-I830I2CVidOutputRec SIL164VidOutput = {
+_X_EXPORT I830I2CVidOutputRec SIL164VidOutput = {
     .init = sil164_init,
     .detect = sil164_detect,
     .mode_valid = sil164_mode_valid,
diff --git a/src/tfp410/tfp410.c b/src/tfp410/tfp410.c
index b79fd2a..bb038cd 100644
--- a/src/tfp410/tfp410.c
+++ b/src/tfp410/tfp410.c
@@ -259,7 +259,7 @@ tfp410_restore(I2CDevPtr d)
     tfp410WriteByte(tfp, TFP410_CTL_1, tfp->SavedReg.ctl1);
 }
 
-I830I2CVidOutputRec TFP410VidOutput = {
+_X_EXPORT I830I2CVidOutputRec TFP410VidOutput = {
     .init = tfp410_init,
     .detect = tfp410_detect,
     .mode_valid = tfp410_mode_valid,

commit 25f4e1729a3447c6288b4acde99f733833661425
Author: Mark Kettenis <mark.kettenis@xs4all.nl>
Date:   Thu Jan 31 21:02:48 2008 -0800

    Bug #14246: Fix biuld on OpenBSD.

diff --git a/src/i830_memory.c b/src/i830_memory.c
index 43d2e0f..eed2eca 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -99,6 +99,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <assert.h>
 #include <string.h>
 #include <errno.h>
+#include <sys/types.h>
 #include <sys/mman.h>
 
 #include "xf86.h"

commit 48eac1a03785c6a795193bb884b2c23dcd5b815b
Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
Date:   Thu Jan 31 18:26:46 2008 +0800

    Don't crash if SW cursor
    
    In case of device option or hw cursor allocation fails.

diff --git a/src/i830_memory.c b/src/i830_memory.c
index 85b6528..43d2e0f 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1929,7 +1929,8 @@ i830_bind_all_memory(ScrnInfoPtr pScrn)
 	}
 #endif
     }
-    i830_update_cursor_offsets(pScrn);
+    if (!pI830->SWCursor)
+	i830_update_cursor_offsets(pScrn);
 
     return TRUE;
 }

commit 6bf53eb48f40ad0c8ea9679ee634447410821b4f
Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
Date:   Fri Jan 25 16:59:13 2008 +0800

    Set vtSema before EnterVT
    
    Which was missing in our ScreenInit and initial EnterVT.
    This not only causes failure in initial rotation with TTM,
    as we won't bind in rotate_mem alloc in this case, and hide
    another bug that we call randr12 function in I830LoadPalete
    before we call xf86RandR12Init.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 7077456..dffc630 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2934,9 +2934,25 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
       pI830->directRenderingEnabled = I830DRIFinishScreenInit(pScreen);
 #endif
 
+   /* Must force it before EnterVT, so we are in control of VT and
+    * later memory should be bound when allocating, e.g rotate_mem */
+   pScrn->vtSema = TRUE;
+
    if (!I830EnterVT(scrnIndex, 0))
       return FALSE;
 
+   pI830->BlockHandler = pScreen->BlockHandler;
+   pScreen->BlockHandler = I830BlockHandler;
+
+   pScreen->SaveScreen = xf86SaveScreen;
+   pI830->CloseScreen = pScreen->CloseScreen;
+   pScreen->CloseScreen = I830CloseScreen;
+   pI830->CreateScreenResources = pScreen->CreateScreenResources;
+   pScreen->CreateScreenResources = i830CreateScreenResources;
+
+   if (!xf86CrtcScreenInit (pScreen))
+       return FALSE;
+
    DPRINTF(PFX, "assert( if(!miCreateDefColormap(pScreen)) )\n");
    if (!miCreateDefColormap(pScreen))
       return FALSE;
@@ -2973,18 +2989,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering: Not available\n");
 #endif
 
-   pI830->BlockHandler = pScreen->BlockHandler;
-   pScreen->BlockHandler = I830BlockHandler;
 
-   pScreen->SaveScreen = xf86SaveScreen;
-   pI830->CloseScreen = pScreen->CloseScreen;
-   pScreen->CloseScreen = I830CloseScreen;
-   pI830->CreateScreenResources = pScreen->CreateScreenResources;
-   pScreen->CreateScreenResources = i830CreateScreenResources;
-
-   if (!xf86CrtcScreenInit (pScreen))
-       return FALSE;
-       
    /* Wrap pointer motion to flip touch screen around */
    pI830->PointerMoved = pScrn->PointerMoved;
    pScrn->PointerMoved = I830PointerMoved;

commit 5d9e67aec3ce458d22b7febd3819542abb360534
Author: Erik Andren <erik.andren@gmail.com>
Date:   Fri Jan 25 11:06:01 2008 +0800

    Clevo M720R has no TV-out

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index cb43603..853a33e 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -69,6 +69,9 @@ static i830_quirk i830_quirk_list[] = {
     /* Apple Mac mini has no lvds, but macbook pro does */
     { PCI_CHIP_I945_GM, 0x8086, 0x7270, quirk_mac_mini },
 
+    /* Clevo M720R has no tv output */
+    { PCI_CHIP_I965_GM, 0x1558, 0x0721, quirk_ignore_tv },
+
     /* Dell Latitude X1 */
     { PCI_CHIP_I915_GM, 0x1028, 0x01a3, quirk_ignore_tv },
     /* Dell XPS 1330 */

commit 94a18fa1f8141837bdab32e545da7a7aed1cc396
Author: Julien Cristau <jcristau@debian.org>
Date:   Thu Jan 24 15:24:40 2008 +0100

    Don't build reg_dumper if we don't have pciaccess 0.10.0
    
    The pci_device_map_range() function was added in libpciaccess 0.10.0, and
    is used by the reg_dumper tool.  Don't try to build it if we have an older
    libpciaccess.
    Also make sure that util-macros >= 1.1.3 is available when running autoconf,
    because it's required for the PACKAGE_VERSION_* macros.

diff --git a/configure.ac b/configure.ac
index 334a1f4..e707a1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,7 +117,7 @@ CFLAGS="$save_CFLAGS"
 if test x$XSERVER_LIBPCIACCESS = xyes; then
 	PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10.0])
 else
-	PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.5.0],
+	PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10.0],
 				       have_libpciaccess=yes,
 				       have_libpciaccess=no)
 fi
@@ -216,6 +216,8 @@ AC_SUBST([moduledir])
 DRIVER_NAME=intel
 AC_SUBST([DRIVER_NAME])
 
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.1.3)
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
 

commit d341e41c863f1212bf2c6b84782a7e472b6612a1
Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
Date:   Thu Jan 24 10:40:18 2008 +0800

    Clear shadow memory after allocation

diff --git a/src/i830_display.c b/src/i830_display.c
index d16871d..f61d3c4 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1342,6 +1342,7 @@ i830_crtc_shadow_allocate (xf86CrtcPtr crtc, int width, int height)
 		   "Couldn't allocate shadow memory for rotated CRTC\n");
 	return NULL;
     }
+    memset(pI830->FbBase + intel_crtc->rotate_mem->offset, 0, size);
 
     return pI830->FbBase + intel_crtc->rotate_mem->offset;
 }

commit 88a1041c5361964d37107c22d77feaa1b2160656
Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
Date:   Thu Jan 24 10:36:06 2008 +0800

    Fix i830 block handler wrap
    
    which was observed in rotation crash with stack overflow.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 32cecff..7077456 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2353,6 +2353,7 @@ I830BlockHandler(int i,
 
     (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
 
+    pI830->BlockHandler = pScreen->BlockHandler;
     pScreen->BlockHandler = I830BlockHandler;
 
     I830VideoBlockHandler(i, blockData, pTimeout, pReadmask);

commit db0a7c569e383436a2725e1e74f35fb426da1196
Author: Andreas Stawinoga <a.stawinoga@gmx.de>
Date:   Thu Jan 24 08:51:09 2008 +0800

    Samsung Q45 has no TV output

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 8fbdbfe..cb43603 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -91,6 +91,8 @@ static i830_quirk i830_quirk_list[] = {
 
     /* Samsung Q35 has no TV output */
     { PCI_CHIP_I945_GM, 0x144d, 0xc504, quirk_ignore_tv },
+    /* Samsung Q45 has no TV output */
+    { PCI_CHIP_I965_GM, 0x144d, 0xc510, quirk_ignore_tv },
 
     /* Dell Inspiron 510m needs pipe A force quirk */
     { PCI_CHIP_I855_GM, 0x1028, 0x0164, quirk_pipea_force },

commit f54bba7600647c76fe3bd2d0133edc06dbea6a05
Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
Date:   Tue Jan 22 00:48:23 2008 +0800

    Add missing i830M and 845G pci ids info

diff --git a/src/common.h b/src/common.h
index 7737194..3a11e59 100644
--- a/src/common.h
+++ b/src/common.h
@@ -298,6 +298,16 @@ extern int I810_DEBUG;
 #define PCI_CHIP_I815_BRIDGE       0x1130
 #endif
 
+#ifndef PCI_CHIP_I830_M
+#define PCI_CHIP_I830_M            0x3577
+#define PCI_CHIP_I830_M_BRIDGE     0x3575


Reply to: