9
0
Fork 0

video: ipufb: Use uncached memory for framebuffer

Otherwise funny caching artifacts can occur on the screen.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-12-20 11:25:53 +01:00
parent 96ec430eeb
commit 8a01dea639
1 changed files with 7 additions and 2 deletions

View File

@ -26,6 +26,7 @@
#include <malloc.h>
#include <errno.h>
#include <asm-generic/div64.h>
#include <asm/mmu.h>
#include <mach/imx-ipu-fb.h>
#include <linux/clk.h>
#include <linux/err.h>
@ -1022,8 +1023,12 @@ static int imxfb_probe(struct device_d *dev)
* memory for screen usage
*/
fbi->info.screen_base = pdata->framebuffer;
if (fbi->info.screen_base == NULL) {
fbi->info.screen_base = malloc(fbi->info.screen_size);
if (fbi->info.screen_base) {
remap_range(fbi->info.screen_base,
fbi->info.screen_size,
mmu_get_pte_uncached_flags());
} else {
fbi->info.screen_base = dma_alloc_coherent(fbi->info.screen_size);
if (!fbi->info.screen_base)
return -ENOMEM;
}