LINUX.ORG.RU

Вот патч

Common subdirectories: build_mod/2.6.x and build_mod-mm/2.6.x diff -u build_mod/agpgart_be.c build_mod-mm/agpgart_be.c --- build_mod/agpgart_be.c 2004-10-03 13:18:54.000000000 +0000 +++ build_mod-mm/agpgart_be.c 2004-10-08 00:48:53.000000000 +0000 @@ -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); @@ -5068,7 +5068,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); @@ -5166,7 +5166,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); @@ -6418,7 +6418,7 @@ struct pci_dev *dev = NULL; // locate host bridge device - 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; agp_bridge.dev = dev; @@ -6935,7 +6935,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; } Only in build_mod: fglrx.ko diff -u build_mod/firegl_public.c build_mod-mm/firegl_public.c --- build_mod/firegl_public.c 2004-08-21 15:25:05.000000000 +0000 +++ build_mod-mm/firegl_public.c 2004-10-08 00:36:00.000000000 +0000 @@ -2577,13 +2577,13 @@ #endif /* __ia64__ */ vma->vm_flags |= VM_IO; /* not in core dump */ } - if (remap_page_range(FGL_VMA_API_PASS + if (remap_pfn_range(FGL_VMA_API_PASS vma->vm_start, - __ke_vm_offset(vma), + vma->vm_pgoff, vma->vm_end - vma->vm_start, vma->vm_page_prot)) { - __KE_DEBUG("remap_page_range failed\n"); + __KE_DEBUG("remap_pfn_range failed\n"); return -EAGAIN; } vma->vm_flags |= VM_SHM | VM_RESERVED; /* Don't swap */ @@ -2642,15 +2642,15 @@ #else // else { - if (__ke_vm_offset(vma) >= __pa(high_memory)) + if (vma->vm_pgoff >= __pa(high_memory)) vma->vm_flags |= VM_IO; /* not in core dump */ - if (remap_page_range(FGL_VMA_API_PASS + if (remap_pfn_range(FGL_VMA_API_PASS vma->vm_start, - __ke_vm_offset(vma), + vma->vm_pgoff, vma->vm_end - vma->vm_start, vma->vm_page_prot)) { - __KE_DEBUG("remap_page_range failed\n"); + __KE_DEBUG("remap_pfn_range failed\n"); return -EAGAIN; } #ifdef __x86_64__ @@ -2679,15 +2679,15 @@ // else #else { - if (__ke_vm_offset(vma) >= __pa(high_memory)) + if (vma->vm_pgoff >= __pa(high_memory)) vma->vm_flags |= VM_IO; /* not in core dump */ - if (remap_page_range(FGL_VMA_API_PASS + if (remap_pfn_range(FGL_VMA_API_PASS vma->vm_start, - __ke_vm_offset(vma), + vma->vm_pgoff, vma->vm_end - vma->vm_start, vma->vm_page_prot)) { - __KE_DEBUG("remap_page_range failed\n"); + __KE_DEBUG("remap_pfn_range failed\n"); return -EAGAIN; } #ifdef __x86_64__ Only in build_mod: make.log Common subdirectories: build_mod/patch and build_mod-mm/patch

sova ★★
()
Ответ на: комментарий от snigga

Вот, нашёл, пудликую:

--- firegl_public.c.orig	2005-03-06 17:50:52.000000000 +0100
+++ firegl_public.c	2005-03-04 23:45:37.000000000 +0100
@@ -217,7 +217,11 @@
 /* global module vars and constants - defined trough macros */
 MODULE_AUTHOR("Fire GL - ATI Research GmbH, Germany");
 MODULE_DESCRIPTION("ATI Fire GL");
+#if LINUX_VERSION_CODE <= 0x020600
 MODULE_PARM(firegl, "s");
+#else
+module_param(firegl, charp, 0);
+#endif
 #ifdef MODULE_LICENSE
 MODULE_LICENSE("Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY");
 #endif
@@ -2424,7 +2428,7 @@
 
 static vm_nopage_ret_t vm_pcie_nopage(struct vm_area_struct* vma,
                                      unsigned long address,
-                                     int write_access)
+                                     int *type)
 {  
        return do_vm_pcie_nopage(vma, address);
 }
@@ -2703,8 +2707,12 @@
 			struct page 	*page = virt_to_page((unsigned long)__va(VM_OFFSET(vma)));
 			if (!VALID_PAGE(page) || PageReserved(page))
 #else
+#if LINUX_VERSION_CODE >= 0x02060b
+            if (vma->vm_pgoff >= __pa(high_memory))
+#else
             if (__ke_vm_offset(vma) >= __pa(high_memory))
 #endif
+#endif
             {
 #ifdef __i386__
                 if (boot_cpu_data.x86 > 3)
@@ -2719,13 +2727,23 @@
 #endif /* __ia64__ */
                 vma->vm_flags |= VM_IO; /* not in core dump */
             }
+#if LINUX_VERSION_CODE >= 0x02060b
+            if (remap_pfn_range(FGL_VMA_API_PASS
+                                 vma->vm_start,
+                                 vma->vm_pgoff,
+#else
             if (remap_page_range(FGL_VMA_API_PASS
                                  vma->vm_start,
                                  __ke_vm_offset(vma),
+#endif
                                  vma->vm_end - vma->vm_start,
                                  vma->vm_page_prot))
             {
+#if LINUX_VERSION_CODE >= 0x02060b
+                __KE_DEBUG("remap_pfn_range failed\n");
+#else
                 __KE_DEBUG("remap_page_range failed\n");
+#endif
                 return -EAGAIN;
             }
             vma->vm_flags |= VM_SHM | VM_RESERVED; /* Don't swap */
@@ -2786,9 +2804,15 @@
 			{
 				if (__ke_vm_offset(vma) >= __pa(high_memory))
 					vma->vm_flags |= VM_IO; /* not in core dump */
+#if LINUX_VERSION_CODE >= 0x02060b
+                                if (remap_pfn_range(FGL_VMA_API_PASS
+                                        vma->vm_start,
+                                        vma->vm_pgoff,
+#else
 				if (remap_page_range(FGL_VMA_API_PASS
 									 vma->vm_start,
 									 __ke_vm_offset(vma),
+#endif
 									 vma->vm_end - vma->vm_start,
 									 vma->vm_page_prot))
 				{
@@ -2823,9 +2847,15 @@
 			{
 				if (__ke_vm_offset(vma) >= __pa(high_memory))
 					vma->vm_flags |= VM_IO; /* not in core dump */
+#if LINUX_VERSION_CODE >= 0x02060b
+                                if (remap_pfn_range(FGL_VMA_API_PASS
+                                         vma->vm_start,
+                                         vma->vm_pgoff,
+#else
 				if (remap_page_range(FGL_VMA_API_PASS
 									 vma->vm_start,
 									 __ke_vm_offset(vma),
+#endif
 									 vma->vm_end - vma->vm_start,
 									 vma->vm_page_prot))
 				{
@@ -2873,6 +2903,37 @@
 
 #if LINUX_VERSION_CODE >= 0x020400
 
+#if LINUX_VERSION_CODE >= 0x02060b
+
+typedef struct {
+   void         (*free_memory)(struct agp_memory *);
+   struct agp_memory *   (*allocate_memory)(size_t, u32);
+   int         (*bind_memory)(struct agp_memory *, off_t);
+   int         (*unbind_memory)(struct agp_memory *);
+   void         (*enable)(u32);
+   int         (*acquire)(void);
+   void         (*release)(void);
+   int         (*copy_info)(struct agp_kern_info *);
+} drm_agp_t;
+
+static const drm_agp_t drm_agp = {
+   &agp_free_memory,
+   &agp_allocate_memory,
+   &agp_bind_memory,
+   &agp_unbind_memory,
+   &agp_enable,
+   &agp_backend_acquire,
+   &agp_backend_release,
+   &agp_copy_info
+};
+#undef DRM_AGP_MODULE_GET
+#undef DRM_AGP_MODULE_PUT
+
+#define DRM_AGP_MODULE_GET      &drm_agp
+#define DRM_AGP_MODULE_PUT
+
+#endif
+
 static const drm_agp_t  *drm_agp_module_stub = NULL;
 
 #define AGP_FUNCTIONS		8

snigga ★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.