From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] console: Fix pre-console flushing via cfb_console being very slow
Date: Sat, 09 May 2015 17:53:44 +0200 [thread overview]
Message-ID: <554E2D88.3000308@redhat.com> (raw)
In-Reply-To: <1431179385.15640.304.camel@hellion.org.uk>
Hi,
On 09-05-15 15:49, Ian Campbell wrote:
> On Tue, 2015-05-05 at 13:21 +0200, Hans de Goede wrote:
>> 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>
>> ---
>> README | 3 +++
>> common/console.c | 40 ++++++++++++++++++++++------------------
>
> I think you need an ack from the maintainer of this file more than you
> do from me. I'm happy for you to enable this option if that maintainer
> is happy for it to exist in the first place.
I do not believe that anyone is actively maintaining this file. Last time
we had changes to it we upstreamed them through the sunxi tree with
Tom's ack.
Tom can we have your ack for this patch ? :
http://patchwork.ozlabs.org/patch/468076/
>> include/configs/sunxi-common.h | 2 +-
>> 3 files changed, 26 insertions(+), 19 deletions(-)
>> [...]
>> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
>> index c78141e..5d77e71 100644
>> --- a/include/configs/sunxi-common.h
>> +++ b/include/configs/sunxi-common.h
>> @@ -402,7 +402,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 */
>
> "Approx".
Will fix.
Regards,
Hans
next prev parent reply other threads:[~2015-05-09 15:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 11:21 [U-Boot] [PATCH 1/2] sunxi: Set SYS_MALLOC_CLEAR_ON_INIT to n Hans de Goede
2015-05-05 11:21 ` [U-Boot] [PATCH 2/2] console: Fix pre-console flushing via cfb_console being very slow Hans de Goede
2015-05-09 13:49 ` Ian Campbell
2015-05-09 15:53 ` Hans de Goede [this message]
2015-05-10 14:07 ` Tom Rini
2015-05-09 13:48 ` [U-Boot] [PATCH 1/2] sunxi: Set SYS_MALLOC_CLEAR_ON_INIT to n Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=554E2D88.3000308@redhat.com \
--to=hdegoede@redhat.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox