Subject: Radeon dual-head hang workaround
To: None <tech-x11@netbsd.org>
From: IWAMOTO Toshihiro <toshii@w.email.ne.jp>
List: tech-x11
Date: 06/27/2006 22:39:11
I'm using Radeon 9200SE in a dual-head configuration and had a hard
hang problem when trying to exit the Xserver or to switch to a text
console VT.  (I don't remember exactly, it's a long ago.)

Here is a workaround for the problem.  As committing this patch may
cause negative effect for single-headed use, I'm just posting this
patch here for reference & record.

(Note: I'm not subscribed.)

Index: ati/radeon_driver.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v
retrieving revision 1.10
diff -u -p -r1.10 radeon_driver.c
--- ati/radeon_driver.c	18 Mar 2005 14:55:14 -0000	1.10
+++ ati/radeon_driver.c	27 Jun 2006 13:25:52 -0000
@@ -5212,6 +5212,9 @@ static void RADEONRestorePLL2Registers(S
 	    ~(RADEON_PIX2CLK_SRC_SEL_MASK));
 }
 
+#if 1
+#define RADEONRestorePalette(pScrn, restore)	/* Nullify */
+#else
 /* Write palette data */
 static void RADEONRestorePalette(ScrnInfoPtr pScrn, RADEONSavePtr restore)
 {
@@ -5228,6 +5231,7 @@ static void RADEONRestorePalette(ScrnInf
 	OUTPAL_NEXT_CARD32(restore->palette[i]);
     }
 }
+#endif
 
 #if 1
 #define RADEONRestorePalette2(pScrn, restore)	/* Nullify */
@@ -5510,7 +5514,7 @@ static void RADEONSaveMode(ScrnInfoPtr p
 	    RADEONSaveCrtc2Registers(pScrn, save);
 	    RADEONSavePLL2Registers(pScrn, save);
 	}
-	RADEONSavePalette(pScrn, save);
+/*	RADEONSavePalette(pScrn, save); */
     }
 
     RADEONTRACE(("RADEONSaveMode returns %p\n", save));

--
IWAMOTO Toshihiro