x4418 八月份发布的源码,对于Ubuntu,linux 的hdmi显示支持,存在一些问题,以下把补丁发布如下,各位可以参考,对比代码的相应文件进行改动:
diff --git a/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/display.c b/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/display.c
index e17a378..bc3d10d 100755
--- a/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/display.c
+++ b/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/display.c
@@ -199,14 +199,19 @@ int bd_display(void)
INIT_PARAM_LVDS(lvds);
INIT_PARAM_MIPI(mipi);
- display_rgb(0, CONFIG_FB_ADDR, &vsync, &syncgen, &multily, &rgb);
- display_lvds(0, CONFIG_FB_ADDR, &vsync, &syncgen, &multily, &lvds);
- display_mipi(0, CONFIG_FB_ADDR, &vsync, &syncgen, &multily, &mipi);
- if((CFG_DISP_PRI_RESOL_WIDTH == 1280) && (CFG_DISP_PRI_RESOL_HEIGHT == 720))
- display_hdmi(0, 0, CONFIG_FB_ADDR, &vsync, &syncgen, &multily);
- else if((CFG_DISP_PRI_RESOL_WIDTH == 1920) && (CFG_DISP_PRI_RESOL_HEIGHT == 1080))
- display_hdmi(0, 1, CONFIG_FB_ADDR, &vsync, &syncgen, &multily);
-
+ if(CFG_DISP_HDMI_USING == 0)
+ {
+ display_rgb(0, CONFIG_FB_ADDR, &vsync, &syncgen, &multily, &rgb);
+ display_lvds(0, CONFIG_FB_ADDR, &vsync, &syncgen, &multily, &lvds);
+ display_mipi(0, CONFIG_FB_ADDR, &vsync, &syncgen, &multily, &mipi);
+ }
+ else
+ {
+ if((CFG_DISP_PRI_RESOL_WIDTH == 1280) && (CFG_DISP_PRI_RESOL_HEIGHT == 720))
+ display_hdmi(0, 0, CONFIG_FB_ADDR, &vsync, &syncgen, &multily);
+ else if((CFG_DISP_PRI_RESOL_WIDTH == 1920) && (CFG_DISP_PRI_RESOL_HEIGHT == 1080))
+ display_hdmi(0, 1, CONFIG_FB_ADDR, &vsync, &syncgen, &multily);
+ }
mdelay(50);
return 0;
}
diff --git a/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/include/cfg_main.h b/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/include/cfg_main.h
index b08f2d6..495346b 100755
--- a/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/include/cfg_main.h
+++ b/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/include/cfg_main.h
@@ -103,6 +103,7 @@ extern int CFG_DISP_PRI_OUT_INTERLACE;
extern int CFG_DISP_PRI_OUT_INVERT_FIELD;
extern int CFG_DISP_LCD_MPY_TYPE;
extern int CFG_DISP_LVDS_LCD_FORMAT;
+extern int CFG_DISP_HDMI_USING;
extern int CFG_DISP_MIPI_PLLPMS;
extern int CFG_DISP_MIPI_BANDCTL;
diff --git a/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/x4418-lcds.c b/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/x4418-lcds.c
index 8d1a99a..2cb5a3d 100755
--- a/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/x4418-lcds.c
+++ b/linux/bootloader/u-boot-2014.07/board/s5p4418/x4418/x4418-lcds.c
@@ -43,6 +43,7 @@ int CFG_DISP_PRI_OUT_INTERLACE = 0;
int CFG_DISP_PRI_OUT_INVERT_FIELD = 0;
int CFG_DISP_LCD_MPY_TYPE = 0;
int CFG_DISP_LVDS_LCD_FORMAT = LVDS_LCDFORMAT_JEIDA;
+int CFG_DISP_HDMI_USING = 0;
int CFG_DISP_MIPI_PLLPMS = 0x2281;
int CFG_DISP_MIPI_BANDCTL = 0x7;
@@ -136,6 +137,7 @@ void x6818_lcd_select(void)
CFG_DISP_PRI_CLKGEN0_DIV = 5;
CFG_DISP_PRI_PIXEL_CLOCK = (780000000 / CFG_DISP_PRI_CLKGEN0_DIV);
+ CFG_DISP_HDMI_USING = 1;
}
else if(strstr(commandline, "lcd=hdmi-1080p"))
{
@@ -153,6 +155,7 @@ void x6818_lcd_select(void)
CFG_DISP_PRI_CLKGEN0_DIV = 5;
CFG_DISP_PRI_PIXEL_CLOCK = (780000000 / CFG_DISP_PRI_CLKGEN0_DIV);
+ CFG_DISP_HDMI_USING = 1;
}
else if(strstr(commandline, "lcd=vs070cxn"))
{
diff --git a/linux/kernel/kernel-3.4.39/arch/arm/mach-s5p4418/soc/display_hdmi.c b/linux/kernel/kernel-3.4.39/arch/arm/mach-s5p4418/soc/display_hdmi.c
index 8575548..a34342f 100755
--- a/linux/kernel/kernel-3.4.39/arch/arm/mach-s5p4418/soc/display_hdmi.c
+++ b/linux/kernel/kernel-3.4.39/arch/arm/mach-s5p4418/soc/display_hdmi.c
@@ -201,13 +201,12 @@ static int hdmi_probe(struct platform_device *pdev)
return ret;
}
-#if defined(CONFIG_NXP_DISPLAY_HDMI_1280_720P)
- preferred_preset = V4L2_DV_720P60;
-#elif defined(CONFIG_NXP_DISPLAY_HDMI_1920_1080P)
- preferred_preset = V4L2_DV_1080P60;
-#else
-#error "***** NOT SPECIFIED HDMI RESOLUTION !!! *****"
-#endif
+ if((CFG_DISP_PRI_RESOL_WIDTH == 1280) && (CFG_DISP_PRI_RESOL_HEIGHT == 720))
+ preferred_preset = V4L2_DV_720P60;
+ else if((CFG_DISP_PRI_RESOL_WIDTH == 1920) && (CFG_DISP_PRI_RESOL_HEIGHT == 1080))
+ preferred_preset = V4L2_DV_1080P60;
+ else
+ preferred_preset = V4L2_DV_720P60;
if (hdmi_is_connected())
preferred_preset = hdmi_get_edid_preset(&me->ctx, preferred_preset);
|