1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>mac_find_mode</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="ch07s04.html" title="Frame Buffer Macintosh Video Mode Database"><link rel="prev" href="API-mac-map-monitor-sense.html" title="mac_map_monitor_sense"><link rel="next" href="ch07s05.html" title="Frame Buffer Fonts"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">mac_find_mode</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-mac-map-monitor-sense.html">Prev</a>&#160;</td><th width="60%" align="center">Frame Buffer Macintosh Video Mode Database</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch07s05.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-mac-find-mode"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>mac_find_mode &#8212; 
2     find a video mode
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">mac_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>unsigned int <var class="pdparam">default_bpp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1114159836"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>var</code></em></span></dt><dd><p>
4     frame buffer user defined part of display
5    </p></dd><dt><span class="term"><em class="parameter"><code>info</code></em></span></dt><dd><p>
6     frame buffer info structure
7    </p></dd><dt><span class="term"><em class="parameter"><code>mode_option</code></em></span></dt><dd><p>
8     video mode name (see mac_modedb[])
9    </p></dd><dt><span class="term"><em class="parameter"><code>default_bpp</code></em></span></dt><dd><p>
10     default color depth in bits per pixel
11    </p></dd></dl></div></div><div class="refsect1"><a name="idp1114164572"></a><h2>Description</h2><p>
12   Finds a suitable video mode.  Tries to set mode specified
13   by <em class="parameter"><code>mode_option</code></em>.  If the name of the wanted mode begins with
14   'mac', the Mac video mode database will be used, otherwise it
15   will fall back to the standard video mode database.
16</p></div><div class="refsect1"><a name="idp1114165764"></a><h2>Note</h2><p>
17   Function marked as __init and can only be used during
18   system boot.
19   </p><p>
20
21   Returns error code from fb_find_mode (see fb_find_mode
22   function).
23</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-mac-map-monitor-sense.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch07s04.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="ch07s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">mac_map_monitor_sense</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;Frame Buffer Fonts</td></tr></table></div></body></html>
24