Skip to contentSkip to conversation

ia32-base: only depend on GL if opengl DISTRO_FEATURE enabled

PATCH In review Ross Burton 2 participants 5 messages Sep 11, 2013 – Sep 12, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ia32-base: only depend on GL if opengl DISTRO_FEATURE enabled

As Mesa refuses to compile if the "opengl" DISTRO_FEATURE isn't enabled, mesa-driver-i9xx and the GLX X module have to be conditional in the ia32 machine defintion too.

---
 meta/conf/machine/include/ia32-base.inc |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/conf/machine/include/ia32-base.inc +3 -3
index cb542a5..e58a314 100644
@@ -33,16 +33,16 @@ XSERVER_IA32_BASE = "xserver-xorg \
            "
 
 XSERVER_IA32_EXT = " \
-           xserver-xorg-extension-glx \
+           ${@base_contains('DISTRO_FEATURES', 'opengl', 'xserver-xorg-extension-glx', '', d)} \
            xserver-xorg-module-libint10 \
            "
 
 XSERVER_IA32_I915 = "xf86-video-intel \
-           mesa-driver-i915 \
+           ${@base_contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-i915', '', d)} \
            "
 
 XSERVER_IA32_I965 = "xf86-video-intel \
-           mesa-driver-i965 \
+           ${@base_contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-i965', '', d)} \
            "
 
 XSERVER_IA32_VESA = "xf86-video-vesa"
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/3 xf86-video-vesa: change depends to refect reality

This recipe appears to have been a copy-and-paste from -intel, because it has dependencies and configure options that xf86-video-vesa just doesn't have, such as virtual/libgl and XVMC.

---
 meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.3.2.bb |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.3.2.bb +1 -4
index fb285ea..4ec07a0 100644
@@ -2,8 +2,6 @@ require xorg-driver-video.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=a1f0610ebdc6f314a9fa5102a8c5c1b0"
 
-EXTRA_OECONF += "--disable-xvmc"
-
 SUMMARY = "X.Org X server -- Generic Vesa video driver"
 
 DESCRIPTION = "vesa is an Xorg driver for generic VESA video cards. It \
@@ -13,8 +11,7 @@ supports depths 8, 15 16 and 24."
 
 PR = "${INC_PR}.0"
 
-DEPENDS += "virtual/libx11 libxvmc drm xf86driproto glproto \
-            virtual/libgl xineramaproto libpciaccess"
+DEPENDS += "virtual/libx11 randrproto libpciaccess"
 
 COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
 
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 3/3 xf86-video-intel: disable DRI2 tests if no DRI2 is available

In reply to Ross Burton

Somehow this slipped past the initial testing and can cause build errors in non-GL distros.

---
 .../xf86-video-intel/disable-dri2-tests.patch      |   50 ++++++++++++++++++++
 .../xorg-driver/xf86-video-intel_2.21.13.bb        |    2 +
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-dri2-tests.patch
meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-dri2-tests.patch new file +50 -0
new file mode 100644
index 0000000..9e93ca8
@@ -0,0 +1,50 @@
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <[email protected]>
+
+From ec91cfe7e5efdd5e1b1fbb85eea8f07b50e24c4b Mon Sep 17 00:00:00 2001
+From: Ross Burton <[email protected]>
+Date: Wed, 11 Sep 2013 21:12:37 +0100
+Subject: [PATCH] test: only build DRI2 tests if DRI2 is enabled
+
+Signed-off-by: Ross Burton <[email protected]>
+---
+ test/Makefile.am |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index f51967b..18528a9 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -16,9 +16,14 @@ stress_TESTS = \
+ 	render-copyarea-size \
+ 	render-copy-alphaless \
+ 	mixed-stress \
++	$(NULL)
++
++if DRI2
++stress_TESTS += \
+ 	dri2-swap \
+ 	dri2-race \
+ 	$(NULL)
++endif
+ 
+ check_PROGRAMS = $(stress_TESTS)
+ 
+@@ -34,9 +39,14 @@ libtest_la_SOURCES = \
+ 	test_image.c \
+ 	test_log.c \
+ 	test_render.c \
++	$(NULL)
++
++if DRI2
++libtest_la_SOURCES += \
+ 	dri2.c \
+ 	dri2.h \
+ 	$(NULL)
++endif
+ 
+ vsync.avi: mkvsync.sh
+ 	./mkvsync.sh $@
+-- 
+1.7.10.4
+
meta/recipes-graphics/xorg-driver/xf86-video-intel_2.21.13.bb +2 -0
index f26544b..3e30936 100644
@@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e"
 
 DEPENDS += "virtual/libx11 drm libpciaccess pixman"
 
+SRC_URI += "file://disable-dri2-tests.patch"
+
 PACKAGECONFIG ??= "sna udev ${@base_contains('DISTRO_FEATURES', 'opengl', 'dri', '', d)}"
 
 PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,xf86driproto dri2proto"
Signature · 1 line
1.7.10.4
#3 lore raw
In reply to Ross Burton
Quoted 21 lines · Ross Burton

As Mesa refuses to compile if the "opengl" DISTRO_FEATURE isn't enabled, mesa-driver-i9xx and the GLX X module have to be conditional in the ia32 machine defintion too.

---
 meta/conf/machine/include/ia32-base.inc |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/conf/machine/include/ia32-base.inc +1 -1
index cb542a5..e58a314 100644
@@ -33,16 +33,16 @@ XSERVER_IA32_BASE = "xserver-xorg \
            "
 
 XSERVER_IA32_EXT = " \
-           xserver-xorg-extension-glx \
+           ${@base_contains('DISTRO_FEATURES', 'opengl', 'xserver-xorg-extension-glx', '', d)} \
            xserver-xorg-module-libint10 \
            "

meta/conf/machine/include/ia32-base.inc XSERVER_IA32_BASE = "xserver-xorg \ · line 46

Quoted 10 lines
meta/conf/machine/include/ia32-base.inc +2 -2
 
 XSERVER_IA32_I915 = "xf86-video-intel \
-           mesa-driver-i915 \
+           ${@base_contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-i915', '', d)} \
            "
 
 XSERVER_IA32_I965 = "xf86-video-intel \
-           mesa-driver-i965 \
+           ${@base_contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-i965', '', d)} \
            "

I thought the idea was to try to build with --disable-gl or similar if the DISTRO_FEATURES didn't include opengl, rather than disable the driver entirely.

Am I remembering incorrectly, or was there more discussion on that which showed that couldn't be made to work?

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#4 lore raw
Quoted 6 lines · Darren Hart

I thought the idea was to try to build with --disable-gl or similar if the DISTRO_FEATURES didn't include opengl, rather than disable the driver entirely.

Am I remembering incorrectly, or was there more discussion on that which showed that couldn't be made to work?

Orthogonal issues. We're building the xf86-video-intel without DRI/GL support in that case, but the machine recommends in ia32-base are currently always pulling in the Mesa drivers (which we're not building) and the server-side GLX support (which we're not building).

Ross