Announcement

Collapse
No announcement yet.

fglrx 8.9 & 2.6.27 ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • fglrx 8.9 & 2.6.27 ?

    Any information if fglrx/catalyst 8.9 works with Linux 2.6.27?
    "Works" can be defined; works without changes or works with patching.

  • #2
    Generally the AMD driver releases don't work on kernels that have not yet been released as stable. I wouldn't expect 8.9 to work with 2.6.27 without patches. But rather 8.10 (assuming kernel 2.6.27 is released before the end of the month)

    Comment


    • #3
      Perhaps a better programmer/code hacker than me can adapt this previous patch? => http://groups.google.com/group/linux...86b1cb7674fc43

      Comment


      • #4
        It worked for me with the following patch for firegl_public.c:

        Code:
        --- firegl_public.c.orig	2008-09-19 10:57:09.000000000 +0200
        +++ firegl_public.c	2008-09-19 10:55:57.000000000 +0200
        @@ -199,6 +199,12 @@
         #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 */
         
        @@ -250,7 +256,7 @@
         const char BUILD_KERNEL_HAS_MODVERSIONS_CLEARED;
         #endif
         
        -#ifdef __SMP__
        +#ifdef CONFIG_SMP
         const unsigned long __ke_SMP_State = 1;
         const char BUILD_KERNEL_HAS_SMP_SET;
         #else
        @@ -2516,8 +2522,8 @@
         {
         /*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__) && defined(__SMP__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) 
        -    on_each_cpu(KCL_flush_tlb_one, &va, 1, 1);
        +#if defined(__x86_64__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) 
        +    on_each_cpu(KCL_flush_tlb_one, &va, 1);
         #else
             flush_tlb_page(vma, va);
         #endif
        @@ -2902,7 +2908,7 @@
         
         /*****************************************************************************/
         
        -#ifdef __SMP__
        +#ifdef CONFIG_SMP
         static atomic_t cpus_waiting;
         
         static void deferred_flush(void* contextp)
        @@ -2918,13 +2924,13 @@
         	while (atomic_read(&cpus_waiting) > 0)
         		barrier();
         }
        -#endif /* __SMP__ */
        +#endif /* CONFIG_SMP */
         
         int ATI_API_CALL __ke_flush_cache(void)
         {
        -#ifdef __SMP__
        +#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 */
        @@ -2938,7 +2944,7 @@
         
         	while (atomic_read(&cpus_waiting) > 0)
         		barrier();
        -#else /* !__SMP__ */
        +#else /* !CONFIG_SMP */
         #if defined(__i386__) || defined(__x86_64__)
         	asm volatile ("wbinvd":::"memory");
         #elif defined(__alpha__) || defined(__sparc__)
        @@ -2946,7 +2952,7 @@
         #else
         #error "Please define flush_cache for your architecture."
         #endif
        -#endif /* !__SMP__ */
        +#endif /* !CONFIG_SMP */
         
             //for kernel 2.6.25, tlb_flush has been included when calling set_pages_*.
             #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
        @@ -4654,7 +4660,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);
        @@ -4673,7 +4679,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);

        Comment


        • #5
          If you are running Ubuntu Intrepid, their package as of yesterday evening runs on 2.6.27 kernels, see this launchpad bug report for more info.

          Comment


          • #6
            Originally posted by farbing View Post
            It worked for me with the following patch for firegl_public.c
            It doesn't work for me. It compiles and loads, but X is horribly slow and unusable. The problem seems to be this:
            Code:
            drmOpenDevice: node name is /dev/dri/card0
            drmOpenDevice: open result is -1, (No such device or address)
            drmOpenDevice: open result is -1, (No such device or address)
            drmOpenDevice: Open failed
            [...]
            (WW) fglrx(0): Failed to open DRM connection
            [...]
            (WW) fglrx(0): No DRM connection for driver fglrx.
            (II) fglrx(0): [drm] DRM buffer queue setup: nbufs = 100 bufsize = 65536
            [...]
            (EE) fglrx(0): atiddxDriScreenInit failed, GPS not been initialized. 
            (WW) fglrx(0): ***********************************************
            (WW) fglrx(0): * DRI initialization failed!                  *
            (WW) fglrx(0): * (maybe driver kernel module missing or bad) *
            (WW) fglrx(0): * 2D acceleraton available (MMIO)             *
            (WW) fglrx(0): * no 3D acceleration available                *
            (WW) fglrx(0): ********************************************* *
            I get some warnings when compiling:
            Code:
            /var/tmp/portage/x11-drivers/ati-drivers-8.532/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘__ke_vm_phys_addr_str’:
            /var/tmp/portage/x11-drivers/ati-drivers-8.532/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3755: warning: return makes pointer from integer without a cast
            /var/tmp/portage/x11-drivers/ati-drivers-8.532/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3756: warning: return makes pointer from integer without a cast
            /var/tmp/portage/x11-drivers/ati-drivers-8.532/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3757: warning: return makes pointer from integer without a cast
            /var/tmp/portage/x11-drivers/ati-drivers-8.532/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3759: warning: return makes pointer from integer without a cast
            /var/tmp/portage/x11-drivers/ati-drivers-8.532/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: At top level:
            /var/tmp/portage/x11-drivers/ati-drivers-8.532/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:6374: warning: initialization from incompatible pointer type
            /var/tmp/portage/x11-drivers/ati-drivers-8.532/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:6400: warning: initialization from incompatible pointer type
            /var/tmp/portage/x11-drivers/ati-drivers-8.532/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:6372: warning: ‘sysrq_fgldbg_op’ defined but not used
            /var/tmp/portage/x11-drivers/ati-drivers-8.532/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:6398: warning: ‘sysrq_fgldump_op’ defined but not used
            but I get them too when compiling for 2.6.26 so I suppose that's not the reason.



            (edit) Ok, now it works. I got an "unknown symbol init_mm". I just enabled "Export unused/obsolete symbols" in kernel hacking and everything seems to work ok now. I even solved some problems that I had with amdcccle in 2.6.26, I don't know why.
            Last edited by Fran; 09-22-2008, 09:21 AM.

            Comment


            • #7
              @farbing

              looks like a nice patch, hopefully ATI adds it directly to next release. Just tested it with 64 bit and it worked fine.

              Comment


              • #8
                Hi.

                I tried to use the patch.
                and get:
                Code:
                # patch firegl_public.c ati-drivers-2.6.27.patch
                patching file firegl_public.c
                Hunk #2 FAILED at 256.
                Hunk #3 FAILED at 2522.
                Hunk #4 FAILED at 2908.
                Hunk #5 FAILED at 2924.
                Hunk #6 FAILED at 2944.
                Hunk #7 FAILED at 2952.
                6 out of 9 hunks FAILED -- saving rejects to file firegl_public.c.rej
                Why not apply a patch?
                PS: firegl_public.c - 178721b
                kernel - 2.6.27 - vanilla
                Last edited by RodionD; 10-13-2008, 11:37 AM.

                Comment


                • #9
                  Originally posted by RodionD View Post
                  Hi.

                  I tried to use the patch.
                  and get:
                  Code:
                  # patch firegl_public.c ati-drivers-2.6.27.patch
                  patching file firegl_public.c
                  Hunk #2 FAILED at 256.
                  Hunk #3 FAILED at 2522.
                  Hunk #4 FAILED at 2908.
                  Hunk #5 FAILED at 2924.
                  Hunk #6 FAILED at 2944.
                  Hunk #7 FAILED at 2952.
                  6 out of 9 hunks FAILED -- saving rejects to file firegl_public.c.rej
                  Do what I did
                  Code:
                  cd /usr/src/kernel-modules/fglrx
                  cp firegl_public.c firegl_public.c.orig
                  vi firegl_public.c
                  diff -u firegl_public.c.orig firegl_public.c
                  All you need to do in the "vi" step is incorporate the contents of the patch you received previously. If you are bold (and good), you can directly edit the patch file to match the original file you have.

                  Anyways, here are my diffs:
                  Code:
                  --- firegl_public.c.orig	2008-10-13 10:50:51.000000000 -0400
                  +++ firegl_public.c	2008-10-13 14:25:26.000000000 -0400
                  @@ -199,6 +199,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 */
                   
                  @@ -2516,8 +2524,8 @@
                   {
                   /*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__) && CONFIG_SMP && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) 
                  -    on_each_cpu(KCL_flush_tlb_one, &va, 1, 1);
                  +#if defined(__x86_64__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) 
                  +    on_each_cpu(KCL_flush_tlb_one, &va, 1);
                   #else
                       flush_tlb_page(vma, va);
                   #endif
                  @@ -2924,7 +2932,7 @@
                   {
                   #if 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 */
                  @@ -4654,7 +4662,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);
                  @@ -4673,7 +4681,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);

                  Comment


                  • #10
                    Hi Guys,

                    Just been having a look at this and just wondered whether or not linux was any good?

                    I've had quite a few different problems with windows Xp and want to move away from windows so wondering whether or not the linux operating system is worth Public Liability Insurance.
                    Last edited by nathan3011; 02-05-2009, 09:55 AM.

                    Comment

                    Working...
                    X