1 |
commit: f23dc6abf1ac65b9bdc7d5d10534af1e9f9111bf |
2 |
Author: Emil Karlson <jekarlson <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Jan 22 21:30:42 2014 +0000 |
4 |
Commit: Emil Karlson <jekarlson <AT> gmail <DOT> com> |
5 |
CommitDate: Wed Jan 22 21:30:42 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=f23dc6ab |
7 |
|
8 |
x11-drivers/ati-drivers: patch support for linux-3.13 |
9 |
|
10 |
Thanks to Helmut Jarausch for providing the patch. |
11 |
|
12 |
--- |
13 |
.../ati-drivers/ati-drivers-13.12-r1.ebuild | 3 + |
14 |
...2.11_beta11.ebuild => ati-drivers-13.12.ebuild} | 237 +++++++++------------ |
15 |
.../ati-drivers/files/ati-drivers-13.12-acpi.patch | 16 ++ |
16 |
.../files/ati-drivers-linux-3.13-acpi-handle.patch | 27 +++ |
17 |
4 files changed, 143 insertions(+), 140 deletions(-) |
18 |
|
19 |
diff --git a/x11-drivers/ati-drivers/ati-drivers-13.12-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.12-r1.ebuild |
20 |
index e7f16b9..3f1e1f3 100644 |
21 |
--- a/x11-drivers/ati-drivers/ati-drivers-13.12-r1.ebuild |
22 |
+++ b/x11-drivers/ati-drivers/ati-drivers-13.12-r1.ebuild |
23 |
@@ -288,6 +288,9 @@ src_prepare() { |
24 |
# Fix build on new kernels |
25 |
epatch "${FILESDIR}/ati-drivers-13.12-acpi.patch" |
26 |
|
27 |
+ # Add support for linux-3.13. See #498766 |
28 |
+ epatch "${FILESDIR}/ati-drivers-linux-3.13-acpi-handle.patch" |
29 |
+ |
30 |
# Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870 |
31 |
use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" |
32 |
|
33 |
|
34 |
diff --git a/x11-drivers/ati-drivers/ati-drivers-12.11_beta11.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.12.ebuild |
35 |
similarity index 76% |
36 |
rename from x11-drivers/ati-drivers/ati-drivers-12.11_beta11.ebuild |
37 |
rename to x11-drivers/ati-drivers/ati-drivers-13.12.ebuild |
38 |
index e76f832..448be0b 100644 |
39 |
--- a/x11-drivers/ati-drivers/ati-drivers-12.11_beta11.ebuild |
40 |
+++ b/x11-drivers/ati-drivers/ati-drivers-13.12.ebuild |
41 |
@@ -4,26 +4,27 @@ |
42 |
|
43 |
EAPI=5 |
44 |
|
45 |
-inherit eutils multilib linux-info linux-mod toolchain-funcs versionator |
46 |
+inherit eutils multilib linux-info linux-mod toolchain-funcs versionator pax-utils |
47 |
|
48 |
DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets" |
49 |
HOMEPAGE="http://www.amd.com" |
50 |
-MY_V=( $(get_version_components) ) |
51 |
-#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" |
52 |
-DRIVERS_URI="http://www2.ati.com/drivers/beta/amd-driver-installer-catalyst-12.11-beta11-x86.x86_64.zip" |
53 |
+#RUN="${WORKDIR}/amd-catalyst-13.11-beta1-linux-x86.x86_64.run" |
54 |
+SLOT="1" |
55 |
+# Uses javascript for download YESSSS |
56 |
+#DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip" |
57 |
+DRIVERS_URI="http://dev.gentooexperimental.org/~scarabeus/amd-catalyst-13.12-linux-x86.x86_64.zip" |
58 |
XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz" |
59 |
SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}" |
60 |
FOLDER_PREFIX="common/" |
61 |
-IUSE="debug +modules multilib qt4 static-libs disable-watermark" |
62 |
+IUSE="debug +modules multilib qt4 static-libs pax_kernel" |
63 |
|
64 |
LICENSE="AMD GPL-2 QPL-1.0" |
65 |
KEYWORDS="-* ~amd64 ~x86" |
66 |
-SLOT="1" |
67 |
|
68 |
-RESTRICT="bindist" |
69 |
+RESTRICT="bindist test" |
70 |
|
71 |
RDEPEND=" |
72 |
- <=x11-base/xorg-server-1.13.49[-minimal] |
73 |
+ <=x11-base/xorg-server-1.14.49[-minimal] |
74 |
>=app-admin/eselect-opengl-1.0.7 |
75 |
app-admin/eselect-opencl |
76 |
sys-power/acpid |
77 |
@@ -36,7 +37,16 @@ RDEPEND=" |
78 |
virtual/glu |
79 |
multilib? ( |
80 |
app-emulation/emul-linux-x86-opengl |
81 |
- app-emulation/emul-linux-x86-xlibs |
82 |
+ || ( |
83 |
+ ( |
84 |
+ x11-libs/libX11[abi_x86_32] |
85 |
+ x11-libs/libXext[abi_x86_32] |
86 |
+ x11-libs/libXinerama[abi_x86_32] |
87 |
+ x11-libs/libXrandr[abi_x86_32] |
88 |
+ x11-libs/libXrender[abi_x86_32] |
89 |
+ ) |
90 |
+ app-emulation/emul-linux-x86-xlibs |
91 |
+ ) |
92 |
) |
93 |
qt4? ( |
94 |
x11-libs/libICE |
95 |
@@ -48,6 +58,13 @@ RDEPEND=" |
96 |
dev-qt/qtgui:4[accessibility] |
97 |
) |
98 |
" |
99 |
+if [[ legacy != ${SLOT} ]]; then |
100 |
+ RDEPEND="${RDEPEND} |
101 |
+ !x11-drivers/ati-drivers:legacy" |
102 |
+else |
103 |
+ RDEPEND="${RDEPEND} |
104 |
+ !x11-drivers/ati-drivers:1" |
105 |
+fi |
106 |
|
107 |
DEPEND="${RDEPEND} |
108 |
x11-proto/inputproto |
109 |
@@ -133,104 +150,39 @@ QA_DT_HASH=" |
110 |
usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 |
111 |
" |
112 |
|
113 |
-_check_kernel_config() { |
114 |
- local failed=0 |
115 |
- local error="" |
116 |
- if ! kernel_is ge 2 6; then |
117 |
- eerror "You need a 2.6 linux kernel to compile against!" |
118 |
- die "No 2.6 Kernel found" |
119 |
- fi |
120 |
- |
121 |
- if ! linux_chkconfig_present MTRR; then |
122 |
- ewarn "You don't have MTRR support enabled in the kernel." |
123 |
- ewarn "Direct rendering will not work." |
124 |
- fi |
125 |
- |
126 |
- if linux_chkconfig_builtin DRM; then |
127 |
- ewarn "You have DRM support built in to the kernel" |
128 |
- ewarn "Direct rendering will not work." |
129 |
- fi |
130 |
- |
131 |
- if ! linux_chkconfig_present AGP && \ |
132 |
- ! linux_chkconfig_present PCIEPORTBUS; then |
133 |
- ewarn "You don't have AGP and/or PCIe support enabled in the kernel" |
134 |
- ewarn "Direct rendering will not work." |
135 |
- fi |
136 |
- |
137 |
- if ! linux_chkconfig_present ACPI; then |
138 |
- eerror "${P} requires the ACPI support in the kernel" |
139 |
- eerror "Please enable it:" |
140 |
- eerror " CONFIG_ACPI=y" |
141 |
- eerror "in /usr/src/linux/.config or" |
142 |
- eerror " Power management and ACPI options --->" |
143 |
- eerror " [*] Power Management support" |
144 |
- eerror "in the 'menuconfig'" |
145 |
- error+=" CONFIG_ACPI disabled;" |
146 |
- failed=1 |
147 |
- fi |
148 |
- |
149 |
- if ! linux_chkconfig_present PCI_MSI; then |
150 |
- eerror "${P} requires MSI in the kernel." |
151 |
- eerror "Please enable it:" |
152 |
- eerror " CONFIG_PCI_MSI=y" |
153 |
- eerror "in /usr/src/linux/.config or" |
154 |
- eerror " Bus options (PCI etc.) --->" |
155 |
- eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" |
156 |
- eerror "in the kernel config." |
157 |
- error+=" CONFIG_PCI_MSI disabled;" |
158 |
- failed=1 |
159 |
- fi |
160 |
- |
161 |
- if linux_chkconfig_present LOCKDEP; then |
162 |
- eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." |
163 |
- eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." |
164 |
- eerror "This prevents ${P} from compiling with an error like this:" |
165 |
- eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" |
166 |
- eerror "Please make sure the following options have been unset:" |
167 |
- eerror " Kernel hacking --->" |
168 |
- eerror " [ ] Lock debugging: detect incorrect freeing of live locks" |
169 |
- eerror " [ ] Lock debugging: prove locking correctness" |
170 |
- eerror " [ ] Lock usage statistics" |
171 |
- eerror "in 'menuconfig'" |
172 |
- error+=" LOCKDEP enabled;" |
173 |
- failed=1 |
174 |
- fi |
175 |
- |
176 |
- use amd64 && if ! linux_chkconfig_present COMPAT; then |
177 |
- eerror "${P} requires COMPAT." |
178 |
- eerror "Please enable the 32 bit emulation:" |
179 |
- eerror "Executable file formats / Emulations --->" |
180 |
- eerror " [*] IA32 Emulation" |
181 |
- eerror "in the kernel config." |
182 |
- eerror "if this doesn't enable CONFIG_COMPAT add" |
183 |
- eerror " CONFIG_COMPAT=y" |
184 |
- eerror "in /usr/src/linux/.config" |
185 |
- error+=" COMPAT disabled;" |
186 |
- failed=1 |
187 |
- fi |
188 |
- |
189 |
- kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then |
190 |
- eerror "${P} requires BKL." |
191 |
- eerror "Please enable the Big Kernel Lock:" |
192 |
- eerror "Kernel hacking --->" |
193 |
- eerror " [*] Big Kernel Lock" |
194 |
- eerror "in the kernel config." |
195 |
- eerror "or add" |
196 |
- eerror " CONFIG_BKL=y" |
197 |
- eerror "in /usr/src/linux/.config" |
198 |
- error+=" BKL disabled;" |
199 |
- failed=1 |
200 |
- fi |
201 |
- |
202 |
- [[ ${failed} -ne 0 ]] && die "${error}" |
203 |
-} |
204 |
- |
205 |
pkg_pretend() { |
206 |
+ local CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP !PAX_KERNEXEC_PLUGIN_METHOD_OR" |
207 |
+ use amd64 && CONFIG_CHECK+=" COMPAT" |
208 |
+ |
209 |
+ local ERROR_MTRR="CONFIG_MTRR required for direct rendering." |
210 |
+ local ERROR_DRM="CONFIG_DRM must be disabled or compiled as a module and not loaded for direct |
211 |
+ rendering to work." |
212 |
+ local ERROR_LOCKDEP="CONFIG_LOCKDEP (lock tracking) exports the symbol lock_acquire |
213 |
+ as GPL-only. This prevents ${P} from compiling with an error like this: |
214 |
+ FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" |
215 |
+ local ERROR_PAX_KERNEXEC_PLUGIN_METHOD_OR="This config option will cause |
216 |
+ kernel to reject loading the fglrx module with |
217 |
+ \"ERROR: could not insert 'fglrx': Exec format error.\" |
218 |
+ You may want to try CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_BTS instead." |
219 |
+ local ERROR_BKL="CONFIG_BKL must be enabled for kernels 2.6.37-2.6.38." |
220 |
+ |
221 |
# workaround until bug 365543 is solved |
222 |
if use modules; then |
223 |
linux-info_pkg_setup |
224 |
require_configured_kernel |
225 |
- _check_kernel_config |
226 |
+ kernel_is ge 2 6 37 && kernel_is le 2 6 38 && CONFIG_CHECK+=" BKL" |
227 |
+ check_extra_config |
228 |
+ if ! linux_chkconfig_present AGP && \ |
229 |
+ ! linux_chkconfig_present PCIEPORTBUS; then |
230 |
+ ewarn "You don't have AGP and/or PCIe support enabled in the kernel" |
231 |
+ ewarn "Direct rendering will not work." |
232 |
+ fi |
233 |
+ fi |
234 |
+ |
235 |
+ if ! has XT ${PAX_MARKINGS} && use pax_kernel; then |
236 |
+ ewarn "You have disabled xattr pax markings for portage." |
237 |
+ ewarn "This will likely cause programs using ati-drivers provided" |
238 |
+ ewarn "libraries to be killed kernel." |
239 |
fi |
240 |
} |
241 |
|
242 |
@@ -264,20 +216,20 @@ pkg_setup() { |
243 |
fi |
244 |
|
245 |
elog |
246 |
- elog "Please note that this driver supports only graphic cards based on" |
247 |
+ elog "Please note that this driver only supports graphic cards based on" |
248 |
elog "Evergreen chipset and newer." |
249 |
- elog "This represent the AMD Radeon HD 5400+ series at this moment." |
250 |
+ elog "This includes the AMD Radeon HD 5400+ series at this moment." |
251 |
elog |
252 |
elog "If your card is older then use ${CATEGORY}/xf86-video-ati" |
253 |
- elog "For migration informations please reffer to:" |
254 |
+ elog "For migration informations please refer to:" |
255 |
elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" |
256 |
einfo |
257 |
} |
258 |
|
259 |
src_unpack() { |
260 |
local DRIVERS_DISTFILE XVBA_SDK_DISTFILE |
261 |
- DRIVERS_DISTFILE=${DRIVERS_URI/*\//} |
262 |
- XVBA_SDK_DISTFILE=${XVBA_SDK_URI/*\//} |
263 |
+ DRIVERS_DISTFILE=${DRIVERS_URI##*/} |
264 |
+ XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/} |
265 |
|
266 |
if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then |
267 |
unpack ${DRIVERS_DISTFILE} |
268 |
@@ -289,19 +241,20 @@ src_unpack() { |
269 |
else |
270 |
RUN="${DISTDIR}/${DRIVERS_DISTFILE}" |
271 |
fi |
272 |
- sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die |
273 |
+ sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die |
274 |
fi |
275 |
|
276 |
mkdir xvba_sdk |
277 |
cd xvba_sdk |
278 |
unpack ${XVBA_SDK_DISTFILE} |
279 |
+ |
280 |
+ mkdir -p "${WORKDIR}/extra" || die "mkdir extra failed" |
281 |
+ cd "${WORKDIR}/extra" |
282 |
+ tar -xf "../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz" |
283 |
} |
284 |
|
285 |
src_prepare() { |
286 |
- # All kernel options for prepare are ment to be in here |
287 |
if use modules; then |
288 |
- # version patches |
289 |
- # epatch "${FILESDIR}"/kernel/${PV}-*.patch |
290 |
if use debug; then |
291 |
sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ |
292 |
"${MODULE_DIR}/firegl_public.c" \ |
293 |
@@ -323,7 +276,7 @@ src_prepare() { |
294 |
-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ |
295 |
-e "s:/var/lib/gdm/:/var/gdm/:" \ |
296 |
"${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ |
297 |
- || die "sed failed." |
298 |
+ || die "ACPI fixups failed." |
299 |
|
300 |
# Since "who" is in coreutils, we're using that one instead of "finger". |
301 |
sed -i -e 's:finger:who:' \ |
302 |
@@ -338,16 +291,27 @@ src_prepare() { |
303 |
# first hunk applied upstream second (x32 related) was not |
304 |
epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch |
305 |
|
306 |
- # compile fix for linux-3.7 |
307 |
- # https://bugs.gentoo.org/show_bug.cgi?id=438516 |
308 |
- epatch "${FILESDIR}/ati-drivers-vm-reserverd.patch" |
309 |
- |
310 |
# compile fix for AGP-less kernel, bug #435322 |
311 |
epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch |
312 |
|
313 |
- # Use ACPI_DEVICE_HANDLE wrapper to make driver build on linux-3.8 |
314 |
- # see https://bugs.gentoo.org/show_bug.cgi?id=448216 |
315 |
- epatch "${FILESDIR}/ati-drivers-kernel-3.8-acpihandle.patch" |
316 |
+ # Compile fix for kernel typesafe uid types #469160 |
317 |
+ epatch "${FILESDIR}/typesafe-kuid.diff" |
318 |
+ |
319 |
+ epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch" |
320 |
+ |
321 |
+ epatch "${FILESDIR}/check-for-iommu-only-if-iommu-is-supported.patch" |
322 |
+ |
323 |
+ # Fix #483400 |
324 |
+ epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch" |
325 |
+ |
326 |
+ # Fix build on new kernels |
327 |
+ epatch "${FILESDIR}/ati-drivers-13.12-acpi.patch" |
328 |
+ |
329 |
+ # Add support for linux-3.13. See #498766 |
330 |
+ epatch "${FILESDIR}/ati-drivers-linux-3.13-acpi-handle.patch" |
331 |
+ |
332 |
+ # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870 |
333 |
+ use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" |
334 |
|
335 |
cd "${MODULE_DIR}" |
336 |
|
337 |
@@ -364,22 +328,6 @@ src_prepare() { |
338 |
sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed" |
339 |
sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \ |
340 |
|| die "MODVERSIONS sed failed" |
341 |
- cd "${S}" |
342 |
- |
343 |
- mkdir extra || die "mkdir failed" |
344 |
- cd extra |
345 |
- unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz |
346 |
- |
347 |
- # Get rid of watermark. Oldest known reference: |
348 |
- # http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark |
349 |
- if use disable-watermark; then |
350 |
- ebegin "Disabling watermark" |
351 |
- driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so |
352 |
- for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do |
353 |
- sed -i "s/${x/x5b/\x5b}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 |
354 |
- done |
355 |
- eend $? || die "Disabling watermark failed" |
356 |
- fi |
357 |
} |
358 |
|
359 |
src_compile() { |
360 |
@@ -398,8 +346,6 @@ src_compile() { |
361 |
eend $? |
362 |
} |
363 |
|
364 |
-src_test() { :; } # no tests present |
365 |
- |
366 |
src_install() { |
367 |
use modules && linux-mod_src_install |
368 |
|
369 |
@@ -611,6 +557,10 @@ src_install-libs() { |
370 |
|
371 |
#install xvba sdk headers |
372 |
doheader xvba_sdk/include/amdxvba.h |
373 |
+ |
374 |
+ if use pax_kernel; then |
375 |
+ pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed" |
376 |
+ fi |
377 |
} |
378 |
|
379 |
pkg_postinst() { |
380 |
@@ -633,12 +583,19 @@ pkg_postinst() { |
381 |
"${ROOT}"/usr/bin/eselect opengl set --use-old ati |
382 |
"${ROOT}"/usr/bin/eselect opencl set --use-old amd |
383 |
|
384 |
- if has_version ">=x11-drivers/xf86-video-intel-2.20.3"; then |
385 |
- ewarn "It is reported that xf86-video-intel-2.20.3 and later cause the X server" |
386 |
+ if has_version "x11-drivers/xf86-video-intel[sna]"; then |
387 |
+ ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server" |
388 |
ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience" |
389 |
- ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier." |
390 |
+ ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or" |
391 |
+ ewarn "try disabling sna for xf86-video-intel." |
392 |
ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000" |
393 |
fi |
394 |
+ |
395 |
+ if use pax_kernel; then |
396 |
+ ewarn "Please run \"revdep-pax -s libGL.so.1 -me\" after installation and" |
397 |
+ ewarn "after you have run \"eselect opengl set ati\". Executacle" |
398 |
+ ewarn "revdep-pax is part of package sys-apps/elfix." |
399 |
+ fi |
400 |
} |
401 |
|
402 |
pkg_preinst() { |
403 |
|
404 |
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-13.12-acpi.patch b/x11-drivers/ati-drivers/files/ati-drivers-13.12-acpi.patch |
405 |
new file mode 100644 |
406 |
index 0000000..0a27431 |
407 |
--- /dev/null |
408 |
+++ b/x11-drivers/ati-drivers/files/ati-drivers-13.12-acpi.patch |
409 |
@@ -0,0 +1,16 @@ |
410 |
+diff -urN common.old/lib/modules/fglrx/build_mod/kcl_acpi.c common/lib/modules/fglrx/build_mod/kcl_acpi.c |
411 |
+--- common.old/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-12-27 13:32:34.734832283 +0100 |
412 |
++++ common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-12-27 13:33:31.849831765 +0100 |
413 |
+@@ -1002,7 +1002,11 @@ |
414 |
+ #endif |
415 |
+ { |
416 |
+ return KCL_ACPI_ERROR; |
417 |
+- } |
418 |
++ } |
419 |
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,1) |
420 |
++ ((acpi_tbl_table_handler)handler)(hdr); |
421 |
++#else |
422 |
+ ((acpi_table_handler)handler)(hdr); |
423 |
++#endif |
424 |
+ return KCL_ACPI_OK; |
425 |
+ } |
426 |
|
427 |
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-linux-3.13-acpi-handle.patch b/x11-drivers/ati-drivers/files/ati-drivers-linux-3.13-acpi-handle.patch |
428 |
new file mode 100644 |
429 |
index 0000000..3ecc7c4 |
430 |
--- /dev/null |
431 |
+++ b/x11-drivers/ati-drivers/files/ati-drivers-linux-3.13-acpi-handle.patch |
432 |
@@ -0,0 +1,27 @@ |
433 |
+From 889165af52ba694f72d4d1e333a1f9ba14a82fde Mon Sep 17 00:00:00 2001 |
434 |
+From: Emil Karlson <jekarlson@×××××.com> |
435 |
+Date: Tue, 21 Jan 2014 23:25:26 +0200 |
436 |
+Subject: [PATCH] ati-drivers: linux-3.13 acpi handle |
437 |
+ |
438 |
+--- |
439 |
+ common/lib/modules/fglrx/build_mod/kcl_acpi.c | 4 +++- |
440 |
+ 1 file changed, 3 insertions(+), 1 deletion(-) |
441 |
+ |
442 |
+diff --git a/common/lib/modules/fglrx/build_mod/kcl_acpi.c b/common/lib/modules/fglrx/build_mod/kcl_acpi.c |
443 |
+index d875bf9..e063057 100755 |
444 |
+--- a/common/lib/modules/fglrx/build_mod/kcl_acpi.c |
445 |
++++ b/common/lib/modules/fglrx/build_mod/kcl_acpi.c |
446 |
+@@ -792,7 +792,9 @@ static unsigned int KCL_ACPI_SearchHandles(KCL_ACPI_DevHandle handle, unsigned i |
447 |
+ unsigned int ATI_API_CALL KCL_ACPI_GetHandles(kcl_match_info_t *pInfo) |
448 |
+ { |
449 |
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12) |
450 |
+- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) |
451 |
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0) |
452 |
++ pInfo->video_handle = (acpi_handle)ACPI_HANDLE(&pInfo->pcidev->dev); |
453 |
++ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) |
454 |
+ pInfo->video_handle = pInfo->pcidev->dev.acpi_node.handle; |
455 |
+ #elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19) |
456 |
+ pInfo->video_handle = pInfo->pcidev->dev.archdata.acpi_handle; |
457 |
+-- |
458 |
+1.8.3.2 |
459 |
+ |