If you have XFree86 (X11) installed on your machine, and you can use it successfully,
it is a simple matter to convert the mode-lines in your XF86Config to the
required timings needed by the framebuffer devices.
The framebuffer device requires the following fields
It is necessary to do some simple calculations to translate the XF86 mode-lines into
a set of framebuffer device timings. As an example, we shall examine how to convert a
mode-line taken from my XF86Config file.
First, calculate the required pixclock rate. XFree86 uses megahertz whilst framebuffer
devices uses picoseconds (Why, I don't know). Divide one million by DCF. For example,
1,000,000 / 110.0 = 9090.9091
Now we need to calculate the horizontal timings.
left_margin = HFL - SH2
right_margin = SH1 - HR
hsync_len = SH2 - SH1
In our example, this would be:
left_margin = 1712 - 1512 = 200
right_margin = 1328 - 1280 = 48
hsync_len = 1512 - 1328 = 184
And now we need to calculate the vertical timings.
upper_margin = VFL - SV2
lower_margin = SV1 - VR
vsync_len = SV2 - SV1
For our example, this would be:
upper_margin = 1054 - 1028 = 26
lower_margin = 1025 - 1024 = 1
vsync_len = 1028 - 1025 = 3
Now we can use this information to set up the framebuffer for the desired mode.
For example, for the matroxfb framebuffer, it requires:
Note that in this case the pixclock isn't used. It's only necessary if you don't like the default pixclock
rates. You can supply this as a parameter as well. Setting the pixclock is documented in other parts of this
HOWTO.