| Happy ( @ 2008-04-06 12:25:00 |
| Current mood: | |
| Entry tags: | life, linux setup |
success: fglrx and kernel-2.6.25-rc8
I finally got DRI and XVideo working on my new laptop, and there seems to be a lack of success stories so here's mine.
Installing ati-drivers with kernel 2.6.25-rc8 gave me these errors...
/var/tmp/portage/x11-drivers/ati-drivers-8.4 71.3/work/common/lib/modules/fglrx/build _mod/2.6.x/firegl_public.c: In function 'KCL_PosixSecurityCapGetEffectiveVector' :
/var/tmp/portage/x11-drivers/ati-drivers-8.4 71.3/work/common/lib/modules/fglrx/build _mod/2.6.x/firegl_public.c:1888: error: implicit declaration of function 'cap_t'
/var/tmp/portage/x11-drivers/ati-drivers-8.4 71.3/work/common/lib/modules/fglrx/build _mod/2.6.x/firegl_public.c: In function 'KCL_PosixSecurityCapSetEffectiveVector' :
/var/tmp/portage/x11-drivers/ati-drivers-8.4 71.3/work/common/lib/modules/fglrx/build _mod/2.6.x/firegl_public.c:1896: error: invalid lvalue in assignment
the machine is a Toshiba Satellite A210-FS3 (PSAFGC-FS308C), I can not use an earlier kernel and have sound working.
after some searching for a solution I came up with just one hint, the cap_t related api in the kernel changed in the 2.6.25-rc series
http://www.phoronix.com/forums/showthrea d.php?t=7822
http://groups.google.com/group/linux.ker nel/browse_thread/thread/c19de5dc98a1a68 e/f59d294786fe3610?lnk=raot&fwc=1
After a bit more searching I went and found the commit that made the change that caused the compile to fail
http://git.kernel.org/?p=linux/kernel/gi t/torvalds/linux-2.6.git;a=commitdiff;h=e 338d263a76af78fe8f38a72131188b58fceb591
and studied exactly what changed, the effective list changed from an int to an array of two u32s, from there I took a guess that I could just take the first of them and treat it as the int that was there before. I made some changes to get it to compile, and made a patch.
But the module would not load afterwards because of the symbol reference to change_page_attr, so i changed the call to use set_pages_uc instead.
During this process I was building an ebuild file for the installation, by just modifying the existing one and adding those patches.
After those changes the kernel module loaded, my machine has not crashed, and xvideo works now.
This worked for me, it may not work for anyone else, and it is highly likely that the changes are not correct.
I believe that is the last of the hardware support in this laptop.
EDIT: one person had to modify the list of exported symbols in the kernel to get this to load
http://forums.gentoo.org/viewtopic-p-503 9144.html#5039144
EDIT: I have exporting of unused symbols turned on in my kernel configuration
EDIT: There are reports of this not working on x86_64, noted in the comments
/var/tmp/portage/x11-drivers/ati-drivers-8.4
/var/tmp/portage/x11-drivers/ati-drivers-8.4
/var/tmp/portage/x11-drivers/ati-drivers-8.4
/var/tmp/portage/x11-drivers/ati-drivers-8.4
the machine is a Toshiba Satellite A210-FS3 (PSAFGC-FS308C), I can not use an earlier kernel and have sound working.
# uname -a
Linux bouncy 2.6.25-rc8 #3 SMP Fri Apr 4 17:47:24 ADT 2008 i686 AMD Athlon(tm) 64 X2 Dual-Core Processor TK-57 AuthenticAMD GNU/Linux
# lspci -v -nn -s 01:05.0
01:05.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon X1200 Series [1002:791f] (prog-if 00 [VGA controller])
Subsystem: Toshiba America Info Systems Unknown device [1179:ff1a]
Flags: bus master, fast devsel, latency 64, IRQ 18
Memory at f0000000 (64-bit, prefetchable) [size=128M]
Memory at f8100000 (64-bit, non-prefetchable) [size=64K]
I/O ports at 9000 [size=256]
Memory at f8000000 (32-bit, non-prefetchable) [size=1M]
Capabilities: [50] Power Management version 2
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Kernel driver in use: fglrx_pci
Kernel modules: fglrx
after some searching for a solution I came up with just one hint, the cap_t related api in the kernel changed in the 2.6.25-rc series
http://www.phoronix.com/forums/showthrea
http://groups.google.com/group/linux.ker
After a bit more searching I went and found the commit that made the change that caused the compile to fail
http://git.kernel.org/?p=linux/kernel/gi
and studied exactly what changed, the effective list changed from an int to an array of two u32s, from there I took a guess that I could just take the first of them and treat it as the int that was there before. I made some changes to get it to compile, and made a patch.
--- common/lib/modules/fglrx/build_mod/firegl_public.c.orig 2008-04-06 01:20
:21.000000000 -0300
+++ common/lib/modules/fglrx/build_mod/firegl_public.c 2008-04-06 01:17:58.0000
00000 -0300
@@ -1885,7 +1885,7 @@
*/
KCL_TYPE_Cap ATI_API_CALL KCL_PosixSecurityCapGetEffectiveVector()
{
- return cap_t(current->cap_effective);
+ return (current->cap_effective).cap[0];
}
/** \brief Set vector of effective security caps for the current process
@@ -1893,7 +1893,7 @@
*/
void ATI_API_CALL KCL_PosixSecurityCapSetEffectiveVector(KCL_TYPE_Cap cap)
{
- cap_t(current->cap_effective) = cap;
+ (current->cap_effective).cap[0] = cap;
}
/** \brief Get number of available RAM pages
But the module would not load afterwards because of the symbol reference to change_page_attr, so i changed the call to use set_pages_uc instead.
--- common/lib/modules/fglrx/build_mod/firegl_public.c.orig 2008-04-06 02:10
:13.000000000 -0300
+++ common/lib/modules/fglrx/build_mod/firegl_public.c 2008-04-06 02:23:05.0000
00000 -0300
@@ -120,6 +120,7 @@
#include <asm/cpufeature.h>
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
+#include <asm/cacheflush.h>
#endif
#include <asm/delay.h>
#include <linux/agp_backend.h>
@@ -1158,7 +1159,7 @@
int ATI_API_CALL KCL_SetPageNoCache(void* virt, int pages)
{
- return change_page_attr(virt_to_page(virt), pages, PAGE_KERNEL_NOCACHE);
+ return set_pages_uc(virt_to_page(virt), pages);
}
/** /brief Call global kernel task/thread scheduler */
During this process I was building an ebuild file for the installation, by just modifying the existing one and adding those patches.
After those changes the kernel module loaded, my machine has not crashed, and xvideo works now.
This worked for me, it may not work for anyone else, and it is highly likely that the changes are not correct.
I believe that is the last of the hardware support in this laptop.
EDIT: one person had to modify the list of exported symbols in the kernel to get this to load
http://forums.gentoo.org/viewtopic-p-503
EDIT: I have exporting of unused symbols turned on in my kernel configuration
Kernel hacking --->
[*] Enable unused/obsolete exported symbols
EDIT: There are reports of this not working on x86_64, noted in the comments