summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-driver/xf86-video-intel/configure-dri.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-driver/xf86-video-intel/configure-dri.patch')
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-intel/configure-dri.patch166
1 files changed, 166 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/configure-dri.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/configure-dri.patch
new file mode 100644
index 0000000000..7fa9443d93
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel/configure-dri.patch
@@ -0,0 +1,166 @@
1Add the ability to enable/disable specific versions of the DRI support.
2
3This is the following two commits from master squashed:
4 7bc669dd4b7e3e5978e95e4131d1f9215afbc041
5 5a0cb1049c2fa0586708719210a2d2cffa7a4491
6
7Upstream-Status: Backport
8Signed-off-by: Ross Burton <ross.burton@intel.com>
9
10diff --git a/configure.ac b/configure.ac
11index b3b6e8e..bd654f3 100644
12--- a/configure.ac
13+++ b/configure.ac
14@@ -296,6 +296,21 @@ AC_ARG_ENABLE(dri,
15 [Disable DRI support [[default=auto]]]),
16 [DRI=$enableval],
17 [DRI=auto])
18+AC_ARG_ENABLE(dri1,
19+ AS_HELP_STRING([--disable-dri1],
20+ [Disable DRI1 support [[default=yes]]]),
21+ [DRI1=$enableval],
22+ [DRI1=yes])
23+AC_ARG_ENABLE(dri2,
24+ AS_HELP_STRING([--disable-dri2],
25+ [Disable DRI2 support [[default=yes]]]),
26+ [DRI2=$enableval],
27+ [DRI2=yes])
28+AC_ARG_ENABLE(dri3,
29+ AS_HELP_STRING([--disable-dri3],
30+ [Disable DRI3 support [[default=yes]]]),
31+ [DRI3=$enableval],
32+ [DRI3=yes])
33
34 AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc],
35 [Disable XvMC support [[default=yes]]]),
36@@ -461,15 +476,15 @@ if test "x$UMS" = "xyes"; then
37 AC_DEFINE(UMS,1,[Assume UMS support])
38 fi
39
40-DRI1=no
41+have_dri1=no
42 XORG_DRIVER_CHECK_EXT(XF86DRI, xf86driproto)
43-if test "x$_EXT_CHECK" != "xno" -a "x$DRI" != "xno" -a "x$UMS" = "xyes"; then
44- PKG_CHECK_MODULES(DRI1, [xf86driproto], [DRI1=$DRI], [DRI1=no])
45+if test "x$_EXT_CHECK" != "xno" -a "x$DRI" != "xno" -a "x$DRI1" != "xno" -a "x$UMS" = "xyes"; then
46+ PKG_CHECK_MODULES(DRI1, [xf86driproto], [have_dri1=$DRI], [have_dri1=no])
47 save_CFLAGS="$CFLAGS"
48 save_CPPFLAGS="$CPPFLAGS"
49 CFLAGS="$CFLAGS $XORG_CFLAGS $DRI1_CFLAGS $DRM_CFLAGS"
50 CPPFLAGS="$CPPFLAGS $XORG_CFLAGS $DRI1_CFLAGS $DRM_CFLAGS"
51- AC_CHECK_HEADERS([dri.h sarea.h dristruct.h], [], [DRI1=no],
52+ AC_CHECK_HEADERS([dri.h sarea.h dristruct.h], [], [have_dri1=no],
53 [/* for dri.h */
54 #include <xf86str.h>
55 /* for dristruct.h */
56@@ -486,49 +501,55 @@ if test "x$_EXT_CHECK" != "xno" -a "x$DRI" != "xno" -a "x$UMS" = "xyes"; then
57 fi
58
59 AC_MSG_CHECKING([whether to include DRI1 support])
60-AC_MSG_RESULT([$DRI1])
61+AC_MSG_RESULT([$have_dri1])
62
63-AM_CONDITIONAL(DRI1, test "x$DRI1" != "xno")
64-if test "x$DRI1" != "xno"; then
65+AM_CONDITIONAL(DRI1, test "x$have_dri1" != "xno")
66+if test "x$have_dri1" != "xno"; then
67 AC_DEFINE(HAVE_DRI1,1,[Enable DRI1 driver support])
68 dri_msg="$dri_msg DRI1"
69 else
70 DRI1_CFLAGS=""
71 DRI1_LIBS=""
72
73- if test "x$DRI" = "xyes" -a "x$UMS" = "xyes"; then
74+ if test "x$DRI" = "xyes" -a "x$UMS" = "xyes" -a "x$DRI1" != "xno"; then
75 AC_MSG_ERROR([DRI1 requested but prerequisites not found])
76 fi
77 fi
78
79-DRI2=no
80-DRI3=no
81+have_dri2=no
82+have_dri3=no
83 if test "x$DRI" != "xno"; then
84- PKG_CHECK_MODULES(DRI2, [dri2proto >= 2.6], [DRI2=$DRI], [DRI2=no])
85- dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri`
86- if test "x$dridriverdir" = "x"; then
87- dridriverdir="$libdir/dri"
88- fi
89- AC_DEFINE_DIR(DRI_DRIVER_PATH, dridriverdir, [Default DRI2 driver path])
90 if test "x$DRI2" != "xno"; then
91+ PKG_CHECK_MODULES(DRI2, [dri2proto >= 2.6], [have_dri2=$DRI], [have_dri2=no])
92+ fi
93+ if test "x$have_dri2" != "xno"; then
94 save_CFLAGS=$CFLAGS
95 CFLAGS="$XORG_CFLAGS $DRM_CFLAGS $DRI1_CFLAGS $DRI2_CFLAGS"
96- AC_CHECK_HEADERS([dri2.h], [], [DRI2=no], [
97+ AC_CHECK_HEADERS([dri2.h], [], [have_dri2=no], [
98 #include <dixstruct.h>
99 #include <drm.h>
100 ])
101 CFLAGS=$save_CFLAGS
102 fi
103-
104- XORG_DRIVER_CHECK_EXT(DRI3, dri3proto)
105- if test "x$_EXT_CHECK" != "xno"; then
106- PKG_CHECK_MODULES(DRI3, [dri3proto], [DRI3=$DRI], [])
107+ if test "x$have_dri2" != "xno"; then
108+ dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri`
109+ if test "x$dridriverdir" = "x"; then
110+ dridriverdir="$libdir/dri"
111+ fi
112+ AC_DEFINE_DIR(DRI_DRIVER_PATH, dridriverdir, [Default have_dri2 driver path])
113 fi
114+
115 if test "x$DRI3" != "xno"; then
116+ XORG_DRIVER_CHECK_EXT(DRI3, dri3proto)
117+ if test "x$_EXT_CHECK" != "xno"; then
118+ PKG_CHECK_MODULES(DRI3, [dri3proto], [have_dri3=$DRI], [])
119+ fi
120+ fi
121+ if test "x$have_dri3" != "xno"; then
122 save_CFLAGS=$CFLAGS
123 CFLAGS="$XORG_CFLAGS $DRI3_CFLAGS"
124- AC_CHECK_DECL(DRI3, [], [DRI3=no], [#include <xorg-server.h>])
125- AC_CHECK_HEADERS([misyncstr.h misyncshm.h], [], [DRI3=no], [
126+ AC_CHECK_DECL(DRI3, [], [have_dri3=no], [#include <xorg-server.h>])
127+ AC_CHECK_HEADERS([misyncstr.h misyncshm.h], [], [have_dri3=no], [
128 #include <xorg-server.h>
129 #include <xf86str.h>
130 #include <misync.h>
131@@ -538,13 +559,13 @@ if test "x$DRI" != "xno"; then
132 fi
133
134 AC_MSG_CHECKING([whether to include DRI2 support])
135-AM_CONDITIONAL(DRI2, test "x$DRI2" != "xno")
136-AC_MSG_RESULT([$DRI2])
137-if test "x$DRI2" != "xno"; then
138+AM_CONDITIONAL(DRI2, test "x$have_dri2" != "xno")
139+AC_MSG_RESULT([$have_dri2])
140+if test "x$have_dri2" != "xno"; then
141 AC_DEFINE(HAVE_DRI2,1,[Enable DRI2 driver support])
142 dri_msg="$dri_msg DRI2"
143 else
144- if test "x$DRI" = "xyes" -a "x$KMS" = "xyes"; then
145+ if test "x$DRI" = "xyes" -a "x$DRI2" != "xno" -a "x$KMS" = "xyes"; then
146 AC_MSG_ERROR([DRI2 requested but prerequisites not found])
147 fi
148
149@@ -553,13 +574,13 @@ else
150 fi
151
152 AC_MSG_CHECKING([whether to include DRI3 support])
153-AM_CONDITIONAL(DRI3, test "x$DRI3" != "xno")
154-AC_MSG_RESULT([$DRI3])
155-if test "x$DRI3" != "xno"; then
156+AM_CONDITIONAL(DRI3, test "x$have_dri3" != "xno")
157+AC_MSG_RESULT([$have_dri3])
158+if test "x$have_dri3" != "xno"; then
159 AC_DEFINE(HAVE_DRI3,1,[Enable DRI3 driver support])
160 dri_msg="$dri_msg DRI3"
161 else
162- if test "x$DRI" = "xyes" -a "x$KMS" = "xyes"; then
163+ if test "x$DRI" = "xyes" -a "x$DRI3" != "xno" -a "x$KMS" = "xyes"; then
164 AC_MSG_ERROR([DRI3 requested but prerequisites not found])
165 fi
166 fi