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

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

diff -u --recursive --new-file v2.1.111/linux/drivers/video/fbcon-cfb2.c linux/drivers/video/fbcon-cfb2.c
@@ -129,7 +129,7 @@
 	u32 eorx,fgx,bgx;
 
 	dest = p->screen_base + yy * p->fontheight * bytes + xx * 2;
-	cdat = p->fontdata + (c & 0xff) * p->fontheight;
+	cdat = p->fontdata + (c & p->charmask) * p->fontheight;
 
 	fgx=3;/*attr_fgcol(p,c);*/
 	bgx=attr_bgcol(p,c);
@@ -150,7 +150,8 @@
 void fbcon_cfb2_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;
 
@@ -163,7 +164,7 @@
 	bgx |= (bgx << 4);
 	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