Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308497 - [PATCH] allow Mesa to be built with only {r100,r200,r300,r600} support
Summary: [PATCH] allow Mesa to be built with only {r100,r200,r300,r600} support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard: x11 overlay
Keywords: InOverlay
Depends on:
Blocks: 383383
  Show dependency tree
 
Reported: 2010-03-08 18:59 UTC by Matt Turner
Modified: 2012-08-11 16:56 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed change (mesa.patch,1.67 KB, patch)
2010-03-08 19:01 UTC, Matt Turner
Details | Diff
Updated patch, with Intel support (mesa.patch,2.39 KB, patch)
2010-04-22 14:21 UTC, Matt Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2010-03-08 18:59:57 UTC
Currently, by enabling the 'radeon' or 'radeonhd' use flags, Mesa builds DRI drivers for r100, r200, r300(-r500), and r600(-r700).

Unless you've got multiple generations of graphics cards in your system, this is probably not ideal.

The attached patch, while retaining the current behavior of the 'radeon' and 'radeonhd' use flags, allows users to build only the DRI driver they need for their radeons
Comment 1 Matt Turner gentoo-dev 2010-03-08 19:01:27 UTC
Created attachment 222711 [details, diff]
Proposed change

Note: the 'if !use video_cards_r100 && !use video_cards_r200 && !use video_cards_r300' line should also include '&& !use video_cards_r600', but I couldn't figure out how to add that.

Adding it to the end of the line caused vi to do a line wrap, and once this happened, ebuild wouldn't source the file.
Comment 2 Tomáš Chvátal (RETIRED) gentoo-dev 2010-03-18 13:54:58 UTC
@Remi: should we split somehow also the intels?
Comment 3 Matt Turner gentoo-dev 2010-04-22 14:21:40 UTC
Created attachment 228767 [details, diff]
Updated patch, with Intel support
Comment 4 Peter Sääf 2010-05-11 21:07:49 UTC
-VIDEO_CARDS="intel mach64 mga none nouveau r128 radeon radeonhd savage sis svga tdfx via"
+VIDEO_CARDS="i810 i915 -i965 intel mach64 mga none nouveau r100 r128 r200 r300 r600 radeon radeonhd savage sis svga tdfx via"

Is it valid to use a negative value in VIDEO_CARDS? Paludis definitely bails on it.
Portage seems to accept it with an added VIDEO_CARDS="--i965%" but setting VIDEO_CARDS="i965" in make.conf has no effect. 
Comment 5 Matt Turner gentoo-dev 2010-05-13 03:37:06 UTC
That was actually just a typo. It's fixed in the x11 repo. :)
Comment 6 Matt Turner gentoo-dev 2010-12-21 00:11:15 UTC
So, I think the original plan was to do this for Mesa 7.9, but that didn't happen. Mesa 7.10 seems to be not too far off. Are there any objections to implementing this with the next Mesa 7.10 ebuild?
Comment 7 Rémi Cardona (RETIRED) gentoo-dev 2010-12-21 00:26:40 UTC
FTR, I'm not at all opposed to doing to this for 7.9. But regardless of which mesa version we do that for, we will have to write a _lot_ of documentation, including a full Mesa Guide to explain which USE flag does what, what drivers support gallium, along with ample links to wikipedia/xorg's wiki/mesa's wiki for people to figure it all out.

IMHO, the ebuild and eselect module were just the easy part ;)

Cheers
Comment 8 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-01-08 14:10:58 UTC
I suggest a savedconfig approach as compromise. This would allow users to have fine-grained control over which drivers are built. The documentation would not need to be updated, and the proliferation of USE flags would be contained.

If that is ok with everyone, I will come up with a proof-of-concept in the x11 overlay in the next few days.
Comment 9 Matt Turner gentoo-dev 2011-01-10 04:25:48 UTC
I talked with chithead on IRC today, so I should make note of it here too.

I don't think Mesa's configuration is complicated enough to warrant a savedconfig system. savedconfig seems to be useful for thinks like busybox which use the menuconfig system (from the kernel) to configure features. With mesa though, we're just selecting a few video drivers and a couple other things.

Given time, I don't have any problem with writing the documentation for the current video card selection system in the mesa ebuild in the overlay.
Comment 10 Rémi Cardona (RETIRED) gentoo-dev 2011-01-10 07:24:04 UTC
I'm fine with either solution as long as its correctly documented.

Cheers
Comment 11 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-01-11 23:50:36 UTC
So we will defer this to another mesa release. I will move mesa-7.10 to portage in its current form then.
Comment 12 Matt Turner gentoo-dev 2012-02-10 18:43:05 UTC
Committed with mesa-8.0. I'll write a mesa-8.0 doc.