xf86-video-intel: 2 commits - src/bios_reader/bios_reader.c src/i810_reg.h src/i830_crt.c src/i830_debug.c src/i830.h src/i830_lvds.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Wed Aug 20 14:41:10 PDT 2008


 src/bios_reader/bios_reader.c |   13 ++++++++++++-
 src/i810_reg.h                |    6 +++---
 src/i830.h                    |    2 +-
 src/i830_crt.c                |   21 ++++++++++++++-------
 src/i830_debug.c              |    3 +++
 src/i830_lvds.c               |   12 ++++++------
 6 files changed, 39 insertions(+), 18 deletions(-)

New commits:
commit 7b6f4d22211d71480caf6335a3eacaacff369371
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Wed Aug 20 14:40:29 2008 -0700

    Don't allocate a pipe for hotplug detection
    
    It shouldn't be needed...

diff --git a/src/i830_crt.c b/src/i830_crt.c
index 2a99f9c..8274c0c 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -352,10 +352,9 @@ i830_crt_detect(xf86OutputPtr output)
     xf86OutputStatus	    status;
     Bool		    connected;
 
-    crtc = i830GetLoadDetectPipe (output, NULL, &dpms_mode);
-    if (!crtc)
-	return XF86OutputStatusUnknown;
-
+    /*
+     * Try hotplug detection where supported
+     */
     if (IS_I945G(pI830) || IS_I945GM(pI830) || IS_I965G(pI830) ||
 	    IS_G33CLASS(pI830)) {
 	if (i830_crt_detect_hotplug(output))
@@ -363,12 +362,19 @@ i830_crt_detect(xf86OutputPtr output)
 	else
 	    status = XF86OutputStatusDisconnected;
 
-	goto out;
+	goto done;
     }
 
+    /*
+     * DDC is next best, no flicker
+     */
+    crtc = i830GetLoadDetectPipe (output, NULL, &dpms_mode);
+    if (!crtc)
+	return XF86OutputStatusUnknown;
+
     if (i830_crt_detect_ddc(output)) {
 	status = XF86OutputStatusConnected;
-	goto out;
+	goto out_release_pipe;
     }
 
     /* Use the load-detect method if we have no other way of telling. */
@@ -378,9 +384,10 @@ i830_crt_detect(xf86OutputPtr output)
     else
 	status = XF86OutputStatusDisconnected;
 
-out:
+out_release_pipe:
     i830ReleaseLoadDetectPipe (output, dpms_mode);
 
+done:
     return status;
 }
 
commit ba4a4b7887d5c2da21cadfeeed601eaec8515550
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Wed Aug 20 14:39:34 2008 -0700

    Add more panel debugging info to register dump & vbios reader

diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index dbcd150..ba773cc 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -198,11 +198,22 @@ static void dump_lvds_data(void *data, unsigned char *base)
 	if (i == panel_type)
 	    marker = '*';
 	else
-	    marker = ' ';
+	    continue;
 
 	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));
+	printf("\t\tinfo:\n");
+	printf("\t\t  LVDS: 0x%08lx\n", 
+	       (unsigned long)lfp_data->fp_timing.lvds_reg_val);
+	printf("\t\t  PP_ON_DELAYS: 0x%08lx\n",
+	       (unsigned long)lfp_data->fp_timing.pp_on_reg_val);
+	printf("\t\t  PP_OFF_DELAYS: 0x%08lx\n",
+	       (unsigned long)lfp_data->fp_timing.pp_off_reg_val);
+	printf("\t\t  PP_DIVISOR: 0x%08lx\n",
+	       (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),
diff --git a/src/i810_reg.h b/src/i810_reg.h
index 7739a1c..a73709b 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -899,9 +899,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 # define POWER_DOWN_ON_RESET			(1 << 1)
 # define POWER_TARGET_ON			(1 << 0)
 
-#define LVDSPP_ON       0x61208
-#define LVDSPP_OFF      0x6120c
-#define PP_CYCLE        0x61210
+#define PP_ON_DELAYS	0x61208
+#define PP_OFF_DELAYS	0x6120c
+#define PP_DIVISOR	0x61210
 
 #define PFIT_CONTROL	0x61230
 # define PFIT_ENABLE				(1 << 31)
diff --git a/src/i830.h b/src/i830.h
index 73fb2ad..ef6d07c 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -682,7 +682,7 @@ typedef struct _I830Rec {
    uint32_t savePP_ON;
    uint32_t savePP_OFF;
    uint32_t savePP_CONTROL;
-   uint32_t savePP_CYCLE;
+   uint32_t savePP_DIVISOR;
    uint32_t savePFIT_CONTROL;
    uint32_t savePaletteA[256];
    uint32_t savePaletteB[256];
diff --git a/src/i830_debug.c b/src/i830_debug.c
index f1205cc..21afb46 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -521,6 +521,9 @@ static struct i830SnapshotRec {
 
     DEFINEREG2(PP_CONTROL, i830_debug_pp_control),
     DEFINEREG2(PP_STATUS, i830_debug_pp_status),
+    DEFINEREG(PP_ON_DELAYS),
+    DEFINEREG(PP_OFF_DELAYS),
+    DEFINEREG(PP_DIVISOR),
     DEFINEREG(PFIT_CONTROL),
     DEFINEREG(PFIT_PGM_RATIOS),
     DEFINEREG(PORT_HOTPLUG_EN),
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 801261a..0d67d50 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -449,10 +449,10 @@ i830_lvds_save (xf86OutputPtr output)
 
     if (IS_I965GM(pI830) || IS_GM45(pI830))
 	pI830->saveBLC_PWM_CTL2 = INREG(BLC_PWM_CTL2);
-    pI830->savePP_ON = INREG(LVDSPP_ON);
-    pI830->savePP_OFF = INREG(LVDSPP_OFF);
+    pI830->savePP_ON = INREG(PP_ON_DELAYS);
+    pI830->savePP_OFF = INREG(PP_OFF_DELAYS);
     pI830->savePP_CONTROL = INREG(PP_CONTROL);
-    pI830->savePP_CYCLE = INREG(PP_CYCLE);
+    pI830->savePP_DIVISOR = INREG(PP_DIVISOR);
     pI830->saveBLC_PWM_CTL = INREG(BLC_PWM_CTL);
     if ((INREG(PP_CONTROL) & POWER_TARGET_ON) && !dev_priv->dpmsoff) 
 	dev_priv->backlight_duty_cycle = dev_priv->get_backlight(output);
@@ -467,9 +467,9 @@ i830_lvds_restore(xf86OutputPtr output)
     if (IS_I965GM(pI830) || IS_GM45(pI830))
 	OUTREG(BLC_PWM_CTL2, pI830->saveBLC_PWM_CTL2);
     OUTREG(BLC_PWM_CTL, pI830->saveBLC_PWM_CTL);
-    OUTREG(LVDSPP_ON, pI830->savePP_ON);
-    OUTREG(LVDSPP_OFF, pI830->savePP_OFF);
-    OUTREG(PP_CYCLE, pI830->savePP_CYCLE);
+    OUTREG(PP_ON_DELAYS, pI830->savePP_ON);
+    OUTREG(PP_OFF_DELAYS, pI830->savePP_OFF);
+    OUTREG(PP_DIVISOR, pI830->savePP_DIVISOR);
     OUTREG(PP_CONTROL, pI830->savePP_CONTROL);
     if (pI830->savePP_CONTROL & POWER_TARGET_ON)
 	i830SetLVDSPanelPower(output, TRUE);


More information about the xorg-commit mailing list