Created
March 25, 2019 21:26
-
-
Save wormyrocks/1fa1b7dbc2440a0d3bd2ef11db277725 to your computer and use it in GitHub Desktop.
lichee_video_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/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..73a4b835a 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 | |
@@ -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/hdmi_core.c b/linux-3.10/drivers/video/sunxi/disp2/hdmi/hdmi_core.c | |
index fde84c969..22485b286 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 | |
@@ -26,11 +26,7 @@ static s32 video_config(u32 vic); | |
struct disp_video_timings video_timing[] = | |
{ | |
- //VIC PCLK AVI_PR X Y HT HBP HFP HST VT VBP VFP VST h_pol v_pol int vac trd | |
- {HDMI1440_480I, 0,13500000, 1, 720, 480, 858, 57, 19, 62, 525, 15, 4, 3, 0, 0, 1, 0, 0}, | |
- {HDMI1440_576I, 0,13500000, 1, 720, 576, 864, 69, 12, 63, 625, 19, 2, 3, 0, 0, 1, 0, 0}, | |
- {HDMI480P, 0,27000000, 0, 720, 480, 858, 60, 16, 62, 525, 30, 9, 6, 0, 0, 0, 0, 0}, | |
- {HDMI576P, 0,27000000, 0, 720, 576, 864, 68, 12, 64, 625, 39, 5, 5, 0, 0, 0, 0, 0}, | |
+ //VIC PCLK AVI_PR X Y HT HBP HFP HST VT VBP VFP VST h_pol v_pol int vac trd | |
{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}, | |
@@ -45,6 +41,8 @@ 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, 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) | |
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..5cd8f7149 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,7 @@ | |
#define HDMI3840_2160P_30 (1+0x100) | |
#define HDMI3840_2160P_25 (2+0x100) | |
#define HDMI3840_2160P_24 (3+0x100) | |
+#define HDMI1920P_60 (4+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..70146bde5 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)) { | |
diff --git a/linux-3.10/include/video/sunxi_display2.h b/linux-3.10/include/video/sunxi_display2.h | |
index 207f6f216..10392cc49 100755 | |
--- a/linux-3.10/include/video/sunxi_display2.h | |
+++ b/linux-3.10/include/video/sunxi_display2.h | |
@@ -154,6 +154,7 @@ 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, | |
/* 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..3fa4778e3 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 | |
@@ -447,7 +447,7 @@ disp_init_enable = 1 | |
disp_mode = 0 | |
screen0_output_type = 3 | |
-screen0_output_mode = 4 | |
+screen0_output_mode = 10 | |
screen1_output_type = 2 | |
screen1_output_mode = 11 | |
@@ -467,8 +467,8 @@ def_output_dev = 0 | |
hdmi_mode_check = 1 | |
fb0_format = 0 | |
-fb0_width = 1280 | |
-fb0_height = 720 | |
+fb0_width = 1080 | |
+fb0_height = 1920 | |
fb1_format = 0 | |
fb1_width = 0 | |
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..3fa4778e3 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> | |
;--------------------------------------------------------------------------------------------------------- | |
@@ -447,7 +447,7 @@ disp_init_enable = 1 | |
disp_mode = 0 | |
screen0_output_type = 3 | |
-screen0_output_mode = 4 | |
+screen0_output_mode = 10 | |
screen1_output_type = 2 | |
screen1_output_mode = 11 | |
@@ -467,8 +467,8 @@ def_output_dev = 0 | |
hdmi_mode_check = 1 | |
fb0_format = 0 | |
-fb0_width = 1280 | |
-fb0_height = 720 | |
+fb0_width = 1080 | |
+fb0_height = 1920 | |
fb1_format = 0 | |
fb1_width = 0 | |
@@ -884,18 +884,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 +1461,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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment