diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-05-05 13:13:36 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2015-05-19 18:37:30 +0200 |
commit | a8552c7c9b53d1d4f36b95f2c80812d8a7bb4fff (patch) | |
tree | 72406ed8d3ee56813c595d837ec69864e0ee8df3 /include/configs | |
parent | f9b08fbf11add614f1773c5378a9026cd3d5c75f (diff) | |
download | u-boot-imx-a8552c7c9b53d1d4f36b95f2c80812d8a7bb4fff.zip u-boot-imx-a8552c7c9b53d1d4f36b95f2c80812d8a7bb4fff.tar.gz u-boot-imx-a8552c7c9b53d1d4f36b95f2c80812d8a7bb4fff.tar.bz2 |
console: Fix pre-console flushing via cfb_console being very slow
On my A10 OlinuxIno Lime I noticed a huge (5+ seconds) delay coming from
console_init_r. This turns out to be caused by the preconsole buffer flushing
to the cfb_console. The Lime only has a 16 bit memory bus and that is already
heavy used to scan out the 1920x1080 framebuffer.
The problem is that print_pre_console_buffer() was printing the buffer once
character at a time and the cfb_console code then ends up doing a cache-flush
for touched display lines for each character.
This commit fixes this by first building a 0 terminated buffer and then
printing it in one puts() call, avoiding unnecessary cache flushes.
This changes the time for the flush from 5+ seconds to not noticable.
The downside of this approach is that the pre-console buffer needs to fit
on the stack, this is not that much to ask since we are talking about plain
text here. This commit also adjusts the sunxi CONFIG_PRE_CON_BUF_SZ to
actually fit on the stack. Sunxi currently is the only user of the pre-console
code so no other boards need to be adjusted.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/configs')
-rw-r--r-- | include/configs/sunxi-common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 723067e..0495dc3 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -336,7 +336,7 @@ extern int soft_i2c_gpio_scl; /* Enable pre-console buffer to get complete log on the VGA console */ #define CONFIG_PRE_CONSOLE_BUFFER -#define CONFIG_PRE_CON_BUF_SZ (1024 * 1024) +#define CONFIG_PRE_CON_BUF_SZ 4096 /* Aprox 2 80*25 screens */ /* Use the room between the end of bootm_size and the framebuffer */ #define CONFIG_PRE_CON_BUF_ADDR 0x4f000000 |