]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
console: Fix pre-console flushing via cfb_console being very slow
authorHans de Goede <hdegoede@redhat.com>
Tue, 5 May 2015 11:13:36 +0000 (13:13 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:43:14 +0000 (22:43 +0200)
commitb69b9aadc91047ecb0320df414b86ed02ba3f717
tree5e73bfd3a0473defc770b06065d2edf20a86d4e9
parent8e20085de4707fa20a9069958d2a4b39e1aa5e78
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>
README
common/console.c
include/configs/sunxi-common.h