LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-22-2005, 10:50 AM   #1
Metallic
LQ Newbie
 
Registered: Feb 2005
Distribution: Slackware
Posts: 14

Rep: Reputation: 0
ATI drivers and kernel 2.6.11 and later


Somebody compile driver under kernel 2.6.11 and later? Help pls.

P.S. Sorry for bad english.
 
Old 03-23-2005, 08:27 AM   #2
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
Gentoo compiled the ati drivers on my laptop just fine. I'm using 2.6.11.4. What exactly is your question.
 
Old 03-23-2005, 09:43 AM   #3
Metallic
LQ Newbie
 
Registered: Feb 2005
Distribution: Slackware
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by musicman_ace
Gentoo compiled the ati drivers on my laptop just fine. I'm using 2.6.11.4. What exactly is your question.
Can you post patches from gentoo ebuilds?
 
Old 03-23-2005, 11:35 AM   #4
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
If there was a patch applied, emerge would have taken care of it. All I did was "emerge ati-drivers". They compiled correctly and I have opengl and 3d acceleration. I guess you could search the mirror to see if there was a patch.
 
Old 03-23-2005, 01:26 PM   #5
UnTamed
Member
 
Registered: Dec 2002
Location: Qc, Canada
Distribution: CRUX
Posts: 317

Rep: Reputation: 30
If you want to check gentoo's tree for patches, search google for intitle:index.of "gentoo/portage" ati

patches are in /files

Also, the linux forum at rage3d.com usually have an active thread about current drivers, patches are usually found there.

HTH

Last edited by UnTamed; 03-23-2005 at 01:28 PM.
 
Old 03-23-2005, 06:42 PM   #6
Metallic
LQ Newbie
 
Registered: Feb 2005
Distribution: Slackware
Posts: 14

Original Poster
Rep: Reputation: 0
Code:
--- lib/modules/fglrx/build_mod/firegl_public.c.orig2005-02-05 08:18:17.301667616 -0500
+++ lib/modules/fglrx/build_mod/firegl_public.c2005-02-05 08:45:50.522339872 -0500
@@ -1659,13 +1659,22 @@
 {
     unsigned long pte_linear;
     pgd_t* pgd_p;
+#if LINUX_VERSION_CODE > 0x02060a/* KERNEL_VERSION(2,6,10) */
+    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,10) */
+    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);
@@ -2085,6 +2094,9 @@
                                                    unsigned long address)
 {
     pgd_t* pgd_p;
+#if LINUX_VERSION_CODE > 0x02060a/* KERNEL_VERSION(2,6,10) */
+    pud_t* pud_p;
+#endif
     pmd_t* pmd_p;
     pte_t* pte_p;
     pte_t  pte;
@@ -2185,7 +2197,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,10) */
+    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");
@@ -2549,13 +2566,21 @@
 {
     unsigned long pte_linear;
     pgd_t* pgd_p;
+#if LINUX_VERSION_CODE > 0x02060a/* KERNEL_VERSION(2,6,10) */
+    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,10) */
+    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);
@@ -2704,13 +2729,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 */
@@ -2771,13 +2796,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__
@@ -2808,13 +2833,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__
@@ -2858,6 +2883,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_FUNCTIONS8
Apply this patch to firegl_public.c in 2.6.x folder and drivers compile without errors
 
Old 03-24-2005, 12:18 PM   #7
Metallic
LQ Newbie
 
Registered: Feb 2005
Distribution: Slackware
Posts: 14

Original Poster
Rep: Reputation: 0
In driver under XFree 4.3 it has error in DRM Somebody using ATI drivers under XFree 4.3 with Direct Rendering yes ?
 
Old 03-24-2005, 04:41 PM   #8
Metallic
LQ Newbie
 
Registered: Feb 2005
Distribution: Slackware
Posts: 14

Original Poster
Rep: Reputation: 0
I solve a problem You can ask me how by e-mail or ICQ(176764468).
 
Old 03-31-2005, 04:56 PM   #9
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Rep: Reputation: 130Reputation: 130
Metallic, would you mind posting your solution? I have the same problem.

Thanks.

--Dane
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ati drivers with kernel 2.6? shanenin Linux - Software 15 07-01-2004 07:46 PM
ATI Drivers with Kernel 2.6 redneon Linux - Hardware 3 02-29-2004 12:53 PM
2.6.2 kernel, with ati drivers. caffeinebot Linux - Software 2 02-22-2004 04:20 PM
ATi drivers and kernel 2.6.2 objorkum Linux - Hardware 0 02-08-2004 04:41 AM
New ATI drivers + Kernel 2.6: is it possible? moly82 Linux - Software 24 10-01-2003 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration