gsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget"/translations/zh_CN/fb/framebuffermodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/zh_TW/fb/framebuffermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/it_IT/fb/framebuffermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ja_JP/fb/framebuffermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ko_KR/fb/framebuffermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/sp_SP/fb/framebuffermodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hThe Frame Buffer Deviceh]hThe Frame Buffer Device}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh fb0 /dev/fb1current -> fb1h]h-/dev/fb0current -> fb0 /dev/fb1current -> fb1}hjIsbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhK'hhhhubh)}(h and so on...h]h and so on...}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hhhhubh)}(hThe frame buffer devices are also `normal` memory devices, this means, you can read and write their contents. You can, for example, make a screen snapshot by::h](h"The frame buffer devices are also }(hjehhhNhNubhtitle_reference)}(h`normal`h]hnormal}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjeubht memory devices, this means, you can read and write their contents. You can, for example, make a screen snapshot by:}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK,hhhhubj*)}(hcp /dev/fb0 myfileh]hcp /dev/fb0 myfile}hjsbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhK/hhhhubh)}(hThere also can be more than one frame buffer at a time, e.g. if you have a graphics card in addition to the built-in hardware. The corresponding frame buffer devices (/dev/fb0 and /dev/fb1 etc.) work independently.h]hThere also can be more than one frame buffer at a time, e.g. if you have a graphics card in addition to the built-in hardware. The corresponding frame buffer devices (/dev/fb0 and /dev/fb1 etc.) work independently.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hhhhubh)}(hX8Application software that uses the frame buffer device (e.g. the X server) will use /dev/fb0 by default (older software uses /dev/fb0current). You can specify an alternative frame buffer device by setting the environment variable $FRAMEBUFFER to the path name of a frame buffer device, e.g. (for sh/bash users)::h]hX7Application software that uses the frame buffer device (e.g. the X server) will use /dev/fb0 by default (older software uses /dev/fb0current). You can specify an alternative frame buffer device by setting the environment variable $FRAMEBUFFER to the path name of a frame buffer device, e.g. (for sh/bash users):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hhhhubj*)}(hexport FRAMEBUFFER=/dev/fb1h]hexport FRAMEBUFFER=/dev/fb1}hjsbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhK;hhhhubh)}(hor (for csh users)::h]hor (for csh users):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hhhhubj*)}(hsetenv FRAMEBUFFER /dev/fb1h]hsetenv FRAMEBUFFER /dev/fb1}hjsbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhK?hhhhubh)}(h9After this the X server will use the second frame buffer.h]h9After this the X server will use the second frame buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhhhhubeh}(h]user-s-view-of-dev-fbah ]h"]1. user's view of /dev/fb*ah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h 2. Programmer's View of /dev/fb*h]h"2. Programmer’s View of /dev/fb*}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKEubh)}(hXNAs you already know, a frame buffer device is a memory device like /dev/mem and it has the same features. You can read it, write it, seek to some location in it and mmap() it (the main usage). The difference is just that the memory that appears in the special file is not the whole memory, but the frame buffer of some video hardware.h]hXNAs you already know, a frame buffer device is a memory device like /dev/mem and it has the same features. You can read it, write it, seek to some location in it and mmap() it (the main usage). The difference is just that the memory that appears in the special file is not the whole memory, but the frame buffer of some video hardware.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjhhubh)}(hX'/dev/fb* also allows several ioctls on it, by which lots of information about the hardware can be queried and set. The color map handling works via ioctls, too. Look into for more information on what ioctls exist and on which data structures they work. Here's just a brief overview:h]hX)/dev/fb* also allows several ioctls on it, by which lots of information about the hardware can be queried and set. The color map handling works via ioctls, too. Look into for more information on what ioctls exist and on which data structures they work. Here’s just a brief overview:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjhhubh block_quote)}(hX*- You can request unchangeable information about the hardware, like name, organization of the screen memory (planes, packed pixels, ...) and address and length of the screen memory. - You can request and change variable information about the hardware, like visible and virtual geometry, depth, color map format, timing, and so on. If you try to change that information, the driver maybe will round up some values to meet the hardware's capabilities (or return EINVAL if that isn't possible). - You can get and set parts of the color map. Communication is done with 16 bits per color part (red, green, blue, transparency) to support all existing hardware. The driver does all the computations needed to apply it to the hardware (round it down to less bits, maybe throw away transparency). h]h bullet_list)}(hhh](h list_item)}(hYou can request unchangeable information about the hardware, like name, organization of the screen memory (planes, packed pixels, ...) and address and length of the screen memory. h]h)}(hYou can request unchangeable information about the hardware, like name, organization of the screen memory (planes, packed pixels, ...) and address and length of the screen memory.h]hYou can request unchangeable information about the hardware, like name, organization of the screen memory (planes, packed pixels, ...) and address and length of the screen memory.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhj+ubah}(h]h ]h"]h$]h&]uh1j)hj&ubj*)}(hX4You can request and change variable information about the hardware, like visible and virtual geometry, depth, color map format, timing, and so on. If you try to change that information, the driver maybe will round up some values to meet the hardware's capabilities (or return EINVAL if that isn't possible). h]h)}(hX3You can request and change variable information about the hardware, like visible and virtual geometry, depth, color map format, timing, and so on. If you try to change that information, the driver maybe will round up some values to meet the hardware's capabilities (or return EINVAL if that isn't possible).h]hX7You can request and change variable information about the hardware, like visible and virtual geometry, depth, color map format, timing, and so on. If you try to change that information, the driver maybe will round up some values to meet the hardware’s capabilities (or return EINVAL if that isn’t possible).}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjCubah}(h]h ]h"]h$]h&]uh1j)hj&ubj*)}(hX&You can get and set parts of the color map. Communication is done with 16 bits per color part (red, green, blue, transparency) to support all existing hardware. The driver does all the computations needed to apply it to the hardware (round it down to less bits, maybe throw away transparency). h]h)}(hX%You can get and set parts of the color map. Communication is done with 16 bits per color part (red, green, blue, transparency) to support all existing hardware. The driver does all the computations needed to apply it to the hardware (round it down to less bits, maybe throw away transparency).h]hX%You can get and set parts of the color map. Communication is done with 16 bits per color part (red, green, blue, transparency) to support all existing hardware. The driver does all the computations needed to apply it to the hardware (round it down to less bits, maybe throw away transparency).}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK\hj[ubah}(h]h ]h"]h$]h&]uh1j)hj&ubeh}(h]h ]h"]h$]h&]bullet-uh1j$hhhKRhj ubah}(h]h ]h"]h$]h&]uh1jhhhKRhjhhubh)}(hXAll this hardware abstraction makes the implementation of application programs easier and more portable. E.g. the X server works completely on /dev/fb* and thus doesn't need to know, for example, how the color registers of the concrete hardware are organized. XF68_FBDev is a general X server for bitmapped, unaccelerated video hardware. The only thing that has to be built into application programs is the screen organization (bitplanes or chunky pixels etc.), because it works on the frame buffer image data directly.h]hX All this hardware abstraction makes the implementation of application programs easier and more portable. E.g. the X server works completely on /dev/fb* and thus doesn’t need to know, for example, how the color registers of the concrete hardware are organized. XF68_FBDev is a general X server for bitmapped, unaccelerated video hardware. The only thing that has to be built into application programs is the screen organization (bitplanes or chunky pixels etc.), because it works on the frame buffer image data directly.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjhhubh)}(hXFFor the future it is planned that frame buffer drivers for graphics cards and the like can be implemented as kernel modules that are loaded at runtime. Such a driver just has to call register_framebuffer() and supply some functions. Writing and distributing such drivers independently from the kernel will save much trouble...h]hXFFor the future it is planned that frame buffer drivers for graphics cards and the like can be implemented as kernel modules that are loaded at runtime. Such a driver just has to call register_framebuffer() and supply some functions. Writing and distributing such drivers independently from the kernel will save much trouble...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjhhubeh}(h]programmer-s-view-of-dev-fbah ]h"] 2. programmer's view of /dev/fb*ah$]h&]uh1hhhhhhhhKEubh)}(hhh](h)}(h&3. Frame Buffer Resolution Maintenanceh]h&3. Frame Buffer Resolution Maintenance}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKrubh)}(hXFrame buffer resolutions are maintained using the utility `fbset`. It can change the video mode properties of a frame buffer device. Its main usage is to change the current video mode, e.g. during boot up in one of your `/etc/rc.*` or `/etc/init.d/*` files.h](h:Frame buffer resolutions are maintained using the utility }(hjhhhNhNubjn)}(h`fbset`h]hfbset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubh. It can change the video mode properties of a frame buffer device. Its main usage is to change the current video mode, e.g. during boot up in one of your }(hjhhhNhNubjn)}(h `/etc/rc.*`h]h /etc/rc.*}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubh or }(hjhhhNhNubjn)}(h`/etc/init.d/*`h]h /etc/init.d/*}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubh files.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKthjhhubh)}(hFbset uses a video mode database stored in a configuration file, so you can easily add your own modes and refer to them with a simple identifier.h]hFbset uses a video mode database stored in a configuration file, so you can easily add your own modes and refer to them with a simple identifier.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjhhubeh}(h]#frame-buffer-resolution-maintenanceah ]h"]&3. frame buffer resolution maintenanceah$]h&]uh1hhhhhhhhKrubh)}(hhh](h)}(h4. The X Serverh]h4. The X Server}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK~ubh)}(hThe X server (XF68_FBDev) is the most notable application program for the frame buffer device. Starting with XFree86 release 3.2, the X server is part of XFree86 and has 2 modes:h]hThe X server (XF68_FBDev) is the most notable application program for the frame buffer device. Starting with XFree86 release 3.2, the X server is part of XFree86 and has 2 modes:}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hX- If the `Display` subsection for the `fbdev` driver in the /etc/XF86Config file contains a:: Modes "default" line, the X server will use the scheme discussed above, i.e. it will start up in the resolution determined by /dev/fb0 (or $FRAMEBUFFER, if set). You still have to specify the color depth (using the Depth keyword) and virtual resolution (using the Virtual keyword) though. This is the default for the configuration file supplied with XFree86. It's the most simple configuration, but it has some limitations. - Therefore it's also possible to specify resolutions in the /etc/XF86Config file. This allows for on-the-fly resolution switching while retaining the same virtual desktop size. The frame buffer device that's used is still /dev/fb0current (or $FRAMEBUFFER), but the available resolutions are defined by /etc/XF86Config now. The disadvantage is that you have to specify the timings in a different format (but `fbset -x` may help). h]j%)}(hhh](j*)}(hX If the `Display` subsection for the `fbdev` driver in the /etc/XF86Config file contains a:: Modes "default" line, the X server will use the scheme discussed above, i.e. it will start up in the resolution determined by /dev/fb0 (or $FRAMEBUFFER, if set). You still have to specify the color depth (using the Depth keyword) and virtual resolution (using the Virtual keyword) though. This is the default for the configuration file supplied with XFree86. It's the most simple configuration, but it has some limitations. h](h)}(h[If the `Display` subsection for the `fbdev` driver in the /etc/XF86Config file contains a::h](hIf the }(hj:hhhNhNubjn)}(h `Display`h]hDisplay}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj:ubh subsection for the }(hj:hhhNhNubjn)}(h`fbdev`h]hfbdev}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj:ubh/ driver in the /etc/XF86Config file contains a:}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj6ubj*)}(hModes "default"h]hModes "default"}hjlsbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhKhj6ubh)}(hXline, the X server will use the scheme discussed above, i.e. it will start up in the resolution determined by /dev/fb0 (or $FRAMEBUFFER, if set). You still have to specify the color depth (using the Depth keyword) and virtual resolution (using the Virtual keyword) though. This is the default for the configuration file supplied with XFree86. It's the most simple configuration, but it has some limitations.h]hXline, the X server will use the scheme discussed above, i.e. it will start up in the resolution determined by /dev/fb0 (or $FRAMEBUFFER, if set). You still have to specify the color depth (using the Depth keyword) and virtual resolution (using the Virtual keyword) though. This is the default for the configuration file supplied with XFree86. It’s the most simple configuration, but it has some limitations.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6ubeh}(h]h ]h"]h$]h&]uh1j)hj3ubj*)}(hXTherefore it's also possible to specify resolutions in the /etc/XF86Config file. This allows for on-the-fly resolution switching while retaining the same virtual desktop size. The frame buffer device that's used is still /dev/fb0current (or $FRAMEBUFFER), but the available resolutions are defined by /etc/XF86Config now. The disadvantage is that you have to specify the timings in a different format (but `fbset -x` may help). h]h)}(hXTherefore it's also possible to specify resolutions in the /etc/XF86Config file. This allows for on-the-fly resolution switching while retaining the same virtual desktop size. The frame buffer device that's used is still /dev/fb0current (or $FRAMEBUFFER), but the available resolutions are defined by /etc/XF86Config now. The disadvantage is that you have to specify the timings in a different format (but `fbset -x` may help).h](hXTherefore it’s also possible to specify resolutions in the /etc/XF86Config file. This allows for on-the-fly resolution switching while retaining the same virtual desktop size. The frame buffer device that’s used is still /dev/fb0current (or $FRAMEBUFFER), but the available resolutions are defined by /etc/XF86Config now. The disadvantage is that you have to specify the timings in a different format (but }(hjhhhNhNubjn)}(h `fbset -x`h]hfbset -x}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubh may help).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j)hj3ubeh}(h]h ]h"]h$]h&]jyjzuh1j$hhhKhj/ubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubh)}(hTo tune a video mode, you can use fbset or xvidtune. Note that xvidtune doesn't work 100% with XF68_FBDev: the reported clock values are always incorrect.h]hTo tune a video mode, you can use fbset or xvidtune. Note that xvidtune doesn’t work 100% with XF68_FBDev: the reported clock values are always incorrect.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] the-x-serverah ]h"]4. the x serverah$]h&]uh1hhhhhhhhK~ubh)}(hhh](h)}(h5. Video Mode Timingsh]h5. Video Mode Timings}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hX.A monitor draws an image on the screen by using an electron beam (3 electron beams for color models, 1 electron beam for monochrome monitors). The front of the screen is covered by a pattern of colored phosphors (pixels). If a phosphor is hit by an electron, it emits a photon and thus becomes visible.h]hX.A monitor draws an image on the screen by using an electron beam (3 electron beams for color models, 1 electron beam for monochrome monitors). The front of the screen is covered by a pattern of colored phosphors (pixels). If a phosphor is hit by an electron, it emits a photon and thus becomes visible.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe electron beam draws horizontal lines (scanlines) from left to right, and from the top to the bottom of the screen. By modifying the intensity of the electron beam, pixels with various colors and intensities can be shown.h]hThe electron beam draws horizontal lines (scanlines) from left to right, and from the top to the bottom of the screen. By modifying the intensity of the electron beam, pixels with various colors and intensities can be shown.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXmAfter each scanline the electron beam has to move back to the left side of the screen and to the next line: this is called the horizontal retrace. After the whole screen (frame) was painted, the beam moves back to the upper left corner: this is called the vertical retrace. During both the horizontal and vertical retrace, the electron beam is turned off (blanked).h]hXmAfter each scanline the electron beam has to move back to the left side of the screen and to the next line: this is called the horizontal retrace. After the whole screen (frame) was painted, the beam moves back to the upper left corner: this is called the vertical retrace. During both the horizontal and vertical retrace, the electron beam is turned off (blanked).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe speed at which the electron beam paints the pixels is determined by the dotclock in the graphics board. For a dotclock of e.g. 28.37516 MHz (millions of cycles per second), each pixel is 35242 ps (picoseconds) long::h]hThe speed at which the electron beam paints the pixels is determined by the dotclock in the graphics board. For a dotclock of e.g. 28.37516 MHz (millions of cycles per second), each pixel is 35242 ps (picoseconds) long:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj*)}(h1/(28.37516E6 Hz) = 35.242E-9 sh]h1/(28.37516E6 Hz) = 35.242E-9 s}hj#sbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhKhjhhubh)}(h3If the screen resolution is 640x480, it will take::h]h2If the screen resolution is 640x480, it will take:}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj*)}(h640*35.242E-9 s = 22.555E-6 sh]h640*35.242E-9 s = 22.555E-6 s}hj?sbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhKhjhhubh)}(hto paint the 640 (xres) pixels on one scanline. But the horizontal retrace also takes time (e.g. 272 `pixels`), so a full scanline takes::h](heto paint the 640 (xres) pixels on one scanline. But the horizontal retrace also takes time (e.g. 272 }(hjMhhhNhNubjn)}(h`pixels`h]hpixels}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjMubh), so a full scanline takes:}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj*)}(h#(640+272)*35.242E-9 s = 32.141E-6 sh]h#(640+272)*35.242E-9 s = 32.141E-6 s}hjmsbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhKhjhhubh)}(h8We'll say that the horizontal scanrate is about 31 kHz::h]h9We’ll say that the horizontal scanrate is about 31 kHz:}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj*)}(h1/(32.141E-6 s) = 31.113E3 Hzh]h1/(32.141E-6 s) = 31.113E3 Hz}hjsbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhKhjhhubh)}(hA full screen counts 480 (yres) lines, but we have to consider the vertical retrace too (e.g. 49 `lines`). So a full screen will take::h](haA full screen counts 480 (yres) lines, but we have to consider the vertical retrace too (e.g. 49 }(hjhhhNhNubjn)}(h`lines`h]hlines}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubh). So a full screen will take:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj*)}(h"(480+49)*32.141E-6 s = 17.002E-3 sh]h"(480+49)*32.141E-6 s = 17.002E-3 s}hjsbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhKhjhhubh)}(h&The vertical scanrate is about 59 Hz::h]h%The vertical scanrate is about 59 Hz:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj*)}(h1/(17.002E-3 s) = 58.815 Hzh]h1/(17.002E-3 s) = 58.815 Hz}hjsbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhKhjhhubh)}(hX8This means the screen data is refreshed about 59 times per second. To have a stable picture without visible flicker, VESA recommends a vertical scanrate of at least 72 Hz. But the perceived flicker is very human dependent: some people can use 50 Hz without any trouble, while I'll notice if it's less than 80 Hz.h]hX<This means the screen data is refreshed about 59 times per second. To have a stable picture without visible flicker, VESA recommends a vertical scanrate of at least 72 Hz. But the perceived flicker is very human dependent: some people can use 50 Hz without any trouble, while I’ll notice if it’s less than 80 Hz.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXkSince the monitor doesn't know when a new scanline starts, the graphics board will supply a synchronization pulse (horizontal sync or hsync) for each scanline. Similarly it supplies a synchronization pulse (vertical sync or vsync) for each new frame. The position of the image on the screen is influenced by the moments at which the synchronization pulses occur.h]hXmSince the monitor doesn’t know when a new scanline starts, the graphics board will supply a synchronization pulse (horizontal sync or hsync) for each scanline. Similarly it supplies a synchronization pulse (vertical sync or vsync) for each new frame. The position of the image on the screen is influenced by the moments at which the synchronization pulses occur.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe following picture summarizes all timings. The horizontal retrace time is the sum of the left margin, the right margin and the hsync length, while the vertical retrace time is the sum of the upper margin, the lower margin and the vsync length::h]hThe following picture summarizes all timings. The horizontal retrace time is the sum of the left margin, the right margin and the hsync length, while the vertical retrace time is the sum of the upper margin, the lower margin and the vsync length:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj*)}(hXk +----------+---------------------------------------------+----------+-------+ | | ↑ | | | | | |upper_margin | | | | | ↓ | | | +----------###############################################----------+-------+ | # ↑ # | | | # | # | | | # | # | | | # | # | | | left # | # right | hsync | | margin # | xres # margin | len | |<-------->#<---------------+--------------------------->#<-------->|<----->| | # | # | | | # | # | | | # | # | | | # |yres # | | | # | # | | | # | # | | | # | # | | | # | # | | | # | # | | | # | # | | | # | # | | | # | # | | | # ↓ # | | +----------###############################################----------+-------+ | | ↑ | | | | | |lower_margin | | | | | ↓ | | | +----------+---------------------------------------------+----------+-------+ | | ↑ | | | | | |vsync_len | | | | | ↓ | | | +----------+---------------------------------------------+----------+-------+h]hXk +----------+---------------------------------------------+----------+-------+ | | ↑ | | | | | |upper_margin | | | | | ↓ | | | +----------###############################################----------+-------+ | # ↑ # | | | # | # | | | # | # | | | # | # | | | left # | # right | hsync | | margin # | xres # margin | len | |<-------->#<---------------+--------------------------->#<-------->|<----->| | # | # | | | # | # | | | # | # | | | # |yres # | | | # | # | | | # | # | | | # | # | | | # | # | | | # | # | | | # | # | | | # | # | | | # | # | | | # ↓ # | | +----------###############################################----------+-------+ | | ↑ | | | | | |lower_margin | | | | | ↓ | | | +----------+---------------------------------------------+----------+-------+ | | ↑ | | | | | |vsync_len | | | | | ↓ | | | +----------+---------------------------------------------+----------+-------+}hj sbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhKhjhhubh)}(hThe frame buffer device expects all horizontal timings in number of dotclocks (in picoseconds, 1E-12 s), and vertical timings in number of scanlines.h]hThe frame buffer device expects all horizontal timings in number of dotclocks (in picoseconds, 1E-12 s), and vertical timings in number of scanlines.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]video-mode-timingsah ]h"]5. video mode timingsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hD6. Converting XFree86 timing values info frame buffer device timingsh]hD6. Converting XFree86 timing values info frame buffer device timings}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhhhhMubh)}(h7An XFree86 mode line consists of the following fields::h]h6An XFree86 mode line consists of the following fields:}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/hhubj*)}(h}"800x600" 50 800 856 976 1040 600 637 643 666 < name > DCF HR SH1 SH2 HFL VR SV1 SV2 VFLh]h}"800x600" 50 800 856 976 1040 600 637 643 666 < name > DCF HR SH1 SH2 HFL VR SV1 SV2 VFL}hjNsbah}(h]h ]h"]h$]h&]j9j:uh1j)hhhMhj/hhubh)}(h2The frame buffer device uses the following fields:h]h2The frame buffer device uses the following fields:}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/hhubj)}(hX - 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 h]j%)}(hhh](j*)}(h*pixclock: pixel clock in ps (pico seconds)h]h)}(hjsh]h*pixclock: pixel clock in ps (pico seconds)}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjqubah}(h]h ]h"]h$]h&]uh1j)hjnubj*)}(h&left_margin: time from sync to pictureh]h)}(hjh]h&left_margin: time from sync to picture}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1j)hjnubj*)}(h'right_margin: time from picture to synch]h)}(hjh]h'right_margin: time from picture to sync}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1j)hjnubj*)}(h'upper_margin: time from sync to pictureh]h)}(hjh]h'upper_margin: time from sync to picture}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1j)hjnubj*)}(h'lower_margin: time from picture to synch]h)}(hjh]h'lower_margin: time from picture to sync}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j)hjnubj*)}(h$hsync_len: length of horizontal synch]h)}(hjh]h$hsync_len: length of horizontal sync}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j)hjnubj*)}(h#vsync_len: length of vertical sync h]h)}(h"vsync_len: length of vertical synch]h"vsync_len: length of vertical sync}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j)hjnubeh}(h]h ]h"]h$]h&]jyjzuh1j$hhhM hjjubah}(h]h ]h"]h$]h&]uh1jhhhM hj/hhubhenumerated_list)}(hhh](j*)}(hNPixelclock: xfree: in MHz fb: in picoseconds (ps) pixclock = 1000000 / DCF h](h)}(h Pixelclock:h]h Pixelclock:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubh)}(h xfree: in MHzh]h xfree: in MHz}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubh)}(hfb: in picoseconds (ps)h]hfb: in picoseconds (ps)}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubh)}(hpixclock = 1000000 / DCFh]hpixclock = 1000000 / DCF}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubeh}(h]h ]h"]h$]h&]uh1j)hj!hhhhhNubj*)}(h]horizontal timings: left_margin = HFL - SH2 right_margin = SH1 - HR hsync_len = SH2 - SH1 h](h)}(hhorizontal timings:h]hhorizontal timings:}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjfubh)}(hleft_margin = HFL - SH2h]hleft_margin = HFL - SH2}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjfubh)}(hright_margin = SH1 - HRh]hright_margin = SH1 - HR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjfubh)}(hhsync_len = SH2 - SH1h]hhsync_len = SH2 - SH1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjfubeh}(h]h ]h"]h$]h&]uh1j)hj!hhhhhNubj*)}(h\vertical timings: upper_margin = VFL - SV2 lower_margin = SV1 - VR vsync_len = SV2 - SV1 h](h)}(hvertical timings:h]hvertical timings:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubh)}(hupper_margin = VFL - SV2h]hupper_margin = VFL - SV2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjubh)}(hlower_margin = SV1 - VRh]hlower_margin = SV1 - VR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjubh)}(hvsync_len = SV2 - SV1h]hvsync_len = SV2 - SV1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjubeh}(h]h ]h"]h$]h&]uh1j)hj!hhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix)uh1jhj/hhhhhMubh)}(h~Good examples for VESA timings can be found in the XFree86 source tree, under "xc/programs/Xserver/hw/xfree86/doc/modeDB.txt".h]hGood examples for VESA timings can be found in the XFree86 source tree, under “xc/programs/Xserver/hw/xfree86/doc/modeDB.txt”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj/hhubeh}(h]Aconverting-xfree86-timing-values-info-frame-buffer-device-timingsah ]h"]D6. converting xfree86 timing values info frame buffer device timingsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h 7. Referencesh]h 7. References}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM/ubh)}(hzFor more specific information about the frame buffer device and its applications, please refer to the Linux-fbdev website:h]hzFor more specific information about the frame buffer device and its applications, please refer to the Linux-fbdev website:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hj hhubj)}(h$http://linux-fbdev.sourceforge.net/ h]h)}(h#http://linux-fbdev.sourceforge.net/h]h reference)}(hj0h]h#http://linux-fbdev.sourceforge.net/}(hj4hhhNhNubah}(h]h ]h"]h$]h&]refurij0uh1j2hj.ubah}(h]h ]h"]h$]h&]uh1hhhhM4hj*ubah}(h]h ]h"]h$]h&]uh1jhhhM4hj hhubh)}(h#and to the following documentation:h]h#and to the following documentation:}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj hhubj)}(h- The manual pages for fbset: fbset(8), fb.modes(5) - The manual pages for XFree86: XF68_FBDev(1), XF86Config(4/5) - The mighty kernel sources: - linux/drivers/video/ - linux/include/linux/fb.h - linux/include/video/ h]j%)}(hhh](j*)}(h1The manual pages for fbset: fbset(8), fb.modes(5)h]h)}(hjeh]h1The manual pages for fbset: fbset(8), fb.modes(5)}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjcubah}(h]h ]h"]h$]h&]uh1j)hj`ubj*)}(hhjubah}(h]h ]h"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]jyjzuh1j$hhhM<hjubah}(h]h ]h"]h$]h&]uh1jhhhM<hjubeh}(h]h ]h"]h$]h&]uh1j)hj`ubeh}(h]h ]h"]h$]h&]jyjzuh1j$hhhM8hj\ubah}(h]h ]h"]h$]h&]uh1jhhhM8hj hhubeh}(h] referencesah ]h"] 7. referencesah$]h&]uh1hhhhhhhhM/ubh)}(hhh](h)}(h8. Mailing listh]h8. Mailing list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMCubh)}(h_There is a frame buffer device related mailing list at kernel.org: linux-fbdev@vger.kernel.org.h](hCThere is a frame buffer device related mailing list at kernel.org: }(hj'hhhNhNubj3)}(hlinux-fbdev@vger.kernel.orgh]hlinux-fbdev@vger.kernel.org}(hj/hhhNhNubah}(h]h ]h"]h$]h&]refuri"mailto:linux-fbdev@vger.kernel.orguh1j2hj'ubh.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMEhjhhubh)}(hyPoint your web browser to http://sourceforge.net/projects/linux-fbdev/ for subscription information and archive browsing.h](hPoint your web browser to }(hjIhhhNhNubj3)}(h,http://sourceforge.net/projects/linux-fbdev/h]h,http://sourceforge.net/projects/linux-fbdev/}(hjQhhhNhNubah}(h]h ]h"]h$]h&]refurijSuh1j2hjIubh3 for subscription information and archive browsing.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMHhjhhubeh}(h] mailing-listah ]h"]8. mailing listah$]h&]uh1hhhhhhhhMCubh)}(hhh](h)}(h9. Downloadingh]h9. Downloading}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhhhhhMMubh)}(h#All necessary files can be found ath]h#All necessary files can be found at}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjrhhubj)}(h1ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/680x0/ h]h)}(h0ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/680x0/h]j3)}(hjh]h0ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/680x0/}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1j2hjubah}(h]h ]h"]h$]h&]uh1hhhhMQhjubah}(h]h ]h"]h$]h&]uh1jhhhMQhjrhhubh)}(hand on its mirrors.h]hand on its mirrors.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjrhhubh)}(h+The latest version of fbset can be found ath]h+The latest version of fbset can be found at}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjrhhubj)}(hhttp://www.linux-fbdev.org/ h]h)}(hhttp://www.linux-fbdev.org/h]j3)}(hjh]hhttp://www.linux-fbdev.org/}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1j2hjubah}(h]h ]h"]h$]h&]uh1hhhhMWhjubah}(h]h ]h"]h$]h&]uh1jhhhMWhjrhhubeh}(h] downloadingah ]h"]9. downloadingah$]h&]uh1hhhhhhhhMMubh)}(hhh](h)}(h 10. Creditsh]h 10. Credits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM[ubh)}(hThis readme was written by Geert Uytterhoeven, partly based on the original `X-framebuffer.README` by Roman Hodek and Martin Schaller. Section 6 was provided by Frank Neumann.h](hLThis readme was written by Geert Uytterhoeven, partly based on the original }(hj hhhNhNubjn)}(h`X-framebuffer.README`h]hX-framebuffer.README}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj ubhM by Roman Hodek and Martin Schaller. Section 6 was provided by Frank Neumann.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM]hjhhubh)}(hDThe frame buffer device abstraction was designed by Martin Schaller.h]hDThe frame buffer device abstraction was designed by Martin Schaller.}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjhhubeh}(h]creditsah ]h"] 10. creditsah$]h&]uh1hhhhhhhhM[ubeh}(h]the-frame-buffer-deviceah ]h"]the frame buffer deviceah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjk error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jE jB hhjjjjj j jjj,j)jjjjjojljjj= j: u nametypes}(jE hjjj jj,jjjojj= uh}(jB hhhjhjjj jjjj)jjj/jj jljjjrj: ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.