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.
calculate-overlay/profiles/patches/x11-drivers/ati-drivers-12.1-for_kernel...

28 lines
844 B

diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
index 6e0aa82..7e5ddb7 100755
--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
+++ b/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,2,8)
+ 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