Gentoo Archives: gentoo-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Suggestions for simplifying VIDEO_CARDS situation
Date: Sun, 17 Jun 2018 07:51:28
Message-Id: 20180617004931.6c410dcc@professor-x
In Reply to: [gentoo-dev] Suggestions for simplifying VIDEO_CARDS situation by Matt Turner
1 On Sat, 16 Jun 2018 21:40:10 -0700
2 Matt Turner <mattst88@g.o> wrote:
3
4 > Hello,
5 >
6 > VIDEO_CARDS is an annoying mess. We used to have radeon, intel, and
7 > some others in media-libs/mesa's VIDEO_CARDS. radeon and intel
8 > corresponded to disparate sets of drivers -- VIDEO_CARDS=radeon has
9 > meant classic r100, r200, r300, and r600 drivers and gallium r600 and
10 > radeonsi drivers. VIDEO_CARDS=intel has meant classic i915 and i965
11 > drivers as well as gallium i915.
12 >
13 > I added more-specific VIDEO_CARDS for those separate drivers a few
14 > years ago, so that users could set VIDEO_CARDS="radeon radeonsi" and
15 > only get the one radeonsi driver they actually wanted while still
16 > enabling support for x11-libs/libdrm's radeon support code which is
17 > used by most of those radeon drivers. Of course some users want this
18 > control and others don't care at all.
19 >
20 > The confusion comes in with "classic" DRI drivers vs Gallium drivers.
21 > The Gallium abstraction layer allows a hardware driver to handle
22 > multiple APIs -- OpenGL, D3D9, OpenCL, video decode APIs, etc. For
23 > instance, users try to build the classic i965 driver (there is no
24 > Gallium driver for this hardware) with USE=opencl or USE=vaapi and
25 > don't understand why they didn't get what they wanted (or REQUIRED_USE
26 > prevents them from doing so).
27 >
28 > Should of Mesa's USE flags, d3d9, llvm, lm_sensors, opencl, openmax,
29 > unwind, vaapi, vdpau, xa, and xvmc are Gallium-only. Should I make a
30 > USE_EXPAND for Gallium-only options to attempt to avoid confusion?
31 > Another point of confusion: not all Gallium drivers support all of
32 > these features. For instance only the r600 and radeonsi drivers
33 > support OpenCL. How to best handle this?
34 >
35 > It seems like at one extreme you build an extensive set of
36 > REQUIRED_USE conditions that force users to micromanage their USE
37 > flags, or you let them enable all sorts of impossible combinations and
38 > deal with the confused bug reports.
39 >
40 > I would like to somehow get rid of the 'classic' and 'gallium' USE
41 > flags entirely, but I'm not totally sure how. Maybe I can enable them
42 > dependent on VIDEO_CARDS...
43 >
44 > Suggestions welcome.
45 >
46
47 What about creating a tiny pkg that has all the combinations in a
48 dictionary and can set the USE and VIDEO_CARDS flags according to the
49 video card(s) you have.
50
51 This would be along the same lines as the
52 app-portage/cpuid2cpuflags pkg. Then the pkg is updated as new drivers
53 and combinations are changed. Perhaps have it run in pkg_postisnt to
54 print any irregularities it finds and ewarn they need fixing.
55
56 --
57 Brian Dolbec <dolsen>

Replies

Subject Author
Re: [gentoo-dev] Suggestions for simplifying VIDEO_CARDS situation Roy Bamford <neddyseagoon@g.o>