Converting XFree86 timing values into frame buffer device timings

The Linux/m68k Frame Buffer Device : Converting XFree86 timing values into frame buffer device timings
Previous: Video Mode Timings
Next: References

## 7. Converting XFree86 timing values into frame buffer device timings

An XFree86 mode line consists of the following fields:

> `

>         "800x600"     50      800  856  976 1040    600  637  643  666
>         < name >     DCF       HR  SH1  SH2  HFL     VR  SV1  SV2  VFL

> `

The frame buffer device uses the following fields:

pixclock

  pixel clock in ps (pico seconds)

left_margin

  time from sync to picture

right_margin

  time from picture to sync

upper_margin

  time from sync to picture

lower_margin

  time from picture to sync

hsync_len

  length of horizontal sync

vsync_len

  length of vertical sync

Pixelclock

  - xfree: in MHz
  - fb: In Picoseconds (ps)
  - pixclock = 1000000 / DCF
Horizontal timings

  - left_margin = HFL - SH2
  - right_margin = SH1 - HR
  - hsync_len = SH2 - SH1
Vertical timings

  - upper_margin = VFL - SV2
  - lower_margin = SV1 - VR
  - vsync_len = SV2 - SV1

Good examples for VESA timings can be found in the XFree86 source tree, under `xc/programs/Xserver/hw/xfree86/doc/modeDB.txt`.

The Linux/m68k Frame Buffer Device : Converting XFree86 timing values into frame buffer device timings
Previous: Video Mode Timings
Next: References