| Edited by justiceiro at 2016-6-27 06:12 
 I'm still working on it. The problem with chaging the script bin is that he only support standard formats. So, i needed to find a way to code a new standart and index it, so using the said code could work. I used the code that i put in the file " include/video/sunxi_display2.h", and since i used the codes 0x1f and 0x20, i used the codes 31 and 32 in the bin file. Both failed. they cimply give me no output in the video. However, using the code taht was alreadly there worked when i change it back. The is any way to find out what errors are happening or debug the code? Even a simply log would be of help.
 
 Besides, it seems that there is a diference between the version of sunxi used in this build and the one in the official sunxi repository, what makes development even harder(file names as different and in diferrent locations).
 
 Edit: I included the pacth file that i generated, Did i missed anything?
 ]
 
 Copy code---
 .../video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c   | 38 ++++++++++++----------
 drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c      |  2 ++
 drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c      |  6 ++++
 drivers/video/sunxi/disp2/hdmi/drv_hdmi.c          |  2 ++
 drivers/video/sunxi/disp2/hdmi/hdmi_hal.h          |  2 ++
 include/video/sunxi_display2.h                     |  4 ++-
 6 files changed, 35 insertions(+), 19 deletions(-)
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 cd57651..270fb12 100755
--- a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c
+++ b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c
@@ -22,24 +22,26 @@ struct pcm_sf
 
 static struct para_tab ptbl[] =
 {
-        {{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        }},
+        {{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        }},
+        {{35                , 4        , 0,  96,                5,          3,         3,                1,         1,                0,                0,        80,                160,                64,                 144,        0,                27,                0,                1        }},
+        {{36                , 4        , 0,  96,                5,          3,         3,                1,         3,                0,                0,        86,                170,                70,                 143,        0,                30,                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        }},
 };
 
 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 e95a9f6..a48f14c 100755
--- a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c
+++ b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c
@@ -32,6 +32,8 @@ 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},
+        {HDMI768P_60,        0,84720000,  0,  1360,  768,   1776,  352,   64, 144,  795,  26, 1,  3,  0,  1, 0,  0,  0},
+        {HDMI768PWXGA_60,        0,85500000,  0,  1366,  768,   1792,  356,   70, 143,  798,  27, 3,  3,  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},
         {HDMI1080P_50,       0,148500000, 0,  1920,  1080,  2640,  148,  528,  44,  1125,  36,  4,  5,  1,   1,   0,   0,   0},
diff --git a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c
index 71ae0d3..e5b7fac 100755
--- a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c
+++ b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c
@@ -166,6 +166,12 @@ static __s32 Parse_DTD_Block(__u8 *pbuf)
                 if ((sizex== 1280) && (sizey == 720)) {
                         Device_Support_VIC[HDMI720P_60] = 1;
                 }
+                if ((sizex== 1360) && (sizey == 768)) {
+                        Device_Support_VIC[HDMI768P_60] = 1;
+                }
+                if ((sizex== 1366) && (sizey == 768)) {
+                        Device_Support_VIC[HDMI768PWXGA_60] = 1;
+                }
                 if ((sizex== 1920) && (sizey == 540)) {
                         Device_Support_VIC[HDMI1080I_60] = 1;
                 }
diff --git a/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c b/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c
index bfd1a3a..67a390d 100755
--- a/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c
+++ b/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c
@@ -272,6 +272,8 @@ static struct disp_hdmi_mode hdmi_mode_tbl[] = {
         {DISP_TV_MOD_576P,                HDMI576P,          },
         {DISP_TV_MOD_720P_50HZ,           HDMI720P_50,       },
         {DISP_TV_MOD_720P_60HZ,           HDMI720P_60,       },
+        {DISP_TV_MOD_768P_60HZ,           HDMI768P_60,       },
+        {DISP_TV_MOD_768PWXGA_60HZ,           HDMI768PWXGA_60,       },
         {DISP_TV_MOD_1080I_50HZ,          HDMI1080I_50,      },
         {DISP_TV_MOD_1080I_60HZ,          HDMI1080I_60,      },
         {DISP_TV_MOD_1080P_24HZ,          HDMI1080P_24,      },
diff --git a/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h b/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h
index e0ef22c..33c2095 100755
--- a/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h
+++ b/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h
@@ -16,6 +16,8 @@
 #define HDMI1080P_24                 32
 #define HDMI1080P_25                 33
 #define HDMI1080P_30                 34
+#define HDMI768P_60                 35
+#define HDMI768PWXGA_60                 36
 #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 4d1b808..64c2838 100755
--- a/include/video/sunxi_display2.h
+++ b/include/video/sunxi_display2.h
@@ -130,7 +130,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_768P_60HZ     = 0x1f,
+        DISP_TV_MOD_768PWXGA_60HZ     = 0x20,
+        DISP_TV_MODE_NUM                = 0x21,
 }disp_tv_mode;
 
 
-- 
2.7.4
 |