All of lore.kernel.org
 help / color / mirror / Atom feed
* Updated fglrx patch for ATI Radeon and Xen
@ 2005-03-17  3:51 Jacob Gorm Hansen
  0 siblings, 0 replies; only message in thread
From: Jacob Gorm Hansen @ 2005-03-17  3:51 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

hi,

I've cleaned up the patch and updated it to work with the latest 8.10.19 
version of the ATI driver. I've tested it on Gentoo with xorg 6.8.0-r5 
(just change the ebuild to apply this patch after the other patches in 
src_unpack()) and seems to work fine, including OpenGL acceleration.

I was unable to get fglrx working with xorg 6.8.2, because they changed 
to format of the driver modules from .o to .so. Attempts at hacking 
around this (converting the fglrx X module to .so by hand) were 
unsuccessful.

The patch is attached.

Best regards,
Jacob

[-- Attachment #2: fglrx_xen.patch --]
[-- Type: text/plain, Size: 3375 bytes --]

--- orig/agpgart_be.c
+++ mod/agpgart_be.c
@@ -81,6 +81,10 @@
  *   version 1.1.1.8, 2001-10-09, CVS-Tag: LINUX_2_4_13
  */
 
+#ifdef CONFIG_XEN
+#define CONFIG_X86
+#endif
+
 // dual boards problem:
 // MGA G450 (PCI) looks like an AGP board
 #define FGL_FIX
@@ -1177,7 +1181,7 @@
     if (!err)    
 #endif
     {
-    	agp_bridge.gatt_table = ioremap_nocache(virt_to_phys(table),
+    	agp_bridge.gatt_table = ioremap_nocache(virt_to_bus(table),
 	    				(PAGE_SIZE * (1 << page_order)));
     }
 	CACHE_FLUSH();
@@ -3214,7 +3218,7 @@
     if (!err)
 #endif
     {
-        page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real), 
+        page_map->remapped = ioremap_nocache(virt_to_bus(page_map->real), 
             PAGE_SIZE);
     }
 
@@ -4687,7 +4691,7 @@
     if (!err)
 #endif
     {
-    	page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real), 
+    	page_map->remapped = ioremap_nocache(virt_to_bus(page_map->real), 
 					    PAGE_SIZE);
     }
 


--- orig/firegl_public.c
+++ mod/firegl_public.c
@@ -25,13 +25,18 @@
 // ============================================================
 #include <linux/version.h>
 #include <linux/autoconf.h>
+#include <asm/pgtable.h>
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,71)
 #define EXPORT_SYMTAB	1
 #endif
 
+#ifdef CONFIG_XEN
+#define CONFIG_X86
+#endif
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,71)
-#if !defined(CONFIG_X86_PC) 
+#if !defined(CONFIG_X86) 
 #if !defined(CONFIG_X86_64)
 #if !defined(CONFIG_X86_VOYAGER)
 #if !defined(CONFIG_X86_NUMAQ)
@@ -2744,13 +2749,13 @@
 #endif /* __ia64__ */
                 vma->vm_flags |= VM_IO; /* not in core dump */
             }
-            if (remap_pfn_range(FGL_VMA_API_PASS
+            if (io_remap_page_range(vma,
                                  vma->vm_start,
-                                 __ke_vm_offset(vma) >> PAGE_SHIFT,
+                                 __ke_vm_offset(vma),
                                  vma->vm_end - vma->vm_start,
                                  vma->vm_page_prot))
             {
-                __KE_DEBUG("remap_pfn_range failed\n");
+                __KE_DEBUG("io_remap_page_range failed\n");
                 return -EAGAIN;
             }
             vma->vm_flags |= VM_SHM | VM_RESERVED; /* Don't swap */
@@ -2811,13 +2816,13 @@
 			{
 				if (__ke_vm_offset(vma) >= __pa(high_memory))
 					vma->vm_flags |= VM_IO; /* not in core dump */
-				if (remap_pfn_range(FGL_VMA_API_PASS
+				if (io_remap_page_range(vma,
 									 vma->vm_start,
-									 __ke_vm_offset(vma) >> PAGE_SHIFT,
+									 __ke_vm_offset(vma),
 									 vma->vm_end - vma->vm_start,
 									 vma->vm_page_prot))
 				{
-					__KE_DEBUG("remap_pfn_range failed\n");
+					__KE_DEBUG("io_remap_page_range failed\n");
 					return -EAGAIN;
 				}
 #ifdef __x86_64__
@@ -2848,13 +2853,13 @@
 			{
 				if (__ke_vm_offset(vma) >= __pa(high_memory))
 					vma->vm_flags |= VM_IO; /* not in core dump */
-				if (remap_pfn_range(FGL_VMA_API_PASS
+				if (io_remap_page_range(vma,
 									 vma->vm_start,
-									 __ke_vm_offset(vma) >> PAGE_SHIFT,
+									 __ke_vm_offset(vma),
 									 vma->vm_end - vma->vm_start,
 									 vma->vm_page_prot))
 				{
-					__KE_DEBUG("remap_pfn_range failed\n");
+					__KE_DEBUG("io_remap_page_range failed\n");
 					return -EAGAIN;
 				}
 #ifdef __x86_64__




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-17  3:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-17  3:51 Updated fglrx patch for ATI Radeon and Xen Jacob Gorm Hansen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.