From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZC3lS-0002We-H8 for barebox@lists.infradead.org; Mon, 06 Jul 2015 10:36:43 +0000 From: Sascha Hauer Date: Mon, 6 Jul 2015 12:36:09 +0200 Message-Id: <1436178974-20064-4-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1436178974-20064-1-git-send-email-s.hauer@pengutronix.de> References: <1436178974-20064-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 4/9] video: stm: use uncached memory To: Barebox List To avoid caching effects on the display use uncached memory. Signed-off-by: Sascha Hauer --- drivers/video/stm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/video/stm.c b/drivers/video/stm.c index 92bff9c..c825092 100644 --- a/drivers/video/stm.c +++ b/drivers/video/stm.c @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include #include #include @@ -329,8 +331,13 @@ static int stmfb_activate_var(struct fb_info *fb_info) return -ENOMEM; fb_info->screen_base = fbi->fixed_screen; fbi->memory_size = fbi->fixed_screen_size; + remap_range(fbi->fixed_screen, + fbi->fixed_screen_size, + mmu_get_pte_uncached_flags()); } else { - fb_info->screen_base = xrealloc(fb_info->screen_base, size); + fb_info->screen_base = dma_alloc_coherent(size, NULL); + if (!fb_info->screen_base) + return -ENOMEM; fbi->memory_size = size; } -- 2.1.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox