返回列表 发帖

Direct Rendering on Fulong

Hi All...
Just wondering if anyone knew how to get Direct Rendering going on the Fulong.  I've been tinkering for the last few months on this... and it's only recently that I've had any decent OpenGL apps to test with.

Just recently, I managed to get Quake II running -- the games-fps/quake2-icculus works on MIPS with a few minor modifications.  I have it going using Software mode at a resolution of 400×300px.  Not terrific, but still quite workable.   The attachment here shows it running in software mode.



I'm close to getting a workable boot environment for Gentoo/MIPS on the Lemote systems... and I figured a demo of Quake II would make a nice touch -- if I can get hardware OpenGL going.  I know it can be done, since I've seen others getting Beryl going on these boxes.

At present, I'm using the patches I have in the Gentoo Loongson overlay... the DRM driver is loaded:
  1. [drm] Initialized radeon 1.27.0 20060524 on minor 0
复制代码


and there's the right nodes created in /dev:
  1. taijia ~ # ls -l /dev/dri/
  2. total 0
  3. crw-rw---- 1 root video 226, 0 2007-10-04 18:35 card0
复制代码


X sees that there is DRI possibly on offer, but then fails to set it up:
  1. (**) RADEON(0): RADEONScreenInit 14000000 0
  2. (**) RADEON(0): Map: 0x14000000, 0x01000000
  3. (**) RADEON(0): RADEONSave
  4. (**) RADEON(0): RADEONSaveMode(0x64be38)
  5. (**) RADEON(0): Read: 0x00000043 0x00000187 0x00000000
  6. (**) RADEON(0): Read: rd=67, fd=391, pd=0
  7. (**) RADEON(0): RADEONSaveMode returns 0x64be38
  8. (==) RADEON(0): Using 16 bit depth buffer
  9. drmOpenDevice: node name is /dev/dri/card0
  10. drmOpenDevice: open result is 6, (OK)
  11. drmOpenDevice: node name is /dev/dri/card0
  12. drmOpenDevice: open result is 6, (OK)
  13. drmOpenByBusid: Searching for BusID pci:0000:00:06.0
  14. drmOpenDevice: node name is /dev/dri/card0
  15. drmOpenDevice: open result is 6, (OK)
  16. drmOpenByBusid: drmOpenMinor returns 6
  17. drmOpenByBusid: drmGetBusid reports
  18. drmOpenDevice: node name is /dev/dri/card1
  19. drmOpenDevice: open result is -1, (No such device)
  20. drmOpenDevice: open result is -1, (No such device)
  21. drmOpenDevice: Open failed
  22. drmOpenByBusid: drmOpenMinor returns -19
  23. [...]
  24. drmOpenDevice: node name is /dev/dri/card14
  25. drmOpenDevice: open result is -1, (No such device)
  26. drmOpenDevice: open result is -1, (No such device)
  27. drmOpenDevice: Open failed
  28. drmOpenByBusid: drmOpenMinor returns -19
  29. drmOpenDevice: node name is /dev/dri/card0
  30. drmOpenDevice: open result is 6, (OK)
  31. drmOpenDevice: node name is /dev/dri/card0
  32. drmOpenDevice: open result is 6, (OK)
  33. drmGetBusid returned ''
  34. (II) RADEON(0): [drm] DRM interface version 1.0
  35. (II) RADEON(0): [drm] drmSetBusid failed (6, pci:0000:00:06.0), Permission denied
  36. (EE) RADEON(0): [dri] DRIScreenInit failed.  Disabling DRI.
复制代码


The end result is yes, I have OpenGL... in software:
  1. taijia ~ # glxinfo
  2. name of display: :0.0
  3. display: :0  screen: 0
  4. direct rendering: No
  5. server glx vendor string: SGI
  6. server glx version string: 1.2
  7. [...]
  8. OpenGL vendor string: Mesa project: www.mesa3d.org
  9. OpenGL renderer string: Mesa GLX Indirect
  10. OpenGL version string: 1.2 (1.5 Mesa 6.5.1)
  11. [...]
复制代码


Exerpts of my xorg.conf:

  1. # **********************************************************************
  2. # Module section -- this  section  is used to specify
  3. # which dynamically loadable modules to load.
  4. # **********************************************************************
  5. #
  6. Section "Module"

  7. # This loads the DBE extension module.

  8.     Load        "dbe"   # Double buffer extension

  9. # This loads the miscellaneous extensions module, and disables
  10. # initialisation of the XFree86-DGA extension within that module.
  11.     SubSection  "extmod"
  12.       Option    "omit xfree86-dga"   # don't initialise the DGA extension
  13.     EndSubSection

  14. # This loads the font modules
  15. #    Load        "type1"
  16. #    Load        "speedo"
  17.     Load        "freetype"
  18. #    Load        "xtt"

  19. # This loads the GLX module
  20.     Load       "glx"
  21.     Load        "drm"
  22. # This loads the DRI module
  23.     Load       "dri"

  24. EndSection
  25. [...]
  26. # **********************************************************************
  27. # Monitor section
  28. # **********************************************************************

  29. # Any number of monitor sections may be present

  30. Section "Monitor"

  31.         Identifier  "My Monitor"
  32.         DisplaySize       366   277     # mm
  33.         VendorName   "HTC"
  34.         ModelName    "CM753"
  35.         #HorizSync    31.0 - 107.0
  36.         #VertRefresh  72.0 - 160.0
  37.         #VertRefresh  50.0 - 160.0
  38.         HorizSync       31 - 96
  39.         VertRefresh     72 - 85
  40.         Option      "DPMS"
  41. EndSection
  42. [...]
  43. # Device configured by xorgconfig:

  44. Section "Device"
  45.     Identifier  "** ATI Radeon (generic)               [radeon]"
  46.     Driver      "ati"
  47.     Option      "BusType" "PCI"
  48.     Option      "DRI" "true"
  49.     #VideoRam    8192
  50.     # Insert Clocks lines here if appropriate
  51. EndSection


  52. # **********************************************************************
  53. # Screen sections
  54. # **********************************************************************

  55. # Any number of screen sections may be present.  Each describes
  56. # the configuration of a single screen.  A single specific screen section
  57. # may be specified from the X server command line with the "-screen"
  58. # option.
  59. Section "Screen"
  60.     Identifier  "Screen 1"
  61.     Device      "** ATI Radeon (generic)               [radeon]"
  62.     Monitor     "My Monitor"
  63.     DefaultDepth 16

  64.     Subsection "Display"
  65.         Depth       8
  66.         ViewPort    0 0
  67.     EndSubsection
  68.     Subsection "Display"
  69.         Depth       16
  70.         ViewPort    0 0
  71.         Modes   "1600x1200" "1024x768"
  72.     EndSubsection
  73.     Subsection "Display"
  74.         Depth       24
  75.         ViewPort    0 0
  76.         Modes   "1600x1200" "1024x768"
  77.     EndSubsection
  78. EndSection
  79. [...]
  80. Section "dri"
  81.     Mode 0666
  82. EndSection
复制代码


I've seen some threads on getting this working... some even with patches, but the patches seem to have been mangled by the forum software, thus I'm not able to extract them from the page.  There are only 3 things on these Lemote boxes I haven't managed to get working:

  • Power management (turning the power off)
  • OpenGL
  • Infrared port (near the speaker-out socket and HDD LED -- this is a low priority thing)
Everything else works flawlessly.  For this release of Gentoo, I'd dearly love to get all the major pieces of hardware working fully.  If anyone knows of some patches I might've missed, or something I've otherwise done incorrect... please let me know.
附件: 您需要登录才可以下载或查看附件。没有帐号?注册(register)
Stuart Longland (aka Redhatter, VK4MSL)
Gentoo/MIPS Developer
请注意, 我不会讲中文, 需要依靠翻译器翻译。

I hope that the newly designed 2F boxes will solve these problem.
欢迎浏览我的bloghttp://jamesr.cublog.cn/

TOP

I have sent you what I could salvage from the forums but when I built 2.6.18.1 with the DRM kernel patch it crashed. I value stability over the latest and greatest so I'm using 2.6.18.1 now and Xorg is running without DRI support and therefore some sluggishness. Still I'd much rather run a current kernel, particularly since 2.6.18.1 corrupts XFS file systems.

It would be a lot better to get the DRM kernel patch integrated into the MIPS kernel sources if it still correct and applicable and not just a hack or rewrite it and then put up for submission to the MIPS maintainer (Ralf Baechle). I don't know if power management will ever work because support for it may be absent from the chipset.

At the user level OpenOffice.org and Java support are a bit behind the times but the blame is with these projects and not with the various MIPS distribution maintainers (of which you and I are only two) nor Lemote. Therefore I have filed issues for OpenOffice.org Linux/MIPS support and signed JCA/SCA to have my patches possibly included in these projects as well.

For Flash support Gnash is improving every day and Lguest/KVM-lite might even make virtualisation possible on MIPS as it will for x86 processors without virtualisation support.

TOP

jamesr: What I hear about the Loongson 2F... they'll be awesome.   I'd seriously consider purchasing a laptop based on a Loongson 2F or Loongson 3.

psychicist: I'm running Gentoo's mips-sources-2.6.22.6 with Lemote's patches applied presently, and found it quite stable even with the DRM driver loaded... just between radeon.ko, xf86-video-ati and xorg-server... none of them are talking to eachother.

The kernel binary is on my site (see the hyperlink: 主页 above)... if you're interested.

[ 本帖最后由 Redhatter 于 2007-10-4 09:39 PM 编辑 ]
Stuart Longland (aka Redhatter, VK4MSL)
Gentoo/MIPS Developer
请注意, 我不会讲中文, 需要依靠翻译器翻译。

TOP

Not meant to hijack this thread but I am curious how you got your fulong box. I have been thinking getting one for a while. Is there any retailer in Australia? I live in Sydney btw.

TOP

好事!舆论上旗帜鲜明的支持!

TOP

We should let foxsen and tony know this.

[ 本帖最后由 ubuntpku 于 2007-10-6 07:57 PM 编辑 ]
In a world without fences and walls,
WHY bother Gate$ and Window$?

TOP

Infrared port (near the speaker-out socket and HDD LED -- this is a low priority thing)

This has also been done.

[ 本帖最后由 ubuntpku 于 2007-10-7 05:19 PM 编辑 ]
In a world without fences and walls,
WHY bother Gate$ and Window$?

TOP

回复 #1 Redhatter 的帖子

fucking cool!!!

I will see what I can help
忆江南
江南忆,最忆是杭州。山寺月中寻桂子,郡亭枕上看潮头。何日更重游。

TOP

回复 #1 Redhatter 的帖子

TOP

返回列表