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

Re: Radeon 9600 acceleration?



Thomas Steffen schrieb:
Hi,

first of all, thank's a lot for the amd64 port despite all the odds of
the Debian infrastructure. 64bit userland rocks, and it feels
significantly faster than i386 userland.

But I can't get 3D acceleration to work with my Radeon 9600. I know
that 3D acceleration with binary only drivers is always difficult to
set up, but whatever I try, it either does no recognise the
acceleration, or it crashes the moment I run glxgears or fgl_glxgears.

My system is the pure64 port of sarge. I have upgraded my X server to
the ubuntu version of Xorg 6.8, because XF86 3.3 would not set the
correct refresh rate for my dual screen setup. I am running a custom
build of kernel 2.6.10, and I try to install the ATI X11 driver
fglrx64_6_8_0-8.10.19-1.x86_64.rpm. I have tried just about any option
I can imagine, build in and native agpgart, many different settings in
the X11 config file, but I did not get it to work.

Has anybody a recommendation? Shall I try to go back to XF86 4.3? A
new version (8.12.10) is released by ATI, but the release notes only
mention cosmetical changes, so I am not sure whether it is worth
trying. Has anyone managed to get a Radeon 9600 working?

And I think i should give kernel 2.6.11 a try, since it has updates in
the AGPgart module. ATI version 8.10.19 did not compile with 2.6.11,
but maybe 8.12.10 does? Again, no mentioning of it in the release
notes...

My system is a Asrock K8 Combo-Z with a Winchester Athlon64 3000+. I
have a single module of 512 MB RAM. I use two screens, one TFT and and
one CRT, both at 1280x1024.

Thomas


Hi,
i installed 2.6.11 with apt-get and installed the new 8.12.10 driver by hand. I patched firegl_public.c with a patch which i found at www.rage3d.com. It is needed for the new kernelversion.
I use Xfree86 4.3
I have only one monitor so i cant help you with dualhead.
Before you begin you need to ln -s lib /usr/X11R6/lib64
and dpkg-divert --package xlibmesa-gl /usr/X11R6/lib/libGL.so.1.2
I hope this helped a little bit
Alex

alex@redkeep:~$ fgl_glxgears
4865 frames in 5.0 seconds = 973.000 FPS
--- 2.c	2005-02-10 04:15:00.000000000 +0200
+++ firegl_public.c	2005-03-02 22:21:42.000000000 +0200
@@ -1664,13 +1664,22 @@
 {
     unsigned long pte_linear;
     pgd_t* pgd_p;
+#if LINUX_VERSION_CODE > 0x02060a     /* KERNEL_VERSION(2,6,11) */
+    pud_t* pud_p;
+#endif
     pmd_t* pmd_p;
     pte_t* pte_p;
     pte_t  pte;
 
     pte_linear = VMALLOC_VMADDR(virtual_addr);  // convert to pte linear address (x86 => nop)
     pgd_p = pgd_offset(mm, pte_linear);
+#if LINUX_VERSION_CODE > 0x02060a     /* KERNEL_VERSION(2,6,11) */
+    pud_p = pud_offset(pgd_p, pte_linear);
+    pmd_p = pmd_offset(pud_p, pte_linear);
+#else
     pmd_p = pmd_offset(pgd_p, pte_linear);
+#endif
+
 #ifndef FGL_ATOMIC_PTE
 #if LINUX_VERSION_CODE > 0x020500
     pte_p = pte_offset_kernel(pmd_p, pte_linear);
@@ -2100,6 +2109,9 @@
                                                    unsigned long address)
 {
     pgd_t* pgd_p;
+#if LINUX_VERSION_CODE > 0x02060a     /* KERNEL_VERSION(2,6,11) */
+    pud_t* pud_p;
+#endif
     pmd_t* pmd_p;
     pte_t* pte_p;
     pte_t  pte;
@@ -2200,7 +2212,12 @@
         /* alternatively we could generate a NOPAGE_OOM "out of memory" */
     }
     /*  locate medium level page table (x86 => nop) */
+#if LINUX_VERSION_CODE > 0x02060a     /* KERNEL_VERSION(2,6,11) */
+    pud_p = pud_offset(pgd_p, pte_linear);
+    pmd_p = pmd_offset(pud_p, pte_linear);
+#else
     pmd_p = pmd_offset(pgd_p, pte_linear);
+#endif
     if (!pmd_present(*pmd_p))
     {
         __KE_ERROR("FATAL ERROR: User queue buffer not present! (pmd)\n");
@@ -2564,13 +2581,21 @@
 {
     unsigned long pte_linear;
     pgd_t* pgd_p;
+#if LINUX_VERSION_CODE > 0x02060a     /* KERNEL_VERSION(2,6,11) */
+    pud_t* pud_p;
+#endif
     pmd_t* pmd_p;
     pte_t* pte_p;
     pte_t  pte;
 
     pte_linear = VMALLOC_VMADDR(virtual_addr);  // convert to pte linear address (x86 => nop)
     pgd_p = pgd_offset(vma->vm_mm, pte_linear);
+#if LINUX_VERSION_CODE > 0x02060a     /* KERNEL_VERSION(2,6,11) */
+    pud_p = pud_offset(pgd_p, pte_linear);
+    pmd_p = pmd_offset(pud_p, pte_linear);
+#else
     pmd_p = pmd_offset(pgd_p, pte_linear);
+#endif
 #ifndef FGL_ATOMIC_PTE
 #if LINUX_VERSION_CODE > 0x020500
     pte_p = pte_offset_kernel(pmd_p, pte_linear);
@@ -2719,13 +2744,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),
+                                 __ke_vm_offset(vma) >> PAGE_SHIFT,
                                  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 */
@@ -2786,13 +2811,13 @@
 			{
 				if (__ke_vm_offset(vma) >= __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),
+									 __ke_vm_offset(vma) >> PAGE_SHIFT,
 									 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__
@@ -2823,13 +2848,13 @@
 			{
 				if (__ke_vm_offset(vma) >= __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),
+									 __ke_vm_offset(vma) >> PAGE_SHIFT,
 									 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__
@@ -2873,6 +2898,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















Reply to: