Package: fglrx-driver
Version: 1:8-7-3
Severity: normal

I used the attached patch to get the source package to compile with
kernel 2.6.27.*. However, it's very unstable with my AMD780G/ATI HD3200
motherboard. The display often goes blank or freezes and needs a reboot,
and I've also had at least one kernel oops. Xine displays repeated
patterns instead of a picture when using the Xv driver; its OpenGL
driver works, but the display gets garbled if I switch to full screen
mode and back again until I reset it.

Is all this because 8-7-3 isn't really compatible with such a new
kernel, and a newer fglrx should fix it? Or is this sort of thing quite
typical of fglrx?

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.27.6 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--- firegl_public.c.orig	2008-11-08 17:34:11.000000000 +0000
+++ firegl_public.c	2008-11-17 23:25:50.000000000 +0000
@@ -207,6 +207,14 @@
 #define preempt_enable()
 #endif
 
+/* Since 2.6.27 smp_call_function doesn't have a nonatomic/retry argument */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+#define SMP_CALL_FUNCTION(func, info, retry, wait) smp_call_function(func, info, wait)
+#else
+#define SMP_CALL_FUNCTION(func, info, retry, wait) smp_call_function(func, info, retry, wait)
+#endif
+
+
 // ============================================================
 /* globals */
 
@@ -2727,7 +2735,11 @@
 /*Some kernel developer removed the export of symbol "flush_tlb_page" on 2.6.25 x86_64 SMP kernel.
   Define a simple version here.*/
 #if defined(__x86_64__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) 
-    on_each_cpu(KCL_flush_tlb_one, &va, 1, 1);
+    on_each_cpu(KCL_flush_tlb_one, &va, 1
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) 
+        , 1
+#endif
+        );
 #else
     flush_tlb_page(vma, va);
 #endif
@@ -3237,7 +3249,7 @@
 {
 #ifdef CONFIG_SMP
     /* write back invalidate all other CPUs (exported by kernel) */
-	if (smp_call_function(deferred_flush, NULL, 1, 0) != 0)
+	if (SMP_CALL_FUNCTION(deferred_flush, NULL, 1, 0) != 0)
 		panic("timed out waiting for the other CPUs!\n");
 
     /* invalidate this CPU */
@@ -4832,7 +4844,7 @@
 void ATI_API_CALL KCL_CallFuncOnOtherCpus(firegl_void_routine_t func_to_call)
 {
 #ifdef CONFIG_SMP
-	smp_call_function( firegl_smp_func_parameter_wrap, (void*)func_to_call, 0, 1 );
+	SMP_CALL_FUNCTION( firegl_smp_func_parameter_wrap, (void*)func_to_call, 0, 1 );
 #endif
 }
 
@@ -4943,7 +4955,7 @@
     }
 
 #ifdef CONFIG_SMP
-    if (smp_call_function(KCL_setup_pat, NULL, 0, 1) != 0)
+    if (SMP_CALL_FUNCTION(KCL_setup_pat, NULL, 0, 1) != 0)
        return 0;
 #endif
     KCL_setup_pat(NULL);
@@ -4961,7 +4973,7 @@
     }
 
 #ifdef CONFIG_SMP
-    if (smp_call_function(KCL_restore_pat, NULL, 0, 1) != 0)
+    if (SMP_CALL_FUNCTION(KCL_restore_pat, NULL, 0, 1) != 0)
        return;
 #endif
     KCL_restore_pat(NULL);

Reply via email to