<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Converting XFree86 timing values into frame buffer device timings</TITLE>
</HEAD>
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">

<A HREF="fbdev.html"><EM>The Linux/m68k Frame Buffer Device</EM></A>
 <b>:</b> <EM>Converting XFree86 timing values into frame buffer device timings</EM><BR>
<b>Previous:</b> <A HREF="fbdev6.html"><EM>Video Mode Timings</EM></A><BR>
<b>Next:</b> <A HREF="fbdev8.html"><EM>References</EM></A>


<HR NOSHADE>
  <H2><A NAME="7"></A>7. Converting XFree86 timing values into frame buffer device timings</H2>
<p>An XFree86 mode line consists of the following fields:</p>
<p>
<blockquote><code>
<pre>
    "800x600"     50      800  856  976 1040    600  637  643  666
    &lt; name &gt;     DCF       HR  SH1  SH2  HFL     VR  SV1  SV2  VFL
    
</pre>
</code></blockquote>
</p>
<p>The frame buffer device uses the following fields:</p>
<p>
<dl>
<dt><b>pixclock</b><dd><p>pixel clock in ps (pico seconds)</p>
<dt><b>left_margin</b><dd><p>time from sync to picture</p>
<dt><b>right_margin</b><dd><p>time from picture to sync</p>
<dt><b>upper_margin</b><dd><p>time from sync to picture</p>
<dt><b>lower_margin</b><dd><p>time from picture to sync</p>
<dt><b>hsync_len</b><dd><p>length of horizontal sync</p>
<dt><b>vsync_len</b><dd><p>length of vertical sync</p>
</dl>
</p>
<p>
<dl>
<dt><b>Pixelclock</b><dd><p>
<ul>
<li>xfree: in MHz</li>
<li>fb: In Picoseconds (ps)</li>
<li>pixclock = 1000000 / DCF</li>
</ul>
</p>

<dt><b>Horizontal timings</b><dd><p>
<ul>
<li>left_margin = HFL - SH2</li>
<li>right_margin = SH1 - HR</li>
<li>hsync_len = SH2 - SH1</li>
</ul>
</p>

<dt><b>Vertical timings</b><dd><p>
<ul>
<li>upper_margin = VFL - SV2</li>
<li>lower_margin = SV1 - VR</li>
<li>vsync_len = SV2 - SV1</li>
</ul>
</p>
</dl>
</p>
<p>Good examples for VESA timings can be found in the XFree86 source tree,
under <code>xc/programs/Xserver/hw/xfree86/doc/modeDB.txt</code>.</p>


 <HR NOSHADE>
<A HREF="fbdev.html"><EM>The Linux/m68k Frame Buffer Device</EM></A>
 <b>:</b> <EM>Converting XFree86 timing values into frame buffer device timings</EM><BR>
<b>Previous:</b> <A HREF="fbdev6.html"><EM>Video Mode Timings</EM></A><BR>
<b>Next:</b> <A HREF="fbdev8.html"><EM>References</EM></A>



</BODY>
</HTML>
