From d84d81a6cc954a04ef9997aaa9388e941ba69138 Mon Sep 17 00:00:00 2001 From: yxj Date: Wed, 22 May 2013 14:54:46 +0800 Subject: [PATCH] =?utf8?q?board=20rk30=E3=80=81rk3168-tb=20rk3188-jettaplu?= =?utf8?q?s:=20modify=20lcdx=5Fscreen=5Finfo=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- arch/arm/mach-rk30/board-rk30-sdk.c | 38 ++++++++++++++----- arch/arm/mach-rk30/board-rk3168-tb.c | 22 +++++++++-- arch/arm/mach-rk3188/board-rk3188-jettaplus.c | 26 ++++++++++--- 3 files changed, 68 insertions(+), 18 deletions(-) diff --git a/arch/arm/mach-rk30/board-rk30-sdk.c b/arch/arm/mach-rk30/board-rk30-sdk.c index 67aca7f5f8de..4b524a08b02a 100755 --- a/arch/arm/mach-rk30/board-rk30-sdk.c +++ b/arch/arm/mach-rk30/board-rk30-sdk.c @@ -849,21 +849,39 @@ static int rk_fb_io_enable(void) #if defined(CONFIG_LCDC0_RK30) struct rk29fb_info lcdc0_screen_info = { - .prop = PRMRY, //primary display device - .io_init = rk_fb_io_init, - .io_disable = rk_fb_io_disable, - .io_enable = rk_fb_io_enable, - .set_screen_info = set_lcd_info, +#if defined(CONFIG_RK_HDMI) && defined(CONFIG_HDMI_SOURCE_LCDC0) && defined(CONFIG_DUAL_LCDC_DUAL_DISP_IN_KERNEL) + .prop = EXTEND, //extend display device + .io_init = NULL, + .io_disable = NULL, + .io_enable = NULL, + .set_screen_info = hdmi_init_lcdc, +#else + .prop = PRMRY, //primary display device + .io_init = rk_fb_io_init, + .io_disable = rk_fb_io_disable, + .io_enable = rk_fb_io_enable, + .set_screen_info = set_lcd_info, +#endif + }; #endif #if defined(CONFIG_LCDC1_RK30) struct rk29fb_info lcdc1_screen_info = { - #if defined(CONFIG_RK_HDMI) - .prop = EXTEND, //extend display device - .lcd_info = NULL, - .set_screen_info = hdmi_init_lcdc, - #endif +#if defined(CONFIG_RK_HDMI) && defined(CONFIG_HDMI_SOURCE_LCDC1) && defined(CONFIG_DUAL_LCDC_DUAL_DISP_IN_KERNEL) + .prop = EXTEND, //extend display device + .io_init = NULL, + .io_disable = NULL, + .io_enable = NULL, + .set_screen_info = hdmi_init_lcdc, +#else + .prop = PRMRY, //primary display device + .io_init = rk_fb_io_init, + .io_disable = rk_fb_io_disable, + .io_enable = rk_fb_io_enable, + .set_screen_info = set_lcd_info, +#endif + }; #endif diff --git a/arch/arm/mach-rk30/board-rk3168-tb.c b/arch/arm/mach-rk30/board-rk3168-tb.c index 67d76135e8d5..f5b3b48d29b4 100755 --- a/arch/arm/mach-rk30/board-rk3168-tb.c +++ b/arch/arm/mach-rk30/board-rk3168-tb.c @@ -544,21 +544,37 @@ static int rk_fb_io_enable(void) #if defined(CONFIG_LCDC0_RK3066B) || defined(CONFIG_LCDC0_RK3188) struct rk29fb_info lcdc0_screen_info = { +#if defined(CONFIG_RK_HDMI) && defined(CONFIG_HDMI_SOURCE_LCDC0) && defined(CONFIG_DUAL_LCDC_DUAL_DISP_IN_KERNEL) + .prop = EXTEND, //extend display device + .io_init = NULL, + .io_disable = NULL, + .io_enable = NULL, + .set_screen_info = hdmi_init_lcdc, +#else .prop = PRMRY, //primary display device .io_init = rk_fb_io_init, .io_disable = rk_fb_io_disable, .io_enable = rk_fb_io_enable, .set_screen_info = set_lcd_info, +#endif }; #endif #if defined(CONFIG_LCDC1_RK3066B) || defined(CONFIG_LCDC1_RK3188) struct rk29fb_info lcdc1_screen_info = { - #if defined(CONFIG_RK_HDMI) +#if defined(CONFIG_RK_HDMI) && defined(CONFIG_HDMI_SOURCE_LCDC1) && defined(CONFIG_DUAL_LCDC_DUAL_DISP_IN_KERNEL) .prop = EXTEND, //extend display device - .lcd_info = NULL, + .io_init = NULL, + .io_disable = NULL, + .io_enable = NULL, .set_screen_info = hdmi_init_lcdc, - #endif +#else + .prop = PRMRY, //primary display device + .io_init = rk_fb_io_init, + .io_disable = rk_fb_io_disable, + .io_enable = rk_fb_io_enable, + .set_screen_info = set_lcd_info, +#endif }; #endif diff --git a/arch/arm/mach-rk3188/board-rk3188-jettaplus.c b/arch/arm/mach-rk3188/board-rk3188-jettaplus.c index 03c8ede6d3de..75397fa91f9c 100644 --- a/arch/arm/mach-rk3188/board-rk3188-jettaplus.c +++ b/arch/arm/mach-rk3188/board-rk3188-jettaplus.c @@ -543,25 +543,41 @@ static int rk_fb_io_enable(void) #if defined(CONFIG_LCDC0_RK3066B) || defined(CONFIG_LCDC0_RK3188) struct rk29fb_info lcdc0_screen_info = { - #if defined(CONFIG_RK_HDMI) - .prop = EXTEND, //extend display device - .lcd_info = NULL, +#if defined(CONFIG_RK_HDMI) && defined(CONFIG_HDMI_SOURCE_LCDC0) && defined(CONFIG_DUAL_LCDC_DUAL_DISP_IN_KERNEL) + .prop = EXTEND, //extend display device + .io_init = NULL, + .io_disable = NULL, + .io_enable = NULL, .set_screen_info = hdmi_init_lcdc, - #endif +#else + .prop = PRMRY, //primary display device + .io_init = rk_fb_io_init, + .io_disable = rk_fb_io_disable, + .io_enable = rk_fb_io_enable, + .set_screen_info = set_lcd_info, +#endif }; #endif #if defined(CONFIG_LCDC1_RK3066B) || defined(CONFIG_LCDC1_RK3188) struct rk29fb_info lcdc1_screen_info = { +#if defined(CONFIG_RK_HDMI) && defined(CONFIG_HDMI_SOURCE_LCDC1) && defined(CONFIG_DUAL_LCDC_DUAL_DISP_IN_KERNEL) + .prop = EXTEND, //extend display device + .io_init = NULL, + .io_disable = NULL, + .io_enable = NULL, + .set_screen_info = hdmi_init_lcdc, +#else .prop = PRMRY, //primary display device .io_init = rk_fb_io_init, .io_disable = rk_fb_io_disable, .io_enable = rk_fb_io_enable, .set_screen_info = set_lcd_info, - +#endif }; #endif + static struct resource resource_fb[] = { [0] = { .name = "fb0 buf", -- 2.34.1