915gm/945gm/XAA lockup with gray blocks when switching video mode

Bryce Harrington bryce at bryceharrington.org
Wed Oct 10 23:12:41 PDT 2007


On Wed, Oct 10, 2007 at 09:17:44PM +0000, Juan Pablo Salazar Bertin wrote:
> I'd like to add some things about this bug:
> 
> It has been reported also at https://bugs.freedesktop.org/show_bug.cgi?
> id=10586.
> 
> After several debugs, I've determined that the laptop hangs in the following 
> loop in file i830_driver.c:
> 
>    for(i = 0; i < 256; i++) {
>       OUTREG(PALETTE_A + (i << 2), pI830->savePaletteA[i]);
>    }
> 
> You can see full gdb output here: https://bugs.freedesktop.org/attachment.cgi?
> id=11964&action=view
> After the last line, the laptop hangs.

Commenting out this loop seems to resolve the issue.  
What is this loop for, and what do we risk by not having it?

Bryce

--- xserver-xorg-video-intel-2.1.1/src/i830_driver.c	2007-08-13 21:58:29.000000000 -0700
+++ xserver-xorg-video-intel-2.1.1-fixed/src/i830_driver.c	2007-10-10 19:38:12.000000000 -0700
@@ -1956,16 +1956,6 @@ RestoreHWState(ScrnInfoPtr pScrn)
    OUTREG(VCLK_DIVISOR_VGA1, pI830->saveVCLK_DIVISOR_VGA1);
    OUTREG(VCLK_POST_DIV, pI830->saveVCLK_POST_DIV);
 
-   for(i = 0; i < 256; i++) {
-      OUTREG(PALETTE_A + (i << 2), pI830->savePaletteA[i]);
-   }
-   
-   if(xf86_config->num_crtc == 2) {
-      for(i= 0; i < 256; i++) {
-         OUTREG(PALETTE_B + (i << 2), pI830->savePaletteB[i]);
-      }
-   }
-
    for(i = 0; i < 7; i++) {
       OUTREG(SWF0 + (i << 2), pI830->saveSWF[i]);
       OUTREG(SWF00 + (i << 2), pI830->saveSWF[i+7]);



More information about the xorg mailing list