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:
复制内容到剪贴板
代码:
[drm] Initialized radeon 1.27.0 20060524 on minor 0and there's the right nodes created in /dev:
复制内容到剪贴板
代码:
taijia ~ # ls -l /dev/dri/
total 0
crw-rw---- 1 root video 226, 0 2007-10-04 18:35 card0X sees that there is DRI possibly on offer, but then fails to set it up:
复制内容到剪贴板
代码:
(**) RADEON(0): RADEONScreenInit 14000000 0
(**) RADEON(0): Map: 0x14000000, 0x01000000
(**) RADEON(0): RADEONSave
(**) RADEON(0): RADEONSaveMode(0x64be38)
(**) RADEON(0): Read: 0x00000043 0x00000187 0x00000000
(**) RADEON(0): Read: rd=67, fd=391, pd=0
(**) RADEON(0): RADEONSaveMode returns 0x64be38
(==) RADEON(0): Using 16 bit depth buffer
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmOpenByBusid: Searching for BusID pci:0000:00:06.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmOpenByBusid: drmOpenMinor returns 6
drmOpenByBusid: drmGetBusid reports
drmOpenDevice: node name is /dev/dri/card1
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: Open failed
drmOpenByBusid: drmOpenMinor returns -19
[...]
drmOpenDevice: node name is /dev/dri/card14
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: Open failed
drmOpenByBusid: drmOpenMinor returns -19
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmGetBusid returned ''
(II) RADEON(0): [drm] DRM interface version 1.0
(II) RADEON(0): [drm] drmSetBusid failed (6, pci:0000:00:06.0), Permission denied
(EE) RADEON(0): [dri] DRIScreenInit failed. Disabling DRI.The end result is yes, I have OpenGL... in software:
复制内容到剪贴板
代码:
taijia ~ # glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: No
server glx vendor string: SGI
server glx version string: 1.2
[...]
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.2 (1.5 Mesa 6.5.1)
[...]Exerpts of my xorg.conf:
复制内容到剪贴板
代码:
# **********************************************************************
# Module section -- this section is used to specify
# which dynamically loadable modules to load.
# **********************************************************************
#
Section "Module"
# This loads the DBE extension module.
Load "dbe" # Double buffer extension
# This loads the miscellaneous extensions module, and disables
# initialisation of the XFree86-DGA extension within that module.
SubSection "extmod"
Option "omit xfree86-dga" # don't initialise the DGA extension
EndSubSection
# This loads the font modules
# Load "type1"
# Load "speedo"
Load "freetype"
# Load "xtt"
# This loads the GLX module
Load "glx"
Load "drm"
# This loads the DRI module
Load "dri"
EndSection
[...]
# **********************************************************************
# Monitor section
# **********************************************************************
# Any number of monitor sections may be present
Section "Monitor"
Identifier "My Monitor"
DisplaySize 366 277 # mm
VendorName "HTC"
ModelName "CM753"
#HorizSync 31.0 - 107.0
#VertRefresh 72.0 - 160.0
#VertRefresh 50.0 - 160.0
HorizSync 31 - 96
VertRefresh 72 - 85
Option "DPMS"
EndSection
[...]
# Device configured by xorgconfig:
Section "Device"
Identifier "** ATI Radeon (generic) [radeon]"
Driver "ati"
Option "BusType" "PCI"
Option "DRI" "true"
#VideoRam 8192
# Insert Clocks lines here if appropriate
EndSection
# **********************************************************************
# Screen sections
# **********************************************************************
# Any number of screen sections may be present. Each describes
# the configuration of a single screen. A single specific screen section
# may be specified from the X server command line with the "-screen"
# option.
Section "Screen"
Identifier "Screen 1"
Device "** ATI Radeon (generic) [radeon]"
Monitor "My Monitor"
DefaultDepth 16
Subsection "Display"
Depth 8
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
ViewPort 0 0
Modes "1600x1200" "1024x768"
EndSubsection
Subsection "Display"
Depth 24
ViewPort 0 0
Modes "1600x1200" "1024x768"
EndSubsection
EndSection
[...]
Section "dri"
Mode 0666
EndSectionI'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.