ati发布for xorg的驱动拉!!!!!
大家可以去ATI的官方网站上面下载了~~~~~呵呵。。如果是2.6.10内核以上的请对源码作如下修改~~
使用方法:将我贴的代码保存下来存为8.8.25-kernel-2.6.10+.path
然后chmod +x 8.8.25-kernel-2.6.10+.patch
进入/lib/modules/fglrx/build_mod/目录~~
patch -p0 -i /path所在目录/8.8.25-kernel-2.6.10+.patch
--- agpgart_be.c 2005-01-06 9:05:02.000000000 +0100
+++ agpgart_be.c 2005-01-06 9:19:16.000000000 +0100
@@ -255,6 +255,12 @@
}
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+#define firegl_pci_find_class(class,from) pci_get_class(class,from)
+#else
+#define firegl_pci_find_class(class,from) pci_find_class(class,from)
+#endif
+
int agp_backend_acquire(void)
{
if (agp_bridge.type == NOT_SUPPORTED) {
@@ -718,7 +724,7 @@
* AGP devices and collect their data.
*/
- while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+ while ((device = firegl_pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
device)) != NULL) {
pci_read_config_dword(device, 0x04, &scratch);
@@ -794,6 +800,13 @@
command &= ~0x00000001;
}
}
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+ // the reference count has been increased in agp_backend_initialize.
+ if (device)
+ pci_dev_put(device);
+#endif
+
/*
* PASS2: Figure out the 4X/2X/1X setting and enable the
* target (our motherboard chipset).
@@ -839,8 +852,9 @@
* command registers.
*/
- while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+ while ((device = firegl_pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
device)) != NULL) {
+
pci_read_config_dword(device, 0x04, &scratch);
if (!(scratch & 0x00100000))
@@ -871,6 +885,12 @@
}
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+ // the reference count has been increased in agp_backend_initialize.
+ if (device)
+ pci_dev_put(device);
+#endif
+
return 0; /* success */
}
@@ -5119,8 +5139,9 @@
* AGP devices and collect their data.
*/
- while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+ while ((device = firegl_pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
device)) != NULL) {
+
pci_read_config_dword(device, 0x04, &scratch);
if (!(scratch & 0x00100000))
@@ -5187,6 +5208,13 @@
command &= ~0x00000001;
}
}
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+ // the reference count has been increased in agp_backend_initialize.
+ if (device)
+ pci_dev_put(device);
+#endif
+
/*
* PASS2: Figure out the 4X/2X/1X setting and enable the
* target (our motherboard chipset).
@@ -5217,8 +5245,9 @@
* command registers.
*/
- while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
+ while ((device = firegl_pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
device)) != NULL) {
+
pci_read_config_dword(device, 0x04, &scratch);
if (!(scratch & 0x00100000))
@@ -5249,6 +5278,12 @@
}
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+ // the reference count has been increased in agp_backend_initialize.
+ if (device)
+ pci_dev_put(device);
+#endif
+
return(0); /* success */
}
@@ -6494,10 +6529,10 @@
// locate host bridge device
#ifdef __x86_64__
do {
- dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
+ dev = firegl_pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
} while((dev) && !agp_check_supported_device(dev));
#else
- if ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) == NULL)
+ if ((dev = firegl_pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) == NULL)
return -ENODEV;
#endif
@@ -7040,8 +7075,12 @@
&agp_bridge.mode);
return hp_zx1_setup(dev);
}
- dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
+ dev = firegl_pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev);
} while (dev);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+ if(dev) pci_dev_put(dev);
+#endif
return -ENODEV;
}
#endif /* __ia64__ */
@@ -7462,6 +7501,11 @@
agp_bridge.free_gatt_table();
vfree(agp_bridge.key_list);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+ // decrease the reference count.
+ pci_dev_put(agp_bridge.dev);
+#endif
+
if (agp_bridge.needs_scratch_page == TRUE) {
agp_bridge.scratch_page &= ~(0x00000fff);
agp_bridge.agp_destroy_page((unsigned long)
--- firegl_public.c 2005-01-06 9:05:02.000000000 +0100
+++ firegl_public.c 2005-01-06 9:19:16.000000000 +0100
@@ -88,6 +88,7 @@
#include <linux/smp_lock.h>
// newer SuSE kernels need this
#include <linux/highmem.h>
+#include <linux/pagemap.h> // for lock_page and unlock_page
#if defined(__ia64__)
#include <linux/vmalloc.h> 我见过这是一个for 2.6.10的patch
还有for 2.6.*的
diff -Nru build_mod.orig/2.6.x/Makefile build_mod/2.6.x/Makefile
--- build_mod.orig/2.6.x/Makefile 2004-08-05 23:06:07.709571464 +0200
+++ build_mod/2.6.x/Makefile 2004-08-05 23:06:35.673320328 +0200
@@ -11,7 +11,7 @@
endif
EXTRA_CFLAGS += \
- -Idrivers/char/drm/ \
+ -I$(DRMINCLUDES) \
-D__AGP__ \
-DFGL \
-DFGL_LINUX \
diff -Nru build_mod.orig/make.sh build_mod/make.sh
--- build_mod.orig/make.sh 2004-08-05 23:06:07.708571616 +0200
+++ build_mod/make.sh 2004-08-05 23:06:37.253080168 +0200
@@ -180,6 +180,11 @@
drmincludes=${linuxincludes}/../drivers/char/drm
#drmincludes=/usr/local/src/dripkg/drm
+# Fedora Core 2 work around
+if [ ! -e "/usr/src/linux" ] && [ -d "/usr/src/linux-${uname_r}" ]; then
+drmincludes=/usr/src/linux-${uname_r}/drivers/char/drm
+fi
+
# since kernel 2.4.8 the X4.1.0 drm kernel module headers are part
# of the kernel build environment - check dir and expected files.
@@ -993,7 +998,7 @@
if [ $kernel_is_26x -gt 0 ]; then
echo "doing Makefile based build for kernel 2.6.x and higher" | tee -a $logfile
cd 2.6.x
- make PAGE_ATTR_FIX=$PAGE_ATTR_FIX 2>&1 | tee -a $logfile
+ make PAGE_ATTR_FIX=$PAGE_ATTR_FIX DRMINCLUDES=$drmincludes 2>&1 | tee -a $logfile
res=$?
cd ..
if [ $res -eq 0 ]; then 原文!
http://www.stanford.edu/~fenn/linux/radeon.shtml 借问下
1、对内核有要求的么?如需2.6以上?
2、slackware 10 下要怎么装 看一下原文吧,我的这个应该是对fedora的2.6内核
他那个好像没有版本限制,但是内核要求是2.6.10的 补充一下,驱动驱动的显卡最低到8500~~~
~~之前的只能用DRI的驱动来获得3D效果了~~ 再次请教,我的系统是Slackware 10,按照
http://www.linuxpackages.net/forum/viewtopic.php?t=8934这篇来装的
但到sh make.sh这部就出错了,是不是要改什么文件啊
系统的内核是2.4.x的 楼上我没有用过2。4X的内核编译过ATI驱动所以没办法回答你
~~不过最起码你也得把你得错误信息贴出来别人才能帮助你啊
呵呵,强烈建议使用2.6X的内核~~也许就什么问题都解决了 在sh make.sh这步的出错信息如下
root@chen:/lib/modules/fglrx/build_mod# sh make.sh
ATI module generator V 2.0
==========================
initializing...
cleaning...
patching 'highmem.h'...
probing for VMA API version...
doing script based build for kernel 2.4.x and similar
compiling './agpgart_be.c'...
agpgart_be.c: In function `x86_64_insert_memory':
agpgart_be.c:3784: warning: integer constant is too large for "long" type
compiling './agp3.c'...
compiling './i7505-agp.c'...
compiling './nvidia-agp.c'...
compiling './firegl_public.c'...
firegl_public.c:207:1: warning: "pte_unmap" redefined
firegl_public.c:140:1: warning: this is the location of the previous definition
linking of fglrx kernel module...
duplicating results into driver repository...
done.
==============================
You must change your working directory to /lib/modules/fglrx
and then call ./make_install.sh in order to install the built module.
==============================
root@chen:/lib/modules/fglrx/build_mod# cd ..
root@chen:/lib/modules/fglrx# sh make_install.sh
- creating symlink
- recreating module dependency list
- trying a sample load of the kernel module
Warning: loading /lib/modules/2.4.26/kernel/drivers/char/drm/fglrx.o will taint the kernel: non-GPL license - Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY
See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Module fglrx loaded, with warnings
done.
就在这里就错了,是不 是要改什么文件阿 我的显卡倒是安装成功了,安装完成也没有显示任何失败的消息,修改xorg.conf改用fglrx的驱动程序,然后进入kde一切正常,但是3d加速依然不行,glxgear只有300fps,我的显卡为9800se,我这到底算不算装上了驱动程序呢? to:chy815
你的编译只是有警告信息而已啊,,并没有出错~~~~~~可以继续下一步~看看驱动能不能装上 to:hanhiver
你LSMOD一下看看FGLRX模块在不在~~~
关于XORG.conf文件配置你可以参考一下我发在这个版面的另外一篇帖子~~
我那个文件时是可以正常工作的~~你对比一下看看能不能发现问题。。 to: fryrice.
谢谢你的回复,我已经尝试过了,lsmod表明模块已经加载,一切证据都表明我确实安装好了驱动程序,唯一不同的就是,依然没有3d加速,游戏很慢,glxgears的祯数也不对。难道驱动就是这个样子的?还是问题在我的显卡是9800SE太有“中国特色”了? 新驱动去ati网站下载!
Xorg6.8 v8.8 一篇驱动文章!
http://www.rage3d.com/board/showthread.php?t=33730800
页:
[1]
2