re: fglrx 4.3.0-3.14.6 vs 2.6.10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



    To answer my own question, I have found that if I use the
patch...

http://www.stanford.edu/~fenn/linux/fglrx-3.14.1-fc2.patch

...and a slightly corrected version of the patch described at...

http://www.rage3d.com/board/showthread.php?t=33798874&highlight=2.6.10

I can build and install the fglrx driver under the new FC2 2.6.10
kernel. The resulting driver seems to work fine.
              Jack
ps The corrected second patch is appended below...


--- agpgart_be.c.sav    2005-01-11 12:23:30.000000000 -0500
+++ agpgart_be.c        2005-01-11 12:25:47.000000000 -0500
@@ -255,6 +255,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 +724,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 +800,13 @@
                                command &= ~0x00000001;
                }
        }
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+            // the reference count has been increased in agp_backend_initialize.
+        if (device)
+            pci_dev_put(device);
+#endif
+
        /*
         * PASS2: Figure out the 4X/2X/1X setting and enable the
         *        target (our motherboard chipset).
@@ -839,8 +852,9 @@
         *        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);
  
                if (!(scratch & 0x00100000))
@@ -871,6 +885,12 @@
         }
        }
  
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+            // the reference count has been increased in agp_backend_initialize.
+        if (device)
+            pci_dev_put(device);
+#endif
+
     return 0; /* success */
 }
  
@@ -5068,8 +5088,9 @@
         *        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);
  
                if (!(scratch & 0x00100000))
@@ -5136,6 +5157,13 @@
                                command &= ~0x00000001;
                }
        }
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+            // the reference count has been increased in agp_backend_initialize.
+        if (device)
+            pci_dev_put(device);
+#endif
+
        /*
         * PASS2: Figure out the 4X/2X/1X setting and enable the
         *        target (our motherboard chipset).
@@ -5166,8 +5194,9 @@
         *        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);
  
                if (!(scratch & 0x00100000))
@@ -5198,6 +5227,12 @@
         }
        }
  
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+            // the reference count has been increased in agp_backend_initialize.
+        if (device)
+            pci_dev_put(device);
+#endif
+
     return(0); /* success */
 }
  
@@ -6418,7 +6453,7 @@
        struct pci_dev *dev = NULL;
  
     // locate host bridge device
-       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;
  
        agp_bridge.dev = dev;
@@ -6935,8 +6970,12 @@
                     &agp_bridge.mode);
                                return hp_zx1_setup(dev);
                        }
-                       dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
+                       dev = firegl_pci_find_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__ */
@@ -7357,6 +7396,11 @@
        agp_bridge.free_gatt_table();
        vfree(agp_bridge.key_list);
  
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+        // decrease the reference count.
+        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)
--- firegl_public.c.sav 2005-01-11 12:23:20.000000000 -0500
+++ firegl_public.c     2005-01-11 12:24:17.000000000 -0500
@@ -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>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux