Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 697552 - media-libs/mesa with radeonsi/amdgpu should not require libdrm for radeon
Summary: media-libs/mesa with radeonsi/amdgpu should not require libdrm for radeon
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-12 12:29 UTC by Klaus Kusche
Modified: 2019-11-04 07:05 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2019-10-12 12:29:51 UTC
All current mesa ebuilds contain 

for card in ${RADEON_CARDS}; do
        RDEPEND="${RDEPEND}
                video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
        "
done
RDEPEND="${RDEPEND}
        video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
"

So, if radeonsi is set, this requires *both* libdrm[video_cards_radeon] *and*
libdrm[video_cards_amdgpu], because radeonsi is in RADEON_CARDS, too.

Most radeonsi cards use the amdgpu kernel driver and as far as I know 
should need libdrm[video_cards_amdgpu] only, so libdrm[video_cards_radeon]
should *not* be set for them?

libdrm[video_cards_radeon] should only be set if radeonsi is set and amdgpu 
is *not* set (cards older than ~7 years, e.g. cape verde cards or older?)?

Bug 674650 sounds somewhat similar, but I was unable to find out what 674650 actually wants or means.
Comment 1 Matt Turner gentoo-dev 2019-10-15 01:01:43 UTC
> Most radeonsi cards use the amdgpu kernel driver and as far as I know 
should need libdrm[video_cards_amdgpu] only, so libdrm[video_cards_radeon]
should *not* be set for them?

Key word: Most.

How do you suggest I differentiate between those that do require libdrm_radeon and those that don't? The upstream meson.build requires both libdrm_radeon and libdrm_amdgpu when the radeonsi driver is installed:

_libdrm_checks = [
  ['intel', with_dri_i915 or with_gallium_i915],
  ['amdgpu', with_amd_vk or with_gallium_radeonsi],
  ['radeon', (with_gallium_radeonsi or with_dri_r100 or with_dri_r200 or
              with_gallium_r300 or with_gallium_r600)],
  ['nouveau', (with_gallium_nouveau or with_dri_nouveau)],
]

Even if it didn't, I wouldn't want to further complicate the configuration options for Mesa over a 50k shared object.

# ls -lh usr/lib*/libdrm_radeon.so.1.0.1 
-rwxr-xr-x 1 root root 50K Oct 14 17:57 usr/lib64/libdrm_radeon.so.1.0.1
-rwxr-xr-x 1 root root 54K Oct 14 17:57 usr/lib/libdrm_radeon.so.1.0.1
Comment 2 Dennis Schridde 2019-11-04 00:39:18 UTC
(In reply to Matt Turner from comment #1)
> Even if it didn't, I wouldn't want to further complicate the configuration
> options for Mesa over a 50k shared object.

I think the issue is more with USE-flag conflicts / missing USE-flags, when trying to emerge a system with VIDEO_CARDS=amdgpu set.  In that case it is not immediately clear that, why and for which packages I need to also set VIDEO_CARDS=radeon.
Comment 3 Matt Turner gentoo-dev 2019-11-04 01:21:34 UTC
(In reply to Dennis Schridde from comment #2)
> (In reply to Matt Turner from comment #1)
> > Even if it didn't, I wouldn't want to further complicate the configuration
> > options for Mesa over a 50k shared object.
> 
> I think the issue is more with USE-flag conflicts / missing USE-flags, when
> trying to emerge a system with VIDEO_CARDS=amdgpu set.  In that case it is
> not immediately clear that, why and for which packages I need to also set
> VIDEO_CARDS=radeon.

What do you suggest?
Comment 4 Dennis Schridde 2019-11-04 07:05:25 UTC
(In reply to Matt Turner from comment #3)
> (In reply to Dennis Schridde from comment #2)
> > (In reply to Matt Turner from comment #1)
> > > Even if it didn't, I wouldn't want to further complicate the configuration
> > > options for Mesa over a 50k shared object.
> > 
> > I think the issue is more with USE-flag conflicts / missing USE-flags, when
> > trying to emerge a system with VIDEO_CARDS=amdgpu set.  In that case it is
> > not immediately clear that, why and for which packages I need to also set
> > VIDEO_CARDS=radeon.
> 
> What do you suggest?

I have no good suggestion.  But it would be nice, if I could just set VIDEO_CARDS=amdgpu once for my system and it would just work.  Maybe make it an alias for VIDEO_CARDS=radeon in ebuilds that need it?