My display card:
  atyfb: 3D RAGE IIC (AGP) [0x475a rev 0x3a] 4M EDO, 14.31818 MHz XTAL, 230 MHz PLL, 83 Mhz MCLK
  BUS_CNTL DAC_CNTL MEM_CNTL EXT_MEM_CNTL CRTC_GEN_CNTL DSP_CONFIG DSP_ON_OFF
  73330000 8701200a 90301097 b4000201     02410200      00000000   00000000
   (xtal is some kind of constant,
    pll  is... ?,
    mclk is memory clock.)

My monitor (according to the manual):
  Hsync range: 30 kHz .. 70 kHz
  Vsync range: 50 Hz  .. 120 Hz
  Frequency: 100 MHz (?)

ylen = yres + topmargin + bottommargin + verticalsynclen
xlen = xres + leftmargin + rightmargin + horizontalsynclen

vsyncfreq = refreshrate

hsyncfreq = (refreshrate * ylen)  Hz

dispclock = hsyncfreq * xlen

pixclock = (1E12 / dispclock)  ps (picoseconds)

vslen = 1 / (refreshrate * ylen) * verticalsynclen
hslen = horizontalsynclen / dispclock

Examples:
  xres = 1280  (margins 232 + 64, sync 112)
  yres = 1024  (margins 64 + 38, sync 3)
  refresh = 60 Hz
  hslen = 1 s, freq.
  vslen = 47 s (even 16 s works ok though).
  
xres*yres*refreshrate must not exceed mclk (memory clock)!

          hsyncfreq/refreshrate = ylen; ylen-yres = v+t+b
          63890/60-1024 = v+t+b = 40.8
                v = max(1, 20s * 60Hz * (40.8)) = 1
                
          155500 / 63.890 - 1280 = l+r+h = 1153
                h = 1s * 155.5 MHz = 156


At 640x480, it appears like
(refreshrate/2 - 0.5) * 1E6 is a suitable way to find the pixel clock...

