On Fri, Mar 02, 2012 at 09:27:52PM -0600, joshua stein wrote: > hi friends, > > this enables vt switching on my laptop (dell xps 13) with > sandybridge video: > > vga1 at pci0 dev 2 function 0 "Intel GT2 Video" rev 0x09 > > previously it would do nothing on ctrl+alt+f1 and redraw the screen > on ctrl+alt+f5. now i am able to switch between the console and X > multiple times without any problems or artifacts. > > can i get some tests on other sandybridge systems like an x220 and > on non-sandybridge intel video machines? > > > diff --git a/driver/xf86-video-intel/src/intel_driver.c > b/driver/xf86-video-intel/src/intel_driver.c > index 03b1586..8f04695 100644 > --- a/driver/xf86-video-intel/src/intel_driver.c > +++ b/driver/xf86-video-intel/src/intel_driver.c > @@ -1552,7 +1552,7 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) > > if (!intel->use_drm_mode) { > /* console hack, stolen from G80 */ > - if (IS_GEN5(intel)) { > + if (IS_GEN5(intel) || HAS_PCH_SPLIT(intel)) { > if (xf86LoadSubModule(scrn, "int10")) { > intel->int10 = xf86InitInt10(pEnt->index); > if (intel->int10) { > @@ -1779,9 +1779,6 @@ static Bool RestoreHWState(ScrnInfoPtr scrn) > vgaRegPtr vgaReg = &hwp->SavedReg; > int i; > > - if (HAS_PCH_SPLIT(intel)) > - return TRUE; > - > DPRINTF(PFX, "RestoreHWState\n"); > > /* Disable outputs */ > @@ -2600,7 +2597,8 @@ static void I830LeaveVT(int scrnIndex, int flags) > RestoreHWState(scrn); > > /* console restore hack */ > - if (IS_GEN5(intel) && intel->int10 && intel->int10Mode) { > + if ((IS_GEN5(intel) || HAS_PCH_SPLIT(intel)) && > + intel->int10 && intel->int10Mode) { > xf86Int10InfoPtr int10 = intel->int10; > > /* Use int10 to restore the console mode */ > @@ -2610,7 +2608,6 @@ static void I830LeaveVT(int scrnIndex, int flags) > int10->cx = int10->dx = 0; > xf86ExecX86int10(int10); > } > - > } > > i830_unbind_all_memory(scrn); >
Works fine on X201(Core i5-540M). -- Alexandr Shadchin