LinuxSir.cn,穿越时空的Linuxsir!

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

ATI KMS 资源

[复制链接]
发表于 2009-4-21 22:38:43 | 显示全部楼层 |阅读模式
当前为试验性质,风险自担!

http://www.phoronix.com/scan.php?page=news_item&px=NjYyMQ
http://airlied.livejournal.com/61839.html
http://airlied.livejournal.com/
http://airlied.livejournal.com/64271.html * 12/29/08 Kernel modesetting pull request sent
http://airlied.livejournal.com/63368.html * 11/30/08 KMS and AGP r300s
http://airlied.livejournal.com/62269.html ** 9/6/08 testing modesetting on radeon...
testing modesetting on radeon...
So if you are feeling like testing modesetting on radeon cards, here are some methods.

a) Install Fedora rawhide - remember nomodeset on the kernel commandline disables it.

b) get some repos.

You need to do a full kernel build for this stuff.

git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-rawhide
git://git.freedesktop.org/git/mesa/drm.git modesetting-gem
If you already have a kernel with GEM bits in it (i.e. rawhide or you have intel stuff - you can
pull this repo and build the kernel modules with make OS_HAS_GEM=1 radeon.o

git://people.freedesktop.org/~airlied/xf86-video-ati radeon-gem-cs
git://people.freedesktop.org/~airlied/mesa r300-bufmgr

If you don't care about 3D you can ignore the mesa tree. You need to build a kernel and choose the radeon drm,
and you can enable modesetting by default. You need to build libdrm from the modesetting-gem branch, and
you need to build the ati driver against it. 3D only works with r300->r500 and even there has some bugs. 2D X.org may not work with render accel on r100/r200 as I need to add a lot of commands to the verifier.

In theory rebooting into the kernel should give you modesetting.

So far the systems I've tested this on are:

PCIE:
RV530 FireGL in a Thinkpad T60P - LVDS + VGA
R580 X1900XTX - DVI + VGA
RS690 - VGA
RV370 in laptop - LVDS + VGA

PCI:
RN50 - vga - no render/3D
RV100 - tmds - no render/3D

AGP:
RV250 on SIS AGP - DVI (Internal/External TMDS) + VGA - no render/3D

So the two areas with problems most likely are AGP and LVDS. and I'm sure r420/rv410 will throw some curve balls as the usually do.

If you are using Rawhide and/or enable modesetting by default you can add the "nomodeset" to the kernel
command line to disable it.

To debug bootup hangs etc you can

1. boot with command line options "nomodeset 3"
2. rmmod radeon drm
3. modprobe drm debug=1
4. modprobe radeon modeset=1

see if you get an oops.. you can fire the dmesg off to me if you want as well, an Xorg.0.log from a working -ati
on the same machine may also help.

I'll hopefully get some radeontool tests available to find regressions.
                                         
http://airlied.livejournal.com/61839.html *  7/26/08 initial kms for radeon r500 atombios pushed


http://aur.archlinux.org/package ... eo-ati-kms/PKGBUILD
http://tirdc.livejournal.com/ *
http://tirdc.livejournal.com/23805.html * 12 January 2009 Gallium on Radeon coming along
January 2009 Gallium on Radeon coming along
Corbin simpson has been working hard on getting Gallium to run after he finally managed to build it. Today we could read the following lines:


01:47 #dri-devel: < MostAwesomeDude> airlied: Awesome. Got my pipe to build, gonna start trying to get things drawing.


So what does it do right now? Well, to be honest: Nothing. But it's the point at where the groundwork should be (mostly) done and development can focus on actually implementing features. You can watch Corbin's progress in his mesa branch.

Source


Branches



Speaking of branches, radeon development is right now happening in many places. It's hard to tell where to start since different developers are working at different features at different places. This is even agreed by leading radeon developers like Jermone Glisse.


03:15 #dri-devel: < glisse> way too much branch in way too much place


Radeon developers try to avoid conflicts with intel development (happening in the official mesa and drm trees) by using seperate private repositories. This avoids regressions in the intel side but increases complexity of the development process. The nouveau project does it's development in the official trees, too.


00:49 #dri-devel: < pq> with Nouveau it's easy: just use drm.git drm.ko and nouveau.ko, and Nouveau's latest DDX


Let's hope the work being done is sooner getting stable and will be slowly merged over to the official branches.

Testing Gallium



I'll try to explain how to play with Gallium/KMS/DRI2/GEM/TTM by choosing the right branches. Note that this is for testing and not every day usage. I can't tell if I get it right since I never did this myself. I can't test any of the commands listed below as I'm writing this on a win32 system.

First of all you need a Radeon KMS and GEM capable kernel. These are not yet available in any kernel release (and won't be in 2.6.29) so you need to clone the following tree.


mkdir /usr/src/linux-radeon
cd /usr/src/linux-radeon
git clone git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git .
git checkout --track -b drm-rawhide origin/drm-rawhide


Now you need to build and install this kernel. Note that it's a 2.6.28-rc9 (IIRC) so it's not recommend for every day usage. You might also need to install GEM-capable kernel headers. There might be specific instructions for you distribution.

After that you need a modesetting capable libdrm.


mkdir /usr/src/drm
cd /usr/src/drm
git clone git://anongit.freedesktop.org/mesa/drm .
git checkout --track -b modesetting-gem origin/modesetting-gem


Now you need a GEM aware DDX (2D X.org driver). I'm not sure which one is the correct one.


mkdir /usr/src/xf86-video-ati-airlied
cd /usr/src/xf86-video-ati-airlied
git clone git://anongit.freedesktop.org/~airlied/xf86-video-ati .
git checkout --track -b radeon-gem-cs2 origin/radeon-gem-cs2



mkdir /usr/src/xf86-video-ati-glisse
cd /usr/src/xf86-video-ati-glisse
git clone git://anongit.freedesktop.org/~glisse/xf86-video-ati .
git checkout --track -b radeon-gem-cs-dri2 origin/radeon-gem-cs-dri2


Both should be more or less the same, i.e. DRI2, KMS and GEM capable. This work will likely be done for xf86-video-radeonhd at a later point, too.

Finally you need a Gallium Mesa tree.

mkdir /usr/src/xf86-video-ati-glisse
cd /usr/src/xf86-video-ati-glisse
git clone git://anongit.freedesktop.org/~csimpson/mesa .
git checkout --track -b gallium-0.2-radeon origin/gallium-0.2-radeon


This might lead you the right way, or might eliminate your whole disk. There are no guarantees on this guide.
              
 楼主| 发表于 2009-4-21 22:45:23 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2009-4-23 23:15:10 | 显示全部楼层
一直在用,跟踪了一个多月了,bug越来越少了,现在gear没问题了,mplayer用xv及gl来输出也没问题,compiz-fusion还没编译,不知道行不行。就是console下字符显示性能明显比radeonfb要慢。听说要到2.6.31才能进内核。可惜我的8500不能支持gallium。没法试验新的驱动模式。
注意:楼主帖子里的DDX驱动和Mesa驱动都已过时。
ddx请用git://anongit.freedesktop.org/~airlied/xf86-video-ati radeon-gem-cs3
mesa请用git://anongit.freedesktop.org/mesa/mesa radeon-rewrite.重写了整个radeon系列的驱动并支持r300的gallium模式
回复 支持 反对

使用道具 举报

发表于 2009-4-23 23:49:28 | 显示全部楼层
哇,都是奔赴在前沿的人阿。

我的2600xt一直是SUSE系统默认,真的很心动。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-23 23:57:49 | 显示全部楼层
Post by iamfool;1978678
ddx请用git://anongit.freedesktop.org/~airlied/xf86-video-ati radeon-gem-cs3
mesa请用git://anongit.freedesktop.org/mesa/mesa radeon-rewrite.重写了整个radeon系列的驱动并支持r300的gallium模式

多谢!
Mesa 偶现在使用的是您给出的版本,忘了从那找到的。
radeon 驱动使用的是 radeon-gem-cs2,没驱动起来。

把您消息来源也一并给出来吧!
回复 支持 反对

使用道具 举报

发表于 2009-4-24 08:32:40 | 显示全部楼层
Rewriting The Radeon 3D Support In Mesa
http://www.phoronix.com/scan.php?page=news_item&px=NzA2MA
http://airlied.livejournal.com/65755.html
dri2 and/or kms status
http://www.phoronix.com/forums/showthread.php?t=15945

楼主能上livejournal吗?我这里可是被和谐了。要用google快照才行
回复 支持 反对

使用道具 举报

发表于 2009-4-24 17:10:06 | 显示全部楼层
用opera的turbo版本可以上的,很快。嘿嘿。。又一个翻墙利器

和手机上的opera mini很像!

还有,我用的就是ls所说的那几个,也是着了很久,全是看最近更新的编译的额,嘿嘿
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-24 18:34:48 | 显示全部楼层
需要安装的包 顺序 和 git分支 如下:
linux-kernel:
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-rawhide
[color="Red"]偶这里为简便,把 KMS 支持编译进内核;
不能、也不需要安装内核头文件,升级内核头文件,有必要更新整个编译工具链。
libdrm:
git://git.freedesktop.org/git/mesa/drm.git modesetting-gem
Mesa:
git://people.freedesktop.org/~airlied/mesa radeon-rewrite
[color="Red"]有时间会试试 Mesa 官方源,看看效果。
xf86-video-ati:
git://people.freedesktop.org/~airlied/xf86-video-ati radeon-gem-cs3
[color="Red"]偶机器上很稳定,ATI radeon X1400,3D 正常,glxgears 有微量提升。

偶原来对 KMS 与 framebuffer 有些误解:启用 KMS 时,无法使用 video=xxx vga=xxx 的内核启动参数,KMS 内核模块会自动设置 framebuffer 工作模式,使用 framebuffer 的程序应能正常工作。
下图为证:工作在 KMS 上的 fbterm + ucimf

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-24 18:37:22 | 显示全部楼层
Post by iamfool;1978750
楼主能上livejournal吗?我这里可是被和谐了。要用google快照才行

要翻墙。
google 快照 偶 这里倒是一直不能直接访问。
回复 支持 反对

使用道具 举报

发表于 2009-4-24 22:05:16 | 显示全部楼层
我发现如果不使用kms内核的头文件,编译出来的DDX驱动和Mesa驱动会有问题,glxgear无法运行,也无法打开dri,因为使用kms就会把xorg显示部分的内存管理放到内核里,不更新对应的头文件会有问题。
还有,使用kms在console下的显示性能下降很多,特别时在翻屏时,不知道各位有没有这个感觉
另:google快照只有google.cn的能上,google.com的是不能上的。
不知道几位有没有用mplayer,我这里使用opengl后端来放fullhd的片子时显示会崩溃,xv就没事,不知道是否是kms驱动的问题。
回复 支持 反对

使用道具 举报

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

本版积分规则

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