diff --git a/drivers/video/sunxi/disp/de/disp_display.c b/drivers/video/sunxi/disp/de/disp_display.c index b3f1075..9148329 100755 --- a/drivers/video/sunxi/disp/de/disp_display.c +++ b/drivers/video/sunxi/disp/de/disp_display.c @@ -740,6 +740,34 @@ s32 bsp_disp_get_screen_width_from_output_type(u32 screen_id, u32 output_type, u width = 3840; height = 2160; break; + case DISP_TV_MOD_800_480P: + width = 800; + height = 480; + break; + case DISP_TV_MOD_1024_768P: + width = 1024; + height = 768; + break; + case DISP_TV_MOD_1280_1024P: + width = 1280; + height = 1024; + break; + case DISP_TV_MOD_1360_768P: + width = 1360; + height = 768; + break; + case DISP_TV_MOD_1440_900P: + width = 1440; + height = 900; + break; + case DISP_TV_MOD_1680_1050P: + width = 1680; + height = 1050; + break; + case DISP_TV_MOD_2048_1536P: + width = 2048; + height = 1536; + break; default: printk("err:function:%s, line:%d,output_mode=%d\n", __func__, __LINE__, output_mode); } @@ -798,6 +826,34 @@ s32 bsp_disp_get_screen_height_from_output_type(u32 screen_id, u32 output_type, width = 3840; height = 2160; break; + case DISP_TV_MOD_800_480P: + width = 800; + height = 480; + break; + case DISP_TV_MOD_1024_768P: + width = 1024; + height = 768; + break; + case DISP_TV_MOD_1280_1024P: + width = 1280; + height = 1024; + break; + case DISP_TV_MOD_1360_768P: + width = 1360; + height = 768; + break; + case DISP_TV_MOD_1440_900P: + width = 1440; + height = 900; + break; + case DISP_TV_MOD_1680_1050P: + width = 1680; + height = 1050; + break; + case DISP_TV_MOD_2048_1536P: + width = 2048; + height = 1536; + break; default: printk("err:function:%s, line:%d,output_mode=%d\n", __func__, __LINE__, output_mode); } diff --git a/drivers/video/sunxi/disp2/disp/de/disp_display.c b/drivers/video/sunxi/disp2/disp/de/disp_display.c index a390049..1af8af5 100755 --- a/drivers/video/sunxi/disp2/disp/de/disp_display.c +++ b/drivers/video/sunxi/disp2/disp/de/disp_display.c @@ -751,6 +751,34 @@ s32 bsp_disp_get_screen_width_from_output_type(u32 disp, u32 output_type, u32 ou width = 3840; height = 2160; break; + case DISP_TV_MOD_800_480P: + width = 800; + height = 480; + break; + case DISP_TV_MOD_1024_768P: + width = 1024; + height = 768; + break; + case DISP_TV_MOD_1280_1024P: + width = 1280; + height = 1024; + break; + case DISP_TV_MOD_1360_768P: + width = 1360; + height = 768; + break; + case DISP_TV_MOD_1440_900P: + width = 1440; + height = 900; + break; + case DISP_TV_MOD_1680_1050P: + width = 1680; + height = 1050; + break; + case DISP_TV_MOD_2048_1536P: + width = 2048; + height = 1536; + break; } } /* FIXME: add other output device res */ @@ -807,6 +835,34 @@ s32 bsp_disp_get_screen_height_from_output_type(u32 disp, u32 output_type, u32 o width = 3840; height = 2160; break; + case DISP_TV_MOD_800_480P: + width = 800; + height = 480; + break; + case DISP_TV_MOD_1024_768P: + width = 1024; + height = 768; + break; + case DISP_TV_MOD_1280_1024P: + width = 1280; + height = 1024; + break; + case DISP_TV_MOD_1360_768P: + width = 1360; + height = 768; + break; + case DISP_TV_MOD_1440_900P: + width = 1440; + height = 900; + break; + case DISP_TV_MOD_1680_1050P: + width = 1680; + height = 1050; + break; + case DISP_TV_MOD_2048_1536P: + width = 2048; + height = 1536; + break; } } /* FIXME: add other output device res */ diff --git a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c index ddcb2b0..95b9a0f 100755 --- a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c +++ b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c @@ -46,6 +46,32 @@ static struct para_tab ptbl[] = {{257 , 1 , 0, 96, 15, 10, 8, 2, 8, 0, 0, 0, 48, 176, 88, 112, 90, 1, 1 }}, {{258 , 1 , 0, 96, 15, 10, 8, 5, 8, 4, 0, 0, 160, 32, 88, 112, 90, 1, 1 }}, {{35 , 11 , 0, 0, 1, 3, 3, 0, 13, 0, 0, 208, 228, 80, 60, 208, 45, 0, 0 }}, + // vic dclk int mx vst my mhbw vfp mhfp +x hbw hfp hst +y vbw h polarity v polarity + {{6 , 1 , 1, 1, 5, 3, 0, 1, 4, 0, 0, 160, 20, 38, 124, 240, 22, 0, 0 }}, + {{21 , 11 , 1, 1, 5, 3, 1, 1, 2, 0, 0, 160, 32, 24, 126, 32, 24, 0, 0 }}, + {{2 , 11 , 0, 0, 2, 6, 1, 0, 9, 0, 0, 208, 138, 16, 62, 224, 45, 0, 0 }}, + {{17 , 11 , 0, 0, 2, 5, 2, 0, 5, 0, 0, 208, 144, 12, 64, 64, 49, 0, 0 }}, + {{19 , 4 , 0, 96, 5, 5, 2, 2, 5, 1, 0, 0, 188, 184, 40, 208, 30, 1, 1 }}, + {{4 , 4 , 0, 96, 5, 5, 2, 1, 5, 0, 0, 0, 114, 110, 40, 208, 30, 1, 1 }}, + {{20 , 4 , 0, 97, 7, 5, 4, 2, 2, 2, 0, 128, 208, 16, 44, 56, 22, 1, 1 }}, + {{5 , 4 , 0, 97, 7, 5, 4, 1, 2, 0, 0, 128, 24, 88, 44, 56, 22, 1, 1 }}, + {{31 , 2 , 0, 96, 7, 5, 4, 2, 4, 2, 0, 128, 208, 16, 44, 56, 45, 1, 1 }}, + {{16 , 2 , 0, 96, 7, 5, 4, 1, 4, 0, 0, 128, 24, 88, 44, 56, 45, 1, 1 }}, + {{32 , 4 , 0, 96, 7, 5, 4, 3, 4, 2, 0, 128, 62, 126, 44, 56, 45, 1, 1 }}, + {{33 , 4 , 0, 0, 7, 5, 4, 2, 4, 2, 0, 128, 208, 16, 44, 56, 45, 1, 1 }}, + {{34 , 4 , 0, 0, 7, 5, 4, 1, 4, 0, 0, 128, 24, 88, 44, 56, 45, 1, 1 }}, + {{160 , 2 , 0, 96, 7, 5, 8, 3, 4, 2, 0, 128, 62, 126, 44, 157, 45, 1, 1 }}, + {{147 , 2 , 0, 96, 5, 5, 5, 2, 5, 1, 0, 0, 188, 184, 40, 190, 30, 1, 1 }}, + {{132 , 2 , 0, 96, 5, 5, 5, 1, 5, 0, 0, 0, 114, 110, 40, 160, 30, 1, 1 }}, + {{257 , 1 , 0, 96, 15, 10, 8, 2, 8, 0, 0, 0, 48, 176, 88, 112, 90, 1, 1 }}, + {{258 , 1 , 0, 96, 15, 10, 8, 5, 8, 4, 0, 0, 160, 32, 88, 112, 90, 1, 1 }}, + {{35 , 11 , 0, 0, 1, 3, 3, 0, 13, 0, 0, 208, 228, 80, 60, 208, 45, 0, 0 }}, + {{36 , 4 , 0, 96, 4, 6, 3, 1, 3, 0, 0, 0, 64, 24, 136, 0, 32, 1, 1 }}, + {{37 , 4 , 0, 96, 5, 3, 4, 1, 1, 0, 0, 0, 152, 48, 112, 0, 42, 1, 1 }}, + {{38 , 4 , 0, 96, 5, 7, 3, 1, 3, 0, 0, 80, 176, 64, 112, 0, 32, 1, 1 }}, + {{39 , 4 , 0, 96, 5, 9, 3, 1, 18, 0, 1, 160, 216, 32, 152, 132, 37, 1, 1 }}, + {{40 , 2 , 0, 96, 6, 3, 4, 2, 1, 0, 0, 144, 64, 104, 184, 26, 44, 1, 1 }}, + {{41 , 1 , 0, 96, 8, 3, 6, 0, 1, 0, 0, 128, 208, 128, 216, 0, 45, 1, 1 }}, }; static unsigned char ca_table[64]= diff --git a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c index 80580b4..5851d02 100755 --- a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c +++ b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c @@ -45,6 +45,12 @@ disp_video_timings video_timing[] = {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}, {HDMI800_480P, 0,27000000, 0, 800, 480, 1028, 88, 80, 60, 525, 29, 13, 3, 0, 0, 0, 0, 0}, + {HDMI1024_768P, 0,65000000, 0, 1024, 768, 1344, 160, 24, 136, 806, 29, 3, 6, 0, 0, 0, 0, 0}, + {HDMI1280_1024P, 0,108000000, 0, 1280, 1024, 1688, 248, 48, 112, 1066, 38, 1, 3, 1, 1, 0, 0, 0}, + {HDMI1360_768P, 0,85500000, 0, 1360, 768, 1792, 256, 64, 112, 805, 17, 3, 17, 0, 0, 0, 0, 0}, + {HDMI1440_900P, 0,108000000, 0, 1440, 900, 1848, 248, 48, 112, 942, 38, 1, 3, 1, 1, 0, 0, 0}, + {HDMI1680_1050P, 0,147000000, 0, 1680, 1050, 2256, 288, 104, 184, 1087, 33, 1, 3, 1, 1, 0, 0, 0}, + {HDMI2048_1536P, 0,172040000, 0, 2048, 1536, 2736, 344, 128, 216, 1572, 32, 1, 3, 1, 1, 0, 0 ,0}, { HDMI_EDID, }, }; diff --git a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c index 71ae0d3..e7437d8 100755 --- a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c +++ b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c @@ -163,6 +163,27 @@ static __s32 Parse_DTD_Block(__u8 *pbuf) if ((sizex== 720) && (sizey == 480)) { //Device_Support_VIC[HDMI480P] = 1; } + if ((sizex== 800) && (sizey == 480)) { + Device_Support_VIC[HDMI800_480P] = 1; + } + if ((sizex== 1024) && (sizey == 768)) { + Device_Support_VIC[HDMI1024_768P] = 1; + } + if ((sizex== 1280) && (sizey == 1024)) { + Device_Support_VIC[HDMI1280_1024P] = 1; + } + if ((sizex== 1360) && (sizey == 768)) { + Device_Support_VIC[HDMI1360_768P] = 1; + } + if ((sizex== 1440) && (sizey == 900)) { + Device_Support_VIC[HDMI1440_900P] = 1; + } + if ((sizex== 1680) && (sizey == 1050)) { + Device_Support_VIC[HDMI1680_1050P] = 1; + } + if ((sizex== 2048) && (sizey == 1536)) { + Device_Support_VIC[HDMI2048_1536P] = 1; + } if ((sizex== 1280) && (sizey == 720)) { Device_Support_VIC[HDMI720P_60] = 1; } @@ -183,6 +204,27 @@ static __s32 Parse_DTD_Block(__u8 *pbuf) if ((sizex== 720) && (sizey == 576)) { Device_Support_VIC[HDMI576P] = 1; } + if ((sizex== 800) && (sizey == 480)) { + Device_Support_VIC[HDMI800_480P] = 1; + } + if ((sizex== 1024) && (sizey == 768)) { + Device_Support_VIC[HDMI1024_768P] = 1; + } + if ((sizex== 1280) && (sizey == 1024)) { + Device_Support_VIC[HDMI1280_1024P] = 1; + } + if ((sizex== 1360) && (sizey == 768)) { + Device_Support_VIC[HDMI1360_768P] = 1; + } + if ((sizex== 1440) && (sizey == 900)) { + Device_Support_VIC[HDMI1440_900P] = 1; + } + if ((sizex== 1680) && (sizey == 1050)) { + Device_Support_VIC[HDMI1680_1050P] = 1; + } + if ((sizex== 2048) && (sizey == 1536)) { + Device_Support_VIC[HDMI2048_1536P] = 1; + } if ((sizex== 1280) && (sizey == 720)) { Device_Support_VIC[HDMI720P_50] = 1; } diff --git a/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c b/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c index f0d2ae3..b510375 100755 --- a/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c +++ b/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c @@ -285,6 +285,12 @@ static struct disp_hdmi_mode hdmi_mode_tbl[] = { {DISP_TV_MOD_3840_2160P_30HZ, HDMI3840_2160P_30, }, {DISP_TV_MOD_3840_2160P_25HZ, HDMI3840_2160P_25, }, {DISP_TV_MOD_800_480P, HDMI800_480P, }, + {DISP_TV_MOD_1024_768P, HDMI1024_768P, }, + {DISP_TV_MOD_1280_1024P, HDMI1280_1024P, }, + {DISP_TV_MOD_1360_768P, HDMI1360_768P, }, + {DISP_TV_MOD_1440_900P, HDMI1440_900P, }, + {DISP_TV_MOD_1680_1050P, HDMI1680_1050P, }, + {DISP_TV_MOD_2048_1536P, HDMI2048_1536P, }, }; __u32 Hdmi_get_vic(u32 mode) diff --git a/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h b/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h index 9074103..cf4a07f 100755 --- a/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h +++ b/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h @@ -17,6 +17,12 @@ #define HDMI1080P_25 33 #define HDMI1080P_30 34 #define HDMI800_480P 35 +#define HDMI1024_768P 36 +#define HDMI1280_1024P 37 +#define HDMI1360_768P 38 +#define HDMI1440_900P 39 +#define HDMI1680_1050P 40 +#define HDMI2048_1536P 41 #define HDMI1080P_24_3D_FP (HDMI1080P_24 +0x80) #define HDMI720P_50_3D_FP (HDMI720P_50 +0x80) #define HDMI720P_60_3D_FP (HDMI720P_60 +0x80) diff --git a/include/video/sunxi_display2.h b/include/video/sunxi_display2.h index c59aafb..98be01b 100755 --- a/include/video/sunxi_display2.h +++ b/include/video/sunxi_display2.h @@ -131,7 +131,13 @@ typedef enum DISP_TV_MOD_3840_2160P_25HZ = 0x1d, DISP_TV_MOD_3840_2160P_24HZ = 0x1e, DISP_TV_MOD_800_480P = 0x1f, - DISP_TV_MODE_NUM = 0x20, + DISP_TV_MOD_1024_768P = 0x20, + DISP_TV_MOD_1280_1024P = 0x21, + DISP_TV_MOD_1360_768P = 0x22, + DISP_TV_MOD_1440_900P = 0x23, + DISP_TV_MOD_1680_1050P = 0x24, + DISP_TV_MOD_2048_1536P = 0x25, + DISP_TV_MODE_NUM = 0x26, }disp_tv_mode;