Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 294997 - Patch to make ati-drivers-9.11 build with 2.6.32
Summary: Patch to make ati-drivers-9.11 build with 2.6.32
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-28 19:05 UTC by James Le Cuirot
Modified: 2009-12-15 12:15 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
2.6.32.patch (2.6.32.patch,7.74 KB, patch)
2009-11-28 19:06 UTC, James Le Cuirot
Details | Diff
Replace previous one for final 2.6.32 (2.6.32.patch,1.97 KB, patch)
2009-12-05 22:10 UTC, Frédéric COIFFIER
Details | Diff
Dirty ebuild which uses 2.6.32.patch (ati-drivers-9.11-r1.ebuild,18.06 KB, patch)
2009-12-05 22:12 UTC, Frédéric COIFFIER
Details | Diff
same as above ebuild with a check for kernel 2.6.32 for applying patch. (ati-drivers-9.11-r101.ebuild,18.09 KB, text/plain)
2009-12-06 06:46 UTC, hirakendu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Le Cuirot gentoo-dev 2009-11-28 19:05:21 UTC
I was having major wireless problems (kernel panics) with 2.6.30 and 2.6.31. They've all gone in 2.6.32 but as usual, it'll probably be ages before ATI catches up so I had a shot at fixing the driver myself. I was successful! Debian managed to take it as far as rc5 but a bit more work was needed for rc8. 

The __cmpxchg_wrong_size stub satisfies an unresolved symbol. Don't worry about the fact that it's a stub, it's only called in cases where the previous kernels did nothing anyway.
Comment 1 James Le Cuirot gentoo-dev 2009-11-28 19:06:12 UTC
Created attachment 211473 [details, diff]
2.6.32.patch

Forgot to mention that the patch is not backwards-compatible so make it conditional on >=2.6.32.
Comment 2 Frédéric COIFFIER 2009-12-05 22:10:15 UTC
Created attachment 212181 [details, diff]
Replace previous one for final 2.6.32

Patch which works with sys-kernel/gentoo-sources-2.6.32
Comment 3 Frédéric COIFFIER 2009-12-05 22:12:23 UTC
Created attachment 212185 [details, diff]
Dirty ebuild which uses 2.6.32.patch

This ebuild works only for 2.6.32. Must be used with latest 2.6.32.patch. Other required files can be found in /usr/portage/x11-drivers/ati-drivers/files/
Comment 4 hirakendu 2009-12-06 06:44:38 UTC
Thanks for the patch :).

I am curious as to why you say the ebuild is only for >=2.6.32. You can make it work for all kernel versions by enclosing the epatch line in the ebuild within a conditional check on kernel version like this:
        if kernel_is ge 2 6 32; then
                epatch "${FILESDIR}"/2.6.32.patch
        fi
. Attaching the modified ebuild.
Comment 5 hirakendu 2009-12-06 06:46:30 UTC
Created attachment 212206 [details]
same as above ebuild with a check for kernel 2.6.32 for applying patch.
Comment 6 James Le Cuirot gentoo-dev 2009-12-06 11:27:50 UTC
Hmm I wonder why my git checkout of vanilla 2.6.32 had autoconf.h and utsrelease.h in include/generated while gentoo-sources still has them in include/linux.
Comment 7 DarkNRG 2009-12-07 09:49:11 UTC
ati-driver compile just fine thanks to your patch but I get corrupted pixels in the lower right corner of the KDE screen and system freezes on logout (even MagicKeys don't work anymore).
They haven't been there with kernel 2.6.31, and my kernel config is practically the same.
May this be related to the patch?
Comment 8 James Le Cuirot gentoo-dev 2009-12-07 09:54:44 UTC
Even though it compiles now, that's no guarantee that it will actually work. It worked for me and a few others, it seems, but maybe not for everybody. I'm not a KDE user, maybe it's specific to that?
Comment 9 Johannes Hirte 2009-12-08 10:56:16 UTC
(In reply to comment #3)
> Created an attachment (id=212185) [details]
> Dirty ebuild which uses 2.6.32.patch
> 
> This ebuild works only for 2.6.32. Must be used with latest 2.6.32.patch. Other
> required files can be found in /usr/portage/x11-drivers/ati-drivers/files/
> 

If you put the 2.6.32 specific parts into

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
$YOURCODE
#else
$OTHERCODE
endif

you don't need to rely on the kernel-version in the ebuild. I didn't looked into the kernel source here, but I suspect this affects the cmpxchg part of the patch.
Comment 10 Fabio Erculiani (RETIRED) gentoo-dev 2009-12-15 12:15:07 UTC
Thanks for reporting and thanks for the patch. I added a cleaned out version of it to the tree.

+  15 Dec 2009; Fabio Erculiani <lxnay@gentoo.org> ati-drivers-9.11.ebuild,
+  +files/kernel/2.6.32-9.11-fix_compilation.patch:
+  make ati-drivers-9.11 compile with 2.6.32 kernel, close bug #294997