From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 5/5] bcm2835 video: Map fb as cached
Date: Wed, 23 Mar 2016 20:05:57 -0600 [thread overview]
Message-ID: <56F34B85.1040800@wwwdotorg.org> (raw)
In-Reply-To: <1458779226-234694-1-git-send-email-agraf@suse.de>
On 03/23/2016 06:27 PM, Alexander Graf wrote:
> The bcm2835 frame buffer is in RAM, so we can easily map it as cached and gain
> all the glorious performance boost that brings with it.
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
> diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
> @@ -44,6 +44,7 @@ void lcd_ctrl_init(void *lcdbase)
> + /* Enable dcache for the frame buffer */
> + fb_start = ALIGN(gd->fb_base, 1 << MMU_SECTION_SHIFT);
> + fb_end = gd->fb_base + msg_setup->allocate_buffer.body.resp.fb_size;
> + fb_end = ALIGN(fb_end, 1 << MMU_SECTION_SHIFT);
> + mmu_set_region_dcache_behaviour(fb_start, fb_end - fb_start,
> + DCACHE_WRITEBACK);
Shouldn't the start be rounded down and the end be rounded up to cover
the entire FB RAM? Normally it might be problematic to push the
boundaries outside the relevant data block since it would affect
adjacent memory that might not then be aware of the cache setup.
However, since the entire FB is in the VC portion of RAM and U-Boot is
touching nothing else there, it should be fine in this case. (And even
if it wasn't, the two ALIGNs would still want to move in opposite
directions; start up and end down).
next prev parent reply other threads:[~2016-03-24 2:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 14:41 [U-Boot] [PATCH v2 0/5] Enable caches for the RPi2 Alexander Graf
2016-03-16 14:41 ` [U-Boot] [PATCH v2 1/5] arm64: Add 32bit arm compatible dcache definitions Alexander Graf
2016-03-27 22:25 ` [U-Boot] [U-Boot, v2, " Tom Rini
2016-03-16 14:41 ` [U-Boot] [PATCH v2 2/5] arm: Add support for HYP mode and LPAE page tables Alexander Graf
2016-03-27 22:25 ` [U-Boot] [U-Boot, v2, " Tom Rini
2016-03-16 14:41 ` [U-Boot] [PATCH v2 3/5] lcd: Fix compile warning in 64bit mode Alexander Graf
2016-03-27 22:25 ` [U-Boot] [U-Boot, v2, " Tom Rini
2016-03-16 14:41 ` [U-Boot] [PATCH v2 4/5] RPi: Enable caches for rpi2 Alexander Graf
2016-03-27 22:25 ` [U-Boot] [U-Boot,v2,4/5] " Tom Rini
2016-03-16 14:41 ` [U-Boot] [PATCH v2 5/5] bcm2835 video: Map fb as cached Alexander Graf
2016-03-22 15:22 ` [U-Boot] [PATCH v3 " Alexander Graf
2016-03-24 0:27 ` [U-Boot] [PATCH v4 " Alexander Graf
2016-03-24 2:05 ` Stephen Warren [this message]
2016-03-24 7:33 ` Alexander Graf
2016-03-24 9:31 ` [U-Boot] [PATCH v5 " Alexander Graf
2016-03-25 3:28 ` Stephen Warren
2016-03-27 22:30 ` [U-Boot] [U-Boot,v5,5/5] " Tom Rini
2016-03-17 4:26 ` [U-Boot] [PATCH v2 0/5] Enable caches for the RPi2 Stephen Warren
2016-03-17 5:35 ` Alexander Graf
2016-03-17 7:58 ` Alexander Graf
2016-03-19 2:12 ` Stephen Warren
2016-03-25 4:13 ` Stephen Warren
2016-08-11 13:42 ` Alexander Graf
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=56F34B85.1040800@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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