Page 1 of 2 12 LastLast
Results 1 to 10 of 22

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

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Vienna, Austria; Germany; hello world :)
    Posts
    642

    Default 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. #2
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    1,759

    Default

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

  3. #3
    Join Date
    Jan 2009
    Location
    Vienna, Austria; Germany; hello world :)
    Posts
    642

    Default

    Quote 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

  4. #4
    Join Date
    Aug 2010
    Posts
    4

    Default

    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,

  5. #5
    Join Date
    Aug 2010
    Posts
    4

    Default

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

  6. #6
    Join Date
    Jan 2009
    Location
    Vienna, Austria; Germany; hello world :)
    Posts
    642

    Default

    Quote 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 !

  7. #7
    Join Date
    Jan 2009
    Location
    Vienna, Austria; Germany; hello world :)
    Posts
    642

    Default

    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}";

  8. #8
    Join Date
    Jan 2009
    Location
    Vienna, Austria; Germany; hello world :)
    Posts
    642

    Default

    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__

  9. #9
    Join Date
    Aug 2010
    Posts
    4

    Default

    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

  10. #10
    Join Date
    Jan 2009
    Location
    Vienna, Austria; Germany; hello world :)
    Posts
    642

    Default

    Quote 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:

    Quote 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 !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •