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:
                    http://www.kernel.org/diff/diffview....-git2.bz2;z=15

                    Comment


                    • #11
                      Originally posted by Spasswolf View Post
                      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:
                      http://www.kernel.org/diff/diffview....-git2.bz2;z=15
                      I have it enabled:

                      Originally posted by cat /usr/src/linux/.config | grep COMPAT
                      # CONFIG_COMPAT_BRK is not set
                      CONFIG_BLOCK_COMPAT=y
                      # CONFIG_COMPAT_VDSO is not set
                      CONFIG_COMPAT_BINFMT_ELF=y
                      CONFIG_COMPAT=y
                      CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
                      CONFIG_SYSVIPC_COMPAT=y
                      CONFIG_COMPAT_NETLINK_MESSAGES=y
                      CONFIG_NF_CONNTRACK_PROC_COMPAT=y
                      CONFIG_I2C_COMPAT=y
                      CONFIG_VIDEO_V4L1_COMPAT=y
                      CONFIG_QUOTACTL_COMPAT=y
                      so it's the latter

                      thanks !

                      Comment


                      • #12
                        Actually, I was wrong with my assumption that compat_alloc_user_space is rennamed to arch_compat_alloc_user_space. compat_alloc_user_space get's some extra checking and calls the "new" arch_compat_alloc_user_space (which is the old compat_alloc_user_space)
                        http://www.kernel.org/diff/diffview....-git2.bz2;z=62
                        http://git.kernel.org/?p=linux/kerne...82d27a79a81ea6
                        The new compat_alloc_user_space is declared in linux/compat.h which should be included by kcl_ioctl.c.

                        Comment


                        • #13
                          Originally posted by Spasswolf View Post
                          In 2.6.36-rc-4-git2 this will break again, because compat_alloc_user_space is renamed to arch_compat_alloc_user_space:
                          http://www.kernel.org/diff/diffview....-git2.bz2;z=15
                          Thanks for the warning, I've got the modules built in 2.6.36-rc4-git2 now.
                          Code:
                          --- fglrx/build_mod/kcl_ioctl.c    2010-09-01 10:05:31.000000000 -0400
                          +++ kcl_ioctl.c 2010-09-16 23:11:12.066336002 -0400
                          @@ -193,7 +193,7 @@
                            */
                           void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
                           {
                          -    return compat_alloc_user_space(size);
                          +    return arch_compat_alloc_user_space(size);
                           }
                           
                           #endif // __x86_64__

                          Comment


                          • #14
                            Hi all,

                            I have had the same problem as descriped in the first post.
                            The patch later on worked for me an 2.6.36-rc3.

                            But now I have the following issu.
                            My system looks like this
                            - one installation on internel hdd - as working system
                            - and the same at an externel hdd (copied via cp -a) - as experimental system

                            The above things worked well on the external system and I could start X, so I wanted to get the same one the internal installation.

                            Build and install with dkms worked well but when starting X I get the following error
                            "fglrx incompatible kernel module detected"

                            (as mentioned both systems run the same kernel-image 2.6.36-rc3)

                            I found another forum where this issue is discriped but the final answer is missing and I can't get behind it.(http://www.linux-club.de/viewtopic.p...107085&start=0)

                            Would be great if anyone could give me a hint :-)

                            bye

                            Comment


                            • #15
                              New compat_alloc_user_space() GPLness and fglrx
                              <--

                              @bridgman:

                              could you please tell the devs for the proprietary driver / fglrx to fix it that it won't leave a security-hole open in the kernel with versions newer than 2.6.36-rc4-git2+ ?

                              thanks !

                              Comment

                              Working...
                              X