Subject: Assabet LCD patch again

From: Tak-Shing Chan <[email-masked]>
Date: Wed, 21 Jun 2000 12:07:35 +0800 (CST)

Hi,

     Better LCD settings for Assabet.  This patch also fixes the
PBS bug while switching consoles.

Tak-Shing Chan

--- /usr/src/linux-2.4.0-test1-ac19-rmk1-np1/drivers/video/sa1100fb.c.orig	Mon Jun 19 10:44:13 2000
+++ /usr/src/linux-2.4.0-test1-ac19-rmk1-np1/drivers/video/sa1100fb.c	Wed Jun 21 12:03:18 2000
@@ -849,15 +849,15 @@
 			LCCR0_LDM + LCCR0_BAM + LCCR0_ERM + LCCR0_Act +
 			LCCR0_LtlEnd + LCCR0_DMADel(0);
 		lcd_shadow.lccr1 = 
-			LCCR1_DisWdth(var->xres) + LCCR1_HorSnchWdth(4) + 
-			LCCR1_BegLnDel(30) + LCCR1_EndLnDel(30);
+			LCCR1_DisWdth(var->xres) + LCCR1_HorSnchWdth(6) + 
+			LCCR1_BegLnDel(61) + LCCR1_EndLnDel(9);
 		lcd_shadow.lccr2 = 
-			LCCR2_DisHght(var->yres) + LCCR2_VrtSnchWdth(1) + 
-			LCCR2_BegFrmDel(0) + LCCR2_EndFrmDel(0);
+			LCCR2_DisHght(var->yres) + LCCR2_VrtSnchWdth(2) + 
+			LCCR2_BegFrmDel(3) + LCCR2_EndFrmDel(0);
 		lcd_shadow.lccr3 = 
 			LCCR3_OutEnH + LCCR3_PixFlEdg + LCCR3_VrtSnchH + 
 			LCCR3_HorSnchH + LCCR3_ACBsCntOff + 
-			LCCR3_ACBsDiv(2) + LCCR3_PixClkDiv(28);
+			LCCR3_ACBsDiv(2) + LCCR3_PixClkDiv(38);
 
 		/* Set board control register to handle new color depth */
 		sa1100fb_assabet_set_truecolor(var->bits_per_pixel >= 16);
@@ -1138,6 +1138,7 @@
 
   	DPRINTK("blank=%d info->modename=%s\n", blank, info->modename);
 	if (blank) {
+                if (current_par.visual != FB_VISUAL_TRUECOLOR)
 		for (i = 0; i < current_par.palette_size; i++)
 			sa1100fb_palette_write(i, sa1100fb_palette_encode(i, 0, 0, 0, 0));
 		sa1100fb_disable_lcd_controller();
@@ -1176,6 +1177,9 @@
 	fb_display[con].var.activate = FB_ACTIVATE_NOW;
 	DPRINTK("fb_display[%d].var.activate=%x\n", con, fb_display[con].var.activate);
 	sa1100fb_set_var(&fb_display[con].var, con, info);
+	current_par.v_palette_base[0] = (current_par.v_palette_base[0] &
+		0xcfff) | SA1100_PALETTE_MODE_VAL(current_par.bits_per_pixel);
+
 	return 0;
 }

unsubscribe: body of `unsubscribe linux-arm-kernel' to [email-masked]