[ Main Page ]

以下の内容は、古いものです。くわしいことは、Freedesktop.orgDRI@sourceforgeなどを参照して下さい。


Linux 2.6 のためのATI Mach64 XFree86 4.3.0 GLX/Xvideo ドライバ

Linux 2.6が出てから結構経ちますが、昔の3Dカードのサポートは段々減ってくるようで、ちょっと寂しいですね。 自分の持っている機械のグラフィックは、ATI 3D Rage Proというもので、まだまだ 現役ですが、GLX/Xvideoのドライバはもう配布されていないようです。 そこで、昔 Unified DRI and XVideo Support for Mach64で手にいれたLinux 2.4用のドライバをちょっと書き直して、 Linux 2.6で使えるようにしました。バグなどがあったら報告いただけると 幸です。
Mach64 Linux 2.2.x/2.4.x
Mach64 Linux 2.6.0-testx

上にたいするいくつかの注意点

上のドライバはXFree86のバージョンが4.3.0のためのものです。自分の使っているSlackware-9.0などではそのまま使えましたが、 それ以外の場合は1からコンパイルする必要があるかもしれません。 (Xを立ち上げられなければもちろんだが、立ち上げてglxinfoとターミナルから入力した時に

teru@server:~$ glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
...

という表示がされず

teru@server:~$ glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: No
...

であれば立ち上がっていてもDRIはできていません。 )
その場合の手順を説明します。 まずXのソースをすべて手に入れます。(もしかしたら必要ないかもしれません。 distributionの状態によって異るようです。)
次に、以下のコマンドでCVSからファイルをとってきます。 まずlogonします。

teru@server:~$ cd /tmp (DownloadしたいDIRに移動)
teru@server:/tmp$ cvs -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri login
Logging in to :pserver:anonymous@cvs.dri.sourceforge.net:2401/cvsroot/dri
CVS password: (そのままEnter)

次にファイルを取ります。

teru@server:~$ cvs -z3 -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri co -r mach64-0-0-5-branch xc

これでカレントディレクトリに./xc/xcとしてダウンロードされます。
次にpatchをdownloadします。 Unified DRI and XVideo Support for Mach64 で、下のほうの

Patch and Binaries for mach64-0-0-6-branch (XFree86 4.3.0)
Source patch: mach64-dri-xv-20030331.diff.gz

Patch and Binaries for mach64-0-0-5-branch (XFree86 4.2.0):
Source patch: mach64-dri-xv-20020917.diff.gz

からdownloadします。次に ./xc/programs/Xserver/hw/xfree86/drivers/atiに移動して

teru@server:/tmp/xc/xc/programs/Xserver/hw/xfree86/drivers/ati$ zcat (patch filename)|patch -p1

なりします。 あとは./xc/xcに移動して適当にXのソースのパスを設定して make Worldしてmake installすればいいはずです。設定は 必要ないかもしれません。(もしエラーが起きたなら、make -i で一通りインストールして後述のパッチつきのモジュールを 組み込めば良いでしょう。) 何か問題があれば、configなどを探して直すしかありません。 distributionによって違うことがあるので一概にはいえません。 どうしてもわからない時はメールを下さればお答え出来るかもしれません。
ところで、先ほどはmach64-0-0-5-branchをダウンロードしましたが、 最新はmach64-0-0-6-branchなので、書き換えれば 最新のが手に入ります。しかし、この2つは似ているようで DRIマネージャの書き方が大きく違うために同じDRMカーネルモジュールでは 動きません。
附属しているものを基本的には使って下さい。 (make installでinstallされるが念のため 言っておくと./xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel にある。ここでコンパイルされる。) Linux-2.6.Xでは 最新でもDRMカーネルモジュールはコンパイルできなかったので そのためにちょっと書換えたファイルを置いておきます。 つかいかたは両方共に、ディレクトリに入ってmake -f Makefile.mach64で 済むようにしてあります。できたmach64.koを insmodしてやればあとはXを立ち上げるだけです。 directoryには別のcardのdriverもありますがcompileは保証しません。
また、注意点として、mach64-0-0-5では実行できるOpenGLプログラムがmach64-0-0-6では実行できない事があります。 このため前者の使用を推薦しますが、これはおそらくメモリがたりないからなのでしょう。
Linux-2.6.Xのためのmach64-0-0-X-branchのpatched kernel drm driver
for mach64-0-0-5
for mach64-0-0-6

       <Anon>  today my kitty gave a birth to two kitties!
    <rindolf>  Anon: ah, nice.
       <Anon>  one of them died :(
       <Anon>  during birth
    <rindolf>  Anon: oh. :-(
 <simcop2387>  Anon: were you expecting it to happen?
 <simcop2387>  :(
       <Anon>  simcop2387, i was expecting this week
    <rindolf>  Anon: do you know who the father is?
 <simcop2387>  ah
       <Anon>  rindolf, some cat
 <simcop2387>  rindolf: hopefully not him
       <Anon>  rindolf, remember my kitty ran away
    <rindolf>  Anon: ah.
       <Anon>  for a week
    <rindolf>  Anon: no I don't remember that.
       <Anon>  well, she ran away for a week
    <rindolf>  Anon: ah.
       <Anon>  and came back
       <Anon>  and during that time she got pregnant.
    <rindolf>  Anon: ah.
   <freehaha>  they don't seem to have safe sex
    <rindolf>  Anon: she eloped.
 <simcop2387>  Anon: sounds like she had fun
       <Anon>  simcop2387, sounds like that :)
 <simcop2387>  Anon: you should have the talk with her about birth control
               then (i wonder do they even make birth control for kitties)

    -- The Love Life of Cats
    -- #perl, Freenode

Rule of Open-Source Programming #1:

Don't whine unless you are going to implement it yourself.

    -- Shlomi Fish
    -- "Rules of Open Source Programming"


Powered by UNIX fortune(6)
[ Main Page ]