PDA

View Full Version : Linux 2.6.22 Patch for ATI fglrx Drivers


Michael
05-16-2007, 02:58 PM
Here is a temporary fglrx patch for the Linux 2.6.22-rc1 kernel.

--- firegl_public.c-orig 2007-05-16 14:52:12.000000000 -0500
+++ firegl_public.c 2007-05-16 14:52:48.000000000 -0500
@@ -144,12 +144,14 @@
#define EXPORT_NO_SYMBOLS
#endif

+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
#ifdef __x86_64__
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
#include "linux/ioctl32.h"
#else
#include "asm/ioctl32.h"
#endif
+#endif

#ifdef __x86_64__
#include "asm/compat.h"

lenrek
05-17-2007, 12:26 AM
We need to patch? I manage to build the driver without patching.


[fglrx] Maximum main memory to use for locked dma buffers: 555 MBytes.
[fglrx] module loaded - fglrx 8.36.5 [Apr 17 2007] on minor 0
ACPI: PCI Interrupt 0000:01:05.0[A] -> GSI 17 (level, low) -> IRQ 16
[fglrx] total GART = 130023424
[fglrx] free GART = 114032640
[fglrx] max single GART = 114032640
[fglrx] total LFB = 134217728
[fglrx] free LFB = 120320000
[fglrx] max single LFB = 120320000
[fglrx] total Inv = 0
[fglrx] free Inv = 0
[fglrx] max single Inv = 0
[fglrx] total TIM = 0



$> uname -a
Linux virgo 2.6.22-rc1 #1 Wed May 16 02:15:48 SGT 2007 i686 athlon-4 i386 GNU/Linux

Michael
05-17-2007, 06:22 AM
Then it may be for 8.37 that you need to patch.

eatmuchpie
05-17-2007, 02:51 PM
So where did you find that patch Michael? I wasn't aware 8.37 had been released (perhaps there's a beta floating around the interweb?).

Cheers for the help!

Michael
05-17-2007, 02:59 PM
So where did you find that patch Michael? I wasn't aware 8.37 had been released (perhaps there's a beta floating around the interweb?).

Cheers for the help!

The patch was written by a fglrx package maintainer for Ubuntu.

The 8.37 will be available later this month.

Zhenech
05-17-2007, 06:10 PM
lenrek, you did not have to patch, as you have a x86 machine, and the issue is x86_64 (aka amd64) only (the patch looks like this, I don't have further information)

lenrek
05-17-2007, 09:18 PM
lenrek, you did not have to patch, as you have a x86 machine, and the issue is x86_64 (aka amd64) only (the patch looks like this, I don't have further information)

Oh... Thanks for the info.

slacker
05-31-2007, 04:50 AM
i can't apply the patch on my gentoo:

gentoo 2.6.x # patch -p0 < ~/fglrx-2.6.22.patch
patching file firegl_public.c
Hunk #1 FAILED at 144.
1 out of 1 hunk FAILED -- saving rejects to file firegl_public.c.rej


kernel 2.6.22rc3 patched with ragnarok patches.
will 8.37 need this patch?

this is the output if I try to compile:
http://nopaste.com/p/aYMqLUkFY

How do I apply this patch please?

slacker
06-01-2007, 01:13 AM
I did it!!
It works fine now, there as some warnings like always tho.

ejos
06-07-2007, 05:15 PM
I did it!!
It works fine now, there as some warnings like always tho.

How did you get it to work? I have applied the patch, verified it made the changes, and when I compile it magically seems to undo itself and give me the same error I had before the patch. After attempting to compile, I looked back at firegl_public.c and it had indeed undone itself because the changes the patch was supposed to make are no longer there. This is really frustrating, can anybody help me?

slacker
06-08-2007, 01:06 AM
How did you get it to work? I have applied the patch, verified it made the changes, and when I compile it magically seems to undo itself and give me the same error I had before the patch. After attempting to compile, I looked back at firegl_public.c and it had indeed undone itself because the changes the patch was supposed to make are no longer there. This is really frustrating, can anybody help me?

uh, very weird problem!
im sorry i can't really help you :(
when i applied the patch everything compiled fine..

Michael
06-08-2007, 06:37 AM
How did you get it to work? I have applied the patch, verified it made the changes, and when I compile it magically seems to undo itself and give me the same error I had before the patch. After attempting to compile, I looked back at firegl_public.c and it had indeed undone itself because the changes the patch was supposed to make are no longer there. This is really frustrating, can anybody help me?

What steps are you doing to install it? It should be like running the file with the extract argument, change directories into the fglrx-install folder, patch firegl_public, run ati-installer.sh inside the fglrx-install folder and it won't overwrite your changes.

ejos
06-08-2007, 12:43 PM
What steps are you doing to install it? It should be like running the file with the extract argument, change directories into the fglrx-install folder, patch firegl_public, run ati-installer.sh inside the fglrx-install folder and it won't overwrite your changes.

That's what I was doing. I got it to compile by deleting the /usr/src/fglrx.tar so it couldn't recopy the file over the patched one.