Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 931

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>fb_find_mode</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Linux Device Drivers" /><link rel="up" href="ch07s03.html" title="Frame Buffer Video Mode Database" /><link rel="prev" href="re680.html" title="fb_delete_videomode" /><link rel="next" href="re682.html" title="fb_var_to_videomode" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>fb_find_mode</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re680.html">Prev</a>&#160;</td><th width="60%" align="center">Frame Buffer Video Mode Database</th><td width="20%" align="right">&#160;<a accesskey="n" href="re682.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="fb_find_mode"><a id="API-fb-find-mode"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>fb_find_mode &#8212; 
  finds a valid video mode
 </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">int <b class="fsfunc">fb_find_mode </b>(</code></td><td>struct fb_var_screeninfo * <var class="pdparam">var</var>, </td></tr><tr><td>&#160;</td><td>struct fb_info * <var class="pdparam">info</var>, </td></tr><tr><td>&#160;</td><td>const char * <var class="pdparam">mode_option</var>, </td></tr><tr><td>&#160;</td><td>const struct fb_videomode * <var class="pdparam">db</var>, </td></tr><tr><td>&#160;</td><td>unsigned int <var class="pdparam">dbsize</var>, </td></tr><tr><td>&#160;</td><td>const struct fb_videomode * <var class="pdparam">default_mode</var>, </td></tr><tr><td>&#160;</td><td>unsigned int <var class="pdparam">default_bpp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1" title="Arguments"><a id="id2694927"></a><h2>Arguments</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>var</code></em></span></dt><dd><p>
     frame buffer user defined part of display
    </p></dd><dt><span class="term"><em class="parameter"><code>info</code></em></span></dt><dd><p>
     frame buffer info structure
    </p></dd><dt><span class="term"><em class="parameter"><code>mode_option</code></em></span></dt><dd><p>
     string video mode to find
    </p></dd><dt><span class="term"><em class="parameter"><code>db</code></em></span></dt><dd><p>
     video mode database
    </p></dd><dt><span class="term"><em class="parameter"><code>dbsize</code></em></span></dt><dd><p>
     size of <em class="parameter"><code>db</code></em>
    </p></dd><dt><span class="term"><em class="parameter"><code>default_mode</code></em></span></dt><dd><p>
     default video mode to fall back to
    </p></dd><dt><span class="term"><em class="parameter"><code>default_bpp</code></em></span></dt><dd><p>
     default color depth in bits per pixel
    </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2695062"></a><h2>Description</h2><p>
   Finds a suitable video mode, starting with the specified mode
   in <em class="parameter"><code>mode_option</code></em> with fallback to <em class="parameter"><code>default_mode</code></em>.  If
   <em class="parameter"><code>default_mode</code></em> fails, all modes in the video mode database will
   be tried.
   </p><p>

   Valid mode specifiers for <em class="parameter"><code>mode_option</code></em>:
   </p><p>

   &lt;xres&gt;x&lt;yres&gt;[M][R][-&lt;bpp&gt;][@&lt;refresh&gt;][i][m] or
   &lt;name&gt;[-&lt;bpp&gt;][@&lt;refresh&gt;]
   </p><p>

   with &lt;xres&gt;, &lt;yres&gt;, &lt;bpp&gt; and &lt;refresh&gt; decimal numbers and
   &lt;name&gt; a string.
   </p><p>

   If 'M' is present after yres (and before refresh/bpp if present),
   the function will compute the timings using VESA(tm) Coordinated
   Video Timings (CVT).  If 'R' is present after 'M', will compute with
   reduced blanking (for flatpanels).  If 'i' is present, compute
   interlaced mode.  If 'm' is present, add margins equal to 1.8%
   of xres rounded down to 8 pixels, and 1.8% of yres. The char
   'i' and 'm' must be after 'M' and 'R'. Example:
   </p><p>

   1024x768MR-8<em class="parameter"><code>60m</code></em> - Reduced blank with margins at 60Hz.
</p></div><div class="refsect1" title="NOTE"><a id="id2695131"></a><h2>NOTE</h2><p>
   The passed struct <em class="parameter"><code>var</code></em> is _not_ cleared!  This allows you
   to supply values for e.g. the grayscale and accel_flags fields.
   </p><p>

   Returns zero for failure, 1 if using specified <em class="parameter"><code>mode_option</code></em>,
   2 if using specified <em class="parameter"><code>mode_option</code></em> with an ignored refresh rate,
   3 if default mode is used, 4 if fall back to any valid mode.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re680.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch07s03.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="re682.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>fb_delete_videomode</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span>fb_var_to_videomode</span></td></tr></table></div></body></html>