X11 on EPIA-M

From coreboot
Revision as of 12:49, 6 February 2006 by Stepan (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction to X-server perfomance with EPIA-M and LinuxBIOS

Version 1.0 summary for LinuxBIOSv2 X-subsystem by Anton Borisov (Dec, 2005)

1) In fact VGA BIOS which used along with Via EPIA motherboards is located inside BIOS (Basic Input/Output System). Instead of capturing it from inside running system you can extract it from BIOS itself. It could be easily done with 'awardeco' utility (http://epia.kaos.ru/download/awardeco-0.1Alpha.tar.gz). It's code ain't optimal and could unpack 2Mbit files at this time.

       # util/flash_and_burn/flash_rom -r via.rom
       $ wget http://epia.kaos.ru/download/awardeco-0.1Alpha.tar.gz
       $ tar xzvf awardeco-0.1Alpha.tar.gz
       $ make rebuild
       $ awardeco via.rom -l
 
 
       -=AwardBIOSDeco, version 0.1 (Linux)=-
 
               AwardBIOS information:
       FileLength      : 40000 (262144 bytes)
       FileName        : via.rom
       Decompression           : 37400
       BootBlock               : 3E000
       First Module            : 0000
       ASUS?                   : NO
       +-----------------------------------------------------------------------------+
       |  #             Name       Description           FileOffset     Ratio   ID   |
       +-----------------------------------------------------------------------------+
 
       HINT: SkipMechanism:    1
         00 (            i0100113.BIN) [    MainBIOS ROM]: 000000h, 58%, 50000000
         01 (            awardext.rom) [ User-defined ;)]: 012B3Fh, 70%, 407F0000
         02 (             ACPITBL.BIN) [     ACPI Patern]: 01A511h, 40%, 40030000
         03 (            AwardBmp.bmp) [     EPA Pattern]: 01B919h, 11%, 40020000
         04 (            _EN_CODE.BIN) [ User-defined ;)]: 01BBC3h, 44%, 40290000
         05 (            awardeyt.rom) [      YGROUP ROM]: 01E1A1h, 66%, 400E0000
         06 (                vpsd.bmp) [     Logo BitMap]: 021380h, 03%, 40000000
         07 (            MVPSD_15.rom) [ User-defined ;)]: 02424Bh, 59%, 40800000
         08 (                 pxe.lom) [ User-defined ;)]: 02D6C5h, 59%, 40860000
       Total Sections  : 9


Module named 'MVPSD_15.rom' is exactly the pure VGA BIOS file. Let's extract Via BIOS

       $ awardeco via.rom -x

Well, video rom size is precisely 64000 bytes. You can pad it with zeroes to 64k boundary or leave as is. Just don't forget to reduce payload size at Config.lb. And read Nick Barker's "EPIA-M-HOWTO".

2) In order to get high resolution screen you have to grab X-drivers from unichrome.sf.net project. Otherwise the largest screen could be like this: 640x480x4 ("vga" videodriver). Unichrome drivers distributed as in binary form as well as source code. Using the latest version is more then just an advice. For instance, "unichrome_X_r20-debian_sarge_xfree86-4.3.0" appeared to work properly but had internal bugs whilst initializing "xv" video-output with MPlayer.

   Essential note! Don't forget to enable "NoAccel" option in "Device" section (shown below).

All other options can be used freely.

       Section "Device"
           Identifier  "MyVideo"
           Driver      "via"
               # unsupported card
           Option      "NoAccel"               "yes"
       #    Option     "DisableVQ"             "yes"
       #    Option     "HWCursor"              "no"
       #    Option     "VideoRAM"              "16384"
       #    Option     "UseBIOS"               "yes"
       #    Option     "IgnoreEDID"            "yes"
       #    Option     "UseEdidFreqs"          "no"
       #    Option     "UseInt10Module"        "no"
           #VideoRam    16384
           # Insert Clocks lines here if appropriate
       EndSection
   I've done some benchmarking with x11perf command to measure X performance.

All tests had been run at resolution 1024x768x16.

       $ x11perf -a -repeat 2 > x11perf.LX2.txt # under LinuxBIOS
       $ x11perf -a -repeat 2 > x11perf.via.txt # under VIA EPIA-M AwardBIOS
       $ x11perfcomp x11perf.LX2.txt x11perf.via.txt
 
   1: x11perf.LX2.txt
   2: x11perf.via.txt
 
        1         2    Operation
   --------  --------  ---------
      633.0     634.0  500x500 rectangle
       64.7      64.9  500x500 stippled rectangle (8x8 stipple)
       93.7      92.5  500x500 opaque stippled rectangle (8x8 stipple)
       78.4      78.3  500x500 tiled rectangle (4x4 tile)
      125.0     123.0  500x500 stippled rectangle (17x15 stipple)
      192.0     192.0  500x500 opaque stippled rectangle (17x15 stipple)
      182.0     183.0  500x500 tiled rectangle (17x15 tile)
      235.0     235.0  500x500 stippled rectangle (161x145 stipple)
      266.0     266.0  500x500 opaque stippled rectangle (161x145 stipple)
      361.0     368.0  500x500 tiled rectangle (161x145 tile)
      348.0     355.0  500x500 tiled rectangle (216x208 tile)
 
   297000.0  297000.0  500-pixel horizontal line segment
    25900.0   26000.0  500-pixel vertical line segment
     4370.0    4360.0  500x50 wide horizontal line segment
     2710.0    2720.0  500x50 wide vertical line segment
 
   727000.0  727000.0  Char in 80-char line (6x13)
   630000.0  631000.0  Char in 70-char line (8x13)
   584000.0  587000.0  Char in 60-char line (9x15)
 
   535000.0  533000.0  Char in 80-char image line (6x13)
   448000.0  446000.0  Char in 70-char image line (8x13)
   393000.0  394000.0  Char in 60-char image line (9x15)
 
      216.0     215.0  Copy 500x500 from pixmap to window
       55.8      55.8  Copy 500x500 from window to pixmap
      199.0     199.0  Copy 500x500 from pixmap to pixmap
      279.0     279.0  Copy 500x500 1-bit deep plane
       72.3      72.8  Copy 500x500 n-bit deep plane
       54.0      54.1  PutImage 500x500 square
        2.0       2.0  PutImage XY 500x500 square
      208.0     209.0  ShmPutImage 500x500 square
        8.9       8.9  ShmPutImage XY 500x500 square
       40.9      40.6  GetImage 500x500 square
        2.6       2.6  GetImage XY 500x500 square
 
   3040000.0  3070000.0  X protocol NoOperation
   481000.0  484000.0  Change graphics context
   119000.0  119000.0  Create and map subwindows (200 kids)
   263000.0  288000.0  Create unmapped window (200 kids)
   148000.0  157000.0  Map window via parent (200 kids)
   518000.0  527000.0  Unmap window via parent (200 kids)
   216000.0  235000.0  Destroy window via parent (200 kids)
   107000.0  109000.0  Hide/expose window via popup (200 kids)
   610000.0  610000.0  Moved unmapped window (200 kids)
    84900.0   85600.0  Move window via parent (200 kids)
   557000.0  559000.0  Resize unmapped window (200 kids)
    11100.0   11100.0  Circulate window (200 kids)
   463000.0  450000.0  Circulate Unmapped window (200 kids)


That's all, folks ;-)