diff options
author | Pedro Perez de Heredia <pedro.perez@digi.com> | 2012-01-20 01:53:45 +0100 |
---|---|---|
committer | Pedro Perez de Heredia <pedro.perez@digi.com> | 2012-01-20 11:05:23 +0100 |
commit | 45fd83e8842d498e6d8e064da4fe205b5795000d (patch) | |
tree | b53806fdbe32fc5a3c965687c937d3d3405cdc1e | |
parent | 191f290aa6c97f40270a735b1b724e16acf750a1 (diff) |
ccxmx53: fixes on dual display support and video mem
This commit fixes some problems with some macros used
for the dual video.
It also corrects problems with the video memory mappings
that was causing problems when using the vga interface
with a resolution of 1680x1050 at 32 bpp.
Signed-off-by: Pedro Perez de Heredia <pedro.perez@digi.com>
(cherry picked from commit ec0c204972183b5ba1d2ade83bd36a26a1ab410d)
Signed-off-by: Pedro Perez de Heredia <pedro.perez@digi.com>
-rw-r--r-- | arch/arm/mach-mx5/devices_ccwmx53.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-mx5/devices_ccwmx53.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx5/mx53_ccwmx53js.c | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/arch/arm/mach-mx5/devices_ccwmx53.c b/arch/arm/mach-mx5/devices_ccwmx53.c index 154fbc97cc65..98b65169e144 100644 --- a/arch/arm/mach-mx5/devices_ccwmx53.c +++ b/arch/arm/mach-mx5/devices_ccwmx53.c @@ -720,12 +720,12 @@ int __init ccwmx5x_init_fb(void) { struct ccwmx5x_lcd_pdata *panel; char *p, *mstr; - int i; + int i, regfbdev; plcd_platform_data[0].vif = -1; plcd_platform_data[1].vif = -1; - for (i = 0; i < MAX_VIDEO_IF; i++) { + for (i = 0, regfbdev = 0; i < MAX_VIDEO_IF; i++) { #if !defined(CONFIG_CCXMX5X_DISP0) if (i == 0) continue; #endif @@ -808,9 +808,9 @@ int __init ccwmx5x_init_fb(void) mxc_register_device(&mxc_tve_device, &tve_data); } mxc_fb_devices[i].num_resources = 1; - mxc_fb_devices[i].resource = &mxcfb_resources[i]; + mxc_fb_devices[i].resource = &mxcfb_resources[regfbdev]; mxc_register_device(&mxc_fb_devices[i], &mx53_fb_data[i]); - + regfbdev++; } /* Register the LVDS bridge */ diff --git a/arch/arm/mach-mx5/devices_ccwmx53.h b/arch/arm/mach-mx5/devices_ccwmx53.h index 6063df27ea61..028134493374 100644 --- a/arch/arm/mach-mx5/devices_ccwmx53.h +++ b/arch/arm/mach-mx5/devices_ccwmx53.h @@ -45,7 +45,7 @@ void gpio_fec_active(void); void gpio_can_active(int interface); /* framebuffer settings */ -#if defined(CONFIG_CCWMX5X_DISP0) && defined(CONFIG_CCWMX5X_DISP1) +#if defined(CONFIG_CCXMX5X_DISP0) && defined(CONFIG_CCXMX5X_DISP1) #define FB_MEM_SIZE (SZ_1M * 48) /* 1920x1080x32bpp x 3 buffers x 2 interfaces*/ #else #define FB_MEM_SIZE (SZ_1M * 24) /* 1920x1080x32bpp x 3 buffers */ diff --git a/arch/arm/mach-mx5/mx53_ccwmx53js.c b/arch/arm/mach-mx5/mx53_ccwmx53js.c index 6bf205199ef1..4d4544e3be61 100644 --- a/arch/arm/mach-mx5/mx53_ccwmx53js.c +++ b/arch/arm/mach-mx5/mx53_ccwmx53js.c @@ -216,26 +216,26 @@ static void __init fixup_mxc_board(struct machine_desc *desc, struct tag *tags, fb_mem = 0; } mem_tag->u.mem.size = left_mem; -#if defined(CONFIG_CCWMX5X_DISP0) && defined(CONFIG_CCWMX5X_DISP1) - fb_mem = fb_mem / 2; /* Divide the mem for between the displays */ -#endif /*reserve memory for gpu*/ if (!gpu_data.enable_mmu) { - gpu_device.resource[5].start = + gpu_device.resource[5].start = mem_tag->u.mem.start + left_mem; - gpu_device.resource[5].end = + gpu_device.resource[5].end = gpu_device.resource[5].start + gpu_mem - 1; } #if defined(CONFIG_FB_MXC_SYNC_PANEL) || \ defined(CONFIG_FB_MXC_SYNC_PANEL_MODULE) if (fb_mem) { +#if defined(CONFIG_CCXMX5X_DISP0) && defined(CONFIG_CCXMX5X_DISP1) + fb_mem = fb_mem / 2; /* Divide the mem for between the displays */ +#endif mxcfb_resources[0].start = gpu_data.enable_mmu ? mem_tag->u.mem.start + left_mem : gpu_device.resource[5].end + 1; mxcfb_resources[0].end = mxcfb_resources[0].start + fb_mem - 1; -#if defined(CONFIG_CCWMX5X_DISP1) && defined(CONFIG_CCWMX5X_DISP2) +#if defined(CONFIG_CCXMX5X_DISP0) && defined(CONFIG_CCXMX5X_DISP1) mxcfb_resources[1].start = mxcfb_resources[0].end + 1; mxcfb_resources[1].end = |