Supported Video Resolutions for Mainline Linux
For support of video resolutions in mainline Linux, the most updated source can be found here: https://github.com/libre-computer-project/libretech-linux/blob/linux-4.14/libretech-cc-master-stable/drivers/gpu/drm/meson/meson_dw_hdmi.c
We handle the following features
- HPD Rise & Fall interrupt
- HDMI Controller Interrupt
- HDMI PHY Init for 480i to 1080p60
- VENC & HDMI Clock setup for 480i to 1080p60
- VENC Mode setup for 480i to 1080p60
What is missing :
- PHY, Clock and Mode setup for 2k && 4k modes
- SDDC Scrambling mode for HDMI 2.0a
- HDCP Setup
- CEC Management
If you find that your video resolution isn't supported, you can try to get the frequency of the resolution and trying to add that frequency to the "switch (vclk_freq)" block of the file above and recompiling the kernel. After confirming it works with your monitor setup, please let us know and we can try to add it for future images.
You can find the frequencies by typing sudo journalctl --no-pager | grep Modeline
. The frequency is the number after the resolution.
Example:
/usr/lib/gdm3/gdm-x-session[2920]: (II) modeset(0): Modeline "3840x2160"x0.0 297.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync (67.5 kHz eP)
Frequency is indicated by 297.00 which is 297000. However per the above, the PHY, Clock, and Mode setup for 2K+ resolutions are not yet supported by the rest of the code.
Comments
Below are some sample modelines and some can be supported by adding the frequencies to the list. If you have a monitor that is an odd resolution, please send us the modelines for your display.
Modeline "3840x2160"x0.0 297.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync (67.5 kHz eP)
Modeline "2560x1440"x0.0 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync (88.8 kHz e)
Modeline "640x480"x0.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e)
Modeline "640x480"x0.0 31.50 640 664 704 832 480 489 492 520 -hsync -vsync (37.9 kHz e)
Modeline "640x480"x0.0 30.24 640 704 768 864 480 483 486 525 -hsync -vsync (35.0 kHz e)
Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e)
Modeline "720x400"x0.0 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e)
Modeline "1280x1024"x0.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz e)
Modeline "1024x768"x0.0 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.0 kHz e)
Modeline "1024x768"x0.0 75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync (56.5 kHz e)
Modeline "832x624"x0.0 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync (49.7 kHz e)
Modeline "800x600"x0.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e)
Modeline "800x600"x0.0 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz e)
Modeline "1280x800"x0.0 71.00 1280 1328 1360 1440 800 803 809 823 +hsync -vsync (49.3 kHz e)
Modeline "1280x720"x60.0 74.48 1280 1336 1472 1664 720 721 724 746 -hsync +vsync (44.8 kHz e)
Modeline "1440x900"x0.0 88.75 1440 1488 1520 1600 900 903 909 926 +hsync -vsync (55.5 kHz e)
Modeline "1600x900"x60.0 119.00 1600 1696 1864 2128 900 901 904 932 -hsync +vsync (55.9 kHz e)
Modeline "1680x1050"x0.0 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync (64.7 kHz e)
Modeline "720x480"x0.0 27.00 720 736 798 858 480 489 495 525 -hsync -vsync (31.5 kHz e)
Modeline "720x576"x0.0 27.00 720 732 796 864 576 581 586 625 -hsync -vsync (31.2 kHz e)
With the latest Preview Image 3 for Ubuntu 18.04, all DMT resolutions should work.
If your monitor does not get video, try to SSH in and dump the EDID of the monitor. For instructions on how, please see http://forum.loverpi.com/discussion/271/getting-edid-of-your-monitor-on-mainline-linux-for-unsupported-resolutions-or-black-screen
I've found these two modlines for 800x480 but I'm not sure how to implement them to test it
Modeline "480x800" 12.43 480 512 552 584 800 818 822 841
Modeline "800x480" 11.46 800 832 872 904 480 491 493 505
+1
If there was a simple way how to compile the kernel and link it with an OS to an image, the community would help out to move the project forward. The barrier of entry is simply too huge.
Something that might help to get started is a docker image to set up the environment to compile and link. Maybe even write iso images?
https://github.com/moul/docker-kernel-builder
Thanks I'll have a look but I've got very little Linux experience so for me at least I don't know how far I can get...