Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

HOWTO: latest ATI devel - KMS / GEM / Gallium3D

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
22 posts • Page 1 of 1
Author
Message
goatcheese
n00b
n00b
User avatar
Posts: 23
Joined: Thu Nov 03, 2005 7:44 am
Location: Seoul, South Korea

HOWTO: latest ATI devel - KMS / GEM / Gallium3D

  • Quote

Post by goatcheese » Sat Apr 18, 2009 6:04 pm

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: Select all

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: Select all

# 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: Select all

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: Select all

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: Select all

# 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: Select all

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.
Top
Sadako
Advocate
Advocate
User avatar
Posts: 3792
Joined: Thu Aug 05, 2004 5:50 pm
Location: sleeping in the bathtub
Contact:
Contact Sadako
Website

  • Quote

Post by Sadako » Sat Apr 18, 2009 6:39 pm

:?

You just [post=5662904]beat me to it[/post] 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"
Top
goatcheese
n00b
n00b
User avatar
Posts: 23
Joined: Thu Nov 03, 2005 7:44 am
Location: Seoul, South Korea

  • Quote

Post by goatcheese » Sat Apr 18, 2009 7:42 pm

@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?
Top
Sadako
Advocate
Advocate
User avatar
Posts: 3792
Joined: Thu Aug 05, 2004 5:50 pm
Location: sleeping in the bathtub
Contact:
Contact Sadako
Website

  • Quote

Post by Sadako » Sat Apr 18, 2009 8:27 pm

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.
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"
Top
goatcheese
n00b
n00b
User avatar
Posts: 23
Joined: Thu Nov 03, 2005 7:44 am
Location: Seoul, South Korea

  • Quote

Post by goatcheese » Sat Apr 18, 2009 11:09 pm

Hopeless wrote:
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:
#$(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.
Top
poly_poly-man
Advocate
Advocate
User avatar
Posts: 2477
Joined: Wed Dec 06, 2006 9:59 pm
Location: RIT, NY, US
Contact:
Contact poly_poly-man
Website

  • Quote

Post by poly_poly-man » Sat Apr 18, 2009 11:50 pm

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[/topic]. Potentially still a WiP.
Top
goatcheese
n00b
n00b
User avatar
Posts: 23
Joined: Thu Nov 03, 2005 7:44 am
Location: Seoul, South Korea

  • Quote

Post by goatcheese » Sun Apr 19, 2009 12:11 am

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 =)
Top
poly_poly-man
Advocate
Advocate
User avatar
Posts: 2477
Joined: Wed Dec 06, 2006 9:59 pm
Location: RIT, NY, US
Contact:
Contact poly_poly-man
Website

  • Quote

Post by poly_poly-man » Sun Apr 19, 2009 12:27 am

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[/topic]. Potentially still a WiP.
Top
Fran
Guru
Guru
User avatar
Posts: 530
Joined: Sun Feb 29, 2004 3:14 pm
Location: Coruña (Spain)

  • Quote

Post by Fran » Sun Apr 19, 2009 2:19 am

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
Top
Rion
Guru
Guru
User avatar
Posts: 383
Joined: Thu Oct 12, 2006 4:09 am
Location: Minsk, Belarus
Contact:
Contact Rion
Website

  • Quote

Post by Rion » Sun Apr 19, 2009 6:03 am

i need kernel with reiser4 and radeon_kms. is here one? :)
i usually use zen kernel. 2.6.29-zen1 for now.
rion-overlay
Top
Ormaaj
Guru
Guru
User avatar
Posts: 319
Joined: Mon Jan 28, 2008 8:04 am

  • Quote

Post by Ormaaj » Mon Apr 27, 2009 7:12 am

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.
Top
ssmaxss
Apprentice
Apprentice
Posts: 160
Joined: Tue Jun 28, 2005 10:19 am
Location: Moscow, Russia.

  • Quote

Post by ssmaxss » Mon Apr 27, 2009 9:46 am

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.
Top
goatcheese
n00b
n00b
User avatar
Posts: 23
Joined: Thu Nov 03, 2005 7:44 am
Location: Seoul, South Korea

  • Quote

Post by goatcheese » Mon Apr 27, 2009 1:24 pm

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.
Top
justinkb
Apprentice
Apprentice
Posts: 161
Joined: Tue Dec 23, 2008 10:41 pm

  • Quote

Post by justinkb » Mon Apr 27, 2009 2:07 pm

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...
Top
goatcheese
n00b
n00b
User avatar
Posts: 23
Joined: Thu Nov 03, 2005 7:44 am
Location: Seoul, South Korea

irrelevant!

  • Quote

Post by goatcheese » Thu Apr 30, 2009 5:56 pm

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.
Top
pingufunkybeat
l33t
l33t
Posts: 610
Joined: Wed Dec 01, 2004 12:03 am

  • Quote

Post by pingufunkybeat » Thu Apr 30, 2009 11:57 pm

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.
Top
justinkb
Apprentice
Apprentice
Posts: 161
Joined: Tue Dec 23, 2008 10:41 pm

  • Quote

Post by justinkb » Fri May 01, 2009 12:10 am

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.
Top
pingufunkybeat
l33t
l33t
Posts: 610
Joined: Wed Dec 01, 2004 12:03 am

  • Quote

Post by pingufunkybeat » Fri May 01, 2009 12:36 am

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)
Top
justinkb
Apprentice
Apprentice
Posts: 161
Joined: Tue Dec 23, 2008 10:41 pm

  • Quote

Post by justinkb » Fri May 01, 2009 12:41 am

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...
Top
goatcheese
n00b
n00b
User avatar
Posts: 23
Joined: Thu Nov 03, 2005 7:44 am
Location: Seoul, South Korea

  • Quote

Post by goatcheese » Fri May 01, 2009 3:05 am

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.
Top
Genewb
Apprentice
Apprentice
Posts: 165
Joined: Tue Jan 09, 2007 7:11 pm

  • Quote

Post by Genewb » Thu Jun 11, 2009 10:57 pm

Has anyone reading this been able to override repo or branch since the x11 overlay's recent bout of changes?
Top
Ormaaj
Guru
Guru
User avatar
Posts: 319
Joined: Mon Jan 28, 2008 8:04 am

  • Quote

Post by Ormaaj » Wed Jun 17, 2009 8:56 pm

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.
Top
Post Reply

22 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic