FGLRX v12.10.5 (AMD Radeon) Linux Module

Stephen Marz (26 July 2013)


The proprietary ATI driver only supports Linux kernels v3.9.x and below because it uses the old create_proc_entry function which no longer exists. Also the remove_proc_entry is replaced with proc_remove which simply calls remove_proc_subtree. Therefore, this needs to only be called on the root and the entire directory entry subtree will be removed as well. The two files affected are drm_proc.h and firegl_public.c. I made simple modifications that utilize the new proc_create and seq_file structures to wrap around the intellectual property functions (which I do not have access to). There is probably a better way to do this, but it works.

There is also a change in the Linux kernel to get the ACPI handle. In the file kcl_acpi.c (line 798). This should read:

pInfo->video_handle = ACPI_HANDLE(&pInfo->pcidev->dev);

I have tested this new code on an AMD Radeon 6550D and it works with Ubuntu 13.04 running Compiz/Unity on Linux v3.10.x and Linux v3.11.0-rc1 and -rc2

//firegl_public.c -- The following lines creates wrapper functions for the new proc_create_data function

#define READ_PROC_FOPS(func) func##_fops

#define READ_PROC_WRAP(func) \
static int func##_show(struct seq_file *sf, void *v) \
{ \
   int eof = 0; \
   int offset = 0; \
   char *start = 0; \
   char buf[2000]; \
   func (buf, &start, offset, 2000, &eof, sf->private); \
   seq_printf(sf, buf); \
   return 0; \
} \
static int func##_open(struct inode *i, struct file *f) \
{ \
   return single_open(f, func##_show, PDE_DATA(i));
} \
static struct file_operations func##_fops = { \
   .owner = THIS_MODULE, \
   .open = func##_open, \
   .read = seq_read, \
   .llseek = seq_lseek, \
   .release = single_release, \