You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.9 KiB
54 lines
1.9 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../fglrx/xf86-video-fglrx-12.2-TS_USEDFPU_fix.patch |
|
# Copyright (C) 2012 The OpenSDE Project |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This patch file is dual-licensed. It is available under the license the |
|
# patched project is licensed under, as long as it is an OpenSource license |
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|
# of the GNU General Public License as published by the Free Software |
|
# Foundation; either version 2 of the License, or (at your option) any later |
|
# version. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
http://phoronix.com/forums/showthread.php?68922-Patch-to-compile-fgrlx-module-on-Linux-3-3-rc4-with-x86-32-bit-arch |
|
fixed fgrlx compilation error on 32-bit x86 arch with kernel 3.3-rc4 due to commit: |
|
https://github.com/torvalds/linux/commit/f94edacf998516ac9d849f7bc6949a703977a7f3 |
|
|
|
Signed-off-by: Gianluca Gennari <gennarone@gmail.com> |
|
--- |
|
firegl_public.c | 9 +++++++++ |
|
1 files changed, 9 insertions(+), 0 deletions(-) |
|
|
|
diff --git a/firegl_public.c b/firegl_public.c |
|
index 6e0aa82..5010b91 100644 |
|
--- fglrx/common/lib/modules/fglrx/build_mod/firegl_public.c |
|
+++ fglrx/common/lib/modules/fglrx/build_mod/firegl_public.c |
|
@@ -5797,6 +5797,14 @@ void ATI_API_CALL KCL_fpu_begin(void) |
|
#ifdef CONFIG_X86_64 |
|
kernel_fpu_begin(); |
|
#else |
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) |
|
+ struct task_struct *tsk = current; |
|
+ preempt_disable(); |
|
+ if (tsk->thread.has_fpu) |
|
+ __save_init_fpu(tsk); |
|
+ else |
|
+ clts(); |
|
+#else |
|
struct thread_info *cur_task = current_thread_info(); |
|
preempt_disable(); |
|
if (cur_task->status & TS_USEDFPU) |
|
@@ -5804,6 +5812,7 @@ void ATI_API_CALL KCL_fpu_begin(void) |
|
else |
|
clts(); |
|
#endif |
|
+#endif |
|
} |
|
|
|
/** \brief End of using FPU |
|
-- |
|
1.7.5.4
|
|
|