1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Chapter 7. Frame Buffer Library</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="index.html" title="Linux Device Drivers"><link rel="prev" href="API-serial8250-unregister-port.html" title="serial8250_unregister_port"><link rel="next" href="API-register-framebuffer.html" title="register_framebuffer"></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">Chapter 7. Frame Buffer Library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-serial8250-unregister-port.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="API-register-framebuffer.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="fbdev"></a>Chapter 7. Frame Buffer Library</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="fbdev.html#idp1113948452">Frame Buffer Memory</a></span></dt><dt><span class="sect1"><a href="ch07s02.html">Frame Buffer Colormap</a></span></dt><dt><span class="sect1"><a href="ch07s03.html">Frame Buffer Video Mode Database</a></span></dt><dt><span class="sect1"><a href="ch07s04.html">Frame Buffer Macintosh Video Mode Database</a></span></dt><dt><span class="sect1"><a href="ch07s05.html">Frame Buffer Fonts</a></span></dt></dl></div><p> 2 The frame buffer drivers depend heavily on four data structures. 3 These structures are declared in include/linux/fb.h. They are 4 fb_info, fb_var_screeninfo, fb_fix_screeninfo and fb_monospecs. 5 The last three can be made available to and from userland. 6 </p><p> 7 fb_info defines the current state of a particular video card. 8 Inside fb_info, there exists a fb_ops structure which is a 9 collection of needed functions to make fbdev and fbcon work. 10 fb_info is only visible to the kernel. 11 </p><p> 12 fb_var_screeninfo is used to describe the features of a video card 13 that are user defined. With fb_var_screeninfo, things such as 14 depth and the resolution may be defined. 15 </p><p> 16 The next structure is fb_fix_screeninfo. This defines the 17 properties of a card that are created when a mode is set and can't 18 be changed otherwise. A good example of this is the start of the 19 frame buffer memory. This "locks" the address of the frame buffer 20 memory, so that it cannot be changed or moved. 21 </p><p> 22 The last structure is fb_monospecs. In the old API, there was 23 little importance for fb_monospecs. This allowed for forbidden things 24 such as setting a mode of 800x600 on a fix frequency monitor. With 25 the new API, fb_monospecs prevents such things, and if used 26 correctly, can prevent a monitor from being cooked. fb_monospecs 27 will not be useful until kernels 2.5.x. 28 </p><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp1113948452"></a>Frame Buffer Memory</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-register-framebuffer.html"><span class="phrase">register_framebuffer</span></a></span><span class="refpurpose"> — 29 registers a frame buffer device 30 </span></dt><dt><span class="refentrytitle"><a href="API-unregister-framebuffer.html"><span class="phrase">unregister_framebuffer</span></a></span><span class="refpurpose"> — 31 releases a frame buffer device 32 </span></dt><dt><span class="refentrytitle"><a href="API-fb-set-suspend.html"><span class="phrase">fb_set_suspend</span></a></span><span class="refpurpose"> — 33 low level driver signals suspend 34 </span></dt></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-serial8250-unregister-port.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="API-register-framebuffer.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">serial8250_unregister_port</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">register_framebuffer</span></td></tr></table></div></body></html> 35