Bug 70864 - classic drivers needlessly link to libdrm_intel / libdrm_nouveau / libdrm_radeon
Summary: classic drivers needlessly link to libdrm_intel / libdrm_nouveau / libdrm_radeon
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-25 14:00 UTC by Fabio Pedretti
Modified: 2013-10-27 15:43 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Fabio Pedretti 2013-10-25 14:00:25 UTC
I noticed (using ldd, incidentally while testing the new mesa_dri_drivers.so) the classic drivers (radeon, r200, i915, i965, nouveau_vieux) links to all three of libdrm_intel / libdrm_nouveau / libdrm_radeon, while only the matching one should be needed.

Gallium drivers (i915, r300, r600, radeonsi, nouveau) are OK, linking only to their libdrm.
Comment 1 Fabio Pedretti 2013-10-25 14:16:28 UTC
It looks every classic driver (including swrast) now includes all the classic drivers, they are more or less a copy of mesa_dri_drivers.so.
Comment 2 Matt Turner 2013-10-25 15:04:51 UTC
(In reply to comment #1)
> It looks every classic driver (including swrast) now includes all the
> classic drivers, they are more or less a copy of mesa_dri_drivers.so.

They are in fact exact copies -- they're hardlinks.

The point of mega drivers was to link all of the (classic) drivers into a single file.
Comment 3 Fabio Pedretti 2013-10-25 15:09:20 UTC
Thanks but it doesn't look they are hardlinks anyway, the md5sum all differ, also their size is slightly different.
Comment 4 Johannes Obermayr 2013-10-25 16:07:33 UTC
(In reply to comment #2)
> The point of mega drivers was to link all of the (classic) drivers into a
> single file.

... to waste memory on runtime if you make use of packages provided by distributions which contain all classic drivers ...

I bet the solution to make only required symbols PUBLIC in former libdricore and libgallium isn't that much worse like you propagate.
I just want to mention that there was never a comparision to my patchset which closes a lot of symbols for libdricore's replacement:
http://lists.freedesktop.org/archives/mesa-dev/2013-September/044593.html
Comment 5 Matt Turner 2013-10-25 17:44:24 UTC
(In reply to comment #3)
> Thanks but it doesn't look they are hardlinks anyway, the md5sum all differ,
> also their size is slightly different.

Strange, that's not what I see on my system:

mattst88@work-Thinkpad mesa % md5sum $(find -name '*_dri.so')   
e918941fd19d4afaeb5834e90c5f88a4  ./lib/swrast_dri.so
e918941fd19d4afaeb5834e90c5f88a4  ./lib/r200_dri.so
e918941fd19d4afaeb5834e90c5f88a4  ./lib/i915_dri.so
e918941fd19d4afaeb5834e90c5f88a4  ./lib/i965_dri.so
e918941fd19d4afaeb5834e90c5f88a4  ./lib/radeon_dri.so
e918941fd19d4afaeb5834e90c5f88a4  ./install/usr/local/lib/dri/swrast_dri.so
e918941fd19d4afaeb5834e90c5f88a4  ./install/usr/local/lib/dri/r200_dri.so
e918941fd19d4afaeb5834e90c5f88a4  ./install/usr/local/lib/dri/i915_dri.so
e918941fd19d4afaeb5834e90c5f88a4  ./install/usr/local/lib/dri/i965_dri.so
e918941fd19d4afaeb5834e90c5f88a4  ./install/usr/local/lib/dri/radeon_dri.so
Comment 6 Fabio Pedretti 2013-10-27 15:43:43 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > Thanks but it doesn't look they are hardlinks anyway, the md5sum all differ,
> > also their size is slightly different.
> 
> Strange, that's not what I see on my system:

1) If someone cares about why my .so that differ my compiled drivers are here:
https://launchpad.net/~oibaf/+archive/graphics-drivers/+files/libgl1-mesa-dri_10.0%7Egit1310251530.980755%2Bglvdpau%7Egd%7Er_i386.deb
build log is here:
https://launchpadlibrarian.net/154982264/buildlog_ubuntu-raring-i386.mesa_10.0~git1310251530.980755%2Bglvdpau~gd~r_UPLOADING.txt.gz

2) I would have expected that classic drivers would be built including only a single driver and only mesa_dri_driver.so would include all drivers.

3) If there is no chance for 2) why the build system don't create a symbolic link for classic drivers pointing to mesa_dri_driver.so rather than hard links (or similar copies like in my case)?

4) There should be a bit of documentation for all this.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.