xf86-video-intel: Branch 'xf86-video-intel-2.2-branch' - 8 commits - src/ch7017/ch7017.c src/ch7xxx/ch7xxx.c src/i830_debug.c src/i830_display.c src/i830_memory.c src/i830_sdvo.c src/ivch/ivch.c src/sil164/sil164.c src/tfp410/tfp410.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Tue Feb 5 11:09:33 PST 2008


 src/ch7017/ch7017.c |    2 +-
 src/ch7xxx/ch7xxx.c |    2 +-
 src/i830_debug.c    |   44 +++++++++++++++++++++++++++++++-------------
 src/i830_display.c  |    6 +++++-
 src/i830_memory.c   |   18 ++++++++++++------
 src/i830_sdvo.c     |   16 ++++++++++++----
 src/ivch/ivch.c     |    2 +-
 src/sil164/sil164.c |    2 +-
 src/tfp410/tfp410.c |    2 +-
 9 files changed, 65 insertions(+), 29 deletions(-)

New commits:
commit 58cb85a7e4c760adc78128bdf605b7885ac32538
Author: Zhenyu Wang <zhenyu.z.wang at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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;
 }


More information about the xorg-commit mailing list