xf86-video-intel: Branch 'modesetting' - 6 commits - man/i810.man src/i830_bios.c src/i830_driver.c src/i830.h src/i830_modes.c

Eric Anholt anholt at kemper.freedesktop.org
Mon Sep 25 22:56:15 EEST 2006


 man/i810.man      |   14 -------
 src/i830.h        |   10 -----
 src/i830_bios.c   |   76 ++++++++++++++++++++-------------------
 src/i830_driver.c |  103 ------------------------------------------------------
 src/i830_modes.c  |   14 -------
 5 files changed, 39 insertions(+), 178 deletions(-)

New commits:
diff-tree 965609f6fa63e28e5a28128f5bc44f8c4d7b9f68 (from c52242c22779a51aa12b18a7a589080ce44c8484)
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Sep 22 09:51:45 2006 -0700

    Restructure i830_bios.c so we don't leak a copy of the BIOS per generation.

diff --git a/src/i830.h b/src/i830.h
index 53302ee..92c9111 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -442,8 +442,6 @@ typedef struct _I830Rec {
    
    Bool panel_wants_dither;
 
-   unsigned char *VBIOS;
-
    CARD32 saveDSPACNTR;
    CARD32 saveDSPBCNTR;
    CARD32 savePIPEACONF;
diff --git a/src/i830_bios.c b/src/i830_bios.c
index 14e354e..07dd67d 100644
--- a/src/i830_bios.c
+++ b/src/i830_bios.c
@@ -38,21 +38,20 @@
 #include "i830_bios.h"
 #include "edid.h"
 
-#define INTEL_BIOS_8(_addr)	(pI830->VBIOS[_addr])
-#define INTEL_BIOS_16(_addr)	(pI830->VBIOS[_addr] | \
-				 (pI830->VBIOS[_addr + 1] << 8))
-#define INTEL_BIOS_32(_addr)	(pI830->VBIOS[_addr] | \
-				 (pI830->VBIOS[_addr + 1] << 8) \
-				 (pI830->VBIOS[_addr + 2] << 16) \
-				 (pI830->VBIOS[_addr + 3] << 24))
+#define INTEL_BIOS_8(_addr)	(bios[_addr])
+#define INTEL_BIOS_16(_addr)	(bios[_addr] | \
+				 (bios[_addr + 1] << 8))
+#define INTEL_BIOS_32(_addr)	(bios[_addr] | \
+				 (bios[_addr + 1] << 8) \
+				 (bios[_addr + 2] << 16) \
+				 (bios[_addr + 3] << 24))
 
 /* XXX */
 #define INTEL_VBIOS_SIZE (64 * 1024)
 
 static void
-i830DumpBIOSToFile(ScrnInfoPtr pScrn)
+i830DumpBIOSToFile(ScrnInfoPtr pScrn, unsigned char *bios)
 {
-    I830Ptr pI830 = I830PTR(pScrn);
     const char *filename = "/tmp/xf86-video-intel-VBIOS";
     FILE *f;
 
@@ -61,7 +60,7 @@ i830DumpBIOSToFile(ScrnInfoPtr pScrn)
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Couldn't open %s\n", filename);
 	return;
     }
-    if (fwrite(pI830->VBIOS, INTEL_VBIOS_SIZE, 1, f) != 1) {
+    if (fwrite(bios, INTEL_VBIOS_SIZE, 1, f) != 1) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Couldn't write BIOS data\n");
     }
 
@@ -78,48 +77,46 @@ i830DumpBIOSToFile(ScrnInfoPtr pScrn)
  * feed an updated VBT back through that, compared to what we'll fetch using
  * this method of groping around in the BIOS data.
  */
-static Bool
+static unsigned char *
 i830GetBIOS(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     struct vbt_header *vbt;
     int vbt_off;
+    unsigned char *bios;
 
-    if (pI830->VBIOS != NULL)
-	return TRUE;
-
-    pI830->VBIOS = xalloc(INTEL_VBIOS_SIZE);
-    if (pI830->VBIOS == NULL)
-	return FALSE;
+    bios = xalloc(INTEL_VBIOS_SIZE);
+    if (bios == NULL)
+	return NULL;
 
     if (pI830->pVbe != NULL) {
-	memcpy(pI830->VBIOS, xf86int10Addr(pI830->pVbe->pInt10,
+	memcpy(bios, xf86int10Addr(pI830->pVbe->pInt10,
 					   pI830->pVbe->pInt10->BIOSseg << 4),
 	       INTEL_VBIOS_SIZE);
     } else {
-	xf86ReadPciBIOS(0, pI830->PciTag, 0, pI830->VBIOS, INTEL_VBIOS_SIZE);
+	xf86ReadPciBIOS(0, pI830->PciTag, 0, bios, INTEL_VBIOS_SIZE);
     }
 
     if (0)
-	i830DumpBIOSToFile(pScrn);
+	i830DumpBIOSToFile(pScrn, bios);
 
     vbt_off = INTEL_BIOS_16(0x1a);
     if (vbt_off >= INTEL_VBIOS_SIZE) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Bad VBT offset: 0x%x\n",
 		   vbt_off);
-	xfree(pI830->VBIOS);
-	return FALSE;
+	xfree(bios);
+	return NULL;
     }
 
-    vbt = (struct vbt_header *)(pI830->VBIOS + vbt_off);
+    vbt = (struct vbt_header *)(bios + vbt_off);
 
     if (memcmp(vbt->signature, "$VBT", 4) != 0) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Bad VBT signature\n");
-	xfree(pI830->VBIOS);
-	return FALSE;
+	xfree(bios);
+	return NULL;
     }
 
-    return TRUE;
+    return bios;
 }
 
 Bool
@@ -130,18 +127,22 @@ i830GetLVDSInfoFromBIOS(ScrnInfoPtr pScr
     struct bdb_header *bdb;
     int vbt_off, bdb_off, bdb_block_off, block_size;
     int panel_type = -1;
+    unsigned char *bios;
     Bool found_panel_info = FALSE;
 
-    if (!i830GetBIOS(pScrn))
+    bios = i830GetBIOS(pScrn);
+
+    if (bios == NULL)
 	return FALSE;
 
     vbt_off = INTEL_BIOS_16(0x1a);
-    vbt = (struct vbt_header *)(pI830->VBIOS + vbt_off);
+    vbt = (struct vbt_header *)(bios + vbt_off);
     bdb_off = vbt_off + vbt->bdb_offset;
-    bdb = (struct bdb_header *)(pI830->VBIOS + bdb_off);
+    bdb = (struct bdb_header *)(bios + bdb_off);
 
     if (memcmp(bdb->signature, "BIOS_DATA_BLOCK ", 16) != 0) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Bad BDB signature\n");
+	xfree(bios);
 	return FALSE;
     }
 
@@ -161,7 +162,7 @@ i830GetLVDSInfoFromBIOS(ScrnInfoPtr pScr
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Found BDB block type %d\n", id);
 	switch (id) {
 	case 40:
-	    lvds1 = (struct lvds_bdb_1 *)(pI830->VBIOS + start);
+	    lvds1 = (struct lvds_bdb_1 *)(bios + start);
 	    panel_type = lvds1->panel_type;
 	    if (lvds1->caps & LVDS_CAP_DITHER)
 		pI830->panel_wants_dither = TRUE;
@@ -170,23 +171,23 @@ i830GetLVDSInfoFromBIOS(ScrnInfoPtr pScr
 	    if (panel_type == -1)
 		break;
 
-	    lvds2 = (struct lvds_bdb_2 *)(pI830->VBIOS + start);
-	    fpparam = (struct lvds_bdb_2_fp_params *)(pI830->VBIOS +
+	    lvds2 = (struct lvds_bdb_2 *)(bios + start);
+	    fpparam = (struct lvds_bdb_2_fp_params *)(bios +
 		bdb_off + lvds2->panels[panel_type].fp_params_offset);
-	    fptiming = (struct lvds_bdb_2_fp_edid_dtd *)(pI830->VBIOS +
+	    fptiming = (struct lvds_bdb_2_fp_edid_dtd *)(bios +
 		bdb_off + lvds2->panels[panel_type].fp_edid_dtd_offset);
-	    timing_ptr = pI830->VBIOS + bdb_off +
+	    timing_ptr = bios + bdb_off +
 	        lvds2->panels[panel_type].fp_edid_dtd_offset;
 
 	    if (fpparam->terminator != 0xffff) {
 		/* Apparently the offsets are wrong for some BIOSes, so we
 		 * try the other offsets if we find a bad terminator.
 		 */
-		fpparam = (struct lvds_bdb_2_fp_params *)(pI830->VBIOS +
+		fpparam = (struct lvds_bdb_2_fp_params *)(bios +
 		    bdb_off + lvds2->panels[panel_type].fp_params_offset + 8);
-		fptiming = (struct lvds_bdb_2_fp_edid_dtd *)(pI830->VBIOS +
+		fptiming = (struct lvds_bdb_2_fp_edid_dtd *)(bios +
 		    bdb_off + lvds2->panels[panel_type].fp_edid_dtd_offset + 8);
-		timing_ptr = pI830->VBIOS + bdb_off +
+		timing_ptr = bios + bdb_off +
 	            lvds2->panels[panel_type].fp_edid_dtd_offset + 8;
 
 		if (fpparam->terminator != 0xffff)
@@ -218,5 +219,6 @@ i830GetLVDSInfoFromBIOS(ScrnInfoPtr pScr
 	}
     }
 
+    xfree(bios);
     return found_panel_info;
 }
diff-tree c52242c22779a51aa12b18a7a589080ce44c8484 (from c2446be9b444b16c95f78dab17bf130f9f491ee2)
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Sep 22 09:41:07 2006 -0700

    Remove some dead code related to clock ranges.

diff --git a/src/i830.h b/src/i830.h
index 9fc6712..53302ee 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -418,7 +418,6 @@ typedef struct _I830Rec {
    unsigned int SaveGeneration;
 
    OsTimerPtr devicesTimer;
-   int MaxClock;
 
    int ddc2;
    int num_outputs;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index fd3bf2e..31e3b17 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2161,8 +2161,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
    xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 	      "Maximum space available for video modes: %d kByte\n", memsize);
 
-     pI830->MaxClock = 300000;
-
    n = I830ValidateXF86ModeList(pScrn, TRUE);
    if (n <= 0) {
       xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n");
diff --git a/src/i830_modes.c b/src/i830_modes.c
index 6bff1d0..f1cdbe1 100644
--- a/src/i830_modes.c
+++ b/src/i830_modes.c
@@ -1025,20 +1025,6 @@ I830ValidateXF86ModeList(ScrnInfoPtr pSc
     last->next = pScrn->modes;
     pScrn->modes->prev = last;
 
-#if 0
-    /* XXX: do I need this any more?  Maybe XF86VidMode uses it?
-     * Set up the ClockRanges, which describe what clock ranges are available,
-     * and what sort of modes they can be used for.
-     */
-    clockRanges = xnfcalloc(sizeof(ClockRange), 1);
-    clockRanges->next = NULL;
-    clockRanges->minClock = 25000;
-    clockRanges->maxClock = pI830->MaxClock;
-    clockRanges->clockIndex = -1;		/* programmable */
-    clockRanges->interlaceAllowed = TRUE;	/* XXX check this */
-    clockRanges->doubleScanAllowed = FALSE;	/* XXX check this */
-#endif
-
 #if DEBUG_REPROBE
     xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Modes post revalidate\n");
     do {
diff-tree c2446be9b444b16c95f78dab17bf130f9f491ee2 (from b6ba268d0d5f22c6a18ce45416452fce83438620)
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Sep 22 09:38:11 2006 -0700

    Remove the GetDevicePresence BIOS call which just printed BIOS information.
    
    Because we aren't using the BIOS to set modes any more, what the BIOS thinks is
    present is probably even less important than before.

diff --git a/man/i810.man b/man/i810.man
index 3aaa165..59766a6 100644
--- a/man/i810.man
+++ b/man/i810.man
@@ -172,13 +172,6 @@ NOTE: Using this option may cause text m
 and thus should be used with caution.
 Default: disabled.
 .TP
-.BI "Option \*qDevicePresence\*q \*q" boolean \*q
-Tell the driver to perform an active detect of the currently connected
-monitors. This option is useful if the monitor was not connected when
-the machine has booted, but unfortunately it doesn't always work and
-is extremely dependent upon the Video BIOS.
-Default: disabled
-.TP
 .BI "Option \*qRotate\*q \*q90\*q"
 Rotate the desktop 90 degrees counterclockwise. Other valid options are
 0, 90, 180 and 270 degrees. The RandR extension is used for rotation 
diff --git a/src/i830.h b/src/i830.h
index 35e0391..9fc6712 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -416,7 +416,6 @@ typedef struct _I830Rec {
    int yoffset;
 
    unsigned int SaveGeneration;
-   Bool devicePresence;
 
    OsTimerPtr devicesTimer;
    int MaxClock;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 5e0cff6..fd3bf2e 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -260,7 +260,6 @@ static OptionInfoRec I830Options[] = {
    {OPTION_XVIDEO,	"XVideo",	OPTV_BOOLEAN,	{0},	TRUE},
    {OPTION_COLOR_KEY,	"ColorKey",	OPTV_INTEGER,	{0},	FALSE},
    {OPTION_VIDEO_KEY,	"VideoKey",	OPTV_INTEGER,	{0},	FALSE},
-   {OPTION_DEVICE_PRESENCE,"DevicePresence",OPTV_BOOLEAN,{0},	FALSE},
    {OPTION_MONITOR_LAYOUT, "MonitorLayout", OPTV_ANYSTR,{0},	FALSE},
    {OPTION_CLONE,	"Clone",	OPTV_BOOLEAN,	{0},	FALSE},
    {OPTION_CLONE_REFRESH,"CloneRefresh",OPTV_INTEGER,	{0},	FALSE},
@@ -623,31 +622,6 @@ GetBIOSVersion(ScrnInfoPtr pScrn, unsign
    return FALSE;
 }
 
-static Bool
-GetDevicePresence(ScrnInfoPtr pScrn, Bool *required, int *attached,
-		  int *encoderPresent)
-{
-   vbeInfoPtr pVbe = I830PTR(pScrn)->pVbe;
-
-   DPRINTF(PFX, "GetDevicePresence\n");
-
-   pVbe->pInt10->num = 0x10;
-   pVbe->pInt10->ax = 0x5f64;
-   pVbe->pInt10->bx = 0x200;
-
-   xf86ExecX86int10_wrapper(pVbe->pInt10, pScrn);
-   if (Check5fStatus(pScrn, 0x5f64, pVbe->pInt10->ax)) {
-      if (required)
-	 *required = ((pVbe->pInt10->bx & 0x1) == 0);
-      if (attached)
-	 *attached = (pVbe->pInt10->cx >> 8) & 0xff;
-      if (encoderPresent)
-	 *encoderPresent = pVbe->pInt10->cx & 0xff;
-      return TRUE;
-   } else
-      return FALSE;
-}
-
 /*
  * Returns a string matching the device corresponding to the first bit set
  * in "device".  savedDevice is then set to device with that bit cleared.
@@ -2071,30 +2045,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
    } else
       pI830->newPipeSwitch = FALSE;
 
-   pI830->devicePresence = FALSE;
-   from = X_DEFAULT;
-   if (xf86ReturnOptValBool(pI830->Options, OPTION_DEVICE_PRESENCE, FALSE)) {
-      pI830->devicePresence = TRUE;
-      from = X_CONFIG;
-   }
-   xf86DrvMsg(pScrn->scrnIndex, from, "Device Presence: %s.\n",
-	      pI830->devicePresence ? "enabled" : "disabled");
-
-   /* This performs an active detect of the currently attached monitors
-    * or, at least it's meant to..... alas it doesn't seem to always work.
-    */
-   if (pI830->devicePresence) {
-      int req=0, att=0, enc=0;
-      GetDevicePresence(pScrn, &req, &att, &enc);
-      for (i = 0; i < NumDisplayTypes; i++) {
-         xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-	    "Display Presence: %s: attached: %s, encoder: %s\n",
-	    displayDevices[i],
-	    BOOLTOSTRING(((1<<i) & att)>>i),
-	    BOOLTOSTRING(((1<<i) & enc)>>i));
-      }
-   }
-
    PrintDisplayDeviceInfo(pScrn);
 
    if (xf86IsEntityShared(pScrn->entityList[0])) {
diff-tree b6ba268d0d5f22c6a18ce45416452fce83438620 (from 20956a5d6f1eb518717a680e58938f31461ca5e4)
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Sep 22 09:31:37 2006 -0700

    Remove the no-longer-connected VBERestore option.

diff --git a/man/i810.man b/man/i810.man
index f6b7368..3aaa165 100644
--- a/man/i810.man
+++ b/man/i810.man
@@ -117,13 +117,6 @@ The following driver
 .B Options
 are supported for the 830M and later chipsets:
 .TP
-.BI "Option \*qVBERestore\*q \*q" boolean \*q
-Enable or disable the use of VBE save/restore for saving and restoring
-the initial text mode.  This is disabled by default because it causes
-lockups on some platforms.  However, there are some cases where it must
-enabled for the correct restoration of the initial video mode.  If you are
-having a problem with that, try enabling this option.  Default: Disabled.
-.TP
 .BI "Option \*qVideoKey\*q \*q" integer \*q
 This is the same as the
 .B \*qColorKey\*q
diff --git a/src/i830.h b/src/i830.h
index 3460c70..35e0391 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -416,7 +416,6 @@ typedef struct _I830Rec {
    int yoffset;
 
    unsigned int SaveGeneration;
-   Bool vbeRestoreWorkaround;
    Bool devicePresence;
 
    OsTimerPtr devicesTimer;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 6000300..5e0cff6 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -260,7 +260,6 @@ static OptionInfoRec I830Options[] = {
    {OPTION_XVIDEO,	"XVideo",	OPTV_BOOLEAN,	{0},	TRUE},
    {OPTION_COLOR_KEY,	"ColorKey",	OPTV_INTEGER,	{0},	FALSE},
    {OPTION_VIDEO_KEY,	"VideoKey",	OPTV_INTEGER,	{0},	FALSE},
-   {OPTION_VBE_RESTORE,	"VBERestore",	OPTV_BOOLEAN,	{0},	FALSE},
    {OPTION_DEVICE_PRESENCE,"DevicePresence",OPTV_BOOLEAN,{0},	FALSE},
    {OPTION_MONITOR_LAYOUT, "MonitorLayout", OPTV_ANYSTR,{0},	FALSE},
    {OPTION_CLONE,	"Clone",	OPTV_BOOLEAN,	{0},	FALSE},
@@ -2426,16 +2425,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
    pI830->pVbe = NULL;
 #endif
 
-   /* Use the VBE mode restore workaround by default. */
-   pI830->vbeRestoreWorkaround = TRUE;
-   from = X_DEFAULT;
-   if (xf86ReturnOptValBool(pI830->Options, OPTION_VBE_RESTORE, FALSE)) {
-      pI830->vbeRestoreWorkaround = FALSE;
-      from = X_CONFIG;
-   }
-   xf86DrvMsg(pScrn->scrnIndex, from, "VBE Restore workaround: %s.\n",
-	      pI830->vbeRestoreWorkaround ? "enabled" : "disabled");
-      
 #if defined(XF86DRI)
    /* Load the dri module if requested. */
    if (xf86ReturnOptValBool(pI830->Options, OPTION_DRI, FALSE) &&
diff-tree 20956a5d6f1eb518717a680e58938f31461ca5e4 (from 2cd28be71472d67956f47c7d49283ebabefa089a)
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Sep 22 09:27:30 2006 -0700

    Remove unused display{Attached,Present} fields.

diff --git a/src/i830.h b/src/i830.h
index 9f65f88..3460c70 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -397,10 +397,6 @@ typedef struct _I830Rec {
    int toggleDevices;
    int lastDevice0, lastDevice1, lastDevice2;
 
-   /* These are indexed by the display types */
-   Bool displayAttached[NumDisplayTypes];
-   Bool displayPresent[NumDisplayTypes];
-
    /* [0] is Pipe A, [1] is Pipe B. */
    int availablePipes;
    /* [0] is display plane A, [1] is display plane B. */
diff-tree 2cd28be71472d67956f47c7d49283ebabefa089a (from d87d1f5bb0475c6f651fcb7e2cab2a7d46edcc69)
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Sep 22 08:55:55 2006 -0700

    Remove empty SAVERESTORE_HWSTATE code.

diff --git a/src/i830.h b/src/i830.h
index 57d6506..9f65f88 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -337,7 +337,6 @@ typedef struct _I830Rec {
    int NumScanlineColorExpandBuffers;
    int nextColorExpandBuf;
 
-   I830RegRec SavedReg;
    I830RegRec ModeReg;
 
    Bool noAccel;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index d21bf9f..6000300 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3512,9 +3512,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr 
    if (!vgaHWMapMem(pScrn))
       return FALSE;
 
-   /* Clear SavedReg */
-   memset(&pI830->SavedReg, 0, sizeof(pI830->SavedReg));
-
    DPRINTF(PFX, "assert( if(!I830EnterVT(scrnIndex, 0)) )\n");
 
    if (!I830EnterVT(scrnIndex, 0))
@@ -3692,34 +3689,6 @@ I830FreeScreen(int scrnIndex, int flags)
       vgaHWFreeHWRec(xf86Screens[scrnIndex]);
 }
 
-#ifndef SAVERESTORE_HWSTATE
-#define SAVERESTORE_HWSTATE 0
-#endif
-
-#if SAVERESTORE_HWSTATE
-static void
-SaveHWOperatingState(ScrnInfoPtr pScrn)
-{
-   I830Ptr pI830 = I830PTR(pScrn);
-   I830RegPtr save = &pI830->SavedReg;
-
-   DPRINTF(PFX, "SaveHWOperatingState\n");
-
-   return;
-}
-
-static void
-RestoreHWOperatingState(ScrnInfoPtr pScrn)
-{
-   I830Ptr pI830 = I830PTR(pScrn);
-   I830RegPtr save = &pI830->SavedReg;
-
-   DPRINTF(PFX, "RestoreHWOperatingState\n");
-
-   return;
-}
-#endif
-
 static void
 I830LeaveVT(int scrnIndex, int flags)
 {
@@ -3760,11 +3729,6 @@ I830LeaveVT(int scrnIndex, int flags)
    }
 #endif
 
-#if SAVERESTORE_HWSTATE
-   if (!pI830->closing)
-      SaveHWOperatingState(pScrn);
-#endif
-
    if (pI830->CursorInfoRec && pI830->CursorInfoRec->HideCursor)
       pI830->CursorInfoRec->HideCursor(pScrn);
 
@@ -3982,10 +3946,6 @@ I830EnterVT(int scrnIndex, int flags)
 
    pScrn->AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
 
-#if SAVERESTORE_HWSTATE
-   RestoreHWOperatingState(pScrn);
-#endif
-
 #ifdef XF86DRI
    if (pI830->directRenderingEnabled) {
       if (!pI830->starting) {



More information about the xorg-commit mailing list