
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.
Signed-off-by: Alexander Graf agraf@suse.de
---
v2 -> v3:
- Fix align parameters - Fix whitespace --- drivers/video/bcm2835.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c index bff1fcb..7c99e2d 100644 --- a/drivers/video/bcm2835.c +++ b/drivers/video/bcm2835.c @@ -106,6 +106,12 @@ void lcd_ctrl_init(void *lcdbase)
gd->fb_base = bus_to_phys( msg_setup->allocate_buffer.body.resp.fb_address); + + /* Enable dcache for the frame buffer */ + mmu_set_region_dcache_behaviour(gd->fb_base, + ALIGN(msg_setup->allocate_buffer.body.resp.fb_size, PAGE_SIZE), + DCACHE_WRITEBACK); + lcd_set_flush_dcache(1); }
void lcd_enable(void)