[dev] fbcon: flush the display after newline/scroll.
Needed if the display requires the data to be manually redrawn after
screen updates.
diff --git a/dev/fbcon/fbcon.c b/dev/fbcon/fbcon.c
index d1774ca..abe1c79 100644
--- a/dev/fbcon/fbcon.c
+++ b/dev/fbcon/fbcon.c
@@ -81,6 +81,14 @@
}
}
+static void fbcon_flush(void)
+{
+ if (config->update_start)
+ config->update_start();
+ if (config->update_done)
+ while (!config->update_done());
+}
+
/* TODO: Take stride into account */
static void fbcon_scroll_up(void)
{
@@ -96,6 +104,8 @@
while(count--) {
*dst++ = BGCOLOR;
}
+
+ fbcon_flush();
}
/* TODO: take stride into account */
@@ -111,13 +121,6 @@
*dst++ = BGCOLOR;
}
-static void fbcon_flush(void)
-{
- if (config->update_start)
- config->update_start();
- if (config->update_done)
- while (!config->update_done());
-}
static void fbcon_set_colors(unsigned bg, unsigned fg)
{
@@ -159,7 +162,8 @@
if(cur_pos.y >= max_pos.y) {
cur_pos.y = max_pos.y - 1;
fbcon_scroll_up();
- }
+ } else
+ fbcon_flush();
}
void fbcon_setup(struct fbcon_config *_config)