public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Gilbert <jgilbert@biomail.ucsd.edu>
To: linux-kernel@vger.kernel.org
Subject: ATI drivers working under realtime-preempt linux
Date: Mon, 24 Jan 2005 20:47:25 -0800	[thread overview]
Message-ID: <41F5CF5D.4060807@biomail.ucsd.edu> (raw)

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

Hello all,
Here are two patches that are needed to get this working. It's not 
perfect, but quake3 runs, bzflag runs, noof runs, and that's a start.
So here's the recipe...

Linux-2.6.10 source
the linux-2.6.11-rc2 patch
the realtime-preempt-2.6.11-rc2-V0.7.36-03 patch
the fglrx_6_8_0-8.8.25-1.i386.rpm proprietary drivers
the two included patches.
xorg 6.8.x and some hardware (Radeon 8500+)

install the kernel source with the rc2 and realtime-preempt patches. Mix 
in some configuration options CONFIG_MODULES=y, CONFIG_MODULE_UNLOAD=y,  
CONFIG_KMOD=y, CONFIG_MTRR=y, #CONFIG_FB= is not set, CONFIG_DRM=y, 
CONFIG_TMPFS=y, plus whatever else runs your system.
Build kernel, fix lilo/grub,  add the line "tmpfs /dev/shm tmpfs 
defaults 0 0" to the fstab
and reboot.

If you have an older ATI rpm installed, remove it.
Install the new ATI drivers. I used "rpm -i --nodeps fglrx...". 
Slackware doesn't use RPMs so dependency tables are useless.
It will install all the files, but will fail.
cd to  /lib/modules/fglrx/build_mod and patch the two files. "sh 
make.sh", "cd .."
"sh make_install.sh", "depmod -e", "modprobe fglrx"
if this works, the kernel module is done.

Run fglrxconfig, answer the questions, and it will create a broken 
XF86Config-4 file for you (if you are running 6.8.1). in /etc/X11 create 
a symbolic link to XF86Config-4 called xorg.conf, and change the line ' 
Driver "Keyboard" ' , to 'Driver "kbd" '.
Keep fingers crossed, run startx.

#### Bugs and Rants Follow ####
Seems to have a problem exiting, leaves video blank.
There's still some compile time warnings.
I suspect that if you ran a 32 bit kernel with AMD-8150 hardware, you 
would see some things blow up (see line 3788 of agpgart_be.c).

Xv isn't supported. DRI isn't supported.
ATI (and NVIDIA) should be all over the hard-realtime kernel, as this 
has the potential of making video and games frame accurate (never 
missing frames, no page tears).
The documentation from Linux user's web pages are better than ATI's.

Making this work should have been someone at ATI's job, not mine. I'm 
working blind here.

To anyone playing with this, good luck. It would be good to have real 
kernel developers look at what I've probably messed up trying to get 
this working. If you can fix some more warnings or some bugs, please let 
me know ;^)

ATI: please work with and support the realtime-preempt developers, 
there's lots of things Linux will be able to do shortly that only 
expensive Silicon Graphics systems could do before (and not open source).
Be a help, not a hindrance. Open up more code. Help make Linux the 
uber-media/games OS.

Thanks, Hope this helps.

John Gilbert
jgilbert@biomail.ucsd.edu

[-- Attachment #2: patch.agpgart_be.c-04 --]
[-- Type: text/plain, Size: 763 bytes --]

--- agpgart_be.c.orig	2004-12-14 09:55:47.000000000 -0800
+++ agpgart_be.c	2005-01-24 17:09:15.000000000 -0800
@@ -117,6 +117,10 @@
 #include <linux/miscdevice.h>
 #include <linux/pm.h>
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
+#define pci_find_class pci_get_class
+#endif
+
 #if (LINUX_VERSION_CODE >= 0x020400)
 #define FGL_PM_PRESENT
 #else
@@ -6469,6 +6473,7 @@
 
 // FGL - end
 
+#ifdef __x86_64__
 static int agp_check_supported_device(struct pci_dev *dev) 
 {
 
@@ -6483,13 +6488,16 @@
 
   return 0;
 }
+#endif
 
 /* Supported Device Scanning routine */
 
 static int __init agp_find_supported_device(void)
 {
 	struct pci_dev *dev = NULL;
+#ifdef __x86_64__
     u8 cap_ptr = 0x00;
+#endif
 
     // locate host bridge device
 #ifdef __x86_64__

[-- Attachment #3: patch.firegl_public.c-04 --]
[-- Type: text/plain, Size: 2789 bytes --]

--- firegl_public.c.orig	2005-01-04 17:05:05.000000000 -0800
+++ firegl_public.c	2005-01-24 16:50:28.000000000 -0800
@@ -2590,13 +2590,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 */
@@ -2655,15 +2655,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__
@@ -2692,15 +2692,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__
@@ -2744,6 +2744,20 @@
 
 #if LINUX_VERSION_CODE >= 0x020400
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
+/* This is no longer used inside kernel, so declare it here. JGG */
+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;
+#endif
+
 static const drm_agp_t  *drm_agp_module_stub = NULL;
 
 #define AGP_FUNCTIONS		8

             reply	other threads:[~2005-01-25  4:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-25  4:47 John Gilbert [this message]
2005-01-25 20:59 ` ATI drivers working under realtime-preempt linux Lee Revell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41F5CF5D.4060807@biomail.ucsd.edu \
    --to=jgilbert@biomail.ucsd.edu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox