Adding Non-Standard HDMI Resolutions to Intrinsyc’s Open-Q™ 820 Linux BSP
In September 2018, Intrinsyc released a new Linux BSP software release for its Open-Q™ 820 development kit based on Linux kernel version 4.14.53. Among the list of supported software features is HDMI output, which can support standard HDMI display panels as well as non-standard HDMI display panels. This article will describe how to connect and configure various HDMI panels for use with Intrinsyc’s Open-Q™ 820 Linux BSP.
HDMI (High Definition Multimedia Interface) is a Standard used to carry high quality audio data and high-definition consumer electronics video formats.
The Open-Q™ 820 development kit from Intrinsyc Technologies supports up to revision HDMI 2.0, and uses the EDID as a Dedicated Data Channel for communication of supported multimedia formats.
Extended Display Identification Data (EDID) was defined by the Video Electronics Standard Association (VESA) to enable plug and play capabilities of displays (sinks). This data, which is stored in the sink, describes video formats that the display is capable of receiving and rendering. The information is supplied to the source, over the interface, upon the request of the source. The source then chooses its output format, taking into account the format of the original video stream and the formats supported by the sink.
EDID Data is comprised of a block of 128 bytes of data describing resolution, refresh rate, manufacture id, color bit depth, video interface type, Horizontal/Vertical screen size and other capabilities of the sink display. This can be extended by additional extension blocks.
For instance, below is the EDID data of DELL U2415 Full HD Monitor which is connected to Open-Q™ 820 HDMI source.
EDID (in hex): 00 ff ff ff ff ff ff 00 10 ac ba a0 53 43 31 32 32 1b 01 03 80 34 20 78 ea 04 95 a9 55 4d 9d 26 10 50 54 a5 4b 00 71 4f 81 80 a9 40 d1 c0 d1 00 01 01 01 01 01 01 28 3c 80 a0 70 b0 23 40 30 20 36 00 06 44 21 00 00 1e 00 00 00 ff 00 39 54 33 43 4d 37 43 42 32 31 43 53 0a 00 00 00 fc 00 44 45 4c 4c 20 55 32 34 31 35 0a 20 20 00 00 00 fd 00 31 3d 1e 53 11 00 0a 20 20 20 20 20 20 01 8f
02 03 22 f1 4f 90 05 04 03 02 07 16 01 14 1f 12 13 20 21 22 23 09 07 07 65 03 0c 00 10 00 83 01 00 00 02 3a 80 18 71 38 2d 40 58 2c 45 00 06 44 21 00 00 1e 01 1d 80 18 71 1c 16 20 58 2c 25 00 06 44 21 00 00 9e 01 1d 00 72 51 d0 1e 20 6e 28 55 00 06 44 21 00 00 1e 8c 0a d0 8a 20 e0 2d 10 10 3e 96 00 06 44 21 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 |
More detailed information on EDID data is available at the following link:
https://en.wikipedia.org/wiki/Extended_Display_Identification_Data
Byte 8-9 – Manufacturer ID - 0x10ac - DEL
Bit 15 - Reserved
Bits 14-10 - First Letter Manufacture ID
Bits 9-5 - Second Letter Manufacture ID
Bits 4-0 - Third letter Manufacture ID
Byte 54-71 - Descriptor block 1 - Detailed Timing descriptor - Each block size is 17 Bytes
28 3c 80 a0 70 b0 23 40 30 20 36 00 06 44 21 00 00 1e
Byte 0:1 - Pixel clock in 10 kHz Units - 0x3c28 = 15400 * 10Khz = 154MHz
Byte 2 & Byte 4(upper nibble) - Horizontal Active pixel - 0x780 = 1920
Byte 3 & Byte 4(lower nibble) - Horizontal blanking pixel - 0x0a0 = 160
Byte 5 & Byte 7(upper nibble) - Vertical Actice pixel - 0x4b0 = 1200
Byte 6 & Byte 7(lower nibble) - Vertical blanking pixel - 0x023 = 35
Byte 8 & Byte 11(Bits 7-6) - Horizontal front porch (sync offset) from blanking start - 0x30 - 48
Byte 9 & Byte 11(Bits 5-4) - Horizontal sync pulse width - 0x20 - 32
Byte 10(upper nibble) & Byte 11(Bits 3-2) - Vertical front porch(sync offset) - 0x3 - 3
Byte 10(lower nibble) & Byte 11(Bits 1-0) - Vertical sync pulse - 0x6 - 6
Byte 17 - features bitmap - 0x1e - Hsync and Vsync are positive
In Linux, “xrandr” is a command line utility for the RandR extension (Resize, Rotate and Reflect extension). It can be used to get and set the size, orientation or reflection of the outputs for a screen.
Intrinsyc Open-Q 820 Linux BSP OS: Debian sid/Buster(Linux)
Kernel: 4.14.53
linaro@OpenQ820:~$ xrandr Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 65535 x 65535 HDMI-1 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm 1920x1200 59.95*+ 1920x1080 60.00 50.00 59.94 30.00 25.00 24.00 29.97 23.98 1600x1200 60.00 1280x1024 75.02 60.02 1152x864 75.00 1280x720 60.00 50.00 59.94 1024x768 75.03 60.00 800x600 75.00 60.32 720x576 50.00 720x480 60.00 59.94 640x480 75.00 60.00 59.94 720x400 70.08 |
To get EDID information in human readable format, the “read-edid” package needs to be installed as follows:
linaro@OpenQ820:~$ sudo apt-get install read-edid
linaro@OpenQ820:~$ sudo get-edid | parse-edid Section "Monitor" Identifier "DELL U2415" ModelName "DELL U2415" VendorName "DEL" # Monitor Manufactured week 50 of 2017 # EDID version 1.3 # Digital Display DisplaySize 520 320 Gamma 2.20 Option "DPMS" "true" Horizsync 30-83 VertRefresh 49-61 # Maximum pixel clock is 170MHz #Not giving standard mode: 1152x864, 75Hz #Not giving standard mode: 1280x1024, 60Hz #Not giving standard mode: 1600x1200, 60Hz #Not giving standard mode: 1920x1080, 60Hz #Not giving standard mode: 1920x1200, 60Hz
#Extension block found. Parsing... Modeline "Mode 16" +hsync +vsync Modeline "Mode 0" +hsync +vsync Modeline "Mode 1" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 2" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace Modeline "Mode 3" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync Modeline "Mode 4" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync Modeline "Mode 5" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync Modeline "Mode 6" 27.027 1440 1478 1602 1716 480 484 487 525 -hsync -vsync interlace Modeline "Mode 7" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace Modeline "Mode 8" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync Modeline "Mode 9" 74.250 1920 2448 2492 2640 1080 1082 1089 1125 +hsync +vsync interlace Modeline "Mode 10" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 11" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync Modeline "Mode 12" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync Modeline "Mode 13" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 14" 74.250 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 15" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 17" +hsync +vsync interlace Modeline "Mode 18" +hsync +vsync Modeline "Mode 19" -hsync -vsync Option "PreferredMode" "Mode 16" EndSection |
As shown above, “get-edid” will list out all supported resolution, refresh rate & manufacture/vendor information.
Sometimes, a sink display doesn’t conform to a standard EDID video format, which results in non-functionality of the display.
So to add support for a non-standard HDMI display, we can bypass processing of standard EDID during Linux system boot-time and force the system to use a custom display video timing modeline/Resolution.
For this example, we are going to set 1680x1050@60Hz as our native resolution which will bypass EDID resolution.
The Linux “cvt” command utility calculates VESA CVT (Coordinated Video Timing) modelines.
In Open-Q™ 820 system;
linaro@OpenQ820:~$ cvt 1680 1050 60
# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz Modeline "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
|
The above will generate proper resolution settings with the pixel clock.
At runtime, we can add above resolution and test it.
linaro@OpenQ820:~$ xrandr --newmode 1680x1050_60.00 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -HSync +VSync linaro@OpenQ820:~$ xrandr --addmode HDMI-1 1680x1050_60.00 |
Go to Application Menu -> Preferences -> LXQt Settings -> Monitor Settings their select 1680x1050 resolution.
The above setting will exist while the system/screen is powered ON.
To make a custom video timing modeline persistent, we need to create a new xorg.conf file in /etc/X11/.
The following is a sample modeline based on cvt generated timings:
linaro@OpenQ820:~$ cat /etc/X11/xorg.conf Section "Monitor" Identifier "HDMI-1" Modeline "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -HSync +VSync Option "preferredMode" "1680x1050_60.00" EndSection Section "Device" Identifier "QCOM HDMI" Option "HDMI-1" EndSection Section "Screen" Identifier "Default Screen" Monitor "HDMI-1" Device "QCOM HDMI" SubSection "Display" Modes "1680x1050_60.00" EndSubSection EndSection |
Next, save the file and reboot the system.
After system is up, run xrandr to confirm new modeline display.
linaro@OpenQ820:~$ xrandr Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 65535 x 65535 HDMI-1 connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) 518mm x 324mm 1680x1050_60.00 59.95*+ 1920x1200 59.95 + 1920x1080 60.00 50.00 59.94 30.00 25.00 24.00 29.97 23.98 |
I hope this information has been helpful to explain how to support new custom, non-standard HDMI display panels!
Author:
Ganesh Biradar, Software Engineer
Intrinsyc Technologies
For more information:
https://ubuntuforums.org/showthread.php?t=1947733
http://www.thinkwiki.org/wiki/Xorg_RandR_1.2
https://wiki.archlinux.org/index.php/Xorg#Configuration
https://wiki.ubuntu.com/X/Config
https://wiki.ubuntu.com/X/Config/Resolution#Setting_resolution_changes_in_xorg.conf