Summary: | x11-libs/libdrm depends on video_cards_radeon even if video_cards_amdgpu is only selected | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Damien Zammit <damien> |
Component: | Current packages | Assignee: | Matt Turner <mattst88> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | x11 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Damien Zammit
2017-03-07 04:03:17 UTC
Can you please provide emerge output? I suspect that not libdrm itself needs that USE flag, but instead some other package like media-libs/mesa[radeonsi] does. Calculating dependencies... done! emerge: there are no ebuilds built with USE flags to satisfy ">=x11-libs/libdrm-2.4.72[video_cards_radeon]". !!! One of the following packages is required to complete your request: - x11-libs/libdrm-2.4.75::gentoo (Change USE: +video_cards_radeon) (dependency required by "media-libs/mesa-17.0.1::gentoo[-video_cards_r200,-video_cards_radeon,-video_cards_r600,video_cards_radeonsi,-video_cards_r100,-video_cards_r300]" [ebuild]) (dependency required by "@profile" [set]) (dependency required by "@world" [argument]) You could have done a significantly better job explaining what exactly you think is wrong. This was a very unclear bug report. The driver names for ATI/AMD cards are terrible. I suspect you know all this, but for posterity: AMDGPU is the name of the kernel driver for modern cards. There is associated code in libdrm. radeonsi is the name of the Mesa driver for modern cards, going back somewhat farther than what the AMDGPU kernel driver supports. The older "radeon" kernel driver is used for the cards supported by radeonsi but not AMDGPU. There is associated code in libdrm. So radeonsi depends on both the radeon and the amdgpu libdrm components. This requirement comes from upstream Mesa, not Gentoo. See https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?id=05520ba490c9463391f438c341243d52a00a7168#n2318 The current intention is for VIDEO_CARDS="radeon" to enable *all* radeon drivers, except if you override it by specifying a specific radeon variant, like VIDEO_CARDS="radeonsi". In that case, "radeon" in VIDEO_CARDS="radeon radeonsi" is not supposed to have any effect. Unfortunately, we seem to have screwed up the logic for that: gallium_enable video_cards_r300 r300 gallium_enable video_cards_r600 r600 gallium_enable video_cards_radeonsi radeonsi if ! use video_cards_r300 && \ ! use video_cards_r600; then gallium_enable video_cards_radeon r300 r600 fi That looks intentional, but I think it's definitely wrong to not select radeonsi for VIDEO_CARDS="radeon". You should be able to set VIDEO_CARDS="radeon radeonsi amdgpu" and get the behavior I think you are requesting. That is, building only the radeonsi Mesa driver, and the radeon and amdgpu libdrm components. To that end, I have fixed the quoted logic to include radeonsi: commit 906eaa04d5b56c1b5c7fb3afa1cf33ec92b40279 Author: Matt Turner <mattst88@gentoo.org> Date: Tue Mar 7 20:57:08 2017 -0800 media-libs/mesa: Build radeonsi if only VIDEO_CARDS="radeon" is selected. I think the Intel/Radeon VIDEO_CARDS are in for an overhaul... Whether excluding radeonsi from VIDEO_CARDS="radeon" was intentional or not, it does have one potentially useful effect. VIDEO_CARDS="radeon" USE="gallium" does not current depend on llvm, except on x86 and amd64. Hmm. We'll see if QA checks complain at me. Sorry for the unclear bug report. Now that you have explained it a bit more, I think I know what the problem is better: It seems that the USE flag "radeon" refers to a superset of all AMD card/driver combinations, but the name of the old radeon driver is also "radeon" in the kernel. So there is no obvious way to set amdgpu and radeonsi and exclude the old radeon driver, because you can't, for example, set: VIDEO_CARDS="radeon -radeon" So the solution currently is to set: VIDEO_CARDS="radeon amdgpu radeonsi" and hope that the logic excludes the old radeon driver. A better way might be to rename the superset "radeon" USE flag to "amd". So then you could do: VIDEO_CARDS="amd amdgpu radeonsi -radeon" Best, Damien The radeonsi driver in mesa supports some cards which libdrm_radeon also supports, hence the USE dependency. But with a sufficiently new AMD GPU you don't need radeon for anything else than libdrm, so you can set /etc/portage/make.conf VIDEO_CARDS="amdgpu radeonsi" /etc/portage/package.use x11-libs/libdrm video_cards_radeon So you will not build the unnecessary radeon driver in mesa. (In reply to Damien Zammit from comment #5) > Sorry for the unclear bug report. > > Now that you have explained it a bit more, I think I know what the problem > is better: > > It seems that the USE flag "radeon" refers to a superset of all AMD > card/driver combinations, but the name of the old radeon driver is also > "radeon" in the kernel. So there is no obvious way to set amdgpu and > radeonsi and exclude the old radeon driver, because you can't, for example, > set: > > VIDEO_CARDS="radeon -radeon" > > So the solution currently is to set: > > VIDEO_CARDS="radeon amdgpu radeonsi" > > and hope that the logic excludes the old radeon driver. It will, so long as you have USE="-classic" > A better way might be to rename the superset "radeon" USE flag to "amd". > So then you could do: > > VIDEO_CARDS="amd amdgpu radeonsi -radeon" Indeed. I'm not sure how exactly this should work, but I completely agree that we need to come up with something better. I had to revert the patch, per bug 612208. There's no bug here, per se, just some somewhat annoying configuration required. Reopen if you have a suggestion for how we can do this better? Otherwise, chithanh suggested a way to configure what you want in comment #6. |