r350 drm

Jonathan Noack noackjr at alumni.rice.edu
Thu May 5 05:10:47 PDT 2005


On 05/05/05 00:24, Eric Anholt wrote:
> On Thu, 2005-05-05 at 00:18 -0500, Jonathan Noack wrote:
>>On 05/04/05 23:59, Eric Anholt wrote:
>>>On Wed, 2005-05-04 at 23:48 -0500, Jonathan Noack wrote:
>>>>I decided to play around with all the new DRM/DRI/XORG/ETC stuff.  I 
>>>>looked over at the r300.sourceforge.net site for some info, added my 
>>>>All-In-Wonder 9800 Pro to the PCI IDs (see attached drm.diff), and then 
>>>>kldloaded radeon.  Looks like it worked successfully:
>>>>
>>>>kernel: drm0: <ATI Radeon NH R350 9800 Pro> port 0x7800-0x78ff mem 
>>>>0xd0000000-0xd7ffffff,0xefcf0000-0xefcfffff irq 16 at device 0.0 on pci1
>>>>kernel: info: [drm] AGP at 0xe0000000 128MB
>>>>kernel: info: [drm] Initialized radeon 1.16.0 20050311 on minor 0
>>>>kernel: info: [drm] Loading R300 Microcode
>>>>
>>>>With the xorg-server-snapshot and dri-devel I seem to have even enabled 
>>>>direct rendering (see Xorg log output in attached drm.txt), although 
>>>>render acceleration is disabled.
>>>
>>>You did install both the DRM and DRI driver from r300.sf.net CVS, right?
>>>I was wrong about our kernel DRM really supporting r300 -- the
>>>development is now happening in their CVS, until they get things
>>>stabilized.
>>>
>>>This patch should be sent to r300.sf.net folks once you get it working,
>>>assuming they don't already have it in their CVS.
>>>
>>>http://dri.sourceforge.net/cgi-bin/moin.cgi/DriTroubleshooting  has
>>>instructions on troubleshooting DRI issues.
>>
>>No, that patch is the only change I made.  I pulled the PCI ID from the 
>>r300 CVS, so they already have it.  If the r300 support in our kernel 
>>DRM doesn't work then I have accomplished nothing because I was just 
>>making the r350 look like an r300.  So much for the easy way...
> 
> Hopefully soon they'll be ready to merge back to DRM and Mesa CVS.  I'll
> only be merging DRM CVS to FreeBSD-current, though.

I got everything successfully compiled from CVS and installed.  However, 
I experience the same lockup issues that many others have experienced 
with 9800 cards (except for me it is instantaneous).  That's progress, I 
guess...

If anyone wants to try this, the procedure I used is below.  It follows 
the README at 
http://cvs.sourceforge.net/viewcvs.py/r300/r300_driver/README?rev=1.10&view=markup. 
  What I do is checkout the sources from CVS, build and install the 
kernel modules, and then modify the graphics/dri-devel port to integrate 
everything.  It's not pretty, but it works.  I hope I haven't forgotten 
anything here...

NOTE: There was a big commit to Mesa yesterday that broke the r300 
driver.  I added "-D '5/4/05 20:00:00 UTC'" between the "co" and "Mesa" 
in step 5d to grab a version of Mesa from right before the change.  The 
r300 folks should catch up with this soon.

0) Be root (the dri-devel.diff patch depends on it)
1) Install the x11-servers/xorg-server-snap port
    a) To install from scratch:
       portinstall x11-servers/xorg-server-snap
    b) To reinstall or upgrade:
       portupgrade -fo x11-servers/xorg-server-snap xorg-server
2) Checkout the r300_driver to your home directory (password is blank)
    a) cd ~
    b) touch .cvspass (if you have used CVS before this is not necessary)
    c) cvs -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/r300 login
    d) cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/r300 co 
-P r300_driver
3) Apply the r300.diff patch
    a) cd ~/r300_driver
    b) patch < /path/to/r300.diff
4) Build the kernel modules and install them
    a) cd ~/r300_driver/drm/bsd-core
    b) make clean && make depend && make
    c) cp drm/drm.ko /boot/kernel/
    d) cp radeon/radeon.ko /boot/kernel/
    e) make clean
5) Checkout Mesa to your home directory (password is blank)
    a) cd ~
    b) touch .cvspass (shouldn't be required if you completed step 2b)
    c) cvs -d:pserver:anonymous at dri.freedesktop.org:/cvs/mesa login
    d) cvs -z3 -d:pserver:anonymous at dri.freedesktop.org:/cvs/mesa co Mesa
6) Apply the mesa.diff path
    a) cd ~/Mesa
    b) patch < /path/to/mesa.diff
7) Apply the dri-devel.diff path
    a) cd /usr/ports/graphics/dri-devel
    b) patch < /path/to/dri-devel.diff
8) Install the graphics/dri-devel port
    a) To install from scratch:
       portinstall graphics/dri-devel
    b) To reinstall or upgrade:
       portupgrade -fo graphics/dri-devel dri
9) Make sure you have the correct settings in /etc/X11/xorg.conf 
(xorg.conf may not be in /etc/X11)
    a) Load the DRI module (make sure this isn't commented out):
     Load       "dri"
    b) Allow non-root users access to DRI (add this to the bottom):
Section "DRI"
     Mode 0666
EndSection
10) Restart X (logout and Ctrl-Alt-Backspace)
11) Enjoy...

-- 
Jonathan Noack | noackjr at alumni.rice.edu | OpenPGP: 0x991D8195
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dri-devel.diff
Type: text/x-patch
Size: 1798 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20050505/398b7aff/dri-devel.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mesa.diff
Type: text/x-patch
Size: 1181 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20050505/398b7aff/mesa.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r300.diff
Type: text/x-patch
Size: 1719 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20050505/398b7aff/r300.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20050505/398b7aff/signature.bin


More information about the freebsd-x11 mailing list