LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3110|回复: 26

为ATI R300献上一颗开源的心

[复制链接]
发表于 2005-5-19 22:30:58 | 显示全部楼层 |阅读模式
最近重新emerge 了Gentoo,整个系统是用gcc 4.0.1-beta20050507编译的,内核和X都用的不稳定的版本,整个系统都是超级新,同时也为系统的兼容性和稳定性埋下了不少隐患,比如我的ATI Radeon 9600XT(9500改的),因为ATI 的Linux驱动不支持gcc4和大于6.8.2的Xorg,害的我好长时间里都玩不了3D游戏。最近偶然在Gentoo Forums上发现了怎么获得安装开源的R300显卡驱动的方法,希望能给和我有同样烦恼的Gentoo Fans一点帮助。(不过想想像我这样做小白鼠做的这么彻底的ATI&Gentoo Fans应该不多别吧,呵呵    )

1.我的系统如下:

  1. Gentoo Linux 2005.0
  2. GCC-4.0.1-beta20050507
  3. Xorg-6.8.99.5
  4. Nitro-source-2.6.12_rc4-r1
复制代码


2.Gentoo Forums原贴链接:
http://forums.gentoo.org/viewtopic-p-2419114.html#2419114

3.R300开源驱动的获得和安装方法:
此驱动还处于High Development当中,我们只能从CVS中获得源代码编译

a.DRM源码:
  1. cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/r300 login
  2. cvs -z3 -d:pserver:anonymous@cvs.sf.net:/cvsroot/r300 co r300_driver

  3. cd r300_driver/drm
  4. rm -rf shared
  5. ln -s shared-core shared

  6. cd linux-core
  7. make radeon.o

  8. cp *.ko /lib/modules/你的内核版本号/kernel/drivers/char/drm
  9. modules-update
复制代码


b.Drivers源码:

  1. cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa login
  2. cvs -z3 -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa co Mesa

  3. mkdir Mesa/src/mesa/drivers/dri/r300
  4. lndir /你源码所在绝对路径/r300_driver/r300 /你源码所在绝对路径/Mesa/src/mesa/drivers/dri/r300

  5. cd Mesa
  6. **编辑** configs/linux-dri (或者linux-dri-x86-64)
  7.   在CONFIG_NAME之上加入  DRM_SOURCE_PATH=/你源码所在绝对路径/r300_driver/drm
  8.   将DRI_DIRS行改为"DRI_DIRS = dri_client r300"
  9. **完成编辑**

  10. make linux-dri-x86 (或者linux-dri-x86-64)

  11. cp lib/r300_dri.so /usr/lib/modules/dri (或者cp Mesa/lib64/r300_dri.so /usr/lib64/modules/dri)

  12. 退出X,[CODE]modprobe radeon
复制代码
,内容然后重启X,执行glxinfo


  1. OpenGL vendor string: Tungsten Graphics, Inc.
  2. OpenGL renderer string: Mesa DRI R300 20040924 AGP 4x x86/MMX+/3DNow!+ TCL
  3. OpenGL version string: 1.3 Mesa 6.3
复制代码


看到以上提示信息,说明驱动就已经安装成功了。

4.R300开源驱动兼容性测试:
a.先看看glxgears的测试结果吧

  1. 3506 frames in 5.0 seconds = 701.081 FPS
  2. 3528 frames in 5.0 seconds = 705.530 FPS
  3. 3519 frames in 5.0 seconds = 702.661 FPS
  4. 3597 frames in 5.0 seconds = 718.193 FPS
  5. 3620 frames in 5.0 seconds = 722.828 FPS
  6. 3541 frames in 5.0 seconds = 708.166 FPS
  7. 3421 frames in 5.0 seconds = 682.939 FPS
  8. 3533 frames in 5.0 seconds = 706.598 FPS
  9. 3556 frames in 5.0 seconds = 711.180 FPS
  10. 3408 frames in 5.0 seconds = 681.520 FPS
  11. 3412 frames in 5.0 seconds = 682.370 FPS
  12. 3370 frames in 5.0 seconds = 672.626 FPS
  13. 3322 frames in 5.0 seconds = 664.093 FPS
  14. 3058 frames in 5.0 seconds = 610.970 FPS
复制代码


再看看我之前系统ati-drivers 8.10.19的glxgears分数:

  1. 11422 frames in 5.0 seconds = 2284.400 FPS
  2. 12282 frames in 5.0 seconds = 2456.400 FPS
  3. 12295 frames in 5.0 seconds = 2459.000 FPS
  4. 12299 frames in 5.0 seconds = 2459.800 FPS
  5. 12304 frames in 5.0 seconds = 2460.800 FPS
  6. 12309 frames in 5.0 seconds = 2461.800 FPS
  7. 12312 frames in 5.0 seconds = 2462.400 FPS
  8. 12314 frames in 5.0 seconds = 2462.800 FPS
  9. 12299 frames in 5.0 seconds = 2459.800 FPS
  10. 12299 frames in 5.0 seconds = 2459.800 FPS
  11. 12304 frames in 5.0 seconds = 2460.800 FPS
  12. 12309 frames in 5.0 seconds = 2461.800 FPS
  13. 12309 frames in 5.0 seconds = 2461.800 FPS
  14. 12314 frames in 5.0 seconds = 2462.800 FPS
复制代码


OS的驱动的性能只有ati-drivers的1/3,需要加以时日,再接再励

b.能正常运行的3D游戏:

1)supertux
2)quake3-demo
3)torcs
4)cube
5)enemy-territory
...更多游戏我会在测试后加进来

已知测试有问题的游戏:
1)ut2004-demo
能正常运行游戏,速度也能接受,但贴图错误比较严重
...更多游戏我会在测试后加进来

虽然开源的R300驱动性能目前还是不很理想,但我们还是可以期盼它能在将来做的比ati-drivers更好。所谓只要敢想,一切皆有可能  :cool:
发表于 2005-5-19 23:40:33 | 显示全部楼层
ATI的驱动居然不支持xorg 6.8.2以上?My God……我搞了半天,经过楼主的提醒,终于恍然大悟……该死的ATI……再不出新驱动,我以后就不买它们的显卡了……
不过情况好像是……ATI的驱动连我的显卡都没认出来的样子,xorg.conf里显卡型号显示ATI Graphic Adapter……
回复 支持 反对

使用道具 举报

发表于 2005-5-20 00:05:42 | 显示全部楼层
我的ati还是7200。。。。。
而且用不用ati-fb,console刷新率就上不去,用了zhcon和cce2k就花屏。。。。。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-20 14:14:47 | 显示全部楼层
ATI显卡在Linux下用得是痛苦,看来它们是没有NVIDIA重视Linux
回复 支持 反对

使用道具 举报

发表于 2005-5-20 16:01:45 | 显示全部楼层
我就不多说什么了。

反正我自己配电脑肯定是nv的显卡。


ATI的,不爽……
回复 支持 反对

使用道具 举报

发表于 2005-5-20 17:09:52 | 显示全部楼层
linux下最好用NVIDIA
回复 支持 反对

使用道具 举报

发表于 2005-5-25 11:33:15 | 显示全部楼层
OK了,xorg-6.8.2下一样用上ATI官方版驱动成功了!3D打开!
安装好驱动后,将/usr/lib下的libGL*全部删除,然后重新安装官方驱动即可。
记得内核里不要编译Direct Rendering Manager,Character Devices里要编译上相应的主板AGP(模块或者编译进内核都可以)。还有,mtrr要编译上,否则速度可能会很慢。
AGPGART编译进内核了的话,xorg.conf里面Option "UseInternalAGPGART"用"yes",编译成模块就选"no"。
我的ATI9600成绩如下:
8897 frames in 5.0 seconds = 1779.400 FPS
10078 frames in 5.0 seconds = 2015.600 FPS
10078 frames in 5.0 seconds = 2015.600 FPS
10078 frames in 5.0 seconds = 2015.600 FPS
10053 frames in 5.0 seconds = 2010.600 FPS
10076 frames in 5.0 seconds = 2015.200 FPS
回复 支持 反对

使用道具 举报

发表于 2005-5-29 09:55:03 | 显示全部楼层
楼上的,你什么版本的内核?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-29 10:35:09 | 显示全部楼层
Post by Freesnake
OK了,xorg-6.8.2下一样用上ATI官方版驱动成功了!3D打开!
安装好驱动后,将/usr/lib下的libGL*全部删除,然后重新安装官方驱动即可。
记得内核里不要编译Direct Rendering Manager,Character Devices里要编译上相应的主板AGP(模块或者编译进内核都可以)。还有,mtrr要编译上,否则速度可能会很慢。
AGPGART编译进内核了的话,xorg.conf里面Option "UseInternalAGPGART"用"yes",编译成模块就选"no"。
我的ATI9600成绩如下:
8897 frames in 5.0 seconds = 1779.400 FPS
10078 frames in 5.0 seconds = 2015.600 FPS
10078 frames in 5.0 seconds = 2015.600 FPS
10078 frames in 5.0 seconds = 2015.600 FPS
10053 frames in 5.0 seconds = 2010.600 FPS
10076 frames in 5.0 seconds = 2015.200 FPS

反正我是不想回头了,呵呵。你试过>xorg-6.8.2+>kernel-2.6.11的组合吗?那样肯定用不了ati-drivers
回复 支持 反对

使用道具 举报

发表于 2005-5-29 10:41:59 | 显示全部楼层
我试过,2.6.11还是可以的。但是2.6.12就彻底不行了。。。ati没有这么快。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表