Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: latest ATI devel - KMS / GEM / Gallium3D
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
goatcheese
n00b
n00b


Joined: 03 Nov 2005
Posts: 23
Location: Seoul, South Korea

PostPosted: Sat Apr 18, 2009 6:04 pm    Post subject: HOWTO: latest ATI devel - KMS / GEM / Gallium3D Reply with quote

Heres my go at getting all the latest Xorg goodies you read about - DRI2 / KMS / GEM / gallium / etc. The hardware victim is a T60 IBM Thinkpad with an ATI Mobility X1400 GPU. The base system is an up to date ~x86 using only the x11 overlay. A couple of the ebuilds from overlay needed modifications as well. Don't forget to unmask / keyword as necessary.

Kernel - To get a kernel with the latest ati drm code nicely merged I used the drm-rawhide branch from Dave Airlie's kernel tree.

Code:

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


currently that branch is synced to 2.6.28_rc8

Make sure the following kernel options are enabled


    CONFIG_DRM_RADEON=y
    CONFIG_DRM_RADEON_KMS=y
    CONFIG_FB=y


build & reboot & you should be good to go on the kernel side.


libdrm - The interesting work seems to be happening in the modesetting-gem branch. The following is the build from the overlay with the necessary GIT_BRANCH line.

Code:

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-libs/libdrm/libdrm-2.3.0.ebuild,v 1.8 2007/05/20 20:47:52 jer Exp $

# Must be before x-modular eclass is inherited
#SNAPSHOT="yes"
EGIT_BRANCH="modesetting-gem"

inherit autotools x-modular

EGIT_REPO_URI="git://anongit.freedesktop.org/git/mesa/drm"
EGIT_BOOTSTRAP="eautoreconf"

DESCRIPTION="X.Org libdrm library"
HOMEPAGE="http://dri.freedesktop.org/"
SRC_URI=""

KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"

IUSE=""
RESTRICT="test" # see bug #236845

CONFIGURE_OPTIONS="--enable-udev --enable-nouveau-experimental-api"

pkg_postinst() {
    x-modular_pkg_postinst

    ewarn "libdrm's ABI may have changed without change in library name"
    ewarn "Please rebuild media-libs/mesa, x11-base/xorg-server and"
    ewarn "your video drivers in x11-drivers/*."
}


then

Code:

emerge -1av =x11-libs/libdrm-9999-r1



mesa - You want the radeon-rewrite branch of mesa. To get it you don't need to modify the x11 layover ebuild, just add the following line to your make.conf:


    MESA_LIVE_BRANCH="radeon-rewrite"


then

Code:

emerge -1av =media-libs/mesa-9999


ati xorg driver - the branch here is radeon-gem-cs3 from Dave Airlie's git repo. To obtain this I created xf86-video-ati-9999-r1 from a the x11 overlay ebuild & added the git branch.

Code:

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-ati/xf86-video-ati-6.6.192.ebuild,v 1.1 2007/05/21 05:25:33 dberkholz Exp $

# Must be before x-modular eclass is inherited
SNAPSHOT="yes"
EGIT_BRANCH="radeon-gem-cs3"

inherit x-modular

EGIT_REPO_URI="git://anongit.freedesktop.org/~airlied/xf86-video-ati"
EGIT_BOOTSTRAP="eautoreconf"

DESCRIPTION="ATI video driver"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
SRC_URI=""
IUSE="dri"

RDEPEND=">=x11-base/xorg-server-1.2"
DEPEND="${RDEPEND}
    >=x11-misc/util-macros-1.1.3
    x11-proto/fontsproto
    x11-proto/randrproto
    x11-proto/videoproto
    x11-proto/xextproto
    x11-proto/xineramaproto
    x11-proto/xf86miscproto
    x11-proto/xproto
    dri? ( x11-proto/glproto
            x11-proto/xf86driproto
            >=x11-libs/libdrm-2 )"

CONFIGURE_OPTIONS="$(use_enable dri)"


then build

Code:

emerge -1av =x11-drivers/xf86-video-ati-9999-r1



The xserver automagic config works well enough now that my xorg.conf has now been whittled down to just


    Section "Files"
    FontPath "/usr/share/fonts/misc/"
    FontPath "/usr/share/fonts/75dpi/"
    FontPath "/usr/share/fonts/100dpi/"
    FontPath "/usr/share/fonts/corefonts"
    EndSection

    Section "Device"
    Identifier "ati"
    Driver "ati"
    Option "BackingStore" "True"
    Option "EnablePageFlip" "True"
    Option "DynamicClocks" "True"
    EndSection


So how's it all work? Pretty well actually (using the system to post this). No random crashes so far. KMS makes VT switching immediate. hardware rendering is working with


    OpenGL vendor string: DRI R300 Project
    OpenGL renderer string: Mesa DRI R300 20090101 x86/MMX/SSE2 TCL DRI2
    OpenGL version string: 1.4 Mesa 7.5-devel


I'm guessing from the renderer string that gallium is not currently enabled, but not exactly sure. Perhaps someone can correct me on this?

2d is solid, 3d is a mixed bag. Full screen hulu is perfectly smooth on LVDS but studders if I attach my TV & have both screens running simultaniously. Good 'ol glxgears shows 1470 fps & quake 3 works well. googleearth & nexiuz are both no-go's tho. Both fail with

*********************************WARN_ONCE*********************************
File r300_render.c function r300Fallback line 463
Software fallback:ctx->Stencil.Ref[0] != ctx->Stencil.Ref[back] || ctx->Stencil.ValueMask[0] != ctx->Stencil.ValueMask[back] || ctx->Stencil.WriteMask[0] != ctx->Stencil.WriteMask[back]
***************************************************************************


This is all greatly in flux so in a week I'm sure half this post will be completely invalid. mesa 7.5 is right around the corner which will contain a bunch of gallium stuff, but I've no idea if the radeon-rewrite stuff will get merged.

Good luck, hope this helps someone else.
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Sat Apr 18, 2009 6:39 pm    Post subject: Reply with quote

:?

You just beat me to it by about 20 minutes, damn my procrastination...

Anyways, your howto is clearer than mine and in the right section, so nice work. :P

Here's a link to download the 2 ebuilds (libdrm & xf86-video-ati), and patches derived from the drm-rawhide tree, which apply cleanly to 2.6.29.1 kernels (such as gentoo-sources-2.6.29-r1).

goatcheese; how do you find it?
Any issues with XV video output?
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
goatcheese
n00b
n00b


Joined: 03 Nov 2005
Posts: 23
Location: Seoul, South Korea

PostPosted: Sat Apr 18, 2009 7:42 pm    Post subject: Reply with quote

@Hopeless Thanks, been meaning to do this for a couple weeks now, just finally got motivated this morning. kernel patches... neat, how did you generate those? Not tested xv, so no clue. Any idea on the gallium part of all this?
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Sat Apr 18, 2009 8:27 pm    Post subject: Reply with quote

goatcheese wrote:
kernel patches... neat, how did you generate those?
I just fetched the 2.6.29 rc8 tarball from kernel.org and made a diff.

Quote:
Any idea on the gallium part of all this?
None, I was wondering the same, but according to the ebuild; "Radeon: not working, disabled."

We could probably try forcibly enabling it, I just ran ./configure --help on the unpacked mesa sources from the radeon-rewrite branch and --enable-gallium-radeon is an option.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
goatcheese
n00b
n00b


Joined: 03 Nov 2005
Posts: 23
Location: Seoul, South Korea

PostPosted: Sat Apr 18, 2009 11:09 pm    Post subject: Reply with quote

Hopeless wrote:

Quote:
Any idea on the gallium part of all this?
None, I was wondering the same, but according to the ebuild; "Radeon: not working, disabled."

We could probably try forcibly enabling it, I just ran ./configure --help on the unpacked mesa sources from the radeon-rewrite branch and --enable-gallium-radeon is an option.


Ah, the mesa ebuild has the following line in it which enables that:

Quote:

#$(use_enable video_cards_radeon gallium-radeon)


I uncommented it, rebuilt mesa, X & the ati driver. No diffrerence, still the same renderer string & the Xorg log makes no mention of it either. Guess I'll go google & read through IRC logs. Someone has to have asked about this.
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Sat Apr 18, 2009 11:50 pm    Post subject: Reply with quote

any love for R770 owners like myself?

currently rocking out with 2d and xv accel, but nothing else :(
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
goatcheese
n00b
n00b


Joined: 03 Nov 2005
Posts: 23
Location: Seoul, South Korea

PostPosted: Sun Apr 19, 2009 12:11 am    Post subject: Reply with quote

poly_poly-man wrote:
any love for R770 owners like myself?

currently rocking out with 2d and xv accel, but nothing else :(


You should try the r6xx-r7xx-support branch of drm & mesa. Its pretty new so make sure you wear your seatbelt. Or you can just send me your card & I'll try it for you =)
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Sun Apr 19, 2009 12:27 am    Post subject: Reply with quote

goatcheese wrote:
poly_poly-man wrote:
any love for R770 owners like myself?

currently rocking out with 2d and xv accel, but nothing else :(


You should try the r6xx-r7xx-support branch of drm & mesa. Its pretty new so make sure you wear your seatbelt. Or you can just send me your card & I'll try it for you =)
you know, that would be a good idea for me if you sent it back later with a free silent ( or very quiet) cooler... having a loud, hot card in here doing really only XV accel is a pretty bad waste...

sucks that I had to get the card with no fan control or power management :(
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
Fran
Guru
Guru


Joined: 29 Feb 2004
Posts: 530
Location: Coruña (Spain)

PostPosted: Sun Apr 19, 2009 2:19 am    Post subject: Reply with quote

I've been playing with KMS + nouveau (FC11 kernel patches). It works great. Maybe I should post a howto too, but I'm a bit lazy :P
Back to top
View user's profile Send private message
Rion
Guru
Guru


Joined: 12 Oct 2006
Posts: 383
Location: Minsk, Belarus

PostPosted: Sun Apr 19, 2009 6:03 am    Post subject: Reply with quote

i need kernel with reiser4 and radeon_kms. is here one? :)
i usually use zen kernel. 2.6.29-zen1 for now.
_________________
rion-overlay
Back to top
View user's profile Send private message
Ormaaj
Guru
Guru


Joined: 28 Jan 2008
Posts: 319

PostPosted: Mon Apr 27, 2009 7:12 am    Post subject: Reply with quote

Anyone happen to have an ebuild for the 6xx-7xx-3d drm branch? Modifying the ebuild from the x11 overlay doesn't seem to work for me.
Back to top
View user's profile Send private message
ssmaxss
Apprentice
Apprentice


Joined: 28 Jun 2005
Posts: 160
Location: Moscow, Russia.

PostPosted: Mon Apr 27, 2009 9:46 am    Post subject: Reply with quote

I tried to to install 3d for r6xx (created mesa-9999,libdrm-9999,x11-drm-9999) but it doesn't work at least for me. Glxgears just crash.
Back to top
View user's profile Send private message
goatcheese
n00b
n00b


Joined: 03 Nov 2005
Posts: 23
Location: Seoul, South Korea

PostPosted: Mon Apr 27, 2009 1:24 pm    Post subject: Reply with quote

Judging from the commits it dooesn't look like the branches I mentioned have any support for the r6xx r7xx cards. Most of the current work seems focused on the r2xx to r5xx cards. mesa has 2 branches you should check out - r6xx-r7xx-support and r6xx-rewrite. Looks like these are the beginnings of a 3d driver.
Back to top
View user's profile Send private message
justinkb
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 161

PostPosted: Mon Apr 27, 2009 2:07 pm    Post subject: Reply with quote

wanted to add the following: KMS doesn't work for r6xx-7xx right now, don't bother trying.

can't wait for it to be added so i can finally have a proper 1920x1080 fb console...
Back to top
View user's profile Send private message
goatcheese
n00b
n00b


Joined: 03 Nov 2005
Posts: 23
Location: Seoul, South Korea

PostPosted: Thu Apr 30, 2009 5:56 pm    Post subject: irrelevant! Reply with quote

Looks like the developement has moved to slightly different trees now, and the state of things sounds promising:

http://jglisse.livejournal.com/1822.html

Looks to only be for R300 - R500 cards, people with newer hardware are going to have to wait a bit more I'm afraid.
Back to top
View user's profile Send private message
pingufunkybeat
l33t
l33t


Joined: 01 Dec 2004
Posts: 610

PostPosted: Thu Apr 30, 2009 11:57 pm    Post subject: Reply with quote

The same developer has also commented that he plans to merge the r600-r700 code sometime next week.

It looks like most of the work on 3D for 600/700 is going on on top of the new, KMS+GEM+DRI2 infrastructure at the moment anyway (radeon-rewrite branch of Mesa).

So, if I understand correctly, perhaps in a week or two we'll have R600/R700 drivers built on KMS+GEM+DRI2, with most of the 2D stuff working. The 3D support will require building the radeon-rewrite branch of Mesa, which requires GEM+DRI2, and at the moment, this 3D support is rudimentary, but improving rapidly. I don't know when the Gallium3D stuff will kick in.

In any case, all the important stuff happening at the moment (proper load-based power management, 3D) will be built on top of this new framework.

I'll keep an eye on this thread in any case. As soon as I get 2D on my R700, I'll switch.
Back to top
View user's profile Send private message
justinkb
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 161

PostPosted: Fri May 01, 2009 12:10 am    Post subject: Reply with quote

i doubt it will be two weeks... probably 2 months at least. also, radeon-rewrite has no r6xx-r7xx code, 3d stuff for those chips is being done in r6xx-rewrite and r6xx-r7xx-support. well, fuck all has been done in it since the initial code got added, tbh :P

i really hope kms on my hd4870 will work soon though... tho i'm not holding my breath.
Back to top
View user's profile Send private message
pingufunkybeat
l33t
l33t


Joined: 01 Dec 2004
Posts: 610

PostPosted: Fri May 01, 2009 12:36 am    Post subject: Reply with quote

You're right, I meant R600-rewrite, but with all this stuff happening in parallel, it's really hard to keep track of everything, so maybe I'm confused. I guess that this isn't the focus for R600+ cards, but will be in the future.

In any case, the official plan is to get the standard (non-KMS/GEM) driver to the point where R600/700 3d is at the level where it is for R500- and then concentrate on the rewritten (KMS/GEM/DRI2) branch.

For me, I want to use the new DRM/KMS/GEM-TTM and DRI2 with Xv and EXA working on my card. This is close to happening, I believe, and the new rudimentary power-saving options added recently should find their way into this new driver too. At that point, I'm content to upgrade and wait patiently for a working 3D implementation, I'm not in a hurry. 8)
Back to top
View user's profile Send private message
justinkb
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 161

PostPosted: Fri May 01, 2009 12:41 am    Post subject: Reply with quote

yea tbh i don't give a fuck about 3d either... any 3d i use is fast enough with softpipe. but it's cool if it's finally supported...
Back to top
View user's profile Send private message
goatcheese
n00b
n00b


Joined: 03 Nov 2005
Posts: 23
Location: Seoul, South Korea

PostPosted: Fri May 01, 2009 3:05 am    Post subject: Reply with quote

Saw on IRC today mention that once the mesa 7.5 branch gets created (ETA "real soon") they're going to merge the radeon-rewrite branch to master. One less random branch to track down.

Also interested to see how the gallium OpenVG state tracker is getting released tomorrowish works out. Hope that means full screen flash performance will officially stop sucking.
Back to top
View user's profile Send private message
Genewb
Apprentice
Apprentice


Joined: 09 Jan 2007
Posts: 165

PostPosted: Thu Jun 11, 2009 10:57 pm    Post subject: Reply with quote

Has anyone reading this been able to override repo or branch since the x11 overlay's recent bout of changes?
Back to top
View user's profile Send private message
Ormaaj
Guru
Guru


Joined: 28 Jan 2008
Posts: 319

PostPosted: Wed Jun 17, 2009 8:56 pm    Post subject: Reply with quote

Genewb wrote:
Has anyone reading this been able to override repo or branch since the x11 overlay's recent bout of changes?
I'm not quite sure what to do. I've been reading about r6xx-r7xx coming along for months but i'm really unsure of the state of 3d support. Has anyone managed to get even basic 3D support for r700 on gentoo?

I noticed they removed the egit_branch variables so I'm guessing this is because attempting to do this is a bad idea.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum