Hi,

On Mon, 05 Mar 2012 11:42:13 +0100
Pali Rohár <pali.ro...@gmail.com> wrote:
...
> Hi, thanks. If you need some more info write me.

Can you please test with attached patch? Does it help to solve
your problem on N900?

Thanks,
Anatolij
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 904caf7..5076e31 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -610,17 +610,24 @@ static void video_set_cursor(void)
 	console_cursor(1);
 }
 
-static void video_invertchar(int xx, int yy)
+static void video_draw_cursor(int xx, int yy, int on)
 {
 	int firstx = xx * VIDEO_PIXEL_SIZE;
 	int lastx = (xx + VIDEO_FONT_WIDTH) * VIDEO_PIXEL_SIZE;
 	int firsty = yy * VIDEO_LINE_LEN;
 	int lasty = (yy + VIDEO_FONT_HEIGHT) * VIDEO_LINE_LEN;
 	int x, y;
+	char val;
+
+	if (on)
+		val = 0xff;
+	else
+		val = 0;
+
 	for (y = firsty; y < lasty; y += VIDEO_LINE_LEN) {
 		for (x = firstx; x < lastx; x++) {
 			u8 *dest = (u8 *)(video_fb_address) + x + y;
-			*dest = ~*dest;
+			*dest = val;
 		}
 	}
 }
@@ -651,14 +658,14 @@ void console_cursor(int state)
 	if (cursor_state != state) {
 		if (cursor_state) {
 			/* turn off the cursor */
-			video_invertchar(old_col * VIDEO_FONT_WIDTH,
-					 old_row * VIDEO_FONT_HEIGHT +
-					 video_logo_height);
+			video_draw_cursor(old_col * VIDEO_FONT_WIDTH,
+					  old_row * VIDEO_FONT_HEIGHT +
+					  video_logo_height, 0);
 		} else {
-			/* turn off the cursor and record where it is */
-			video_invertchar(console_col * VIDEO_FONT_WIDTH,
-					 console_row * VIDEO_FONT_HEIGHT +
-					 video_logo_height);
+			/* turn on the cursor and record where it is */
+			video_draw_cursor(console_col * VIDEO_FONT_WIDTH,
+					  console_row * VIDEO_FONT_HEIGHT +
+					  video_logo_height, 1);
 			old_col = console_col;
 			old_row = console_row;
 		}
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to