diff options
author | Ye.Li <B37916@freescale.com> | 2015-03-26 15:41:52 +0800 |
---|---|---|
committer | Ye.Li <B37916@freescale.com> | 2015-03-27 16:52:25 +0800 |
commit | 4d55a4124be3a3a6288c3c845d17fd9d4f2b8b43 (patch) | |
tree | 2d08a25902a50c640b7fa1e59d557df6a4c536ef /drivers/video | |
parent | 0aa21a0b43ac54c43635b130c7b4902dc5263890 (diff) | |
download | u-boot-imx-4d55a4124be3a3a6288c3c845d17fd9d4f2b8b43.zip u-boot-imx-4d55a4124be3a3a6288c3c845d17fd9d4f2b8b43.tar.gz u-boot-imx-4d55a4124be3a3a6288c3c845d17fd9d4f2b8b43.tar.bz2 |
MLK-10478 mx6: EPDC: Improve EPDC usage and configuration
Change to load EPDC waveform from FAT partition and allocate waveform
buffer, framebuffer and working buffer in dynamic manner not static.
So many EPDC configurations are removed.
To enable the EPDC feature, must define CONFIG_MXC_EPDC and CONFIG_SPLASH_SCREEN.
Signed-off-by: Ye.Li <B37916@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/mxc_epdc_fb.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/drivers/video/mxc_epdc_fb.c b/drivers/video/mxc_epdc_fb.c index 5a400e1..cd18058 100644 --- a/drivers/video/mxc_epdc_fb.c +++ b/drivers/video/mxc_epdc_fb.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2010-2015 Freescale Semiconductor, Inc. All Rights Reserved. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -13,6 +13,7 @@ #include <linux/list.h> #include <linux/err.h> #include <linux/types.h> +#include <malloc.h> #include <mxc_epdc_fb.h> @@ -353,7 +354,6 @@ void lcd_enable(void) epdc_power_on(); - lcd_base = (void *)CONFIG_FB_BASE; /* Draw black border around framebuffer*/ memset(lcd_base, 0xFF, panel_info.vl_col * panel_info.vl_row); memset(lcd_base, 0x0, 24 * panel_info.vl_col); @@ -397,6 +397,22 @@ void lcd_ctrl_init(void *lcdbase) if (!lcdbase) return; + panel_info.epdc_data.working_buf_addr = (u_long)memalign(ARCH_DMA_MINALIGN, + panel_info.vl_col * panel_info.vl_row * 2); + + if (!panel_info.epdc_data.working_buf_addr) { + printf("EPDC: Error allocating working buffer!\n"); + return; + } + + panel_info.epdc_data.waveform_buf_addr = (u_long)memalign(ARCH_DMA_MINALIGN, + CONFIG_WAVEFORM_BUF_SIZE); + + if (!panel_info.epdc_data.waveform_buf_addr) { + printf("EPDC: Error allocating waveform buffer!\n"); + return; + } + lcd_color_fg = 0xFF; lcd_color_bg = 0xFF; @@ -431,7 +447,7 @@ void lcd_ctrl_init(void *lcdbase) REG_WR(EPDC_BASE, EPDC_WB_ADDR_TCE, panel_info.epdc_data.working_buf_addr); /* Get waveform data address and offset */ - if (setup_waveform_file()) { + if (setup_waveform_file(panel_info.epdc_data.waveform_buf_addr)) { printf("Can't load waveform data!\n"); return; } @@ -443,6 +459,8 @@ void lcd_ctrl_init(void *lcdbase) /* Initialize EPDC, passing pointer to EPDC registers */ epdc_init_settings(); + lcd_base = lcdbase; + return; } |