Skip to contentSkip to conversation

fbcon: Fix screen pointer updating in bit_putcs

PATCH New Antonino A. Daplas 1 participant 1 message Sep 2, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fbcon: Fix screen pointer updating in bit_putcs

Bug reported by Knut Petersen:

The screen pointer (*s) is not updated if the loop is iterated more than once.

Do not pass unused variables (xx, yy, and count) to the component function of bit_putcs()

---
 bitblit.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)
drivers/video/console/bitblit.c +9 -11
@@ -104,9 +104,8 @@ static void bit_clear(struct vc_data *vc
 }
 
 static inline void bit_putcs_aligned(struct vc_data *vc, struct fb_info *info,
-				     const u16 *s, u32 count, u32 yy, u32 xx,
-				     u32 attr, u32 cnt, u32 d_pitch,
-				     u32 s_pitch, u32 cellsize,
+				     const u16 *s, u32 attr, u32 cnt,
+				     u32 d_pitch, u32 s_pitch, u32 cellsize,
 				     struct fb_image *image, u8 *buf, u8 *dst)
 {
 	u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
@@ -136,8 +135,7 @@ static inline void bit_putcs_aligned(str
 }
 
 static inline void bit_putcs_unaligned(struct vc_data *vc,
-				       struct fb_info *info,
-				       const u16 *s, u32 count, u32 yy, u32 xx,
+				       struct fb_info *info, const u16 *s,
 				       u32 attr, u32 cnt, u32 d_pitch,
 				       u32 s_pitch, u32 cellsize,
 				       struct fb_image *image, u8 *buf,
@@ -213,16 +211,16 @@ static void bit_putcs(struct vc_data *vc
 		image.data = dst;
 
 		if (!mod)
-			bit_putcs_aligned(vc, info, s, count, yy, xx,
-					  attribute, cnt, pitch, width,
-					  cellsize, &image, buf, dst);
+			bit_putcs_aligned(vc, info, s, attribute, cnt, pitch,
+					  width, cellsize, &image, buf, dst);
 		else
-			bit_putcs_unaligned(vc, info, s, count, yy, xx,
-					    attribute, cnt, pitch, width,
-					    cellsize, &image, buf, dst);
+			bit_putcs_unaligned(vc, info, s, attribute, cnt,
+					    pitch, width, cellsize, &image,
+					    buf, dst);
 
 		image.dx += cnt * vc->vc_font.width;
 		count -= cnt;
+		s += cnt;
 	}
 
 	/* buf is always NULL except when in monochrome mode, so in this case

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf