patch-2.1.112 linux/drivers/video/fbcon-cfb4.c

Next file: linux/drivers/video/fbcon-cfb4.h
Previous file: linux/drivers/video/fbcon-cfb32.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.111/linux/drivers/video/fbcon-cfb4.c linux/drivers/video/fbcon-cfb4.c
@@ -131,7 +131,7 @@
 	u32 eorx,fgx,bgx;
 
 	dest = p->screen_base + yy * p->fontheight * bytes + xx * 4;
-	cdat = p->fontdata + (c & 0xff) * p->fontheight;
+	cdat = p->fontdata + (c & p->charmask) * p->fontheight;
 
 	fgx=15;/*attr_fgcol(p,c);*/
 	bgx=attr_bgcol(p,c);
@@ -152,7 +152,8 @@
 void fbcon_cfb4_putcs(struct vc_data *conp, struct display *p, 
 		      const unsigned short *s, int count, int yy, int xx)
 {
-	u8 *cdat, c, *dest, *dest0;
+	u8 *cdat, *dest, *dest0;
+	u16 c;
 	int rows,bytes=p->next_line;
 	u32 eorx, fgx, bgx;
 
@@ -167,7 +168,7 @@
 	bgx |= (bgx << 16);
 	eorx = fgx ^ bgx;
 	while (count--) {
-		c = *s++;
+		c = *s++ & p->charmask;
 		cdat = p->fontdata + c * p->fontheight;
 
 		for (rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov