36 1234
发新话题
打印

Direct Rendering on Fulong

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:
复制内容到剪贴板
代码:
[drm] Initialized radeon 1.27.0 20060524 on minor 0
and 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 card0
X 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
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.
附件: 您所在的用户组无法下载或查看附件
Stuart Longland (aka Redhatter, VK4MSL)
Gentoo/MIPS Developer
请注意, 我不会讲中文, 需要依靠翻译器翻译。

TOP

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

 36 1234
发新话题