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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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>fb_dri.so</code> - software-only fbdev driver.
  55. <li><code>miniglx.conf</code> - configuration file for the MiniGLX interface
  56. </ul>
  57. <h1>3. Using fbdev/DRI</h1>
  58. <p>
  59. If XFree86 is currently running, exit/stop the X server so you're
  60. working from the console.
  61. </p>
  62. <h2>3.1 Kernel Modules</h2>
  63. <p>
  64. You'll need to load kernel modules specific to your graphics hardware.
  65. The following kernel modules should be included with your kernel.
  66. </p>
  67. <p>
  68. If you have ATI Radeon/R200 hardware, run as root:
  69. </p>
  70. <pre>
  71. modprobe agpgart # the AGP GART module
  72. modprobe radeonfb # the Radeon fbdev driver
  73. modprobe radeon # the Radeon DRI kernel module
  74. </pre>
  75. <p>
  76. If you have ATI Rage 128 hardware, run as root:
  77. </p>
  78. <pre>
  79. modprobe agpgart # the AGP GART module
  80. modprobe aty128fb # the Rage 128 fbdev driver
  81. modprobe r128 # the Rage 128 DRI kernel module
  82. </pre>
  83. <p>
  84. If you have Matrox G200/G400 hardware, run as root:
  85. </p>
  86. <pre>
  87. modprobe agpgart # the AGP GART module
  88. modprobe mgafb # the Matrox fbdev driver
  89. modprobe mga # the Matrox DRI kernel module
  90. </pre>
  91. <p>
  92. Then run <code>lsmod</code> to be sure the modules are loaded.
  93. For a Radeon card, you should see something like this:
  94. </p>
  95. <pre>
  96. Module Size Used by Not tainted
  97. radeon 110308 0 (unused)
  98. radeonfb 21900 0 (unused)
  99. agpgart 43072 1
  100. </pre>
  101. <h2>3.2 Configuration File</h2>
  102. <p>
  103. The <code>Mesa-newtree/lib/miniglx.conf</code> file should be installed
  104. in <code>/etc/</code>.
  105. </p>
  106. <p>
  107. Edit <code>/etc/miniglx.conf</code> to be sure it's set up correctly
  108. for your hardware.
  109. Comments in the file explain the options.
  110. </p>
  111. <h2>3.3 Running fbdev/DRI Programs</h2>
  112. <p>
  113. Make sure your LD_LIBRARY_PATH environment variable is set to the
  114. <code>Mesa-newtree/lib/</code> directory.
  115. </p>
  116. <p>
  117. Change to the <code>Mesa-newtree/progs/miniglx/</code> directory and
  118. start the sample_server program in the background:
  119. </p>
  120. <pre>
  121. ./sample_server &
  122. </pre>
  123. <p>
  124. Then try running the <code>miniglxtest</code> program:
  125. </p>
  126. <pre>
  127. ./miniglxtest
  128. </pre>
  129. <p>
  130. You should see a rotating quadrilateral which changes color as it rotates.
  131. It will exit automatically after a bit.
  132. </p>
  133. <p>
  134. If you run other tests in the miniglx/ directory, you may want to run
  135. them from a remote shell so that you can stop them with ctrl-C.
  136. </p>
  137. <h1>4.0 Troubleshooting</h1>
  138. <p>
  139. If you try to run miniglxtest and get the following:
  140. </p>
  141. <pre>
  142. [miniglx] failed to probe chipset
  143. connect: Connection refused
  144. server connection lost
  145. </pre>
  146. <p>
  147. It means that the sample_server process is not running.
  148. </p>
  149. <h1>5.0 Programming Information</h1>
  150. <p>
  151. The full OpenGL API is available with fbdev/DRI.
  152. </p>
  153. <p>
  154. OpenGL/Mesa is interfaced to fbdev via the <a href="MiniGLX.html">MiniGLX</a>
  155. interface.
  156. MiniGLX is a subset of Xlib and GLX API functions which provides just
  157. enough functionality to setup OpenGL rendering and respond to simple
  158. input events.
  159. </p>
  160. <p>
  161. Since MiniGLX is a subset of the usual Xlib and GLX APIs, programs written
  162. to the MiniGLX API can also be run on full Xlib/GLX implementations.
  163. This allows some degree of flexibility for software development and testing.
  164. </p>
  165. <p>
  166. However, the MiniGLX API is not binary-compatible with full Xlib/GLX.
  167. Some of the structures are different and some macros/functions work
  168. differently.
  169. See the <code>GL/miniglx.h</code> header file for details.
  170. </p>
  171. </body>
  172. </html>