You are not logged in.

#151 2004-10-01 13:22:54

link
Member
Registered: 2004-04-30
Posts: 69

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

ActionNews wrote:

Well at least they give a solution smile:

X Fails to load on systems with Linux kernel version 2.6.x
This information applies to the following system configurations:

Linux kernel version 2.6.x
Any ATI Linux driver
A blank screen may appear momentarily when X starts to load. The following error message (or similar) may appear on the text console or in /var/log/XFree86.0.log:

(EE) fglrx(0): [agp] unable to acquire AGP, error ""xf86_ENODEV""

This is not a problem with the display driver.

Version 2.6 kernels require a second kernel module in addition to agpgart, which should be named similar to the manufacturer of your motherboard AGP chipset. This error message should occur if the other agp module is not loaded.

This issue can be worked around as follows:

First make sure that agpgart is loading properly.
To find out which AGP controller your motherboard uses, issue the following command: lspci | grep AGP
To find a list of AGP related kernel modules installed on your machine, issue the following command and look for a module (*.ko file) that suits your AGP Controller: ls /lib/modules/`uname -r`/kernel/drivers/char/agp
Use the modprobe command (as root) to load the module. For example: On a motherboard using a VIA® AGP Controller, you would load the via-agp.ko using modprobe as follows (notice that the trailing .ko is omitted): modprobe via-agp
Check the modprobe manpage for more information on loading kernel modules.

To verify that the AGP module is already loaded, run lsmod as root. With the XServer running and the connection established, the usage count of this module must be greater than zero.
If you cannot find a suitable agp module for your motherboard, then you may want to upgrade to the latest version of the Linux kernel, or check your motherboard manufacturer's website for more information.

Didn't read this before. Sorry.

And perhaps there is still some hope, but you never know wink: http://www.rage3d.net/board/showpost.ph … stcount=27

CU ActionNews

Ahh, ok, I've heard of that module. It looks like Arch's kernel26 has the agpgart & the agp-* modules compiled into it.

[link@blue ~]$ grep AGP /boot/kconfig26 
CONFIG_AGP=y
CONFIG_AGP_ALI=y
CONFIG_AGP_ATI=y
CONFIG_AGP_AMD=y
CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=y
CONFIG_AGP_INTEL_MCH=y
CONFIG_AGP_NVIDIA=y
CONFIG_AGP_SIS=y
CONFIG_AGP_SWORKS=y
CONFIG_AGP_VIA=y
CONFIG_AGP_EFFICEON=y

So we should be okay for a 3.14.1 build. I'll get on that today after work.

Offline

#152 2004-10-01 19:23:00

StratoS
Member
From: Netherlands, the
Registered: 2004-03-28
Posts: 22
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

this is getting realy frusterating.
I finally hoped this would work, but it's still not working.

firstly i took links Xorg that was a bit back in the topic, and downgraded my xorg.
This simply resulted in Xorg no longer functioning.
it tried to find modules that wheren't there.
(EE) Failed to load module "bitmap" (module does not exist, 0)
(EE) Failed to load module "pcidata" (module does not exist, 0)

But since i have a tendencie never to trow away stuff i happily still had the old xorg 6.7 in the /var/cache/pacman/pkg directory, and installed that one.

Then i installed links repositories, and downloaded the ati drivers and ati kernel module.

So i installed it and booted into the default 2.6.8.1 kernel.

I expected it  to be that simple.
However i was presented with the following error when trieng to load the ati driver.
fglrx: version magic '2.6.8.1 SMP preempt PENTIUM4 gcc-3.4' should be '2.6.8.1 SMP preempt 686 gcc-3.4'

Now i'm guessing that this would be a leftover from another 'trying to get this damn ati to work' project, described on page 1 of this topic.

my question is, why wasn't that one overwritten, or what did i forget to do, and why isn't it working.
followed by some obnoxious cries for help in all caps.

but however, i also tried to force load it.
Which precented me wih this nice addition to errors when trying to start X
Xorg.8.log.old:Symbol DRIGetDrawableInfo from module /usr/X11R6/lib/modules/drivers/fglrx_drv.o is unresolved!

so i disabled DRI, which worked.
but basicly put me bak to square one, since then 3d doesn't work.
*sigh*

so please, if anyone knows what step i apparently missed, or did wrong, please tell.


-edit-
just tried kleptophobiac's pkgbuild, the results where as expected.

Error:
XFree86 drm includes at /lib/modules/2.6.8.1/build/include/../drivers/char/drm do not fit this driver.
This driver is designed to only work with X4.1.0 or higher.
You can match this by getting Linux kernel 2.4.8 or higher.


Show me a sane man and I will cure him for you." - Carl Gustav Jung (1875-1961)

Offline

#153 2004-10-02 20:06:46

StratoS
Member
From: Netherlands, the
Registered: 2004-03-28
Posts: 22
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

i finaly got it too work.

Since i'm guessing there are more people who are pulling out there hair slow but steady i'll try to describe how i got it to work.

firstly i pulled a vanilla kernel and set it up the way i liked.
made symlinks to the kernel source dir in /lib/modules/2.6.8.1
named build and source. (perhaps this is standard but i never heard of it anyway)

got the abs-ati-drivers PKGBUILD from kleptophobiac's a bit back in this topic.
and rand makepkg.
followed his steps.

then did a grep AGP /proc/pci to find out i have a sis AGP thingy.
so i added sis_agp and agpgart and fglrx to my rc.conf and rebooted.

edited my xorg.conf as described by the horrible auto generated XF86Config from the fglrxconfig thingy.

then i commented out the module extmod.
and kablam it worked smile smile


Show me a sane man and I will cure him for you." - Carl Gustav Jung (1875-1961)

Offline

#154 2004-10-03 03:58:54

link
Member
Registered: 2004-04-30
Posts: 69

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Congrats! Another success story is always good to hear. :-)

Offline

#155 2004-10-03 10:50:19

StratoS
Member
From: Netherlands, the
Registered: 2004-03-28
Posts: 22
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

well not realy.

It's working:
[stratos@Tanzwut ~]$ fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9600 XT Generic
OpenGL version string: 1.3.4510 (X4.3.0-3.12.0)

and the glxgear and fgl_glxgears are working
[stratos@Tanzwut ~]$ glxgears
8974 frames in 5.0 seconds = 1794.800 FPS
9628 frames in 5.0 seconds = 1925.600 FPS
Broken pipe
[stratos@Tanzwut ~]$ fgl_glxgears
1705 frames in 5.0 seconds = 341.000 FPS
1803 frames in 5.0 seconds = 360.600 FPS

but when i run a game like tuxracer or neverball, they are extreeemly slow, as if there not using the 3d acceleration.
Xscreensaver is running fine though almost all of the openGL enabled screensavers work fine.


Show me a sane man and I will cure him for you." - Carl Gustav Jung (1875-1961)

Offline

#156 2004-10-25 10:57:52

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 768

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Followed the instructions and have great framerates, but many of my OpenGL apps look screwy or crash.

My first thought is that this tutorial no longer includes a second atch for AMD processors and maybe, if I applied that, it would solve my problem...

Offline

#157 2004-10-25 13:24:10

link
Member
Registered: 2004-04-30
Posts: 69

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

phunni wrote:

Followed the instructions and have great framerates, but many of my OpenGL apps look screwy or crash.

My first thought is that this tutorial no longer includes a second atch for AMD processors and maybe, if I applied that, it would solve my problem...

There is a patch for AMD processors? I have an AMD, though to be honest the only OpenGL application I use these days is the glslideshow screensaver. I haven't played any games in Linux in a long time.

Offline

#158 2004-10-25 14:09:05

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 768

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

There used to be one...

Offline

#159 2004-11-07 15:35:34

sickboy
Member
Registered: 2004-10-29
Posts: 18

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Hello all

After ploughing through theses posts I can't find anyone with the same problem as me.

when I run sh make_install.sh in /lib/modules/fglrx I get the following error :

[root@shmonkey fglrx]# sh make_install.sh
- creating symlink
- recreating module dependency list
- trying a sample load of the kernel module
FATAL: Error inserting fglrx (/lib/modules/2.6.8.1/kernel/drivers/char/drm/fglrx.ko): Invalid module format
failed.

any ideas on how to get past this ?

Unreal Tournament 2004 is calling  big_smile

Offline

#160 2004-11-10 05:39:14

zhitch
Member
Registered: 2004-10-31
Posts: 22

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

try a modprobe -r radeon       had the same prob......make sure you dont have any radeon modules loading at boot...just fglrx

Offline

#161 2004-12-30 20:39:57

qwerty
Member
Registered: 2004-12-17
Posts: 183

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Hallo, i've just upgraded to kernel 2.6.10 and i've had a lot of trouble making fgrlx module work, at the end i've found a patch here:

http://www.rage3d.com/board/showthread.php?t=33797225

And now everything seems to work...

Here is my PKGBUILD (i've just modified the one from Link Dupont):

kernel=`uname -r`
kernelpkgver=2.6.10-1
pkgname=ati-drivers-module-kernel26
pkgver=3.14.1
pkgrel=2
pkgdesc="ATI drivers kernel module"
url="http://www.ati.com"
license="ATI"
provides=('ati-drivers-module')
depends=("kernel26=$kernelpkgver")
makedepends=('rpmunpack')
install=ati-drivers-module.install
source=("http://www2.ati.com/drivers/linux/fglrx-4.3.0-$pkgver.i386.rpm"
        'arch-xorg-fix-includes.patch' "http://www.pissflitsche.net/scripts/agpgart_be.patch")

md5sums=('ae7bbeab76a3b08e7e2e769dc3ad6a5a' '47fa4a6761ad5c957d9b63b958c1bd5b'
         '9a4860f2b69fc421d1303c3be4794f48')

build() {
    cd $startdir/src
    rpmunpack < $startdir/src/fglrx-4.3.0-$pkgver.i386.rpm | gzip -d | cpio -idmuv
    # Correct the permissions
    chmod 644 `find $startdir/src -type f`
    chmod 755 `find $startdir/src -type d`

    # Apply patches
    cd $startdir/src/lib/modules/fglrx/build_mod
    patch -p4 < $startdir/src/arch-xorg-fix-includes.patch
    patch -p0 < $startdir/src/agpgart_be.patch

    # Fix some stupid permission problems
    chmod 644 `find $startdir/src/lib/modules/fglrx/build_mod/ -type f`
    chmod 755 $startdir/src/lib/modules/fglrx/build_mod/2.6.x

    # Compile the DRI kernel module
    cd $startdir/src/lib/modules/fglrx/build_mod
    cp 2.6.x/Makefile .
    export _POSIX2_VERSION="199209"
    make -C /usr/src/linux-$kernel SUBDIRS="`pwd`" modules || return 1

    # Install the kernel module
    install -m 644 -D $startdir/src/lib/modules/fglrx/build_mod/fglrx.ko 
        $startdir/pkg/lib/modules/$kernel/video/fglrx.ko || return 1
}

Offline

#162 2005-01-17 22:38:31

kleptophobiac
Member
From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 488

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

there appears to be a new version of the ATI linux drivers for xorg 6.8!!!!!

http://www2.ati.com/drivers/linux/fglrx … 1.i386.rpm

I'll be messing with it over the next few days.

Offline

#163 2005-01-17 23:57:57

jskier
Member
From: Minnesota, USA
Registered: 2003-07-30
Posts: 383
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Finally I can take off xorg from ignorepkg  big_smile
Works fine on my laptop running custom 2.6.9 and ATI 9600.
Used the ati-drivers pkgbuild in the TUR and modified it to suit the new RPM file.
GL seems smooth in tuxracer, and KDE screensaver, this is the extent of my testing, good luck installing everyone  smile


--
JSkier

Offline

#164 2005-01-18 05:53:04

Olli
Member
Registered: 2004-04-01
Posts: 57

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

jskier wrote:

Finally I can take off xorg from ignorepkg  big_smile
Works fine on my laptop running custom 2.6.9 and ATI 9600.
Used the ati-drivers pkgbuild in the TUR and modified it to suit the new RPM file.

Mmm I've tried that, but doesn't seem to work for me. First of all I get an error while applying the 2.6.10 patch:

Hunk #3 succeeded at 5119 (offset 51 lines).
Hunk #5 FAILED at 6418.
Hunk #6 succeeded at 7040 (offset 105 lines).
1 out of 6 hunks FAILED -- saving rejects to file agpgart_be.c.rej

And finally when the module is built, I can't load it. depmod doesn't do a thing at all and insmod:

[root@ender video]# insmod fglrx.ko
insmod: error inserting 'fglrx.ko': -1 Unknown symbol in module

Edit: Did a little research and it turns out that my agpart_be is indeed not correctly patched, as what I can find the error with inserting the module is:

fglrx: no version for "struct_module" found: kernel tainted.
fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.
fglrx: Unknown symbol pci_find_class
fglrx: Unknown symbol pci_find_class

Which is basically what the patch should correct, if I'm not mistaken.


DIY: Doom-It-Yourself

Offline

#165 2005-01-18 06:23:37

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Replace your current patch with the code below and if using the PKGBUILD from TUR take the Arch patch out.

--- agpgart_be.c    2004-12-14 12:55:47.000000000 -0500
+++ agpgart_be2.c    2005-01-17 17:31:50.000000000 -0500
@@ -718,7 +718,7 @@
      *        AGP devices and collect their data.
      */
 
-    while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+    while ((device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8,
                     device)) != NULL) {
         pci_read_config_dword(device, 0x04, &scratch);
 
@@ -839,7 +839,7 @@
      *        command registers.
      */
 
-    while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+    while ((device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8,
                     device)) != NULL) {
         pci_read_config_dword(device, 0x04, &scratch);
 
@@ -5119,7 +5119,7 @@
      *        AGP devices and collect their data.
      */
 
-    while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+    while ((device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8,
                     device)) != NULL) {
         pci_read_config_dword(device, 0x04, &scratch);
 
@@ -5217,7 +5217,7 @@
      *        command registers.
      */
 
-    while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+    while ((device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8,
                     device)) != NULL) {
         pci_read_config_dword(device, 0x04, &scratch);
 
@@ -6494,10 +6494,10 @@
     // locate host bridge device
 #ifdef __x86_64__
     do {
-        dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
+        dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
     } while((dev) && !agp_check_supported_device(dev));
 #else
-    if ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) == NULL)
+    if ((dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) == NULL)
         return -ENODEV;
 #endif
 
@@ -7040,7 +7040,7 @@
                     &agp_bridge.mode);
                 return hp_zx1_setup(dev);
             }
-            dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
+            dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
         } while (dev);
         return -ENODEV;
     }

If you have problems with the above, just let me know and I'll post the patch on my website.

Offline

#166 2005-01-18 07:30:20

Olli
Member
Registered: 2004-04-01
Posts: 57

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

patching file agpgart_be.c
Hunk #1 FAILED at 718.
Hunk #2 FAILED at 839.
Hunk #3 FAILED at 5119.
Hunk #4 FAILED at 5217.
Hunk #6 FAILED at 7040.

Now all the changes fail wink

And I don't understand why cause it looks alright, have a look at my reject file:

*** 718,724 ****
      *        AGP devices and collect their data.
      */

-    while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
                 device)) != NULL) {
        pci_read_config_dword(device, 0x04, &scratch);

--- 718,724 ----
      *        AGP devices and collect their data.
      */

+    while ((device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8,
                 device)) != NULL) {
        pci_read_config_dword(device, 0x04, &scratch);

***************
*** 839,845 ****
      *        command registers.
      */

-    while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
                 device)) != NULL) {
        pci_read_config_dword(device, 0x04, &scratch);

--- 839,845 ----
      *        command registers.
      */

+    while ((device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8,
                 device)) != NULL) {
        pci_read_config_dword(device, 0x04, &scratch);

***************
*** 5119,5125 ****
      *        AGP devices and collect their data.
      */

-    while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
                 device)) != NULL) {
        pci_read_config_dword(device, 0x04, &scratch);

--- 5119,5125 ----
      *        AGP devices and collect their data.
      */

+    while ((device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8,
                 device)) != NULL) {
        pci_read_config_dword(device, 0x04, &scratch);

***************
*** 5217,5223 ****
      *        command registers.
      */

-    while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
                 device)) != NULL) {
        pci_read_config_dword(device, 0x04, &scratch);

--- 5217,5223 ----
      *        command registers.
      */

+    while ((device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8,
                 device)) != NULL) {
        pci_read_config_dword(device, 0x04, &scratch);

***************
*** 7040,7046 ****
                      &agp_bridge.mode);
              return hp_zx1_setup(dev);
           }
-          dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
        } while (dev);
        return -ENODEV;
     }
--- 7040,7046 ----
                      &agp_bridge.mode);
              return hp_zx1_setup(dev);
           }
+          dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
        } while (dev);
        return -ENODEV;
     }

DIY: Doom-It-Yourself

Offline

#167 2005-01-18 09:26:22

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

That's strange. Try using this PKGBUILD and report back.

Link: http://personal.ecu.edu/rjh0507/ati-drivers.tar.gz

Just change the kernel version in the PKGBUILD to your kernel package.

Offline

#168 2005-01-18 09:29:20

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Forgot to say that you still need the ati-drivers PKGBUILD from link's TUR. This archive is only for the ati-drivers-module part.

Offline

#169 2005-01-18 09:42:19

Olli
Member
Registered: 2004-04-01
Posts: 57

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

iBertus wrote:

Forgot to say that you still need the ati-drivers PKGBUILD from link's TUR. This archive is only for the ati-drivers-module part.

I am using the link's PKGBUILD smile and without the ati-drivers I can't even build the modules smile


DIY: Doom-It-Yourself

Offline

#170 2005-01-18 16:26:03

jskier
Member
From: Minnesota, USA
Registered: 2003-07-30
Posts: 383
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Mmm I've tried that, but doesn't seem to work for me. First of all I get an error while applying the 2.6.10 patch:

I posted success with 2.6.9, not 2.6.10. The  2.6.10 patch needs to be updated it appears.


--
JSkier

Offline

#171 2005-01-19 00:36:51

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

I made my own patch by changing the file by hand and running it through diff. I replaced the one from link's TUR and commented out the Arch specific patch and everything worked fine. I'm using the drivers right now.

Offline

#172 2005-01-19 03:34:10

qwerty
Member
Registered: 2004-12-17
Posts: 183

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

You can find the right patch to use with new ati drivers on rage3d forum, anyway, i've pasted the PKGBUILDs (modified from the ones in Link's TUR) and the patch i've  used here:

http://bbs.archlinux.org/viewtopic.php?t=9264

Offline

#173 2005-01-19 12:53:33

rottenikken
Member
Registered: 2005-01-19
Posts: 5

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

I have found this patch to work with 2.6.10
http://frodo.hiof.no/~mk/fglrx-8.8.25-l … 6.10.patch

Offline

#174 2005-01-19 19:46:32

Olli
Member
Registered: 2004-04-01
Posts: 57

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

rottenikken wrote:

I have found this patch to work with 2.6.10
http://frodo.hiof.no/~mk/fglrx-8.8.25-l … 6.10.patch

Can you please copy and paste it, can't reach that page...


DIY: Doom-It-Yourself

Offline

#175 2005-01-19 19:54:43

rottenikken
Member
Registered: 2005-01-19
Posts: 5

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Olli wrote:
rottenikken wrote:

I have found this patch to work with 2.6.10
http://frodo.hiof.no/~mk/fglrx-8.8.25-l … 6.10.patch

Can you please copy and paste it, can't reach that page...

--- src-8.8.25-orig/lib/modules/fglrx/build_mod/agpgart_be.c2004-12-14 18:55:47.000000000 +0100
+++ src-8.8.25/lib/modules/fglrx/build_mod/agpgart_be.c2005-01-18 21:08:14.000000000 +0100
@@ -117,6 +117,10 @@
 #include <linux/miscdevice.h>
 #include <linux/pm.h>
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
+#define pci_find_class pci_get_class
+#endif
+
 #if (LINUX_VERSION_CODE >= 0x020400)
 #define FGL_PM_PRESENT
 #else
@@ -255,6 +259,12 @@
 }
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+#define firegl_pci_find_class(class,from) pci_get_class(class,from)
+#else
+#define firegl_pci_find_class(class,from) pci_find_class(class,from)
+#endif
+
 int agp_backend_acquire(void)
 {
 if (agp_bridge.type == NOT_SUPPORTED) {
@@ -718,7 +728,7 @@
  *        AGP devices and collect their data.
  */
 
-while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+while ((device = firegl_pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
 device)) != NULL) {
 pci_read_config_dword(device, 0x04, &scratch);
 
@@ -794,6 +804,12 @@
 command &= ~0x00000001;
 }
 }
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+if(device)
+pci_dev_put(device);
+#endif
+
 /*
  * PASS2: Figure out the 4X/2X/1X setting and enable the
  *        target (our motherboard chipset).
@@ -839,7 +855,7 @@
  *        command registers.
  */
 
-while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+while ((device = firegl_pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
 device)) != NULL) {
 pci_read_config_dword(device, 0x04, &scratch);
 
@@ -870,6 +886,10 @@
 pci_write_config_dword(device, cap_ptr + 8, command);
         }
 }
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+if(device)
+pci_dev_put(device);
+#endif
 
     return 0; /* success */
 }
@@ -5119,7 +5139,7 @@
  *        AGP devices and collect their data.
  */
 
-while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+while ((device = firegl_pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
 device)) != NULL) {
 pci_read_config_dword(device, 0x04, &scratch);
 
@@ -5187,6 +5207,12 @@
 command &= ~0x00000001;
 }
 }
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+if (device)
+pci_dev_put(device);
+#endif
+
 /*
  * PASS2: Figure out the 4X/2X/1X setting and enable the
  *        target (our motherboard chipset).
@@ -5217,7 +5243,7 @@
  *        command registers.
  */
 
-while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+while ((device = firegl_pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
 device)) != NULL) {
 pci_read_config_dword(device, 0x04, &scratch);
 
@@ -5249,6 +5275,11 @@
         }
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+if (device)
+pci_dev_put(device);
+#endif
+
     return(0); /* success */
 }
 
@@ -6494,10 +6525,10 @@
     // locate host bridge device
 #ifdef __x86_64__
     do {
-        dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
+        dev = firegl_pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
     } while((dev) && !agp_check_supported_device(dev));
 #else
-    if ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) == NULL)
+    if ((dev = firegl_pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) == NULL)
         return -ENODEV;
 #endif
 
@@ -7040,8 +7071,14 @@
                     &agp_bridge.mode);
 return hp_zx1_setup(dev);
 }
-dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
+dev = firegl_pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
 } while (dev);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+if(dev)
+pci_dev_put(dev);
+#endif
+
 return -ENODEV;
 }
 #endif/* __ia64__ */
@@ -7462,6 +7499,10 @@
 agp_bridge.free_gatt_table();
 vfree(agp_bridge.key_list);
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+pci_dev_put(agp_bridge.dev);
+#endif
+
 if (agp_bridge.needs_scratch_page == TRUE) {
 agp_bridge.scratch_page &= ~(0x00000fff);
 agp_bridge.agp_destroy_page((unsigned long)
--- src-8.8.25-orig/lib/modules/fglrx/build_mod/firegl_public.c2005-01-05 02:05:05.000000000 +0100
+++ src-8.8.25/lib/modules/fglrx/build_mod/firegl_public.c2005-01-18 21:08:37.000000000 +0100
@@ -88,6 +88,7 @@
 #include <linux/smp_lock.h>
 // newer SuSE kernels need this
 #include <linux/highmem.h>
+#include <linux/pagemap.h> // for lock_page and unlock_page
 
 #if defined(__ia64__)
 #include <linux/vmalloc.h>

Offline

Board footer

Powered by FluxBB