From: Tom Rini Date: Sun, 10 May 2015 10:07:25 -0400 Subject: [U-Boot] [PATCH 2/2] console: Fix pre-console flushing via cfb_console being very slow In-Reply-To: <1430824867-10682-2-git-send-email-hdegoede@redhat.com> References: <1430824867-10682-1-git-send-email-hdegoede@redhat.com> <1430824867-10682-2-git-send-email-hdegoede@redhat.com> Message-ID: <20150510140725.GZ5267@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, May 05, 2015 at 01:21:07PM +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 Reviewed-by: Tom Rini -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: