xf86-video-intel: Branch 'modesetting' - 3 commits - src/i830_crt.c src/i830_debug.c src/i830_debug.h src/i830_display.h src/i830_driver.c src/i830_edid_modes.c src/i830_xf86cvt.c src/i830_xf86Modes.c src/i830_xf86Modes.h

Keith Packard keithp at kemper.freedesktop.org
Wed Dec 6 10:14:23 EET 2006


 src/i830_crt.c        |    4 +---
 src/i830_debug.c      |    4 ++--
 src/i830_debug.h      |    2 +-
 src/i830_display.h    |    4 ++--
 src/i830_driver.c     |   22 ++++++++++++++++------
 src/i830_edid_modes.c |    4 ++--
 src/i830_xf86Modes.c  |    4 ++--
 src/i830_xf86Modes.h  |    4 ++--
 src/i830_xf86cvt.c    |    4 ++--
 9 files changed, 30 insertions(+), 22 deletions(-)

New commits:
diff-tree ffd8aacbe7c72b696ff7257609e3c1d45c057609 (from a73649611414cb92697575efa90addfc3cf91cf9)
Author: Keith Packard <keithp at mandolin.keithp.com>
Date:   Tue Dec 5 19:48:39 2006 -0800

    new server APIs are not in server-1.2 (version 7.1.99.2)

diff --git a/src/i830_display.h b/src/i830_display.h
index c80c3f7..d140e09 100644
--- a/src/i830_display.h
+++ b/src/i830_display.h
@@ -44,11 +44,11 @@ Bool i830PipeInUse(xf86CrtcPtr crtc);
 
 /** @{
  */
-#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,1,99,2,0)
+#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,2,99,2,0)
 DisplayModePtr i830_xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
 DisplayModePtr i830_xf86CVTMode(int HDisplay, int VDisplay, float VRefresh,
 				Bool Reduced, Bool Interlaced);
 #define xf86DDCGetModes i830_xf86DDCGetModes
 #define xf86CVTMode i830_xf86CVTMode
-#endif /* XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,1,99,2) */
+#endif /* XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,2,99,2) */
 /** @} */
diff --git a/src/i830_edid_modes.c b/src/i830_edid_modes.c
index fcb71d2..3becbb5 100644
--- a/src/i830_edid_modes.c
+++ b/src/i830_edid_modes.c
@@ -38,7 +38,7 @@
 #include "i830.h"
 #include "i830_display.h"
 
-#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,1,99,2,0)
+#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,2,99,2,0)
 
 /*
  * TODO:
@@ -208,4 +208,4 @@ xf86DDCGetModes(int scrnIndex, xf86MonPt
     return Modes;
 }
 
-#endif /* XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,1,99,2,0) */
+#endif /* XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,2,99,2,0) */
diff --git a/src/i830_xf86Modes.c b/src/i830_xf86Modes.c
index c091aef..1afda95 100644
--- a/src/i830_xf86Modes.c
+++ b/src/i830_xf86Modes.c
@@ -45,7 +45,7 @@
  * there but we still want to use.  We need to come up with better API here.
  */
 
-#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,1,99,2,0)
+#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,2,99,2,0)
 /**
  * Calculates the horizontal sync rate of a mode.
  *
@@ -321,7 +321,7 @@ xf86PrintModeline(int scrnIndex,DisplayM
 		   mode->VTotal, flags, xf86ModeHSync(mode));
     xfree(flags);
 }
-#endif /* XORG_VERSION_CURRENT <= 7.1.99.2 */
+#endif /* XORG_VERSION_CURRENT <= 7.2.99.2 */
 
 /**
  * Marks as bad any modes with unsupported flags.
diff --git a/src/i830_xf86Modes.h b/src/i830_xf86Modes.h
index 3bd8557..9830003 100644
--- a/src/i830_xf86Modes.h
+++ b/src/i830_xf86Modes.h
@@ -29,7 +29,7 @@
 #define _I830_XF86MODES_H_
 #include "xorgVersion.h"
 
-#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,1,99,2,0)
+#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,2,99,2,0)
 double i830_xf86ModeHSync(DisplayModePtr mode);
 double i830_xf86ModeVRefresh(DisplayModePtr mode);
 DisplayModePtr i830_xf86DuplicateMode(DisplayModePtr pMode);
@@ -50,7 +50,7 @@ DisplayModePtr i830_xf86ModesAdd(Display
 #define xf86ModesEqual i830_xf86ModesEqual
 #define xf86PrintModeline i830_xf86PrintModeline
 #define xf86ModesAdd i830_xf86ModesAdd
-#endif /* XORG_VERSION_CURRENT <= 7.1.99.2 */
+#endif /* XORG_VERSION_CURRENT <= 7.2.99.2 */
 
 void
 i830xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList,
diff --git a/src/i830_xf86cvt.c b/src/i830_xf86cvt.c
index 0014056..dba57c8 100644
--- a/src/i830_xf86cvt.c
+++ b/src/i830_xf86cvt.c
@@ -40,7 +40,7 @@
 #include "i830.h"
 #include "i830_display.h"
 
-#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,1,99,2,0)
+#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,2,99,2,0)
 /*
  * Generate a CVT standard mode from HDisplay, VDisplay and VRefresh.
  *
@@ -303,4 +303,4 @@ xf86CVTMode(int HDisplay, int VDisplay, 
 
     return Mode;
 }
-#endif /* XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,1,99,2,0) */
+#endif /* XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,2,99,2,0) */
diff-tree a73649611414cb92697575efa90addfc3cf91cf9 (from 62fba80d3ea9c185ec8ae1e06c099c02bf844d8b)
Author: Keith Packard <keithp at mandolin.keithp.com>
Date:   Tue Dec 5 19:47:04 2006 -0800

    Capture VGA registers sooner so checks are more informative

diff --git a/src/i830_debug.c b/src/i830_debug.c
index d74d092..f732389 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -175,13 +175,13 @@ void i830TakeRegSnapshot(ScrnInfoPtr pSc
     }
 }
 
-void i830CompareRegsToSnapshot(ScrnInfoPtr pScrn)
+void i830CompareRegsToSnapshot(ScrnInfoPtr pScrn, char *where)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     int i;
 
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-	       "Comparing regs before/after X's VT usage\n");
+	       "Comparing regs from server start up to %s\n", where);
     for (i = 0; i < NUM_I830_SNAPSHOTREGS; i++) {
 	CARD32 val = INREG(i830_snapshot[i].reg);
 	if (i830_snapshot[i].regval != val) {
diff --git a/src/i830_debug.h b/src/i830_debug.h
index a8e3839..a365085 100644
--- a/src/i830_debug.h
+++ b/src/i830_debug.h
@@ -26,5 +26,5 @@
  */
 
 void i830TakeRegSnapshot(ScrnInfoPtr pScrn);
-void i830CompareRegsToSnapshot(ScrnInfoPtr pScrn);
+void i830CompareRegsToSnapshot(ScrnInfoPtr pScrn, char *where);
 void i830DumpRegs (ScrnInfoPtr pScrn);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index c85fe4e..73af147 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -325,6 +325,9 @@ static Bool I830CloseScreen(int scrnInde
 static Bool I830SaveScreen(ScreenPtr pScreen, int unblack);
 static Bool I830EnterVT(int scrnIndex, int flags);
 static CARD32 I830CheckDevicesTimer(OsTimerPtr timer, CARD32 now, pointer arg);
+static Bool SaveHWState(ScrnInfoPtr pScrn);
+static Bool RestoreHWState(ScrnInfoPtr pScrn);
+
 
 extern int I830EntityIndex;
 
@@ -1146,6 +1149,8 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
    /* Some of the probing needs MMIO access, so map it here. */
    I830MapMMIO(pScrn);
 
+   i830TakeRegSnapshot(pScrn);
+
 #if 1
    pI830->saveSWF0 = INREG(SWF0);
    pI830->saveSWF4 = INREG(SWF4);
@@ -1360,18 +1365,22 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
    }
 
 
+#if 0
+   SaveHWState (pScrn);
+#endif
    /* Perform the pipe assignment of outputs. This is a kludge until
     * we have better configuration support in the generic RandR code
     */
    for (i = 0; i < pI830->xf86_config.num_output; i++) 
    {
       xf86OutputPtr	      output = pI830->xf86_config.output[i];
-      I830OutputPrivatePtr    intel_output = output->driver_private;
-      xf86CrtcPtr	      crtc;
-      int		      p;
 
       output_status[i] = (*output->funcs->detect) (output);
    }
+#if 0
+   RestoreHWState (pScrn);
+#endif
+   
    
    for (i = 0; i < pI830->xf86_config.num_output; i++) 
    {
@@ -1911,6 +1920,8 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
       xf86LoaderReqSymLists(I810ramdacSymbols, NULL);
    }
 
+   i830CompareRegsToSnapshot(pScrn, "After PreInit");
+
    I830UnmapMMIO(pScrn);
 
    /*  We won't be using the VGA access after the probe. */
@@ -2187,8 +2198,6 @@ SaveHWState(ScrnInfoPtr pScrn)
 		 (unsigned long) temp);
    }
 
-   i830TakeRegSnapshot(pScrn);
-
    /* Save video mode information for native mode-setting. */
    pI830->saveDSPACNTR = INREG(DSPACNTR);
    pI830->savePIPEACONF = INREG(PIPEACONF);
@@ -2380,7 +2389,8 @@ RestoreHWState(ScrnInfoPtr pScrn)
    OUTREG(SWF31, pI830->saveSWF[15]);
    OUTREG(SWF32, pI830->saveSWF[16]);
 
-   i830CompareRegsToSnapshot(pScrn);
+   i830CompareRegsToSnapshot(pScrn, "After RestoreHWState");
+   i830DumpRegs (pScrn);
 
    return TRUE;
 }
diff-tree 62fba80d3ea9c185ec8ae1e06c099c02bf844d8b (from 2e8c927f9308069a82f25b65bb0c62bc5a156832)
Author: Keith Packard <keithp at mandolin.keithp.com>
Date:   Tue Dec 5 19:43:41 2006 -0800

    fix up misleading comment in i830_crt.c about border register

diff --git a/src/i830_crt.c b/src/i830_crt.c
index 7a706d1..bf23f9e 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -221,9 +221,7 @@ i830_crt_detect_load (xf86CrtcPtr	    cr
     adpa |= ADPA_VSYNC_CNTL_ENABLE | ADPA_HSYNC_CNTL_ENABLE;
     OUTREG(ADPA, adpa);
 
-    /* Set the border color to purple.  Maybe we should save/restore this
-     * reg.
-     */
+    /* Set the border color to purple. */
     bclrpat = INREG(bclrpat_reg);
     OUTREG(bclrpat_reg, 0x00500050);
 



More information about the xorg-commit mailing list