<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>8.7. Matrox framebuffer (mga_vid)</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="MPlayer - 电影播放器"><link rel="up" href="video.html" title="第 8 章 Video output devices"><link rel="prev" href="fbdev.html" title="8.6. Framebuffer output (FBdev)"><link rel="next" href="tdfxfb.html" title="8.8. 3Dfx YUV support"><link rel="preface" href="howtoread.html" title="如何阅读此文档"><link rel="chapter" href="intro.html" title="第 1 章 介绍"><link rel="chapter" href="install.html" title="第 2 章 Installation"><link rel="chapter" href="usage.html" title="第 3 章 Usage"><link rel="chapter" href="cd-dvd.html" title="第 4 章 CD/DVD用法"><link rel="chapter" href="faq.html" title="第 5 章 Frequently Asked Questions"><link rel="chapter" href="containers.html" title="第 6 章 Containers"><link rel="chapter" href="codecs.html" title="第 7 章 Codecs"><link rel="chapter" href="video.html" title="第 8 章 Video output devices"><link rel="chapter" href="audio.html" title="第 9 章 音频输出设备"><link rel="chapter" href="tv.html" title="第 10 章 TV"><link rel="chapter" href="radio.html" title="第 11 章 广播电台"><link rel="chapter" href="ports.html" title="第 12 章 Ports"><link rel="chapter" href="mencoder.html" title="第 13 章 MEncoder的基础用法"><link rel="chapter" href="encoding-guide.html" title="第 14 章 Encoding with MEncoder"><link rel="appendix" href="bugreports.html" title="附录 A. 如何报告错误"><link rel="appendix" href="bugs.html" title="附录 B. 已知错误"><link rel="appendix" href="skin.html" title="附录 C. MPlayer skin format"><link rel="appendix" href="history.html" title="附录 D. History"></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">8.7. Matrox framebuffer (mga_vid)</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="fbdev.html">上一页</a> </td><th width="60%" align="center">第 8 章 Video output devices</th><td width="20%" align="right"> <a accesskey="n" href="tdfxfb.html">下一页</a></td></tr></table><hr></div><div class="sect1" lang="zh-CN"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mga_vid"></a>8.7. Matrox framebuffer (mga_vid)</h2></div></div></div><p> <code class="systemitem">mga_vid</code> is a combination of a video output driver and a Linux kernel module that utilitizes the Matrox G200/G400/G450/G550 video scaler/overlay unit to perform YUV->RGB colorspace conversion and arbitrary video scaling. <code class="systemitem">mga_vid</code> has hardware VSYNC support with triple buffering. It works on both a framebuffer console and under X, but only with Linux 2.4.x. </p><p> For a Linux 2.6.x version of this driver check out <a class="ulink" href="http://attila.kinali.ch/mga/" target="_top">http://attila.kinali.ch/mga/</a>. </p><div class="procedure"><a name="id2569372"></a><p class="title"><b>Installation:</b></p><ol type="1"><li><p> To use it, you first have to compile <tt class="filename">mga_vid.o</tt>: </p><pre class="screen"> cd drivers make</pre><p> </p></li><li><p> Then run (as <code class="systemitem">root</code>) </p><pre class="screen">make install</pre><p> which should install the module and create the device node for you. Load the driver with </p><pre class="screen">insmod mga_vid.o</pre><p> </p></li><li><p> You should verify the memory size detection using the <span class="command"><strong>dmesg</strong></span> command. If it's bad, use the <tt class="option">mga_ram_size</tt> option (<span class="command"><strong>rmmod mga_vid</strong></span> first), specify card's memory size in MB: </p><pre class="screen">insmod mga_vid.o mga_ram_size=16</pre><p> </p></li><li><p> To make it load/unload automatically when needed, first insert the following line at the end of <tt class="filename">/etc/modules.conf</tt>: </p><pre class="programlisting">alias char-major-178 mga_vid</pre><p> </p></li><li><p> Now you have to (re)compile <span class="application">MPlayer</span>, <span class="command"><strong>./configure</strong></span> will detect <tt class="filename">/dev/mga_vid</tt> and build the 'mga' driver. Using it from <span class="application">MPlayer</span> goes by <tt class="option">-vo mga</tt> if you have matroxfb console, or <tt class="option">-vo xmga</tt> under XFree86 3.x.x or 4.x.x. </p></li></ol></div><p> The mga_vid driver cooperates with Xv. </p><p> The <tt class="filename">/dev/mga_vid</tt> device file can be read for some info, for example by </p><pre class="screen">cat /dev/mga_vid</pre><p> and can be written for brightness change: </p><pre class="screen">echo "brightness=120" > /dev/mga_vid</pre><p> </p><p> There is a test application called <span class="command"><strong>mga_vid_test</strong></span> in the same directory. It should draw 256x256 images on the screen if all is working well. </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="fbdev.html">上一页</a> </td><td width="20%" align="center"><a accesskey="u" href="video.html">上一级</a></td><td width="40%" align="right"> <a accesskey="n" href="tdfxfb.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">8.6. Framebuffer output (FBdev) </td><td width="20%" align="center"><a accesskey="h" href="index.html">起始页</a></td><td width="40%" align="right" valign="top"> 8.8. 3Dfx YUV support</td></tr></table></div></body></html>