Announcement

Collapse
No announcement yet.

request: patch for catalyst (10.7) to get 2.6.36-rc* working

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

  • request: patch for catalyst (10.7) to get 2.6.36-rc* working

    Hi guys,

    anyone has already a patch to get the fglrx / catalyst drivers to work with 2.6.36-rc* kernels ?

  • #2
    Come on now, why do you even want to run Catalyst on such experimental kernels?

    Comment


    • #3
      Originally posted by nanonyme View Post
      Come on now, why do you even want to run Catalyst on such experimental kernels?
      it has been since the beginning for me that way - those bleeding edge kernels were the only possibility to run my hardware at that time (6 years ago) - and I'm kind of keeping that tradition

      besides that the most severe problems don't affect me / have already been fixed

      Comment


      • #4
        There you are, I'm currently running the opencl 1.1 testing only driver (ati-driver-installer-8.753.1-x86.x86_64.run) with kernel 2.6.36-rc1, I didn't do much testing yet but torcs and some opencl examples from the sdk seen to work fine:
        Code:
        diff -aur work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c work/common/lib/modules/fglrx/build_mod/firegl_public.c
        --- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2010-08-20 21:51:48.000000000 +0200
        +++ work/common/lib/modules/fglrx/build_mod/firegl_public.c	2010-08-20 22:02:32.000000000 +0200
        @@ -320,7 +320,7 @@
             return firegl_release((KCL_IO_FILE_Handle)filp);
         }
         
        -int ip_firegl_ioctl(struct inode* inode, struct file* filp, unsigned int cmd, unsigned long arg)
        +int ip_firegl_ioctl(struct file* filp, unsigned int cmd, unsigned long arg)
         {
             return firegl_ioctl((KCL_IO_FILE_Handle)filp, cmd, arg);
         }
        @@ -407,7 +407,7 @@
         #endif
             open:    ip_firegl_open,
             release: ip_firegl_release,
        -    ioctl:   ip_firegl_ioctl,
        +    unlocked_ioctl:   ip_firegl_ioctl,
             mmap:    ip_firegl_mmap,
         
             write:   ip_firegl_write,
        This is a version of the patch with proper kernelversion detection, but the KERNEL_VERSION macro doesn't work with -rc kernels:
        Code:
        diff -aur work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c work/common/lib/modules/fglrx/build_mod/firegl_public.c
        --- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2010-08-20 21:51:48.000000000 +0200
        +++ work/common/lib/modules/fglrx/build_mod/firegl_public.c	2010-08-20 23:46:37.000000000 +0200
        @@ -320,7 +320,11 @@
             return firegl_release((KCL_IO_FILE_Handle)filp);
         }
         
        +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
        +int ip_firegl_ioctl(struct file* filp, unsigned int cmd, unsigned long arg)
        +#else
         int ip_firegl_ioctl(struct inode* inode, struct file* filp, unsigned int cmd, unsigned long arg)
        +#endif
         {
             return firegl_ioctl((KCL_IO_FILE_Handle)filp, cmd, arg);
         }
        @@ -407,7 +411,11 @@
         #endif
             open:    ip_firegl_open,
             release: ip_firegl_release,
        +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
        +    unlocked_ioctl:   ip_firegl_ioctl,
        +#else
             ioctl:   ip_firegl_ioctl,
        +#endif
             mmap:    ip_firegl_mmap,
         
             write:   ip_firegl_write,

        Comment


        • #5
          The second patch (and the KERNEL_VERSION macro) works with 2.6.36-rc1, too.

          Comment


          • #6
            Originally posted by Spasswolf View Post
            The second patch (and the KERNEL_VERSION macro) works with 2.6.36-rc1, too.
            confirmed !

            it's running here now (compiz-fusion, so compositing and glxgears are working fine)

            thanks a lot Spasswolf !

            Comment


            • #7
              does this still work for you with 2.6.36-rc4+ ?

              Comment


              • #8
                error message for me

                make -C /usr/src/linux M=/var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x modules
                make[1]: Entering directory `/usr/src/linux-2.6.36-rc4_plus'
                /usr/src/linux-2.6.36-rc4_plus/arch/x86/Makefile:81: stack protector enabled but no compiler support
                CC [M] /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
                CC [M] /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
                CC [M] /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
                CC [M] /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
                CC [M] /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
                CC [M] /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_io.o
                CC [M] /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_pci.o
                CC [M] /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.o
                CC [M] /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_str.o
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c:51:44: warning: ‘struct tty_struct’ declared inside parameter list
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c:51:44: warning: its scope is only this definition or declaration, which is probably not what you want
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c:60:49: warning: ‘struct tty_struct’ declared inside parameter list
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c:67:5: warning: initialization from incompatible pointer type
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c:74:5: warning: initialization from incompatible pointer type
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c: In function ‘KCL_IOCTL_AllocUserSpace32’:
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:196:5: error: implicit declaration of function ‘compat_alloc_user_space’
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:196:5: warning: return makes pointer from integer without a cast
                make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o] Error 1
                make[2]: *** Waiting for unfinished jobs....
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:415:5: warning: initialization from incompatible pointer type
                In file included from /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:459:0:
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/drm_proc.h: In function ‘FGLDRM__vma_info’:
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/drm_proc.h:497:2: warning: format ‘%08lx’ expects type ‘long unsigned int’, but argument 5 has type ‘phys_addr_t’
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_MapPageToPfn’:
                /var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1646:16: warning: unused variable ‘bus_addr’
                make[1]: *** [_module_/var/tmp/portage/x11-drivers/ati-drivers-10.8/work/common/lib/modules/fglrx/build_mod/2.6.x] Error 2
                make[1]: Leaving directory `/usr/src/linux-2.6.36-rc4_plus'
                make: *** [kmod_build] Error 2
                emake failed
                * ERROR: x11-drivers/ati-drivers-10.8 failed:
                * Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= GCC_VER_MAJ=4 KVER=2.6.36-rc4_plus+ KDIR=/usr/src/linux kmod_build
                *
                * Call stack:
                * ebuild.sh, line 56: Called src_compile
                * environment, line 3721: Called linux-mod_src_compile
                * environment, line 2885: Called die
                * The specific snippet of code:
                * eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" CROSS_COMPILE=${CHOST}- LDFLAGS=\"$(get_abi_LDFLAGS)\" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";

                Comment


                • #9
                  looks like a very very old error to me:

                  [all variants] Ati,: fglrx module and vanilla kernel 2.6.24.x and 2.6.25.x on x86_64

                  Code:
                  --- kcl_ioctl.c.old	2010-09-15 16:38:39.399690030 +0200
                  +++ kcl_ioctl.c	2010-09-15 16:39:55.632689146 +0200
                  @@ -193,7 +193,7 @@
                    */
                   void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
                   {
                  -    return compat_alloc_user_space(size);
                  +    return KCL_IOCTL_AllocUserSpace32(size);
                   }
                   
                   #endif // __x86_64__

                  Comment


                  • #10
                    My guess is you're missing CONFIG_COMPAT=y in your .config, which is selected automatically when enabling IA32_EMULATION (at least on an x86_64 system).

                    In 2.6.36-rc-4-git2 this will break again, because compat_alloc_user_space is renamed to arch_compat_alloc_user_space:

                    Comment

                    Working...
                    X