Created
March 28, 2019 03:32
-
-
Save wormyrocks/fbdc04436addae954c21285c5f44b9e1 to your computer and use it in GitHub Desktop.
android_display_mode_patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.gitignore b/.gitignore | |
index e2e7327cde..552c44fa7a 100644 | |
--- a/.gitignore | |
+++ b/.gitignore | |
@@ -1 +1,3 @@ | |
+*.ko | |
+kernel | |
/out | |
diff --git a/device/softwinner/cheetah-common/cheetah-common.mk b/device/softwinner/cheetah-common/cheetah-common.mk | |
index 04e0a4099e..ddf869a7cb 100755 | |
--- a/device/softwinner/cheetah-common/cheetah-common.mk | |
+++ b/device/softwinner/cheetah-common/cheetah-common.mk | |
@@ -56,8 +56,9 @@ PRODUCT_PROPERTY_OVERRIDES += \ | |
ro.opengles.version=131072 | |
#ExoPlayer youtube will use it | |
-PRODUCT_PROPERTY_OVERRIDES += \ | |
- sys.display-size=3840x2160 | |
+ | |
+# PRODUCT_PROPERTY_OVERRIDES += \ | |
+# sys.display-size=3840x2160 | |
# For mali GPU only | |
PRODUCT_PROPERTY_OVERRIDES += \ | |
diff --git a/device/softwinner/cheetah-p1/cheetah_fvd_p1.mk b/device/softwinner/cheetah-p1/cheetah_fvd_p1.mk | |
index 712ce62f05..2798f673a4 100755 | |
--- a/device/softwinner/cheetah-p1/cheetah_fvd_p1.mk | |
+++ b/device/softwinner/cheetah-p1/cheetah_fvd_p1.mk | |
@@ -48,7 +48,7 @@ PRODUCT_PACKAGE_OVERLAYS := device/softwinner/cheetah-p1/overlay \ | |
#disable rotation | |
PRODUCT_PROPERTY_OVERRIDES += \ | |
- ro.sf.disablerotation = 1 | |
+ ro.sf.disablerotation = 0 | |
#support write external storage permission for third-party application | |
PRODUCT_PROPERTY_OVERRIDES += \ | |
ro.config.writeexternalstorage=1 | |
@@ -57,13 +57,13 @@ PRODUCT_PROPERTY_OVERRIDES += \ | |
PRODUCT_PROPERTY_OVERRIDES += \ | |
persist.sys.usb.config=mtp,adb \ | |
ro.adb.secure=0 \ | |
- config.disable_bluetooth=false | |
+ config.disable_bluetooth=true | |
PRODUCT_PROPERTY_OVERRIDES += \ | |
- ro.sf.lcd_density=320 \ | |
- persist.sys.disp_density=320 \ | |
- ro.hwc.sysrsl=9 \ | |
+ ro.sf.lcd_density=400 \ | |
+ persist.sys.disp_density=400 \ | |
+ ro.hwc.sysrsl=10 \ | |
persist.sys.disp_enhance_mode=1 \ | |
persist.sys.disp_policy=3 \ | |
persist.sys.disp_init_exit=0 \ | |
@@ -78,7 +78,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ | |
persist.sys.tv_vdid_fex=0 | |
PRODUCT_PROPERTY_OVERRIDES += \ | |
- persist.sys.timezone=Asia/Shanghai \ | |
+ persist.sys.timezone=America/NewYork \ | |
persist.sys.country=US \ | |
persist.sys.language=en | |
@@ -88,12 +88,12 @@ DISP_DE := 20 | |
DISP_DEV0 := 4 | |
DISP_DEV1 := 2 | |
HDMI_CHANNEL := 0 | |
-HDMI_DEFAULT_MODE := 11 | |
+HDMI_DEFAULT_MODE := 18 | |
CVBS_CHANNEL := 1 | |
CVBS_DEFAULT_MODE := 11 | |
#SHOW_INITLOGO := true | |
-MAX_INIT_DISP_WIDTH := 1920 | |
-MAX_INIT_DISP_HEIGHT := 1080 | |
+MAX_INIT_DISP_WIDTH := 3840 | |
+MAX_INIT_DISP_HEIGHT := 2160 | |
SAVE_DISP_CONFIGS_TO_PROPERTY := true | |
PRODUCT_AAPT_CONFIG := large xlarge mdpi hdpi xhdpi | |
diff --git a/hardware/aw/displayd/helper.cpp b/hardware/aw/displayd/helper.cpp | |
index b2d11fd5a9..6a2eaa95d7 100644 | |
--- a/hardware/aw/displayd/helper.cpp | |
+++ b/hardware/aw/displayd/helper.cpp | |
@@ -19,6 +19,8 @@ const static struct display_mode_info _display_modes[] = { | |
{"1080p-24Hz", DISP_TV_MOD_1080P_24HZ }, | |
{"1080p-50Hz", DISP_TV_MOD_1080P_50HZ }, | |
{"1080p-60Hz", DISP_TV_MOD_1080P_60HZ }, | |
+ {"1920p-60Hz", DISP_TV_MOD_1920P_60HZ }, | |
+ {"2560p-60Hz", DISP_TV_MOD_2560P_60HZ }, | |
{"4K-30Hz" , DISP_TV_MOD_3840_2160P_30HZ }, | |
/* The last two modes are just for cvbs, | |
* They must store in the end of this array */ | |
diff --git a/hardware/aw/displayd/include/config.h b/hardware/aw/displayd/include/config.h | |
index 3e29fa35af..f4b60beb75 100644 | |
--- a/hardware/aw/displayd/include/config.h | |
+++ b/hardware/aw/displayd/include/config.h | |
@@ -33,7 +33,7 @@ | |
#define CVBS_CHANNEL 1 | |
#endif | |
-#define DEFAULT_HDMI_MODE DISP_TV_MOD_720P_50HZ | |
+#define DEFAULT_HDMI_MODE DISP_TV_MOD_1920P_60HZ | |
#define DEFAULT_CVBS_MODE DISP_TV_MOD_PAL | |
/* | |
diff --git a/hardware/aw/displayd/include/helper.h b/hardware/aw/displayd/include/helper.h | |
index c5264d20cd..893e5223f2 100644 | |
--- a/hardware/aw/displayd/include/helper.h | |
+++ b/hardware/aw/displayd/include/helper.h | |
@@ -39,7 +39,9 @@ enum sunxi_display_output_mode_t { | |
DISP_TV_MOD_3840_2160P_30HZ = 0x1c, | |
DISP_TV_MOD_3840_2160P_25HZ = 0x1d, | |
DISP_TV_MOD_3840_2160P_24HZ = 0x1e, | |
- DISP_TV_MODE_NUM = 0x1f, | |
+ DISP_TV_MOD_1920P_60HZ = 0x1f, | |
+ DISP_TV_MOD_2560P_60HZ = 0x20, | |
+ DISP_TV_MODE_NUM = 0x21, | |
}; | |
int stringToMode(char *mode); | |
diff --git a/hardware/aw/displayd/include/sunxi_display2.h b/hardware/aw/displayd/include/sunxi_display2.h | |
index dbaaa6bbc7..82d6ef53cc 100755 | |
--- a/hardware/aw/displayd/include/sunxi_display2.h | |
+++ b/hardware/aw/displayd/include/sunxi_display2.h | |
@@ -139,7 +139,9 @@ typedef enum { | |
DISP_TV_MOD_3840_2160P_30HZ = 0x1c, | |
DISP_TV_MOD_3840_2160P_25HZ = 0x1d, | |
DISP_TV_MOD_3840_2160P_24HZ = 0x1e, | |
- DISP_TV_MODE_NUM = 0x1f, | |
+ DISP_TV_MOD_1920P_60HZ = 0x1f, | |
+ DISP_TV_MOD_2560P_60HZ = 0x20, | |
+ DISP_TV_MODE_NUM = 0x21, | |
}disp_tv_mode; | |
typedef enum { | |
diff --git a/hardware/aw/displayd/policy/policySelector.cpp b/hardware/aw/displayd/policy/policySelector.cpp | |
index ec1e72fd84..6eaa695edf 100644 | |
--- a/hardware/aw/displayd/policy/policySelector.cpp | |
+++ b/hardware/aw/displayd/policy/policySelector.cpp | |
@@ -134,6 +134,12 @@ static void correct_screen_window(disp_rect *win, int mode) { | |
case DISP_TV_MOD_1080P_60HZ: | |
win->width = 1920; win->height = 1080; | |
break; | |
+ case DISP_TV_MOD_1920P_60HZ: | |
+ win->width = 1080; win->height = 1920; | |
+ break; | |
+ case DISP_TV_MOD_2560P_60HZ: | |
+ win->width = 2560; win->height = 1600; | |
+ break; | |
default: | |
win->width = 0; win->height = 0; | |
ALOGE("disp_reset_scn_win: not support the mode[%d]\n", mode); | |
diff --git a/hardware/aw/include/camerahal/drv_display.h b/hardware/aw/include/camerahal/drv_display.h | |
index 49a2ecb749..963b721fea 100755 | |
--- a/hardware/aw/include/camerahal/drv_display.h | |
+++ b/hardware/aw/include/camerahal/drv_display.h | |
@@ -141,7 +141,9 @@ typedef enum | |
DISP_TV_MOD_3840_2160P_30HZ = 0x1c, | |
DISP_TV_MOD_3840_2160P_25HZ = 0x1d, | |
DISP_TV_MOD_3840_2160P_24HZ = 0x1e, | |
- DISP_TV_MODE_NUM = 0x1f, | |
+ DISP_TV_MOD_1920P_60HZ = 0x1f, | |
+ DISP_TV_MOD_2560P_60HZ = 0x20, | |
+ DISP_TV_MODE_NUM = 0x21, | |
}disp_tv_mode; | |
typedef enum | |
diff --git a/system/core/init/display/policySelector.cpp b/system/core/init/display/policySelector.cpp | |
index 5b409eba3d..d0126b6bfd 100644 | |
--- a/system/core/init/display/policySelector.cpp | |
+++ b/system/core/init/display/policySelector.cpp | |
@@ -133,6 +133,12 @@ static void correct_screen_window(disp_rect *win, int mode) { | |
case DISP_TV_MOD_1080P_60HZ: | |
win->width = 1920; win->height = 1080; | |
break; | |
+ case DISP_TV_MOD_1920P_60HZ: | |
+ win->width = 1080; win->height = 1920; | |
+ break; | |
+ case DISP_TV_MOD_2560P_60HZ: | |
+ win->width = 2560; win->height = 1600; | |
+ break; | |
default: | |
win->width = 0; win->height = 0; | |
ERROR("disp_reset_scn_win: not support the mode[%d]\n", mode); | |
diff --git a/system/core/init/display/sunxi_display2.h b/system/core/init/display/sunxi_display2.h | |
index dbaaa6bbc7..82d6ef53cc 100755 | |
--- a/system/core/init/display/sunxi_display2.h | |
+++ b/system/core/init/display/sunxi_display2.h | |
@@ -139,7 +139,9 @@ typedef enum { | |
DISP_TV_MOD_3840_2160P_30HZ = 0x1c, | |
DISP_TV_MOD_3840_2160P_25HZ = 0x1d, | |
DISP_TV_MOD_3840_2160P_24HZ = 0x1e, | |
- DISP_TV_MODE_NUM = 0x1f, | |
+ DISP_TV_MOD_1920P_60HZ = 0x1f, | |
+ DISP_TV_MOD_2560P_60HZ = 0x20, | |
+ DISP_TV_MODE_NUM = 0x21, | |
}disp_tv_mode; | |
typedef enum { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.gitignore b/.gitignore | |
index 21ab88cf2..281ba45d9 100644 | |
--- a/.gitignore | |
+++ b/.gitignore | |
@@ -1,4 +1,6 @@ | |
.buildconfig | |
+tools/pack/chips/* | |
+!tools/pack/chips/sun50iw2p1 | |
linux-3.10/modules/gpu/mali400/kernel_mode/driver/src/devicedrv/mali/Module.symvers | |
linux-3.10/modules/nand/Module.symvers | |
linux-3.10/samples/hidraw/hid-example | |
diff --git a/brandy/SUNXI_README b/brandy/SUNXI_README | |
index fc038910b..cd2a1e1b2 100755 | |
--- a/brandy/SUNXI_README | |
+++ b/brandy/SUNXI_README | |
@@ -26,6 +26,7 @@ where "NAME_config" is the name of one of the existing configurations; | |
see boards.cfg for more supported names. | |
List of configurations: | |
+ | |
(config 1633) A31/A31S : $ make sun8iw1p1_config | |
(config 1650) A23 : $ make sun8iw3p1_config | |
(config 1667) A33 : $ make sun8iw5p1_config | |
diff --git a/linux-3.10/drivers/video/sunxi/disp2/disp/de/disp_display.c b/linux-3.10/drivers/video/sunxi/disp2/disp/de/disp_display.c | |
index a127085a3..7e3e4d289 100644 | |
--- a/linux-3.10/drivers/video/sunxi/disp2/disp/de/disp_display.c | |
+++ b/linux-3.10/drivers/video/sunxi/disp2/disp/de/disp_display.c | |
@@ -828,6 +828,10 @@ s32 bsp_disp_get_screen_width_from_output_type(u32 disp, u32 output_type, u32 ou | |
width = 1920; | |
height = 1200; | |
break; | |
+ case DISP_TV_MOD_1920P_60HZ: | |
+ width = 1080; | |
+ height = 1920; | |
+ break; | |
} | |
} | |
/* FIXME: add other output device res */ | |
@@ -914,6 +918,10 @@ s32 bsp_disp_get_screen_height_from_output_type(u32 disp, u32 output_type, u32 o | |
width = 1920; | |
height = 1200; | |
break; | |
+ case DISP_TV_MOD_1920P_60HZ: | |
+ width = 1080; | |
+ height = 1920; | |
+ break; | |
} | |
} | |
/* FIXME: add other output device res */ | |
diff --git a/linux-3.10/drivers/video/sunxi/disp2/disp/de/include.h b/linux-3.10/drivers/video/sunxi/disp2/disp/de/include.h | |
index 5edc0ecee..9f2b167e4 100644 | |
--- a/linux-3.10/drivers/video/sunxi/disp2/disp/de/include.h | |
+++ b/linux-3.10/drivers/video/sunxi/disp2/disp/de/include.h | |
@@ -52,6 +52,7 @@ | |
s32 bsp_disp_get_print_level(void); | |
#if 1 | |
+#define __eskinf(msg...) do{if (true){printk(KERN_WARNING "[DISP] %s,line:%d:",__func__,__LINE__);printk(msg);}}while (0) | |
#define __inf(msg...) do{if (bsp_disp_get_print_level()){printk(KERN_WARNING "[DISP] %s,line:%d:",__func__,__LINE__);printk(msg);}}while (0) | |
#define __msg(msg...) do{if (bsp_disp_get_print_level()){printk(KERN_WARNING "[DISP] %s,line:%d:",__func__,__LINE__);printk(msg);}}while (0) | |
#define __wrn(msg...) do{{printk(KERN_WARNING "[DISP] %s,line:%d:",__func__,__LINE__);printk(msg);}}while (0) | |
diff --git a/linux-3.10/drivers/video/sunxi/disp2/disp/dev_disp.c b/linux-3.10/drivers/video/sunxi/disp2/disp/dev_disp.c | |
index ef019b87e..5e6ee678f 100644 | |
--- a/linux-3.10/drivers/video/sunxi/disp2/disp/dev_disp.c | |
+++ b/linux-3.10/drivers/video/sunxi/disp2/disp/dev_disp.c | |
@@ -344,7 +344,7 @@ unsigned int disp_boot_para_parse(const char *name) | |
{ | |
unsigned int value = 0; | |
if (of_property_read_u32(g_disp_drv.dev->of_node, name, &value) < 0) | |
- __wrn("of_property_read disp.%s fail\n", name); | |
+ __eskinf("of_property_read disp.%s fail\n", name); | |
pr_info("[DISP] %s:0x%x\n", name, value); | |
return value; | |
@@ -359,7 +359,7 @@ const char *disp_boot_para_parse_str(const char *name) | |
if (!of_property_read_string(g_disp_drv.dev->of_node, name, &str)) { | |
return str; | |
} else { | |
- __inf("of_property_read_string disp.%s fail\n", name); | |
+ __eskinf("of_property_read_string disp.%s fail\n", name); | |
return NULL; | |
} | |
} | |
@@ -373,20 +373,20 @@ static s32 parser_disp_init_para(const struct device_node *np, disp_init_para * | |
memset(init_para, 0, sizeof(disp_init_para)); | |
if (of_property_read_u32(np, "disp_init_enable", &value) < 0) { | |
- __wrn("of_property_read disp_init.disp_init_enable fail\n"); | |
+ __eskinf("of_property_read disp_init.disp_init_enable fail\n"); | |
return -1; | |
} | |
init_para->b_init = value; | |
if (of_property_read_u32(np, "disp_mode", &value) < 0) { | |
- __wrn("of_property_read disp_init.disp_mode fail\n"); | |
+ __eskinf("of_property_read disp_init.disp_mode fail\n"); | |
return -1; | |
} | |
init_para->disp_mode= value; | |
//screen0 | |
if (of_property_read_u32(np, "screen0_output_type", &value) < 0) { | |
- __wrn("of_property_read disp_init.screen0_output_type fail\n"); | |
+ __eskinf("of_property_read disp_init.screen0_output_type fail\n"); | |
return -1; | |
} | |
if (value == 0) { | |
@@ -400,12 +400,12 @@ static s32 parser_disp_init_para(const struct device_node *np, disp_init_para * | |
} else if (value == 4) { | |
init_para->output_type[0] = DISP_OUTPUT_TYPE_VGA; | |
} else { | |
- __wrn("invalid screen0_output_type %d\n", init_para->output_type[0]); | |
+ __eskinf("invalid screen0_output_type %d\n", init_para->output_type[0]); | |
return -1; | |
} | |
if (of_property_read_u32(np, "screen0_output_mode", &value) < 0) { | |
- __wrn("of_property_read disp_init.screen0_output_mode fail\n"); | |
+ __eskinf("of_property_read disp_init.screen0_output_mode fail\n"); | |
return -1; | |
} | |
if (init_para->output_type[0] == DISP_OUTPUT_TYPE_TV || init_para->output_type[0] == DISP_OUTPUT_TYPE_HDMI | |
@@ -415,7 +415,7 @@ static s32 parser_disp_init_para(const struct device_node *np, disp_init_para * | |
if (DISP_SCREEN_NUM > 1) { | |
//screen1 | |
if (of_property_read_u32(np, "screen1_output_type", &value) < 0) { | |
- __wrn("of_property_read disp_init.screen1_output_type fail\n"); | |
+ __eskinf("of_property_read disp_init.screen1_output_type fail\n"); | |
return -1; | |
} | |
if (value == 0) { | |
@@ -429,12 +429,12 @@ static s32 parser_disp_init_para(const struct device_node *np, disp_init_para * | |
} else if (value == 4) { | |
init_para->output_type[1] = DISP_OUTPUT_TYPE_VGA; | |
} else { | |
- __wrn("invalid screen1_output_type %d\n", init_para->output_type[1]); | |
+ __eskinf("invalid screen1_output_type %d\n", init_para->output_type[1]); | |
return -1; | |
} | |
if (of_property_read_u32(np, "screen1_output_mode", &value) < 0) { | |
- __wrn("of_property_read disp_init.screen1_output_mode fail\n"); | |
+ __eskinf("of_property_read disp_init.screen1_output_mode fail\n"); | |
return -1; | |
} | |
if (init_para->output_type[1] == DISP_OUTPUT_TYPE_TV || init_para->output_type[1] == DISP_OUTPUT_TYPE_HDMI | |
@@ -445,7 +445,7 @@ static s32 parser_disp_init_para(const struct device_node *np, disp_init_para * | |
#if 0 | |
//screen2 | |
if (of_property_read_u32(np, "screen2_output_type", &value) < 0) { | |
- __inf("of_property_read disp_init.screen2_output_type fail\n"); | |
+ __eskinf("of_property_read disp_init.screen2_output_type fail\n"); | |
} | |
if (value == 0) { | |
init_para->output_type[2] = DISP_OUTPUT_TYPE_NONE; | |
@@ -458,11 +458,11 @@ static s32 parser_disp_init_para(const struct device_node *np, disp_init_para * | |
} else if (value == 4) { | |
init_para->output_type[2] = DISP_OUTPUT_TYPE_VGA; | |
} else { | |
- __inf("invalid screen0_output_type %d\n", init_para->output_type[2]); | |
+ __eskinf("invalid screen0_output_type %d\n", init_para->output_type[2]); | |
} | |
if (of_property_read_u32(np, "screen2_output_mode", &value) < 0) { | |
- __inf("of_property_read disp_init.screen2_output_mode fail\n"); | |
+ __eskinf("of_property_read disp_init.screen2_output_mode fail\n"); | |
} | |
if (init_para->output_type[2] == DISP_OUTPUT_TYPE_TV || init_para->output_type[2] == DISP_OUTPUT_TYPE_HDMI | |
|| init_para->output_type[2] == DISP_OUTPUT_TYPE_VGA) { | |
@@ -473,19 +473,19 @@ static s32 parser_disp_init_para(const struct device_node *np, disp_init_para * | |
init_para->buffer_num[0]= 2; | |
if (of_property_read_u32(np, "fb0_format", &value) < 0) { | |
- __wrn("of_property_read disp_init.fb0_format fail\n"); | |
+ __eskinf("of_property_read disp_init.fb0_format fail\n"); | |
return -1; | |
} | |
init_para->format[0]= value; | |
if (of_property_read_u32(np, "fb0_width", &value) < 0) { | |
- __inf("of_property_read disp_init.fb0_width fail\n"); | |
+ __eskinf("of_property_read disp_init.fb0_width fail\n"); | |
return -1; | |
} | |
init_para->fb_width[0]= value; | |
if (of_property_read_u32(np, "fb0_height", &value) < 0) { | |
- __inf("of_property_read disp_init.fb0_height fail\n"); | |
+ __eskinf("of_property_read disp_init.fb0_height fail\n"); | |
return -1; | |
} | |
init_para->fb_height[0]= value; | |
@@ -495,17 +495,17 @@ static s32 parser_disp_init_para(const struct device_node *np, disp_init_para * | |
init_para->buffer_num[1]= 2; | |
if (of_property_read_u32(np, "fb1_format", &value) < 0) { | |
- __wrn("of_property_read disp_init.fb1_format fail\n"); | |
+ __eskinf("of_property_read disp_init.fb1_format fail\n"); | |
} | |
init_para->format[1]= value; | |
if (of_property_read_u32(np, "fb1_width", &value) < 0) { | |
- __inf("of_property_read disp_init.fb1_width fail\n"); | |
+ __eskinf("of_property_read disp_init.fb1_width fail\n"); | |
} | |
init_para->fb_width[1]= value; | |
if (of_property_read_u32(np, "fb1_height", &value) < 0) { | |
- __inf("of_property_read disp_init.fb1_height fail\n"); | |
+ __eskinf("of_property_read disp_init.fb1_height fail\n"); | |
} | |
init_para->fb_height[1]= value; | |
} | |
@@ -524,34 +524,34 @@ static s32 parser_disp_init_para(const struct device_node *np, disp_init_para * | |
init_para->buffer_num[2]= 2; | |
if (of_property_read_u32(np, "fb2_format", &value) < 0) { | |
- __inf("of_property_read disp_init.fb2_format fail\n"); | |
+ __eskinf("of_property_read disp_init.fb2_format fail\n"); | |
} | |
init_para->format[2]= value; | |
if (of_property_read_u32(np, "fb2_width", &value) < 0) { | |
- __inf("of_property_read disp_init.fb2_width fail\n"); | |
+ __eskinf("of_property_read disp_init.fb2_width fail\n"); | |
} | |
init_para->fb_width[2]= value; | |
if (of_property_read_u32(np, "fb2_height", &value) < 0) { | |
- __inf("of_property_read disp_init.fb2_height fail\n"); | |
+ __eskinf("of_property_read disp_init.fb2_height fail\n"); | |
} | |
init_para->fb_height[2]= value; | |
#endif | |
- __inf("====display init para begin====\n"); | |
- __inf("b_init:%d\n", init_para->b_init); | |
- __inf("disp_mode:%d\n\n", init_para->disp_mode); | |
+ __eskinf("====display init para begin====\n"); | |
+ __eskinf("b_init:%d\n", init_para->b_init); | |
+ __eskinf("disp_mode:%d\n\n", init_para->disp_mode); | |
for (i=0; i<3; i++) { | |
- __inf("output_type[%d]:%d\n", i, init_para->output_type[i]); | |
- __inf("output_mode[%d]:%d\n", i, init_para->output_mode[i]); | |
+ __eskinf("output_type[%d]:%d\n", i, init_para->output_type[i]); | |
+ __eskinf("output_mode[%d]:%d\n", i, init_para->output_mode[i]); | |
} | |
for (i=0; i<3; i++) { | |
- __inf("buffer_num[%d]:%d\n", i, init_para->buffer_num[i]); | |
- __inf("format[%d]:%d\n", i, init_para->format[i]); | |
- __inf("fb_width[%d]:%d\n", i, init_para->fb_width[i]); | |
- __inf("fb_height[%d]:%d\n", i, init_para->fb_height[i]); | |
+ __eskinf("buffer_num[%d]:%d\n", i, init_para->buffer_num[i]); | |
+ __eskinf("format[%d]:%d\n", i, init_para->format[i]); | |
+ __eskinf("fb_width[%d]:%d\n", i, init_para->fb_width[i]); | |
+ __eskinf("fb_height[%d]:%d\n", i, init_para->fb_height[i]); | |
} | |
- __inf("====display init para end====\n"); | |
+ __eskinf("====display init para end====\n"); | |
return 0; | |
} | |
@@ -566,14 +566,14 @@ void *disp_malloc(u32 num_bytes, void *phys_addr) | |
address = dma_alloc_coherent(g_disp_drv.dev, actual_bytes, (dma_addr_t*)phys_addr, GFP_KERNEL); | |
if (address) { | |
- __inf("dma_alloc_coherent ok, address=0x%p, size=0x%x\n", (void*)(*(unsigned long*)phys_addr), num_bytes); | |
+ __eskinf("dma_alloc_coherent ok, address=0x%p, size=0x%x\n", (void*)(*(unsigned long*)phys_addr), num_bytes); | |
return address; | |
} else { | |
- __wrn("dma_alloc_coherent fail, size=0x%x\n", num_bytes); | |
+ __eskinf("dma_alloc_coherent fail, size=0x%x\n", num_bytes); | |
return NULL; | |
} | |
} else { | |
- __wrn("%s size is zero\n", __func__); | |
+ __eskinf("%s size is zero\n", __func__); | |
} | |
return NULL; | |
@@ -651,7 +651,7 @@ static void start_work(struct work_struct *work) | |
int lcd_registered = bsp_disp_get_lcd_registered(screen_id); | |
int hdmi_registered = bsp_disp_get_hdmi_registered(); | |
- __inf("sel=%d, output_type=%d, lcd_reg=%d, hdmi_reg=%d\n", | |
+ __eskinf("sel=%d, output_type=%d, lcd_reg=%d, hdmi_reg=%d\n", | |
screen_id, output_type, lcd_registered, hdmi_registered); | |
if (((disp_mode == DISP_INIT_MODE_SCREEN0) && (screen_id == 0)) | |
|| ((disp_mode == DISP_INIT_MODE_SCREEN1) && (screen_id == 1))) { | |
@@ -923,7 +923,7 @@ static s32 disp_init(struct platform_device *pdev) | |
int i, disp, num_screens; | |
unsigned int value, output_type, output_mode; | |
- __inf("%s !\n", __func__); | |
+ __eskinf("%s !\n", __func__); | |
INIT_WORK(&g_disp_drv.resume_work[0], resume_work_0); | |
if (DISP_SCREEN_NUM > 1) | |
@@ -944,7 +944,7 @@ static s32 disp_init(struct platform_device *pdev) | |
para->reg_base[i] = g_disp_drv.reg_base[i]; | |
para->irq_no[i] = g_disp_drv.irq_no[i]; | |
para->mclk[i] = g_disp_drv.mclk[i]; | |
- __inf("mod %d, base=0x%lx, irq=%d, mclk=0x%p\n", i, para->reg_base[i], para->irq_no[i], para->mclk[i]); | |
+ __eskinf("mod %d, base=0x%lx, irq=%d, mclk=0x%p\n", i, para->reg_base[i], para->irq_no[i], para->mclk[i]); | |
} | |
para->disp_int_process = disp_sync_finish_process; | |
@@ -993,7 +993,7 @@ static s32 disp_init(struct platform_device *pdev) | |
start_process(); | |
- __inf("%s finish\n", __func__); | |
+ __eskinf("%s finish\n", __func__); | |
return 0; | |
} | |
@@ -1023,16 +1023,16 @@ static int disp_mem_request(int sel,u32 size) | |
g_disp_mm[sel].info_base = page_address(page); | |
if (NULL == g_disp_mm[sel].info_base) { | |
free_pages((unsigned long)(page),get_order(map_size)); | |
- __wrn("page_address fail!\n"); | |
+ __eskinf("page_address fail!\n"); | |
return -ENOMEM; | |
} | |
g_disp_mm[sel].mem_start = virt_to_phys(g_disp_mm[sel].info_base); | |
memset(g_disp_mm[sel].info_base,0,size); | |
- __inf("pa=0x%p va=0x%p size:0x%x\n",(void*)g_disp_mm[sel].mem_start, g_disp_mm[sel].info_base, size); | |
+ __eskinf("pa=0x%p va=0x%p size:0x%x\n",(void*)g_disp_mm[sel].mem_start, g_disp_mm[sel].info_base, size); | |
return 0; | |
} else { | |
- __wrn("alloc_pages fail!\n"); | |
+ __eskinf("alloc_pages fail!\n"); | |
return -ENOMEM; | |
} | |
#else | |
@@ -1043,11 +1043,11 @@ static int disp_mem_request(int sel,u32 size) | |
g_disp_mm[sel].mem_start = phy_addr; | |
g_disp_mm[sel].mem_len = size; | |
memset(g_disp_mm[sel].info_base,0,size); | |
- __inf("pa=0x%p va=0x%p size:0x%x\n", (void*)g_disp_mm[sel].mem_start, g_disp_mm[sel].info_base, size); | |
+ __eskinf("pa=0x%p va=0x%p size:0x%x\n", (void*)g_disp_mm[sel].mem_start, g_disp_mm[sel].info_base, size); | |
return 0; | |
} else { | |
- __wrn("disp_malloc fail!\n"); | |
+ __eskinf("disp_malloc fail!\n"); | |
return -ENOMEM; | |
} | |
#endif | |
@@ -1069,7 +1069,7 @@ static int disp_mem_release(int sel) | |
if (g_disp_mm[sel].info_base == NULL) | |
return -EINVAL; | |
- __inf("disp_mem_release, mem_id=%d, phy_addr=0x%p\n", sel, (void*)g_disp_mm[sel].mem_start); | |
+ __eskinf("disp_mem_release, mem_id=%d, phy_addr=0x%p\n", sel, (void*)g_disp_mm[sel].mem_start); | |
disp_free((void *)g_disp_mm[sel].info_base, (void*)g_disp_mm[sel].mem_start, g_disp_mm[sel].mem_len); | |
memset(&g_disp_mm[sel],0,sizeof(struct info_mm)); | |
#endif | |
@@ -1145,7 +1145,7 @@ static int disp_probe(struct platform_device *pdev) | |
int ret; | |
int counter = 0; | |
- __inf("[DISP]disp_probe\n"); | |
+ __eskinf("[DISP]disp_probe\n"); | |
memset(&g_disp_drv, 0, sizeof(disp_drv_info)); | |
g_disp_drv.dev = &pdev->dev; | |
@@ -1296,7 +1296,7 @@ static int disp_probe(struct platform_device *pdev) | |
ret = sysfs_create_group(&display_dev->kobj, | |
&disp_attribute_group); | |
if (ret) | |
- __wrn("sysfs_create_group fail!\n"); | |
+ __eskinf("sysfs_create_group fail!\n"); | |
power_status_init = 1; | |
#if defined(CONFIG_PM_RUNTIME) | |
@@ -1306,7 +1306,7 @@ static int disp_probe(struct platform_device *pdev) | |
pm_runtime_use_autosuspend(&pdev->dev); | |
pm_runtime_enable(&pdev->dev); | |
#endif | |
- __inf("[DISP]disp_probe finish\n"); | |
+ __eskinf("[DISP]disp_probe finish\n"); | |
return ret; | |
@@ -1512,7 +1512,7 @@ static int disp_suspend(struct device *dev) | |
struct disp_eink_manager *eink_manager = NULL; | |
eink_manager = g_disp_drv.eink_manager[0]; | |
if (!eink_manager) | |
- __wrn("eink_manager is NULL!\n"); | |
+ __eskinf("eink_manager is NULL!\n"); | |
#endif | |
pr_info("%s\n", __func__); | |
@@ -1591,7 +1591,7 @@ static int disp_resume(struct device *dev) | |
struct disp_eink_manager *eink_manager = NULL; | |
eink_manager = g_disp_drv.eink_manager[0]; | |
if (!eink_manager) | |
- __wrn("eink_manager is NULL!\n"); | |
+ __eskinf("eink_manager is NULL!\n"); | |
#endif | |
#if defined(CONFIG_PM_RUNTIME) | |
/* | |
@@ -1751,7 +1751,7 @@ long disp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |
num_screens = bsp_disp_feat_get_num_screens(); | |
if (copy_from_user((void*)karg,(void __user*)arg,4*sizeof(unsigned long))) { | |
- __wrn("copy_from_user fail\n"); | |
+ __eskinf("copy_from_user fail\n"); | |
return -EFAULT; | |
} | |
@@ -1774,23 +1774,23 @@ long disp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |
if (!eink_manager) | |
- __wrn("eink_manager is NULL!\n"); | |
+ __eskinf("eink_manager is NULL!\n"); | |
#endif | |
if (cmd < DISP_FB_REQUEST) { | |
if (ubuffer[0] >= num_screens) { | |
- __wrn("para err in disp_ioctl, cmd = 0x%x,screen id = %d\n", cmd, (int)ubuffer[0]); | |
+ __eskinf("para err in disp_ioctl, cmd = 0x%x,screen id = %d\n", cmd, (int)ubuffer[0]); | |
return -1; | |
} | |
} | |
if (DISPLAY_DEEP_SLEEP & suspend_status) { | |
- __wrn("ioctl:%x fail when in suspend!\n", cmd); | |
+ __eskinf("ioctl:%x fail when in suspend!\n", cmd); | |
return -1; | |
} | |
if (cmd == DISP_print) { | |
- __wrn("cmd:0x%x,%ld,%ld\n",cmd, ubuffer[0], ubuffer[1]); | |
+ __eskinf("cmd:0x%x,%ld,%ld\n",cmd, ubuffer[0], ubuffer[1]); | |
} | |
switch(cmd) { | |
@@ -1800,7 +1800,7 @@ long disp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |
struct disp_color para; | |
if (copy_from_user(¶, (void __user *)ubuffer[1],sizeof(struct disp_color))) { | |
- __wrn("copy_from_user fail\n"); | |
+ __eskinf("copy_from_user fail\n"); | |
return -EFAULT; | |
} | |
if (mgr && (mgr->set_back_color != NULL)) | |
@@ -1920,7 +1920,7 @@ long disp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |
addr = fb_get_address_info(ubuffer[0], 0); //if do not define write back function, need to return virtual address | |
#endif | |
if (0 == addr) { | |
- __wrn("fail to get fb%ld address\n", ubuffer[0]); | |
+ __eskinf("fail to get fb%ld address\n", ubuffer[0]); | |
return -EFAULT; | |
} | |
ret = bsp_disp_eink_update(eink_manager, (void*)addr, (enum eink_update_mode)ubuffer[1], (struct area_info *)ubuffer[2]); | |
@@ -1953,7 +1953,7 @@ long disp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |
} | |
if (copy_to_user((void __user *)ubuffer[1],¶, sizeof(struct disp_output))) { | |
- __wrn("copy_from_user fail\n"); | |
+ __eskinf("copy_from_user fail\n"); | |
return -EFAULT; | |
} | |
break; | |
@@ -1983,7 +1983,7 @@ long disp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |
struct disp_layer_config para; | |
if (copy_from_user(¶, (void __user *)ubuffer[1],sizeof(struct disp_layer_config)*ubuffer[2])) { | |
- __wrn("copy_from_user fail\n"); | |
+ __eskinf("copy_from_user fail\n"); | |
return -EFAULT; | |
} | |
if (mgr && mgr->set_layer_config) | |
@@ -1996,13 +1996,13 @@ long disp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |
struct disp_layer_config para; | |
if (copy_from_user(¶, (void __user *)ubuffer[1],sizeof(struct disp_layer_config)*ubuffer[2])) { | |
- __wrn("copy_from_user fail\n"); | |
+ __eskinf("copy_from_user fail\n"); | |
return -EFAULT; | |
} | |
if (mgr && mgr->get_layer_config) | |
ret = mgr->get_layer_config(mgr, ¶, ubuffer[2]); | |
if (copy_to_user((void __user *)ubuffer[1], ¶, sizeof(struct disp_layer_config)*ubuffer[2])) { | |
- __wrn("copy_to_user fail\n"); | |
+ __eskinf("copy_to_user fail\n"); | |
return -EFAULT; | |
} | |
break; | |
@@ -2101,7 +2101,7 @@ long disp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |
struct disp_rect rect; | |
if (copy_from_user(&rect, (void __user *)ubuffer[1],sizeof(struct disp_rect))) { | |
- __wrn("copy_from_user fail\n"); | |
+ __eskinf("copy_from_user fail\n"); | |
return -EFAULT; | |
} | |
if (smbl && smbl->set_window) | |
@@ -2129,7 +2129,7 @@ long disp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |
struct disp_capture_info info; | |
if (copy_from_user(&info, (void __user *)ubuffer[1],sizeof(struct disp_capture_info))) { | |
- __wrn("copy_from_user fail\n"); | |
+ __eskinf("copy_from_user fail\n"); | |
return -EFAULT; | |
} | |
if (cptr && cptr->commmit) | |
@@ -2164,7 +2164,7 @@ static long disp_compat_ioctl(struct file *file, unsigned int cmd, unsigned long | |
unsigned long __user *ubuffer; | |
if (copy_from_user((void*)karg,(void __user*)arg,4*sizeof(compat_uptr_t))) { | |
- __wrn("copy_from_user fail\n"); | |
+ __eskinf("copy_from_user fail\n"); | |
return -EFAULT; | |
} | |
@@ -2176,7 +2176,7 @@ static long disp_compat_ioctl(struct file *file, unsigned int cmd, unsigned long | |
put_user(karg[1], &ubuffer[1]) || | |
put_user(karg[2], &ubuffer[2]) || | |
put_user(karg[3], &ubuffer[3])) { | |
- __wrn("put_user fail\n"); | |
+ __eskinf("put_user fail\n"); | |
return -EFAULT; | |
} | |
@@ -2269,13 +2269,13 @@ static int __init disp_module_init(void) | |
my_cdev->owner = THIS_MODULE; | |
err = cdev_add(my_cdev, devid, 1); | |
if (err) { | |
- __wrn("cdev_add fail\n"); | |
+ __eskinf("cdev_add fail\n"); | |
return -1; | |
} | |
disp_class = class_create(THIS_MODULE, "disp"); | |
if (IS_ERR(disp_class)) { | |
- __wrn("class_create fail\n"); | |
+ __eskinf("class_create fail\n"); | |
return -1; | |
} | |
@@ -2302,7 +2302,7 @@ static int __init disp_module_init(void) | |
static void __exit disp_module_exit(void) | |
{ | |
- __inf("disp_module_exit\n"); | |
+ __eskinf("disp_module_exit\n"); | |
#ifdef CONFIG_DISP2_SUNXI_DEBUG | |
dispdbg_exit(); | |
diff --git a/linux-3.10/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c b/linux-3.10/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c | |
index 2e8916988..45b199fc7 100755 | |
--- a/linux-3.10/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c | |
+++ b/linux-3.10/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c | |
@@ -274,9 +274,9 @@ static struct disp_hdmi_mode hdmi_mode_tbl[] = { | |
{DISP_TV_MOD_720P_60HZ, HDMI720P_60, }, | |
{DISP_TV_MOD_1080I_50HZ, HDMI1080I_50, }, | |
{DISP_TV_MOD_1080I_60HZ, HDMI1080I_60, }, | |
- {DISP_TV_MOD_1080P_24HZ, HDMI1080P_24, }, | |
{DISP_TV_MOD_1080P_50HZ, HDMI1080P_50, }, | |
{DISP_TV_MOD_1080P_60HZ, HDMI1080P_60, }, | |
+ {DISP_TV_MOD_1080P_24HZ, HDMI1080P_24, }, | |
{DISP_TV_MOD_1080P_25HZ, HDMI1080P_25, }, | |
{DISP_TV_MOD_1080P_30HZ, HDMI1080P_30, }, | |
{DISP_TV_MOD_1080P_24HZ_3D_FP, HDMI1080P_24_3D_FP,}, | |
@@ -284,6 +284,7 @@ static struct disp_hdmi_mode hdmi_mode_tbl[] = { | |
{DISP_TV_MOD_720P_60HZ_3D_FP, HDMI720P_60_3D_FP, }, | |
{DISP_TV_MOD_3840_2160P_30HZ, HDMI3840_2160P_30, }, | |
{DISP_TV_MOD_3840_2160P_25HZ, HDMI3840_2160P_25, }, | |
+ {DISP_TV_MOD_1920P_60HZ, HDMI1920P_60, }, | |
}; | |
static u32 hdmi_get_vic(u32 mode) | |
diff --git a/linux-3.10/drivers/video/sunxi/disp2/hdmi/drv_hdmi_i.h b/linux-3.10/drivers/video/sunxi/disp2/hdmi/drv_hdmi_i.h | |
index 468d353b0..1caf3f393 100755 | |
--- a/linux-3.10/drivers/video/sunxi/disp2/hdmi/drv_hdmi_i.h | |
+++ b/linux-3.10/drivers/video/sunxi/disp2/hdmi/drv_hdmi_i.h | |
@@ -41,11 +41,11 @@ extern u32 hdmi_print; | |
extern u32 rgb_only; | |
extern u32 hdmi_hpd_mask;//0x10: force unplug; 0x11: force plug | |
-#define OSAL_PRINTF(msg...) do{printk(KERN_WARNING "[HDMI] ");printk(msg);}while (0) | |
-#define __inf(msg...) do{if (hdmi_print){printk(KERN_WARNING "[HDMI] ");printk(msg);}}while (0) | |
-#define __msg(msg...) do{if (hdmi_print){printk(KERN_WARNING "[HDMI] file:%s,line:%d:",__FILE__,__LINE__);printk(msg);}}while (0) | |
-#define __wrn(msg...) do{printk(KERN_WARNING "[HDMI WRN] file:%s,line:%d: ",__FILE__,__LINE__);printk(msg);}while (0) | |
-#define __here__ do{if (hdmi_print){printk(KERN_WARNING "[HDMI] file:%s,line:%d\n",__FILE__,__LINE__);}}while (0) | |
+#define OSAL_PRINTF(msg...) do{printk(KERN_EMERG "[HDMI] ");printk(msg);}while (0) | |
+#define __inf(msg...) do{if (true){printk("[HDMI] ");printk(msg);}}while (0) | |
+#define __msg(msg...) do{if (true){printk("[HDMI] file:%s,line:%d:",__FILE__,__LINE__);printk(msg);}}while (0) | |
+#define __wrn(msg...) do{printk("[HDMI WRN] file:%s,line:%d: ",__FILE__,__LINE__);printk(msg);}while (0) | |
+#define __here__ do{if (true){printk("[HDMI] file:%s,line:%d\n",__FILE__,__LINE__);}}while (0) | |
s32 hdmi_init(struct platform_device *pdev); | |
diff --git a/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_core.c b/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_core.c | |
index fde84c969..8f48a455c 100755 | |
--- a/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_core.c | |
+++ b/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_core.c | |
@@ -33,8 +33,8 @@ struct disp_video_timings video_timing[] = | |
{HDMI576P, 0,27000000, 0, 720, 576, 864, 68, 12, 64, 625, 39, 5, 5, 0, 0, 0, 0, 0}, | |
{HDMI720P_50, 0,74250000, 0, 1280, 720, 1980, 220, 440, 40, 750, 20, 5, 5, 1, 1, 0, 0, 0}, | |
{HDMI720P_60, 0,74250000, 0, 1280, 720, 1650, 220, 110, 40, 750, 20, 5, 5, 1, 1, 0, 0, 0}, | |
- {HDMI1080I_50, 0,74250000, 0, 1920, 1080, 2640, 148, 528, 44, 1125, 15, 2, 5, 1, 1, 1, 0, 0}, | |
- {HDMI1080I_60, 0,74250000, 0, 1920, 1080, 2200, 148, 88, 44, 1125, 15, 2, 5, 1, 1, 1, 0, 0}, | |
+ {HDMI1080I_50, 0,74250000, 0, 1920, 1080, 2640, 148, 528, 44, 1125, 15, 2, 5, 1, 1, 1, 0, 0}, | |
+ {HDMI1080I_60, 0,74250000, 0, 1920, 1080, 2200, 148, 88, 44, 1125, 15, 2, 5, 1, 1, 1, 0, 0}, | |
{HDMI1080P_50, 0,148500000, 0, 1920, 1080, 2640, 148, 528, 44, 1125, 36, 4, 5, 1, 1, 0, 0, 0}, | |
{HDMI1080P_60, 0,148500000, 0, 1920, 1080, 2200, 148, 88, 44, 1125, 36, 4, 5, 1, 1, 0, 0, 0}, | |
{HDMI1080P_24, 0,74250000, 0, 1920, 1080, 2750, 148, 638, 44, 1125, 36, 4, 5, 1, 1, 0, 0, 0}, | |
@@ -45,6 +45,9 @@ struct disp_video_timings video_timing[] = | |
{HDMI720P_60_3D_FP, 0,148500000, 0, 1280, 1440, 1650, 220, 110, 40, 750, 20, 5, 5, 1, 1, 0, 30, 1}, | |
{HDMI3840_2160P_30, 0,297000000, 0, 3840, 2160, 4400, 296, 176, 88, 2250, 72, 8, 10, 1, 1, 0, 0, 0}, | |
{HDMI3840_2160P_25, 0,297000000, 0, 3840, 2160, 5280, 296, 1056, 88, 2250, 72, 8, 10, 1, 1, 0, 0, 0}, | |
+ {HDMI1920P_60, 0,137220000, 0, 1080, 1920, 1185, 35, 60, 10, 1930, 2, 4, 4, 1, 1, 0, 0, 0}, | |
+ {HDMI2560P_60, 0,263995200, 0, 2560, 1600, 3052, 230, 230, 32, 1620, 4, 12, 4, 0, 0, 0, 0, 0}, | |
+ //vic tvmode pclk rpt xres yres hort hbp hfp hst vert vbp vfp vst hsp vsp bint vactv trd_mode | |
}; | |
static void hdmi_para_reset(void) | |
@@ -57,7 +60,7 @@ static void hdmi_para_reset(void) | |
static void hdmi_para_init(void) | |
{ | |
- glb_video_para.vic = HDMI720P_50; | |
+ glb_video_para.vic = HDMI1920P_60; | |
glb_video_para.csc = BT601; | |
glb_video_para.is_hdmi = 1; | |
glb_video_para.is_yuv = 0; | |
diff --git a/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_core.h b/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_core.h | |
index 12755bf4e..a60d27dae 100755 | |
--- a/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_core.h | |
+++ b/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_core.h | |
@@ -24,6 +24,8 @@ | |
#define HDMI3840_2160P_30 (1+0x100) | |
#define HDMI3840_2160P_25 (2+0x100) | |
#define HDMI3840_2160P_24 (3+0x100) | |
+#define HDMI1920P_60 (4+0x100) | |
+#define HDMI2560P_60 (5+0x100) | |
#define HDMI_EDID_LEN 1024 | |
#define HDMI_State_Idle 0x00 | |
diff --git a/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_edid.c b/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_edid.c | |
index 9b5812dff..890ca4f98 100755 | |
--- a/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_edid.c | |
+++ b/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_edid.c | |
@@ -145,6 +145,9 @@ static s32 edid_parse_dtd_block(u8 *pbuf) | |
if ((sizex== 1920) && (sizey == 1080)) { | |
Device_Support_VIC[HDMI1080P_60] = 1; | |
} | |
+ if ((sizex== 1080) && (sizey == 1920)) { | |
+ Device_Support_VIC[HDMI1920P_60] = 1; | |
+ } | |
} | |
else if ((frame_rate == 49) || (frame_rate == 50)) { | |
if ((sizex== 720) && (sizey == 288)) { | |
@@ -322,13 +325,16 @@ s32 hdmi_edid_parse(void) | |
BlockCount = 4 ; | |
for ( i = 1 ; i <= BlockCount ; i++ ) { | |
+ __inf("esk - reading edid block %d\n",i); | |
edid_read_data(i, EDID_Buf) ; | |
if (edid_check_sum(i, EDID_Buf)!= 0) | |
+ __inf("esk - intermediate checksum failure\n"); | |
return 0; | |
if ((EDID_Buf[0x80*i+0]==2)/*&&(EDID_Buf[0x80*i+1]==1)*/) | |
{ | |
if ( (EDID_Buf[0x80*i+1]>=1)) { | |
+ | |
if (EDID_Buf[0x80*i+3]&0x20) | |
{ | |
is_yuv = 1; | |
@@ -353,13 +359,16 @@ s32 hdmi_edid_parse(void) | |
return 0; | |
} else { | |
if ( tag == 1) { | |
+ __inf("esk - block tag 1 (audio data)\n"); | |
/* ADB */ | |
edid_parse_audiodata_block(EDID_Buf+0x80*i+bsum+1,len); | |
} else if ( tag == 2) { | |
+ __inf("esk - block tag 2 (video data)\n"); | |
/* VDB */ | |
edid_parse_videodata_block(EDID_Buf+0x80*i+bsum+1,len); | |
} else if ( tag == 3) { | |
/* vendor specific */ | |
+ __inf("esk - block tag 3 (vendor data)\n"); | |
edid_parse_vsdb(EDID_Buf+0x80*i+bsum+1,len); | |
} | |
} | |
@@ -369,7 +378,7 @@ s32 hdmi_edid_parse(void) | |
} else { | |
__inf("no data in reserved block%d\n",i); | |
} | |
- | |
+ __inf("esk - entering 18 byte timing block\n"); | |
/* deal with 18-byte timing block */ | |
if (offset >= 4) { | |
while (offset < (0x80-18)) { | |
diff --git a/linux-3.10/include/video/sunxi_display2.h b/linux-3.10/include/video/sunxi_display2.h | |
index 207f6f216..92ea53d7d 100755 | |
--- a/linux-3.10/include/video/sunxi_display2.h | |
+++ b/linux-3.10/include/video/sunxi_display2.h | |
@@ -154,6 +154,8 @@ enum disp_tv_mode | |
DISP_TV_MOD_3840_2160P_30HZ = 0x1c, | |
DISP_TV_MOD_3840_2160P_25HZ = 0x1d, | |
DISP_TV_MOD_3840_2160P_24HZ = 0x1e, | |
+ DISP_TV_MOD_1920P_60HZ = 0x1f, | |
+ DISP_TV_MOD_2560P_60HZ = 0x20, | |
/* vga */ | |
DISP_VGA_MOD_640_480P_60 = 0x50, | |
DISP_VGA_MOD_800_600P_60 = 0x51, | |
diff --git a/tools/pack/chips/sun50iw2p1/configs/cheetah-p1/board/sys_config_nanopi-k1-plus.fex b/tools/pack/chips/sun50iw2p1/configs/cheetah-p1/board/sys_config_nanopi-k1-plus.fex | |
index a263e1e16..f7e7c5d2e 100755 | |
--- a/tools/pack/chips/sun50iw2p1/configs/cheetah-p1/board/sys_config_nanopi-k1-plus.fex | |
+++ b/tools/pack/chips/sun50iw2p1/configs/cheetah-p1/board/sys_config_nanopi-k1-plus.fex | |
@@ -437,23 +437,24 @@ nand0_p3 = 0x55aaaa55 | |
;disp_mode (0:screen0<screen0,fb0>) | |
;screenx_output_type (0:none; 1:lcd; 3:hdmi;) | |
;screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50) | |
-; (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60) | |
+; (5:720p60 6:1080i50 7:1080i60 8:1080p50 9:1080p60 10:1080p24) | |
+; (11:1080p25 12:1080p30 13:1080p24_3d 14:720p50_3d 15:720p60_3d 16:4k30 17:4k25 18:1920p) | |
;fbx format (0:ARGB 1:ABGR 2:RGBA 3:BGRA 5:RGB565 8:RGB888 12:ARGB4444 16:ARGB1555 18:RGBA5551) | |
;fbx_width,fbx_height (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0) | |
;disp_para_zone (0: disp parameter store in the part Reserve1), 1: disp paremeter store in file parameter.fex) | |
;---------------------------------------------------------------------------------- | |
-[disp] | |
+[disp_init] | |
disp_init_enable = 1 | |
disp_mode = 0 | |
screen0_output_type = 3 | |
-screen0_output_mode = 4 | |
+screen0_output_mode = 18 | |
screen1_output_type = 2 | |
screen1_output_mode = 11 | |
dev0_output_type = 4 | |
-dev0_output_mode = 4 | |
+dev0_output_mode = 18 | |
dev0_screen_id = 0 | |
dev0_do_hpd = 1 | |
@@ -464,15 +465,15 @@ dev1_do_hpd = 1 | |
dev2_output_type = 0 | |
def_output_dev = 0 | |
-hdmi_mode_check = 1 | |
+hdmi_mode_check = 0 | |
fb0_format = 0 | |
-fb0_width = 1280 | |
-fb0_height = 720 | |
+fb0_width = 0 | |
+fb0_height = 0 | |
fb1_format = 0 | |
-fb1_width = 0 | |
-fb1_height = 0 | |
+fb1_width = 690 | |
+fb1_height = 690 | |
disp_para_zone = 1 | |
@@ -621,9 +622,9 @@ pwm_positive = port:PL10<7><0><default><default> | |
;auto_hpd = 1 | |
;output_disp = 0 | |
;output_type = 3 | |
-;output_mode = 4 | |
+;output_mode = 18 | |
;hdmi_channel = 0 | |
-;hdmi_mode = 4 | |
+;hdmi_mode = 18 | |
;cvbs_channel = 1 | |
;cvbs_mode = 11 | |
;hdmi_mode_check = 1 | |
diff --git a/tools/pack/chips/sun50iw2p1/configs/cheetah-p1/sys_config.fex b/tools/pack/chips/sun50iw2p1/configs/cheetah-p1/sys_config.fex | |
index 9e0379709..f7e7c5d2e 100755 | |
--- a/tools/pack/chips/sun50iw2p1/configs/cheetah-p1/sys_config.fex | |
+++ b/tools/pack/chips/sun50iw2p1/configs/cheetah-p1/sys_config.fex | |
@@ -47,8 +47,8 @@ ir_addr_code1 = 0xbc00 | |
;---------------------------------------------------------------------------------- | |
[card_boot] | |
logical_start = 40960 | |
-sprite_gpio0 = port:PL10<1><default><default><1> | |
-next_work = 3 | |
+sprite_gpio0 = port:PA10<1><default><default><1> | |
+next_work = 1 | |
;---------------------------------------------------------------------------------- | |
; used: 模块使能端 1:开启模块 0:关闭模块 | |
@@ -62,8 +62,8 @@ recovery_key = port:PL04<0><default><default><default> | |
[boot_init_gpio] | |
boot_init_gpio_used = 1 | |
-gpio0 = port:PL10<1><default><default><0> | |
-gpio1 = port:PA15<1><default><default><1> | |
+gpio0 = port:PL10<1><default><default><1> | |
+gpio1 = port:PA10<1><default><default><1> | |
;--------------------------------------------------------------------------------------------------------- | |
@@ -437,23 +437,24 @@ nand0_p3 = 0x55aaaa55 | |
;disp_mode (0:screen0<screen0,fb0>) | |
;screenx_output_type (0:none; 1:lcd; 3:hdmi;) | |
;screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50) | |
-; (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60) | |
+; (5:720p60 6:1080i50 7:1080i60 8:1080p50 9:1080p60 10:1080p24) | |
+; (11:1080p25 12:1080p30 13:1080p24_3d 14:720p50_3d 15:720p60_3d 16:4k30 17:4k25 18:1920p) | |
;fbx format (0:ARGB 1:ABGR 2:RGBA 3:BGRA 5:RGB565 8:RGB888 12:ARGB4444 16:ARGB1555 18:RGBA5551) | |
;fbx_width,fbx_height (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0) | |
;disp_para_zone (0: disp parameter store in the part Reserve1), 1: disp paremeter store in file parameter.fex) | |
;---------------------------------------------------------------------------------- | |
-[disp] | |
+[disp_init] | |
disp_init_enable = 1 | |
disp_mode = 0 | |
screen0_output_type = 3 | |
-screen0_output_mode = 4 | |
+screen0_output_mode = 18 | |
screen1_output_type = 2 | |
screen1_output_mode = 11 | |
dev0_output_type = 4 | |
-dev0_output_mode = 4 | |
+dev0_output_mode = 18 | |
dev0_screen_id = 0 | |
dev0_do_hpd = 1 | |
@@ -464,15 +465,15 @@ dev1_do_hpd = 1 | |
dev2_output_type = 0 | |
def_output_dev = 0 | |
-hdmi_mode_check = 1 | |
+hdmi_mode_check = 0 | |
fb0_format = 0 | |
-fb0_width = 1280 | |
-fb0_height = 720 | |
+fb0_width = 0 | |
+fb0_height = 0 | |
fb1_format = 0 | |
-fb1_width = 0 | |
-fb1_height = 0 | |
+fb1_width = 690 | |
+fb1_height = 690 | |
disp_para_zone = 1 | |
@@ -621,9 +622,9 @@ pwm_positive = port:PL10<7><0><default><default> | |
;auto_hpd = 1 | |
;output_disp = 0 | |
;output_type = 3 | |
-;output_mode = 4 | |
+;output_mode = 18 | |
;hdmi_channel = 0 | |
-;hdmi_mode = 4 | |
+;hdmi_mode = 18 | |
;cvbs_channel = 1 | |
;cvbs_mode = 11 | |
;hdmi_mode_check = 1 | |
@@ -884,18 +885,8 @@ smc_sda = | |
;---------------------------------------------------------------------------------- | |
[gpio_para] | |
compatible = "allwinner,sunxi-init-gpio" | |
-gpio_used = 1 | |
-gpio_num = 3 | |
-gpio_pin_1 = port:PL10<1><default><default><0> | |
-gpio_pin_2 = port:PA15<1><default><default><1> | |
-gpio_pin_3 = port:PA13<1><default><default><1> | |
-normal_led = "gpio_pin_1" | |
-standby_led = "gpio_pin_2" | |
-network_led = "gpio_pin_3" | |
-easy_light_used = 1 | |
-normal_led_light = 0 | |
-standby_led_light = 0 | |
-network_led_light = 0 | |
+gpio_used = 0 | |
+gpio_num = 0 | |
;-------------------------------- | |
;[usbc0]: usbc0 configuration. | |
@@ -1471,7 +1462,7 @@ pmukey_used = 0 | |
;--------------------------------------------------------------------------------- | |
[box_standby_led] | |
gpio0 = port:PL10<1><default><default><1> | |
-gpio1 = port:PA15<1><default><default><0> | |
+gpio1 = port:PA10<1><default><default><1> | |
;-------------------------------------------------------------------------------- | |
;gpio power key | |
diff --git a/tools/pack/chips/sun50iw2p1/configs/default/env.cfg b/tools/pack/chips/sun50iw2p1/configs/default/env.cfg | |
index 3a2d334cd..b1ea80962 100755 | |
--- a/tools/pack/chips/sun50iw2p1/configs/default/env.cfg | |
+++ b/tools/pack/chips/sun50iw2p1/configs/default/env.cfg | |
@@ -6,7 +6,7 @@ console=ttyS0,115200 | |
nand_root=/dev/system | |
mmc_root=/dev/mmcblk0p7 | |
init=/init | |
-loglevel=4 | |
+loglevel=8 | |
selinux=0 | |
cma=400M | |
mac= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment