Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fbdev-dri.html 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <HTML>
  2. <TITLE>Mesa fbdev/DRI Environment</TITLE>
  3. <BODY text="#000000" bgcolor="#55bbff" link="#111188">
  4. <center><H1>Mesa fbdev/DRI Drivers</H1></center>
  5. <H1>1. Introduction</H1>
  6. <p>
  7. The fbdev/DRI sub-project within Mesa brings hardware accelerated OpenGL
  8. rendering to the Linux fbdev environment.
  9. The X Window System / XFree86 is not needed.
  10. </p>
  11. <p>
  12. Basically, the <a href="http://dri.sf.net/">DRI</a> drivers for hardware
  13. accelerated OpenGL for XFree86 have been ported to fbdev so that X is
  14. not needed.
  15. This means fbdev/DRI works in full-screen mode only.
  16. </p>
  17. <p>
  18. DRI driver writers may find this simplified environment easier to work in,
  19. compared to the full XFree86/DRI environment.
  20. </p>
  21. <p>
  22. Much of the work for this project has been done by Jon Smirl and
  23. Keith Whitwell.
  24. </p>
  25. <p>
  26. To use fbdev/DRI, you'll need a Linux 2.4 or 2.6 kernel.
  27. </p>
  28. <p>
  29. The fbdev/DRI Mesa code is in the Mesa CVS trunk (to be released as Mesa
  30. 5.1 in the future).
  31. </p>
  32. <h1>2. Compilation</h1>
  33. <p>
  34. Assuming you're starting with a fresh Mesa CVS checkout, do the following:
  35. </p>
  36. <pre>
  37. cd Mesa-newtree
  38. cp Makefile.X11 Makefile # or use a symlink
  39. make linux-solo
  40. </pre>
  41. <p>
  42. When this is finished, check the <code>Mesa-newtree/lib</code> directory
  43. to verify that the following files were made:
  44. </p>
  45. <ul>
  46. <li><code>libGL.so.1.2</code> - the client-side OpenGL library
  47. (and a few symlinks to it).
  48. <li><code>libGLU.so.1.1</code> - the GLU library (and a few symlinks to it).
  49. <li><code>libglut.so.3.7</code> - the GLUT library (and a few symlinks to it).
  50. <li><code>mga_dri.so</code> - DRI driver for Matrox G200/G400 cards.
  51. <li><code>r128_dri.so</code> - DRI driver for ATI Rage 128 cards.
  52. <li><code>r200_dri.so</code> - DRI driver for ATI R200 Radeon cards.
  53. <li><code>radeon_dri.so</code> - DRI driver for original ATI Radeon cards.
  54. <li><code>i810_dri.so</code> - DRI driver for Intel i810/i815 chips.
  55. <li><code>i830_dri.so</code> - DRI driver for Intel i830/i845 chips.
  56. <li><code>mga_dri.so</code> - DRI driver for Matrox G200/G400 cards.
  57. <li><code>sis_dri.so</code> - DRI driver for SIS cards.
  58. <li><code>tdfx_dri.so</code> - DRI driver for 3dfx Voodoo 3/4/5 cards.
  59. <li><code>gamma_dri.so</code> - DRI driver for 3Dlabs gamma cards.
  60. <li><code>fb_dri.so</code> - software-only fbdev driver.
  61. <li><code>miniglx.conf</code> - configuration file for the MiniGLX interface
  62. </ul>
  63. <h1>3. Using fbdev/DRI</h1>
  64. <p>
  65. If XFree86 is currently running, exit/stop the X server so you're
  66. working from the console.
  67. </p>
  68. <h2>3.1 Kernel Modules</h2>
  69. <p>
  70. You'll need to load kernel modules specific to your graphics hardware.
  71. The following kernel modules should be included with your kernel.
  72. </p>
  73. <p>
  74. If you have ATI Radeon/R200 hardware, run as root:
  75. </p>
  76. <pre>
  77. modprobe agpgart # the AGP GART module
  78. modprobe radeonfb # the Radeon fbdev driver
  79. modprobe radeon # the Radeon DRI kernel module
  80. </pre>
  81. <p>
  82. If you have ATI Rage 128 hardware, run as root:
  83. </p>
  84. <pre>
  85. modprobe agpgart # the AGP GART module
  86. modprobe aty128fb # the Rage 128 fbdev driver
  87. modprobe r128 # the Rage 128 DRI kernel module
  88. </pre>
  89. <p>
  90. If you have Matrox G200/G400 hardware, run as root:
  91. </p>
  92. <pre>
  93. modprobe agpgart # the AGP GART module
  94. modprobe mgafb # the Matrox fbdev driver
  95. modprobe mga # the Matrox DRI kernel module
  96. </pre>
  97. <p>
  98. Then run <code>lsmod</code> to be sure the modules are loaded.
  99. For a Radeon card, you should see something like this:
  100. </p>
  101. <pre>
  102. Module Size Used by Not tainted
  103. radeon 110308 0 (unused)
  104. radeonfb 21900 0 (unused)
  105. agpgart 43072 1
  106. </pre>
  107. <p>
  108. If the driver complains that the radeon/mga/etc/ kernel module is too
  109. old, you'll have to compile/install a newer one from the DRI project.
  110. </p>
  111. <h2>3.2 Configuration File</h2>
  112. <p>
  113. The <code>Mesa-newtree/lib/miniglx.conf</code> file should be installed
  114. in <code>/etc/</code>.
  115. </p>
  116. <p>
  117. Edit <code>/etc/miniglx.conf</code> to be sure it's set up correctly
  118. for your hardware.
  119. Comments in the file explain the options.
  120. </p>
  121. <h2>3.3 Running fbdev/DRI Programs</h2>
  122. <p>
  123. Make sure your LD_LIBRARY_PATH environment variable is set to the
  124. <code>Mesa-newtree/lib/</code> directory.
  125. </p>
  126. <p>
  127. Change to the <code>Mesa-newtree/progs/miniglx/</code> directory and
  128. start the sample_server program in the background:
  129. </p>
  130. <pre>
  131. ./sample_server &
  132. </pre>
  133. <p>
  134. Then try running the <code>miniglxtest</code> program:
  135. </p>
  136. <pre>
  137. ./miniglxtest
  138. </pre>
  139. <p>
  140. You should see a rotating quadrilateral which changes color as it rotates.
  141. It will exit automatically after a bit.
  142. </p>
  143. <p>
  144. If you run other tests in the miniglx/ directory, you may want to run
  145. them from a remote shell so that you can stop them with ctrl-C.
  146. </p>
  147. <h1>4.0 Troubleshooting</h1>
  148. <p>
  149. If you try to run miniglxtest and get the following:
  150. </p>
  151. <pre>
  152. [miniglx] failed to probe chipset
  153. connect: Connection refused
  154. server connection lost
  155. </pre>
  156. <p>
  157. It means that the sample_server process is not running.
  158. </p>
  159. <h1>5.0 Programming Information</h1>
  160. <p>
  161. The full OpenGL API is available with fbdev/DRI.
  162. </p>
  163. <p>
  164. OpenGL/Mesa is interfaced to fbdev via the <a href="MiniGLX.html">MiniGLX</a>
  165. interface.
  166. MiniGLX is a subset of Xlib and GLX API functions which provides just
  167. enough functionality to setup OpenGL rendering and respond to simple
  168. input events.
  169. </p>
  170. <p>
  171. Since MiniGLX is a subset of the usual Xlib and GLX APIs, programs written
  172. to the MiniGLX API can also be run on full Xlib/GLX implementations.
  173. This allows some degree of flexibility for software development and testing.
  174. </p>
  175. <p>
  176. However, the MiniGLX API is not binary-compatible with full Xlib/GLX.
  177. Some of the structures are different and some macros/functions work
  178. differently.
  179. See the <code>GL/miniglx.h</code> header file for details.
  180. </p>
  181. </body>
  182. </html>