View Full Version : FC5 x86_64 and ati driver: compiles but not function

29th March 2006, 02:12 AM
It's frustrating that there's still no fglrx kernel module for amd64 users. According to the thread here:
there is no solution yet from the livna guys and we are pretty much on our own.

I should mention I know nothing about linux kernel at all. But with a little bit programming experience I decided to give it a try. Looking into the fglrx kernel module I found the are two things that prevent it being compiled.
If you install the kernel module source package, you will find a file named 'fglrx-kmod-data-8.23.7.tar.bz2' under /usr/src/redhat/SOURCES. Extract this file and you'll get two directories: 'fglrxpkg-x86' and 'fglrxpkg-x64'. The files that are giving troubles are located in fglrxpkg-x64/common/lib/modules/fglrx/build_mod.

First in 'firegl_public.h', line 155-160 as shown below:

#ifdef pfn_to_page
#define PMD_PAGE(pmd) pmd_page(pmd)
#else /* for old 2.4 kernels */
#define pfn_to_page(pfn) (mem_map + (pfn))
#define PMD_PAGE(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))

The first error message I saw was something like 'mem_map undefined'. Here we see function pfn_to_page depends on mem_map if pfn_to_page is not defined. Also the comment says this could be the case for old 2.4 kernels. But somehow the compiler could not find the definition of pfn_to_page and goes to the mem_map line. So I changed

#ifdef pfn_to_page


Secondly, with the change above, there came another error in file 'firegl_public.c' line 2356 about the variable 'no_iommu'. After a little search I found the definition of 'no_iommu' was removed from kernel 2.6.16. That's why it's complaining about it. Without knowing more details of what 'no_iommu' is, I just changed line 2356 in file 'firegl_public.c' to

return 0;

With these two changes I regenerated the package file 'fglrx-kmod-data-8.23.7.tar.bz2'. Then I went to /usr/src/redhat/SPECS and rebuilt the spec file. It went through without any error. I installed the driver and kernel module packages. But the driver did not work. It gave me a blank screen. I guess what I did has something wrong in it. I hope someone else could look into it and solve the problem.