Chapter 7. Modeline Support

Standard display devices could be lighted by EDID (Extended Display Identification Data) or built-in timing. But regarding to those non-standard display devices which fails to use the timing provided by EDID or the built-in timing, the only way is to use the modeline.

However, you could use the specified timing by modeline to light the display device, even it has the EDID or the built-in timing works on it. Comparing to EDID and the built-in timing, the modeline has higher piority.

Generally, modeline is utilized for CRT/LCD/DVI. HDMI monitor need a precise PLL clock to meet CEA’s requirement, so HDMI need to use built-in timing.

To use modeline, you should do the following steps,

1. Add the modeline in the Section "Monitor". For example,

Modeline "1024x600_60" 50.4 1024 1048 1184 1344 600 603 604 625 -HSync +VSync

The mode description is in four sections, the first three of which are mandatory. The first is the dot (pixel) clock. This is a single number specifying the pixel clock rate for the mode in MHz. The second section is a list of four numbers specifying the horizontal timings. These numbers are the hdisp, hsyncstart, hsyncend, and htotal values. The third section is a listof  four numbers specifying the vertical timings. These numbers are the vdisp, vsyncstart, vsyncend, and vtotal values. The final section is a list of flags specifying other characteristics of the mode. Interlace indicates that the mode is interlaced. DoubleScan indicates a mode where each scanline is doubled. +HSync and -HSync can be used to select the  polarity of the HSync signal. +VSync and -VSync can be used to select the polarity of the VSync signal. Composite can be used to specify composite sync on hardware where this is supported. Additionally, on some hardware, +CSync and -CSync may be used to select the composite sync polarity. 

There are several VESA standards to calculate the timing table, i.e. CVT, GTF, DMT.

The string after Modeline is usually defined after the mode plus the refresh rate. But regarding to LCD panel, there is a special setting besides this format. The string after Modeline is "PanelMode". This function is similar to Option "PanelSize", but it has a detailed timing. It aims to support the special panel timing not listed at the panel mode table. Once you set PanelMode, the driver will use the defined timing to light the LCD panel in a mandatory way. And if you set PanelMode, you would not set PanelSize, since the priority of PanelMode is higher than EDID and PanelSize. For example,

Section "Monitor"
        Identifier      "Configured Monitor"
        Modeline "PanelMode"   49.00  1024 1072 1168 1312  600 603 613 624 -hsync +vsync
EndSection

2. Add Modes in SubSection "Display"

For example, to use the modeline defined above, the SubSection "Display" will be like as follwoing. The string after Modeline and Modes is the same.

Section "Screen"
       ......
       SubSection      "Display"
              Modes       "1024x600_60"
              ...
       EndSubSection
       ......
EndSection 

You're allowed to add more than one Modeline in the Section "Monitor", but only the one after Modes will be used.

In the Duo-view display mode, the modeline setting applies to the primary display device, and the mode settings of the secondary display device follows the primary. The first one appears in Option "ActiveDevie" "string1, string2" is the primary.

In the SAMM display mode, there are two independent Screen sections, so both display devices can use its own modeline.