Bug 76377 - DRI3 should only be enabled on Linux due to a udev dependency
Summary: DRI3 should only be enabled on Linux due to a udev dependency
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: Other OpenBSD
: medium normal
Assignee: mesa-dev
QA Contact:
Depends on:
Reported: 2014-03-20 02:28 UTC by Jonathan Gray
Modified: 2014-04-09 14:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

configure: drop duplicated libudev check (2.00 KB, patch)
2014-03-21 17:04 UTC, Emil Velikov
Details | Splinter Review
configure: enable dri3 only on linux (2.13 KB, patch)
2014-03-21 18:06 UTC, Emil Velikov
Details | Splinter Review

Description Jonathan Gray 2014-03-20 02:28:37 UTC
The configure script defaults to enabling DRI3 on every platform but it will only work on Linux due to a udev dependency.

Unless --disable-dri3 is specified mesa configure will error on platforms where udev isn't available when DRI3 should really be disabled by default.

checking for LIBDRM... yes
checking for LIBUDEV... no
checking for GLPROTO... yes
checking for DRI2PROTO... yes
configure: error: DRI3 requires libudev >= 151
Comment 1 Emil Velikov 2014-03-21 17:04:14 UTC
Created attachment 96176 [details] [review]
configure: drop duplicated libudev check

Thanks for the report Jonathan.

FWIW there is a bit of confusion wrt udev vs libudev. The latter is just a "dummy wrapper" library that deals with searching, iterating (and other) operations of the sysfs nodes.

With that said, the attached patch drops the duplicated check, and disables dri3 for non linux platforms.

Comment 2 Jonathan Gray 2014-03-21 17:23:58 UTC
Thanks, though perhaps the logic of the test would be better inverted?  You seem to have missed disabling dri3 on gnu* (hurd) for example.

Passing --disable-dri3 to configure also disables the test for dri3proto but it seems that isn't disabled with your patch?

checking for DRI3PROTO... no
configure: error: Package requirements (dri3proto >= 1.0) were not met:
Comment 3 Emil Velikov 2014-03-21 18:06:44 UTC
Created attachment 96181 [details] [review]
configure: enable dri3 only on linux

After some coffee it all makes sense :-) The updated patch should handle things properly now.
Comment 4 Jonathan Gray 2014-03-21 18:37:16 UTC
Yes, the updated patch seems to have the --disable-dri3 behaviour by default here on OpenBSD.  Thanks.
Comment 5 Fabio Pedretti 2014-03-21 18:44:29 UTC
The patch should also be applied on 10.1 brach.
Comment 6 Jonathan Gray 2014-03-21 19:01:15 UTC
Well the changes to not get the drm driver from the x server leaves non udev system with 'unknown chipset' and gpu hangs.  So this patch alone isn't going to help matters on stable much.  Even master needs something along the lines of  http://marc.info/?l=mesa3d-dev&m=139515481925008&w=2 in order to load the dri drivers.
Comment 7 Emil Velikov 2014-04-09 14:21:24 UTC
Both patches are in master now, and a tagged for the 10.1 stable branch.

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.