Author: justiceiro

Support for 1360x768@60Hz resolution/refresh rate

[Copy link]

4

threads

1118

posts

9203

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9203
Published in 2016-6-27 03:39:11 | Show all floors
No, I just tell him what needs to be changed in kernel to support another resolution and it is not easy.

4

threads

23

posts

166

credits

Registered member

Rank: 2

credits
166
 Author| Published in 2016-6-27 06:05:30 | Show all floors
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?
]
  1. ---
  2. .../video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c   | 38 ++++++++++++----------
  3. drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c      |  2 ++
  4. drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c      |  6 ++++
  5. drivers/video/sunxi/disp2/hdmi/drv_hdmi.c          |  2 ++
  6. drivers/video/sunxi/disp2/hdmi/hdmi_hal.h          |  2 ++
  7. include/video/sunxi_display2.h                     |  4 ++-
  8. 6 files changed, 35 insertions(+), 19 deletions(-)

  9. diff --git a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c
  10. index cd57651..270fb12 100755
  11. --- a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c
  12. +++ b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c
  13. @@ -22,24 +22,26 @@ struct pcm_sf

  14. static struct para_tab ptbl[] =
  15. {
  16. -        {{6                        , 1        , 1,  1,                5,         3,         0,                1,         4,                0,                0,        160,        20,                 38,         124,        240,        22,                0,                0        }},
  17. -        {{21                , 11, 1,  1,                5,         3,         1,                1,         2,                0,                0,        160,        32,                 24,         126,        32,                24,                0,                0        }},
  18. -        {{2                        , 11, 0,  0,                2,         6,         1,                0,         9,                0,                0,        208,        138,                16,         62,         224,        45,                0,                0        }},
  19. -        {{17                , 11, 0,  0,                2,         5,         2,                0,         5,                0,                0,        208,        144,                12,         64,         64,                49,                0,                0        }},
  20. -        {{19                , 4        , 0,  96,                5,         5,         2,                2,         5,                1,                0,        0,                188,                184,        40,         208,        30,                1,                1        }},
  21. -        {{4                        , 4        , 0,  96,                5,         5,         2,                1,         5,                0,                0,        0,                114,                110,        40,         208,        30,                1,                1        }},
  22. -        {{20                , 4        , 0,  97,                7,          5,         4,                2,         2,                2,                0,        128,        208,                16,                44,         56,                22,                1,                1        }},
  23. -        {{5                        , 4        , 0,  97,                7,          5,         4,                1,         2,                0,                0,        128,        24,                 88,         44,         56,                22,                1,                1        }},
  24. -        {{31                , 2        , 0,  96,                7,          5,         4,                2,         4,                2,                0,        128,        208,                16,                44,         56,         45,                1,                1        }},
  25. -        {{16                , 2        , 0,  96,                7,          5,         4,                1,         4,                0,                0,        128,        24,                 88,         44,         56,                45,                1,                1        }},
  26. -        {{32                , 4        , 0,  96,                7,          5,         4,                3,         4,                2,                0,        128,        62,                 126,        44,         56,                45,                1,                1        }},
  27. -        {{33                , 4        , 0,  0,                7,          5,         4,                2,         4,                2,                0,        128,        208,                16,                44,         56,         45,                1,                1        }},
  28. -        {{34                , 4        , 0,  0,                7,          5,         4,                1,         4,                0,                0,        128,        24,                 88,         44,         56,                45,                1,                1        }},
  29. -        {{160                ,        2        , 0,  96,                7,          5,         8,                3,         4,                2,                0,        128,        62,                 126,        44,         157,        45,                1,                1        }},
  30. -        {{147                , 2        , 0,  96,                5,         5,         5,                2,         5,                1,                0,        0,                188,                184,        40,         190,        30,                1,                1        }},
  31. -        {{132                , 2        , 0,  96,                5,         5,         5,                1,         5,          0,                0,        0,                114,                110,        40,          160,         30,                1,                1        }},
  32. -        {{257                , 1        , 0,  96,                15,        10,         8,                2,         8,                0,                0,        0,                48,                        176,        88,         112,        90,                1,                1        }},
  33. -        {{258                , 1        , 0,  96,                15,        10,         8,                5,         8,                4,                0,        0,                160,                32,                88,         112,        90,                1,                1        }},
  34. +        {{6                        , 1        , 1,  1,                5,         3,         0,                1,         4,                0,                0,        160,        20,                         38,                 124,        240,        22,                0,                0        }},
  35. +        {{21                , 11, 1,  1,                5,         3,         1,                1,         2,                0,                0,        160,        32,                         24,                 126,        32,                24,                0,                0        }},
  36. +        {{2                        , 11, 0,  0,                2,         6,         1,                0,         9,                0,                0,        208,        138,                16,                 62,                 224,        45,                0,                0        }},
  37. +        {{17                , 11, 0,  0,                2,         5,         2,                0,         5,                0,                0,        208,        144,                12,                 64,                 64,                49,                0,                0        }},
  38. +        {{19                , 4        , 0,  96,                5,         5,         2,                2,         5,                1,                0,        0,                188,                184,        40,                 208,        30,                1,                1        }},
  39. +        {{4                        , 4        , 0,  96,                5,         5,         2,                1,         5,                0,                0,        0,                114,                110,        40,                 208,        30,                1,                1        }},
  40. +        {{20                , 4        , 0,  97,                7,          5,         4,                2,         2,                2,                0,        128,        208,                16,                44,                 56,                22,                1,                1        }},
  41. +        {{5                        , 4        , 0,  97,                7,          5,         4,                1,         2,                0,                0,        128,        24,                         88,                 44,                 56,                22,                1,                1        }},
  42. +        {{31                , 2        , 0,  96,                7,          5,         4,                2,         4,                2,                0,        128,        208,                16,                44,                 56,                 45,                1,                1        }},
  43. +        {{16                , 2        , 0,  96,                7,          5,         4,                1,         4,                0,                0,        128,        24,                         88,                 44,                 56,                45,                1,                1        }},
  44. +        {{32                , 4        , 0,  96,                7,          5,         4,                3,         4,                2,                0,        128,        62,                         126,        44,                 56,                45,                1,                1        }},
  45. +        {{33                , 4        , 0,  0,                7,          5,         4,                2,         4,                2,                0,        128,        208,                16,                44,                 56,                 45,                1,                1        }},
  46. +        {{34                , 4        , 0,  0,                7,          5,         4,                1,         4,                0,                0,        128,        24,                         88,                 44,                 56,                45,                1,                1        }},
  47. +        {{35                , 4        , 0,  96,                5,          3,         3,                1,         1,                0,                0,        80,                160,                64,                 144,        0,                27,                0,                1        }},
  48. +        {{36                , 4        , 0,  96,                5,          3,         3,                1,         3,                0,                0,        86,                170,                70,                 143,        0,                30,                1,                1        }},
  49. +        {{160                , 2        , 0,  96,                7,          5,         8,                3,         4,                2,                0,        128,        62,                         126,        44,                 157,        45,                1,                1        }},
  50. +        {{147                , 2        , 0,  96,                5,         5,         5,                2,         5,                1,                0,        0,                188,                184,        40,                 190,        30,                1,                1        }},
  51. +        {{132                , 2        , 0,  96,                5,         5,         5,                1,         5,                0,                0,        0,                114,                110,        40,          160,         30,                1,                1        }},
  52. +        {{257                , 1        , 0,  96,                15,        10,         8,                2,         8,                0,                0,        0,                48,                        176,        88,                 112,        90,                1,                1        }},
  53. +        {{258                , 1        , 0,  96,                15,        10,         8,                5,         8,                4,                0,        0,                160,                32,                88,                 112,        90,                1,                1        }},
  54. };

  55. static unsigned char ca_table[64]=
  56. diff --git a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c
  57. index e95a9f6..a48f14c 100755
  58. --- a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c
  59. +++ b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_core.c
  60. @@ -32,6 +32,8 @@ disp_video_timings video_timing[] =
  61.         {HDMI576P,           0,27000000,  0,  720,   576,   864,   68,   12,   64,  625,   39,  5,  5,  0,   0,   0,   0,   0},
  62.         {HDMI720P_50,        0,74250000,  0,  1280,  720,   1980,  220,  440,  40,  750,   20,  5,  5,  1,   1,   0,   0,   0},
  63.         {HDMI720P_60,        0,74250000,  0,  1280,  720,   1650,  220,  110,  40,  750,   20,  5,  5,  1,   1,   0,   0,   0},
  64. +        {HDMI768P_60,        0,84720000,  0,  1360,  768,   1776,  352,   64, 144,  795,  26, 1,  3,  0,  1, 0,  0,  0},
  65. +        {HDMI768PWXGA_60,        0,85500000,  0,  1366,  768,   1792,  356,   70, 143,  798,  27, 3,  3,  1,  1, 0,  0,  0},
  66.         {HDMI1080I_50,       0,74250000,  0,  1920,  1080,   2640,  148,  528,  44,  1125,  15,  2,  5,  1,   1,   1,   0,   0},
  67.         {HDMI1080I_60,       0,74250000,  0,  1920,  1080,   2200,  148,  88,   44,  1125,  15,  2,  5,  1,   1,   1,   0,   0},
  68.         {HDMI1080P_50,       0,148500000, 0,  1920,  1080,  2640,  148,  528,  44,  1125,  36,  4,  5,  1,   1,   0,   0,   0},
  69. diff --git a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c
  70. index 71ae0d3..e5b7fac 100755
  71. --- a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c
  72. +++ b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_edid.c
  73. @@ -166,6 +166,12 @@ static __s32 Parse_DTD_Block(__u8 *pbuf)
  74.                 if ((sizex== 1280) && (sizey == 720)) {
  75.                         Device_Support_VIC[HDMI720P_60] = 1;
  76.                 }
  77. +                if ((sizex== 1360) && (sizey == 768)) {
  78. +                        Device_Support_VIC[HDMI768P_60] = 1;
  79. +                }
  80. +                if ((sizex== 1366) && (sizey == 768)) {
  81. +                        Device_Support_VIC[HDMI768PWXGA_60] = 1;
  82. +                }
  83.                 if ((sizex== 1920) && (sizey == 540)) {
  84.                         Device_Support_VIC[HDMI1080I_60] = 1;
  85.                 }
  86. diff --git a/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c b/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c
  87. index bfd1a3a..67a390d 100755
  88. --- a/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c
  89. +++ b/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c
  90. @@ -272,6 +272,8 @@ static struct disp_hdmi_mode hdmi_mode_tbl[] = {
  91.         {DISP_TV_MOD_576P,                HDMI576P,          },
  92.         {DISP_TV_MOD_720P_50HZ,           HDMI720P_50,       },
  93.         {DISP_TV_MOD_720P_60HZ,           HDMI720P_60,       },
  94. +        {DISP_TV_MOD_768P_60HZ,           HDMI768P_60,       },
  95. +        {DISP_TV_MOD_768PWXGA_60HZ,           HDMI768PWXGA_60,       },
  96.         {DISP_TV_MOD_1080I_50HZ,          HDMI1080I_50,      },
  97.         {DISP_TV_MOD_1080I_60HZ,          HDMI1080I_60,      },
  98.         {DISP_TV_MOD_1080P_24HZ,          HDMI1080P_24,      },
  99. diff --git a/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h b/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h
  100. index e0ef22c..33c2095 100755
  101. --- a/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h
  102. +++ b/drivers/video/sunxi/disp2/hdmi/hdmi_hal.h
  103. @@ -16,6 +16,8 @@
  104. #define HDMI1080P_24                 32
  105. #define HDMI1080P_25                 33
  106. #define HDMI1080P_30                 34
  107. +#define HDMI768P_60                 35
  108. +#define HDMI768PWXGA_60                 36
  109. #define HDMI1080P_24_3D_FP  (HDMI1080P_24 +0x80)
  110. #define HDMI720P_50_3D_FP   (HDMI720P_50  +0x80)
  111. #define HDMI720P_60_3D_FP   (HDMI720P_60  +0x80)
  112. diff --git a/include/video/sunxi_display2.h b/include/video/sunxi_display2.h
  113. index 4d1b808..64c2838 100755
  114. --- a/include/video/sunxi_display2.h
  115. +++ b/include/video/sunxi_display2.h
  116. @@ -130,7 +130,9 @@ typedef enum
  117.         DISP_TV_MOD_3840_2160P_30HZ     = 0x1c,
  118.         DISP_TV_MOD_3840_2160P_25HZ     = 0x1d,
  119.         DISP_TV_MOD_3840_2160P_24HZ     = 0x1e,
  120. -        DISP_TV_MODE_NUM                = 0x1f,
  121. +        DISP_TV_MOD_768P_60HZ     = 0x1f,
  122. +        DISP_TV_MOD_768PWXGA_60HZ     = 0x20,
  123. +        DISP_TV_MODE_NUM                = 0x21,
  124. }disp_tv_mode;


  125. --
  126. 2.7.4
Copy code

4

threads

1118

posts

9203

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9203
Published in 2016-6-28 04:14:03 | Show all floors
justiceiro replied at 2016-6-26 23:05
I'm still working on it. The problem with chaging the script bin is that he only support standard fo ...

At first glance, everything seems fine... I strongly suggest that you connect serial console and during boot you can read all the messages kernel produces and for the bonus you get console so you can examine system state. My favorite method for debug such things is to put myriad of printk's in kernel code on interesting places so I know as much as possible about the system state.

4

threads

23

posts

166

credits

Registered member

Rank: 2

credits
166
 Author| Published in 2016-6-30 09:45:51 | Show all floors
jernej replied at 2016-6-28 04:14
At first glance, everything seems fine... I strongly suggest that you connect serial console and d ...

I only have a ultrabook as computer, any way i can see the serial console output usins usb ports?

And how i put those printf around the code?

I also would like to know how i use kernel arguments in this project:
http://linux-sunxi.org/Kernel_arguments

its seems like a easier way to set my desired resolution.

And how i recompile the project? "make clean" and then "make" again?

4

threads

1118

posts

9203

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9203
Published in 2016-6-30 13:54:18 | Show all floors
justiceiro replied at 2016-6-30 02:45
I only have a ultrabook as computer, any way i can see the serial console output usins usb ports?
...

You have thousands of USB to serial adapters on ebay (I'm using FT232RL based adapter). Just be sure that yours is set to 3.3V. Just connect GND->GND, TX->RX and RX->TX. Settings are standard one, 115200 baud, no parity and 1 stop bit.

They are not printf, they are printk, but otherwise they are used exactly the same. How do you use it is up to you. Probably you would like to know if some variable has same value you predicted.

Kernel arguments can be changed by stopping U-Boot to auto run boot.scr and for that you need serial console. Another, easier, option is to change it in projects/H3/bootloader/boot.cfg but for that you have to recompile the U-Boot. Please note that you don't have  disp.screen0_output_mode kernel argument. AFAIK, it was added by community and is not original from Allwinner. Because there is not much interest in Allwinner's H3 kernel apart for documentation purposes, this was not reimplemented here.

If you want to recompile the image, you execute standard command again (ARCH=... PROJECT=... ... make image). Changes should be picked automatically. But in some cases they are not - usually aforementioned boot.cfg and all fex files under projects/H3/sys_config. For that to work, you have to clean specific package first ARCH=... PROJECT=... scripts/clean <package> where <package> is u-boot for boot.cfg or linux for any fex file. After that, you execute standard make image command to rebuild the image.

0

threads

8

posts

1008

credits

Gold member

Rank: 6Rank: 6

credits
1008
Published in 2016-6-30 13:55:07 | Show all floors
I only have a ultrabook as computer, any way i can see the serial console output usins usb ports?

I used "PL2303HX USB to UART TTL".

0

threads

37

posts

256

credits

Intermediate member

Rank: 3Rank: 3

credits
256
Published in 2016-7-14 20:10:16 | Show all floors
hey, this is what i am looking for too!

i'll start another thread, because of more hardware...

0

threads

3

posts

34

credits

Novice

Rank: 1

credits
34
Published in 2016-7-18 13:25:34 | Show all floors
Did someone here ever tried sucsessfull connect orangepi PC to VGA monitor 1366 X 768 @60Hz, did the monitor can be used

4

threads

1118

posts

9203

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9203
Published in 2016-7-18 13:41:14 | Show all floors
tyopi replied at 2016-7-18 06:25
Did someone here ever tried sucsessfull connect orangepi PC to VGA monitor 1366 X 768 @60Hz, did the ...

That resolution is not supported, but justiceiro started to work on.

4

threads

23

posts

166

credits

Registered member

Rank: 2

credits
166
 Author| Published in 2016-7-21 02:48:16 | Show all floors
jernej replied at 2016-7-18 13:41
That resolution is not supported, but justiceiro started to work on.

Actually, it is supported, if the connection is vga, as described in here: http://linux-sunxi.org/Fex_Guide#.5Bdisp_init.5D
in hdmi, the story is all different.

Anyway, I ordered the connector finally , this one.

Got caugt up in some network problems in my house, so this why i waited that long. Anyway, ETA is 2 months, till then, don't expect any progress, sorry. Bye.

BTW, how i will use it? Any guides on that?

You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list