summaryrefslogtreecommitdiff
path: root/x11-drivers/ati-drivers/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2015-10-04 19:09:51 +0100
committerV3n3RiX <venerix@rogentos.ro>2015-10-04 19:09:51 +0100
commit836dcf91c181df6afb0f658bf31d34744f8ff052 (patch)
tree17d553cc348a5cdf287a55c96021971340cd5b1d /x11-drivers/ati-drivers/files
parent1df4d224a758ee39311dbff64893a509ef78ede2 (diff)
drop splitted x11 drivers, we go gentoo way
Diffstat (limited to 'x11-drivers/ati-drivers/files')
-rw-r--r--x11-drivers/ati-drivers/files/amd-drivers-3.2.7.1.patch19
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-12.2-redefine-WARN.patch42
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch27
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-13.12-acpi.patch16
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-13.6-linux-3.10-proc.diff356
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-13.8-beta-include-seq_file.patch13
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-14.12-linux-3.19.patch28
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-14.4-acpi.patch12
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-2.6.33.patch140
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-2.6.34.patch10
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-2.6.35-and-newer.patch11
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-2.6.36.patch26
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-2.6.37.patch14
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch60
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch55
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-3.2.8+-2.patch12
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-3.2.8+.patch29
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-CVE-2010-3081-fix.patch60
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch50
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch25
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-kernel-3.8-acpihandle.patch15
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch72
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-old_rsp.patch24
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-redefine-WARN.patch39
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-vm-reserverd.patch12
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-x32_something_something.patch13
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-xen.patch62
-rw-r--r--x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch42
-rw-r--r--x11-drivers/ati-drivers/files/ati-powermode-opt-path-3.patch40
-rw-r--r--x11-drivers/ati-drivers/files/atieventsd.init20
-rw-r--r--x11-drivers/ati-drivers/files/buildfix_kernel_3.13.patch30
-rw-r--r--x11-drivers/ati-drivers/files/check-for-iommu-only-if-iommu-is-supported.patch31
-rw-r--r--x11-drivers/ati-drivers/files/const-notifier-block.patch25
-rw-r--r--x11-drivers/ati-drivers/files/fgl_glxgears-do-not-include-glATI.patch11
-rw-r--r--x11-drivers/ati-drivers/files/fix-the-linux-3.17-no_hotplug-error.patch18
-rw-r--r--x11-drivers/ati-drivers/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch19
-rw-r--r--x11-drivers/ati-drivers/files/kernel/2.6.32-9.11-fix_compilation.patch37
-rw-r--r--x11-drivers/ati-drivers/files/linux-3.10-proc.diff293
-rw-r--r--x11-drivers/ati-drivers/files/switchlibGL61
-rw-r--r--x11-drivers/ati-drivers/files/typesafe-kuid.diff34
-rw-r--r--x11-drivers/ati-drivers/files/use-kernel_fpu_begin.patch12
41 files changed, 0 insertions, 1915 deletions
diff --git a/x11-drivers/ati-drivers/files/amd-drivers-3.2.7.1.patch b/x11-drivers/ati-drivers/files/amd-drivers-3.2.7.1.patch
deleted file mode 100644
index 104c8788..00000000
--- a/x11-drivers/ati-drivers/files/amd-drivers-3.2.7.1.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -5797,10 +5797,16 @@ void ATI_API_CALL KCL_fpu_begin(void)
- #ifdef CONFIG_X86_64
- kernel_fpu_begin();
- #else
-+#ifndef TS_USEDFPU
-+ preempt_disable();
-+ if (__thread_has_fpu(current))
-+ __save_init_fpu(current);
-+#else
- struct thread_info *cur_task = current_thread_info();
- preempt_disable();
- if (cur_task->status & TS_USEDFPU)
- __save_init_fpu(cur_task->task);
-+#endif
- else
- clts();
- #endif
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-12.2-redefine-WARN.patch b/x11-drivers/ati-drivers/files/ati-drivers-12.2-redefine-WARN.patch
deleted file mode 100644
index f4fab432..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-12.2-redefine-WARN.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- common/lib/modules/fglrx/build_mod/kcl_debug.h.orig 2012-03-08 19:30:38.195025328 +0100
-+++ common/lib/modules/fglrx/build_mod/kcl_debug.h 2012-03-08 19:31:24.976024507 +0100
-@@ -85,8 +85,8 @@
- #ifdef ERROR
- #undef ERROR
- #endif
--#ifdef WARN
--#undef WARN
-+#ifdef AMD_WARN
-+#undef AMD_WARN
- #endif
- #ifdef INFO
- #undef INFO
-@@ -122,7 +122,7 @@
- {
- SPECIAL = 0,
- ERROR ,
-- WARN ,
-+ AMD_WARN ,
- INFO ,
- INFOEX,
- TRACE,
-@@ -160,7 +160,7 @@
- }log_map;
-
-
--#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) ))
-+#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(AMD_WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) ))
- #define INFO_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX)))
- extern const log_map module_log_map[];
- extern const module_map module_type_map[];
---- common/lib/modules/fglrx/build_mod/kcl_debug.c.orig 2012-03-08 19:36:18.244019310 +0100
-+++ common/lib/modules/fglrx/build_mod/kcl_debug.c 2012-03-08 19:36:36.197018973 +0100
-@@ -69,7 +69,7 @@
- {
- {SPECIAL , 'S'},
- {ERROR , 'E'},
-- {WARN , 'W'},
-+ {AMD_WARN , 'W'},
- {INFO , 'I'},
- {INFOEX , 'X'},
- {TRACE , 'T'},
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch b/x11-drivers/ati-drivers/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
deleted file mode 100644
index 0ea461b8..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Vasiliy Yeremeyev <vayerx@gmail.com>
-Date: Sun, 4 Nov 2012 23:59:36 +0400
-Subject: [PATCH] KCL_AGP_FindCapsRegisters stub for AGP-less systems
-
----
- common/lib/modules/fglrx/build_mod/kcl_agp.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/common/lib/modules/fglrx/build_mod/kcl_agp.c b/common/lib/modules/fglrx/build_mod/kcl_agp.c
-index b9c0655..cb1902b 100644
---- a/common/lib/modules/fglrx/build_mod/kcl_agp.c
-+++ b/common/lib/modules/fglrx/build_mod/kcl_agp.c
-@@ -479,6 +479,11 @@ int ATI_API_CALL KCL_AGP_Enable(unsigned long mode)
- return -EINVAL;
- }
-
-+int ATI_API_CALL KCL_AGP_FindCapsRegisters(KCL_PCI_DevHandle dev)
-+{
-+ return -EINVAL;
-+}
-+
- int ATI_API_CALL KCL_AGP_ReadCapsRegisters(KCL_PCI_DevHandle dev, unsigned int *caps)
- {
- return -EINVAL;
---
-1.7.12
-
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-13.12-acpi.patch b/x11-drivers/ati-drivers/files/ati-drivers-13.12-acpi.patch
deleted file mode 100644
index 3c568742..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-13.12-acpi.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -urN common.old/lib/modules/fglrx/build_mod/kcl_acpi.c common/lib/modules/fglrx/build_mod/kcl_acpi.c
---- common.old/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-12-27 13:32:34.734832283 +0100
-+++ common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-12-27 13:33:31.849831765 +0100
-@@ -1002,7 +1002,11 @@
- #endif
- {
- return KCL_ACPI_ERROR;
-- }
-+ }
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
-+ ((acpi_tbl_table_handler)handler)(hdr);
-+#else
- ((acpi_table_handler)handler)(hdr);
-+#endif
- return KCL_ACPI_OK;
- }
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-13.6-linux-3.10-proc.diff b/x11-drivers/ati-drivers/files/ati-drivers-13.6-linux-3.10-proc.diff
deleted file mode 100644
index bdb22eae..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-13.6-linux-3.10-proc.diff
+++ /dev/null
@@ -1,356 +0,0 @@
-diff --git a/common/lib/modules/fglrx/build_mod/drmP.h b/common/lib/modules/fglrx/build_mod/drmP.h
-index 81546b2..4e74526 100755
---- a/common/lib/modules/fglrx/build_mod/drmP.h
-+++ b/common/lib/modules/fglrx/build_mod/drmP.h
-@@ -901,10 +901,6 @@ int DRM(stub_register)(const char *name,
- int DRM(stub_unregister)(int minor);
-
- /* Proc support (drm_proc.h) */
--extern struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev,
-- int minor,
-- struct proc_dir_entry *root,
-- struct proc_dir_entry **dev_root);
- extern int DRM(proc_cleanup)(int minor,
- struct proc_dir_entry *root,
- struct proc_dir_entry *dev_root);
-diff --git a/common/lib/modules/fglrx/build_mod/drm_proc.h b/common/lib/modules/fglrx/build_mod/drm_proc.h
-index 1e3ab4a..c52ad7e 100755
---- a/common/lib/modules/fglrx/build_mod/drm_proc.h
-+++ b/common/lib/modules/fglrx/build_mod/drm_proc.h
-@@ -75,61 +75,6 @@ struct drm_proc_list {
- #define DRM_PROC_ENTRIES (sizeof(DRM(proc_list))/sizeof(DRM(proc_list)[0]))
-
- /**
-- * Initialize the DRI proc filesystem for a device.
-- *
-- * \param dev DRM device.
-- * \param minor device minor number.
-- * \param root DRI proc dir entry.
-- * \param dev_root resulting DRI device proc dir entry.
-- * \return root entry pointer on success, or NULL on failure.
-- *
-- * Create the DRI proc root entry "/proc/ati", the device proc root entry
-- * "/proc/ati/%minor%/", and each entry in proc_list as
-- * "/proc/ati/%minor%/%name%".
-- */
--struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev, int minor,
-- struct proc_dir_entry *root,
-- struct proc_dir_entry **dev_root)
--{
-- struct proc_dir_entry *ent;
-- int i, j;
-- char name[64];
--
-- if (!minor) root = create_proc_entry("dri", S_IFDIR, NULL);
-- if (!root) {
-- DRM_ERROR("Cannot create /proc/ati\n");
-- return NULL;
-- }
--
-- sprintf(name, "%d", minor);
-- *dev_root = create_proc_entry(name, S_IFDIR, root);
-- if (!*dev_root) {
-- DRM_ERROR("Cannot create /proc/ati/%s\n", name);
-- return NULL;
-- }
--
-- for (i = 0; i < DRM_PROC_ENTRIES; i++) {
-- ent = create_proc_entry(DRM(proc_list)[i].name,
-- S_IFREG|S_IRUGO, *dev_root);
-- if (!ent) {
-- DRM_ERROR("Cannot create /proc/ati/%s/%s\n",
-- name, DRM(proc_list)[i].name);
-- for (j = 0; j < i; j++)
-- remove_proc_entry(DRM(proc_list)[i].name,
-- *dev_root);
-- remove_proc_entry(name, root);
-- if (!minor) remove_proc_entry("dri", NULL);
-- return NULL;
-- }
-- ent->read_proc = DRM(proc_list)[i].f;
-- ent->data = dev;
-- }
--
-- return root;
--}
--
--
--/**
- * Cleanup the proc filesystem resources.
- *
- * \param minor device minor number.
-diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
-index d3ad3ce..890a0aa 100755
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -583,6 +583,202 @@ kcl_proc_list_t KCL_PROC_FileList[] =
- { "NULL", NULL, NULL} // Terminate List!!!
- };
-
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
-+typedef int (read_proc_t)(char *page, char **start, off_t off, int count, int *eof, void *data);
-+typedef int (write_proc_t)(struct file *file, const char __user *buffer, unsigned long count, void *data);
-+#else
-+#define PDE_DATA(inode) (PDE((inode))->data)
-+#endif
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
-+typedef struct {
-+ read_proc_t *read_func;
-+ write_proc_t *write_func;
-+ void *data;
-+} gentoo_proc_wrapper_t;
-+
-+#define GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC 939750305
-+
-+static ssize_t gentoo_proc_wrapper_read (struct file *myfile, char __user *buffer, size_t count, loff_t *offset) {
-+ int is_eof=0, retval;
-+ char *start, *usebuffer=NULL;
-+ gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data);
-+ if (PAGE_SIZE<*offset) {
-+ printk(KERN_ERR "Trying to read beyond 4k on proc\n");
-+ return -EIO;
-+ }
-+ //printk(KERN_NOTICE " call with: dev %p, func %p\n", wrapper_data->data, wrapper_data->read_func);
-+
-+ usebuffer=kmalloc(2*PAGE_SIZE, GFP_KERNEL);
-+ if (!usebuffer)
-+ return -ENOMEM;
-+ ((u32*)usebuffer)[1024]=GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC;
-+
-+ retval=wrapper_data->read_func(usebuffer, &start, *offset, count, &is_eof, wrapper_data->data);
-+
-+ BUG_ON(GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC != ((u32*)usebuffer)[1024]);
-+
-+ if (0 > retval)
-+ {
-+ printk(KERN_ERR "Proc read failed with %d", retval);
-+ goto out;
-+ }
-+
-+ if (copy_to_user(buffer, start, retval)) {
-+ printk(KERN_NOTICE "copy to user failed in amd drivers proc code\n");
-+ retval=-EFAULT;
-+ goto out;
-+ }
-+ *offset+=retval;
-+
-+out:
-+ if (usebuffer)
-+ kfree(usebuffer);
-+ return retval;
-+}
-+static ssize_t gentoo_proc_wrapper_write (struct file *myfile, const char __user *buffer, size_t count, loff_t *offset) {
-+ gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data);
-+ int retval=0;
-+ void *usebuffer=NULL;
-+
-+ BUG_ON(*offset);
-+ if (!wrapper_data->write_func)
-+ return -EPERM;
-+
-+ usebuffer=kmalloc(count, GFP_KERNEL);
-+ if (!usebuffer)
-+ return -ENOMEM;
-+ if (copy_from_user(usebuffer, buffer, count)) {
-+ printk(KERN_NOTICE "copy from user failed in amd drivers proc code\n");
-+ retval=-EFAULT;
-+ goto out;
-+ }
-+
-+ retval=wrapper_data->write_func(myfile, buffer, count, wrapper_data->data);
-+ *offset+=retval;
-+out:
-+ if (usebuffer)
-+ kfree(usebuffer);
-+ return retval;
-+}
-+static int gentoo_proc_wrapper_open(struct inode *myinode, struct file *myfile) {
-+ myfile->private_data=PDE_DATA(myinode);
-+ return generic_file_open(myinode, myfile);
-+}
-+struct file_operations gentoo_proc_fops = {
-+ .read=gentoo_proc_wrapper_read,
-+ .write=gentoo_proc_wrapper_write,
-+ .open=gentoo_proc_wrapper_open,
-+};
-+
-+static void *gentoo_proc_wrapper_data(read_proc_t *reader, write_proc_t *writer, void *mydata) {
-+ gentoo_proc_wrapper_t *retval=kmalloc(sizeof(gentoo_proc_wrapper_t), GFP_KERNEL);
-+ if (!retval)
-+ return retval;
-+ retval->read_func=reader;
-+ retval->write_func=writer;
-+ retval->data=mydata;
-+ return retval;
-+}
-+
-+static struct proc_dir_entry *firegl_proc_init( device_t *dev,
-+ int minor,
-+ struct proc_dir_entry *root,
-+ struct proc_dir_entry **dev_root,
-+ kcl_proc_list_t *proc_list ) // proc_list must be terminated!
-+{
-+ struct proc_dir_entry *ent;
-+ char name[64];
-+ kcl_proc_list_t *list = proc_list;
-+ void *tempdata;
-+ KCL_DEBUG1(FN_FIREGL_PROC, "minor %d, proc_list 0x%08lx\n", minor, (unsigned long)proc_list);
-+ if (!minor)
-+ {
-+ root = proc_mkdir("ati", NULL);
-+ }
-+
-+ if (!root)
-+ {
-+ KCL_DEBUG_ERROR("Cannot create /proc/ati\n");
-+ return NULL;
-+ }
-+
-+ if (minor == 0)
-+ {
-+ // Global major debice number entry
-+ tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_major_proc_read, NULL, NULL);
-+ if (!tempdata)
-+ return NULL;
-+ ent = proc_create_data("major", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata);
-+ if (!ent)
-+ {
-+ remove_proc_entry("ati", NULL);
-+ KCL_DEBUG_ERROR("Cannot create /proc/ati/major\n");
-+ return NULL;
-+ }
-+ }
-+
-+ sprintf(name, "%d", minor);
-+ *dev_root = proc_mkdir(name, root);
-+ if (!*dev_root) {
-+ remove_proc_entry("major", root);
-+ remove_proc_entry("ati", NULL);
-+ KCL_DEBUG_ERROR("Cannot create /proc/ati/%s\n", name);
-+ return NULL;
-+ }
-+
-+ while (list->f || list->fops)
-+ {
-+ struct file_operations *my_fops = &gentoo_proc_fops;
-+ if (list->fops)
-+ {
-+ my_fops = (struct file_operations*)list->fops;
-+ tempdata=(dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev);
-+ }
-+ else {
-+ BUG_ON(!list->f);
-+ tempdata=gentoo_proc_wrapper_data((read_proc_t*)list->f, NULL, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev) );
-+ if (!tempdata)
-+ return NULL;
-+ }
-+ //printk(KERN_NOTICE "name %s, dev %p, func %p, data %p\n", list->name, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev), list->f, tempdata);
-+ ent = proc_create_data(list->name, S_IFREG|S_IRUGO, *dev_root, my_fops, tempdata);
-+
-+ if (!ent)
-+ {
-+ KCL_DEBUG_ERROR("Cannot create /proc/ati/%s/%s\n", name, list->name);
-+ while (proc_list != list)
-+ {
-+ remove_proc_entry(proc_list->name, *dev_root);
-+ proc_list++;
-+ }
-+ remove_proc_entry(name, root);
-+ if (!minor)
-+ {
-+ remove_proc_entry("major", root);
-+ remove_proc_entry("ati", NULL);
-+ }
-+ return NULL;
-+ }
-+
-+ list++;
-+ }
-+
-+ if (minor == 0)
-+ {
-+ // Global debug entry, only create it once
-+ tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_debug_proc_read_wrap, (write_proc_t*)firegl_debug_proc_write_wrap, dev);
-+ if (!tempdata)
-+ return NULL;
-+ ent=proc_create_data("debug", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata);
-+ if (!ent)
-+ return NULL;
-+ }
-+
-+ return root;
-+}
-+#else
- static struct proc_dir_entry *firegl_proc_init( device_t *dev,
- int minor,
- struct proc_dir_entry *root,
-@@ -677,6 +873,7 @@ static struct proc_dir_entry *firegl_proc_init( device_t *dev,
-
- return root;
- }
-+#endif
-
- static int firegl_proc_cleanup( int minor,
- struct proc_dir_entry *root,
-@@ -6135,59 +6332,4 @@ void ATI_API_CALL KCL_fpu_end(void)
- kernel_fpu_end();
- }
-
--/** Create new directory entry under "/proc/ati/...."
-- * Where
-- * root_dir - Root directory. If NULL then we should use "/proc/ati" root.
-- * name - Pointer to the name of directory
-- * access - Access attribute. We could use it to disable access to the directory for everybody accept owner.
-- * By default owner is root.
-- * Return NULL if failure. Pointer to proc_dir_entry otherwise
-- */
--void * KCL_create_proc_dir(void *root_dir, const char *name, unsigned int access)
--{
-- struct proc_dir_entry *dir = NULL;
--
-- if (root_dir == NULL)
-- dir = create_proc_entry(name, S_IFDIR | access, firegl_stub_root);
-- else
-- dir = create_proc_entry(name, S_IFDIR | access, (struct proc_dir_entry *)root_dir);
--
-- return dir;
--}
--
--/* Remove proc directory entry
-- * root - Pointer to directory proc entry or NULL if for "/proc/ati"
-- * name - Name to delete
-- */
--void KCL_remove_proc_dir_entry(void *root, const char *name)
--{
-- if (root == NULL)
-- remove_proc_entry(name, firegl_stub_root);
-- else
-- remove_proc_entry(name, (struct proc_dir_entry *)root);
--}
--
--
--/* Create proc_entry under "root_dir"
-- * read_fn - Function which will be called on read request
-- * write_fn - Function which will be called on write request
-- * private_data - Pointer to private data which will be passed
-- */
--void KCL_create_proc_entry(void *root_dir, const char *name, unsigned int access_mode, void *read_fn, void *write_fn, void *private_data)
--{
-- struct proc_dir_entry *ent = NULL;
--
-- if (root_dir == NULL || name == NULL)
-- return;
--
-- ent = create_proc_entry(name, access_mode, (struct proc_dir_entry *)root_dir);
--
-- if (ent)
-- {
-- ent->read_proc = (read_proc_t *)read_fn;
-- ent->write_proc = (write_proc_t *)write_fn;
-- ent->data = private_data;
-- }
--}
--
- #endif /* __KERNEL__ */
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-13.8-beta-include-seq_file.patch b/x11-drivers/ati-drivers/files/ati-drivers-13.8-beta-include-seq_file.patch
deleted file mode 100644
index fb1ba17e..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-13.8-beta-include-seq_file.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
-index 22561c5..fdfe65e 100755
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -520,6 +520,8 @@ static int func##_wrap(char *buf, char **start, kcl_off_t offset, \
- }
-
- #else
-+#include <linux/seq_file.h>
-+
- #define READ_PROC_WRAP(func) \
- static int func##_wrap(struct seq_file *m, void* data) \
- { \
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-14.12-linux-3.19.patch b/x11-drivers/ati-drivers/files/ati-drivers-14.12-linux-3.19.patch
deleted file mode 100644
index 9594972d..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-14.12-linux-3.19.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -4823,8 +4823,13 @@
- {
- unsigned long orig_level;
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
-+ orig_level = __this_cpu_read(kasExecutionLevel);
-+ __this_cpu_write(kasExecutionLevel,level);
-+#else
- orig_level = __get_cpu_var(kasExecutionLevel);
- __get_cpu_var(kasExecutionLevel) = level;
-+#endif
-
- return orig_level;
- }
-@@ -4836,7 +4841,11 @@
- */
- static unsigned long kas_GetExecutionLevel(void)
- {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
-+ return __this_cpu_read(kasExecutionLevel);
-+#else
- return __get_cpu_var(kasExecutionLevel);
-+#endif
- }
-
- /** \brief Type definition for kas_spin_lock() parameter */
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-14.4-acpi.patch b/x11-drivers/ati-drivers/files/ati-drivers-14.4-acpi.patch
deleted file mode 100644
index 0295307d..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-14.4-acpi.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- work.orig/common/lib/modules/fglrx/build_mod/kcl_acpi.c
-+++ work/common/lib/modules/fglrx/build_mod/kcl_acpi.c
-@@ -981,7 +981,7 @@ int ATI_API_CALL KCL_ACPI_ParseTable(cha
- {
- return KCL_ACPI_ERROR;
- }
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,1)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
- ((acpi_tbl_table_handler)handler)(hdr);
- #else
- ((acpi_table_handler)handler)(hdr);
-
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.33.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.33.patch
deleted file mode 100644
index 85f9aff7..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-2.6.33.patch
+++ /dev/null
@@ -1,140 +0,0 @@
---- work.orig/common/lib/modules/fglrx/build_mod/drmP.h
-+++ work/common/lib/modules/fglrx/build_mod/drmP.h
-@@ -42,7 +42,11 @@
- * can build the DRM (part of PI DRI). 4/21/2000 S + B */
- #include <asm/current.h>
- #endif /* __alpha__ */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-+#include <generated/autoconf.h>
-+#else
- #include <linux/autoconf.h>
-+#endif
- #include <linux/module.h>
- #include <linux/kernel.h>
- #include <linux/miscdevice.h>
---- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ work/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -28,7 +28,11 @@
- #error Kernel versions older than 2.6.0 are no longer supported by this module.
- #endif
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-+#include <generated/autoconf.h>
-+#else
- #include <linux/autoconf.h>
-+#endif
-
- #if !defined(CONFIG_X86)
- #if !defined(CONFIG_X86_PC)
-@@ -163,8 +167,12 @@
-
- // For 2.6.18 or higher, the UTS_RELEASE is defined in the linux/utsrelease.h.
- #ifndef UTS_RELEASE
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-+#include <generated/utsrelease.h>
-+#else
- #include <linux/utsrelease.h>
- #endif
-+#endif
-
- #if defined(__i386__)
- #ifndef do_div
---- work.orig/common/lib/modules/fglrx/build_mod/kcl_acpi.c
-+++ work/common/lib/modules/fglrx/build_mod/kcl_acpi.c
-@@ -15,7 +15,11 @@
- ****************************************************************************/
-
- #include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-+#include <generated/autoconf.h>
-+#else
- #include <linux/autoconf.h>
-+#endif
- #include <linux/acpi.h>
-
- #include "kcl_config.h"
---- work.orig/common/lib/modules/fglrx/build_mod/kcl_agp.c
-+++ work/common/lib/modules/fglrx/build_mod/kcl_agp.c
-@@ -31,7 +31,11 @@
- */
-
- #include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-+#include <generated/autoconf.h>
-+#else
- #include <linux/autoconf.h>
-+#endif
- #include <linux/pci.h>
- #include <linux/agp_backend.h>
- #include <linux/string.h>
---- work.orig/common/lib/modules/fglrx/build_mod/kcl_io.c
-+++ work/common/lib/modules/fglrx/build_mod/kcl_io.c
-@@ -37,7 +37,11 @@
- */
-
- #include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-+#include <generated/autoconf.h>
-+#else
- #include <linux/autoconf.h>
-+#endif
- #include <linux/poll.h>
- #include <linux/signal.h>
- #include <asm/io.h>
---- work.orig/common/lib/modules/fglrx/build_mod/kcl_osconfig.h
-+++ work/common/lib/modules/fglrx/build_mod/kcl_osconfig.h
-@@ -20,7 +20,11 @@
- #define KCL_OSCONFIG_H
-
- #include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-+#include <generated/autoconf.h>
-+#else
- #include <linux/autoconf.h>
-+#endif
-
- // Choose modern way to call 32-on-64 IOCTLs if configured in the kernel
- #if defined(CONFIG_COMPAT) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
---- work.orig/common/lib/modules/fglrx/build_mod/kcl_pci.c
-+++ work/common/lib/modules/fglrx/build_mod/kcl_pci.c
-@@ -31,7 +31,11 @@
- */
-
- #include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-+#include <generated/autoconf.h>
-+#else
- #include <linux/autoconf.h>
-+#endif
- #include <linux/pci.h>
-
- #include "kcl_config.h"
---- work.orig/common/lib/modules/fglrx/build_mod/kcl_str.c
-+++ work/common/lib/modules/fglrx/build_mod/kcl_str.c
-@@ -30,7 +30,12 @@
- *
- */
-
-+#include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-+#include <generated/autoconf.h>
-+#else
- #include <linux/autoconf.h>
-+#endif
- #include <linux/string.h>
- #include <linux/module.h>
-
---- work.orig/common/lib/modules/fglrx/build_mod/kcl_wait.c
-+++ work/common/lib/modules/fglrx/build_mod/kcl_wait.c
-@@ -31,7 +31,11 @@
- */
-
- #include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-+#include <generated/autoconf.h>
-+#else
- #include <linux/autoconf.h>
-+#endif
- #include <linux/wait.h>
- #include <linux/highmem.h>
- #include <linux/sched.h>
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.34.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.34.patch
deleted file mode 100644
index 1993d134..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-2.6.34.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- work.orig/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-04-13 20:02:46.494496561 +0200
-+++ work/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-04-13 19:52:00.054563389 +0200
-@@ -39,6 +39,7 @@
- #include <linux/wait.h>
- #include <linux/highmem.h>
- #include <linux/sched.h>
-+#include <linux/slab.h>
-
- #include "kcl_config.h"
- #include "kcl_wait.h"
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.35-and-newer.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.35-and-newer.patch
deleted file mode 100644
index e1703f34..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-2.6.35-and-newer.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- work.orig/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-19 11:45:04.922760268 +0200
-+++ work/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-19 12:04:29.092812959 +0200
-@@ -193,7 +193,7 @@ void ATI_API_CALL KCL_IOCTL_UnregisterCo
- */
- void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
- {
-- return compat_alloc_user_space(size);
-+ return arch_compat_alloc_user_space(size);
- }
-
- #endif // __x86_64__
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.36.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.36.patch
deleted file mode 100644
index 5f8f5845..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-2.6.36.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 21:51:48.000000000 +0200
-+++ work/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 23:46:37.000000000 +0200
-@@ -320,7 +320,11 @@
- return firegl_release((KCL_IO_FILE_Handle)filp);
- }
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
-+int ip_firegl_ioctl(struct file* filp, unsigned int cmd, unsigned long arg)
-+#else
- int ip_firegl_ioctl(struct inode* inode, struct file* filp, unsigned int cmd, unsigned long arg)
-+#endif
- {
- return firegl_ioctl((KCL_IO_FILE_Handle)filp, cmd, arg);
- }
-@@ -407,7 +411,11 @@
- #endif
- open: ip_firegl_open,
- release: ip_firegl_release,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
-+ unlocked_ioctl: ip_firegl_ioctl,
-+#else
- ioctl: ip_firegl_ioctl,
-+#endif
- mmap: ip_firegl_mmap,
-
- write: ip_firegl_write,
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.37.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.37.patch
deleted file mode 100644
index e3feb837..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-2.6.37.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- ati.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-11-18 18:08:34.831997690 +0100
-+++ ati/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-11-18 18:10:28.711997706 +0100
-@@ -5094,7 +5094,11 @@
- unsigned int ATI_API_CALL KAS_Mutex_Initialize(void* hMutex)
- {
- kasMutex_t* mutex_obj = (kasMutex_t*)hMutex;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
-+ sema_init(&(mutex_obj->mutex),1);
-+#else
- init_MUTEX(&(mutex_obj->mutex));
-+#endif
- return 1;
- }
-
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch
deleted file mode 100644
index 0c3970e0..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-2.6.38.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- cat11.1/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-01-17 15:59:26.000000000 +0100
-+++ cat11.1/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-02-01 18:39:08.902218444 +0100
-@@ -848,7 +848,12 @@
- * happen much less frequent then without this workaround.
- */
- if (state == PM_EVENT_SUSPEND)
-- acquire_console_sem();
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
-+ console_lock();
-+#else
-+ acquire_console_sem();
-+#endif
-
- if (firegl_cail_powerdown(privdev, state))
- ret = -EIO;
-@@ -870,8 +875,13 @@
- }
-
- if (state == PM_EVENT_SUSPEND)
-- release_console_sem();
--
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
-+ console_unlock();
-+#else
-+ release_console_sem();
-+#endif
-+
- KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, ret, NULL);
-
- return ret;
-@@ -894,7 +904,12 @@
- if (PMSG_EVENT(pdev->dev.power.power_state) == 0) return 0;
-
- if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND)
-- acquire_console_sem();
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
-+ console_lock();
-+#else
-+ acquire_console_sem();
-+#endif
-
- #ifdef FIREGL_USWC_SUPPORT
- // Restore the PAT after resuming from S3 or S4.
-@@ -919,7 +934,12 @@
- firegl_cail_powerup(privdev);
-
- if (PMSG_EVENT(pdev->dev.power.power_state) == PM_EVENT_SUSPEND)
-- release_console_sem();
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
-+ console_unlock();
-+#else
-+ release_console_sem();
-+#endif
-
- PMSG_EVENT(pdev->dev.power.power_state) = 0;
- KCL_DEBUG_TRACEOUT(FN_FIREGL_ACPI, 0, NULL);
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch
deleted file mode 100644
index ffd2e459..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch
+++ /dev/null
@@ -1,55 +0,0 @@
---- firegl_public.c.orig 2011-05-10 22:19:26.395914392 +0200
-+++ firegl_public.c 2011-05-11 01:40:36.967379590 +0200
-@@ -114,7 +114,9 @@
- #include <linux/pci.h>
- #include <linux/wait.h>
- #include <linux/miscdevice.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
- #include <linux/smp_lock.h>
-+#endif
- // newer SuSE kernels need this
- #include <linux/highmem.h>
-
-@@ -1049,7 +1051,11 @@ static int __init firegl_init_module(voi
- dev->pubdev.signature = FGL_DEVICE_SIGNATURE;
-
- for (i = 0; i < __KE_MAX_SPINLOCKS; i++)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
- dev->spinlock[i] = SPIN_LOCK_UNLOCKED;
-+#else
-+ dev->spinlock[i] = __SPIN_LOCK_UNLOCKED(old_style_spin_init);
-+#endif
-
- for (i=0; i < __KE_MAX_SEMAPHORES; i++)
- sema_init(&dev->struct_sem[i], 1);
-@@ -1900,13 +1906,17 @@ void ATI_API_CALL KCL_spin_unlock(void *
- /** \brief Grab global kernel lock */
- void ATI_API_CALL KCL_GlobalKernelLock(void)
- {
-+#ifdef CONFIG_KERNEL_LOCK
- lock_kernel();
-+#endif
- }
-
- /** \brief Release global kernel lock */
- void ATI_API_CALL KCL_GlobalKernelUnlock(void)
- {
-+#ifdef CONFIG_KERNEL_LOCK
- unlock_kernel();
-+#endif
- }
-
- /*****************************************************************************/
---- drmP.h.orig 2011-05-10 22:17:00.000000000 +0200
-+++ drmP.h 2011-05-11 01:32:09.399610802 +0200
-@@ -57,7 +57,9 @@
- #include <linux/pci.h>
- #include <linux/version.h>
- #include <linux/sched.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
- #include <linux/smp_lock.h> /* For (un)lock_kernel */
-+#endif
- #include <linux/mm.h>
- #include <linux/pagemap.h>
- #if defined(__alpha__) || defined(__powerpc__)
- #if defined(__alpha__) || defined(__powerpc__)
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+-2.patch b/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+-2.patch
deleted file mode 100644
index 9bf9058f..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+-2.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -187,6 +187,9 @@
- #include <linux/gfp.h>
- #include <linux/swap.h>
- #include "asm/i387.h"
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
-+#include <asm/fpu-internal.h>
-+#endif
-
- #include "firegl_public.h"
- #include "kcl_osconfig.h"
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+.patch b/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+.patch
deleted file mode 100644
index 01291160..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-3.2.8+.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -187,6 +187,9 @@
- #include <linux/gfp.h>
- #include <linux/swap.h>
- #include "asm/i387.h"
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
-+#include <asm/fpu-internal.h>
-+#endif
-
- #include "firegl_public.h"
- #include "kcl_osconfig.h"
-@@ -5807,10 +5810,16 @@ void ATI_API_CALL KCL_fpu_begin(void)
- #ifdef CONFIG_X86_64
- kernel_fpu_begin();
- #else
-+#ifndef TS_USEDFPU
-+ preempt_disable();
-+ if (__thread_has_fpu(current))
-+ __save_init_fpu(current);
-+#else
- struct thread_info *cur_task = current_thread_info();
- preempt_disable();
- if (cur_task->status & TS_USEDFPU)
- __save_init_fpu(cur_task->task);
-+#endif
- else
- clts();
- #endif
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-CVE-2010-3081-fix.patch b/x11-drivers/ati-drivers/files/ati-drivers-CVE-2010-3081-fix.patch
deleted file mode 100644
index 5a71da10..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-CVE-2010-3081-fix.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
- * *
- * Copyright 1999-2005 ATI Technologies Inc., Markham, Ontario, CANADA. *
- * All Rights Reserved. *
- * *
- * Your use and or redistribution of this software in source and \ or *
- * binary form, with or without modification, is subject to: (i) your *
- * ongoing acceptance of and compliance with the terms and conditions of *
- * the ATI Technologies Inc. software End User License Agreement; and (ii) *
- * your inclusion of this notice in any version of this software that you *
- * use or redistribute. A copy of the ATI Technologies Inc. software End *
- * User License Agreement is included with this software and is also *
- * available by contacting ATI Technologies Inc. at http://www.ati.com *
- * *
- ****************************************************************************/
-
---- common/lib/modules/fglrx/build_mod/kcl_ioctl.c.orig 2010-09-01 16:05:31.000000000 +0200
-+++ common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2010-09-23 01:41:46.711844303 +0200
-@@ -35,6 +35,9 @@
-
- #ifdef __x86_64__
- # include "asm/compat.h"
-+# if ARCH_COMPAT_ALLOC_USER_SPACE
-+# include "linux/compat.h"
-+# endif
- # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
- # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
- # include "linux/ioctl32.h"
-@@ -193,7 +196,20 @@
- */
- void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
- {
-- return compat_alloc_user_space(size);
-+ void __user *ptr;
-+
-+ /* If size would occupy more than half of the entire compat space... */
-+ if (unlikely(size > (((compat_uptr_t)~0) >> 1)))
-+ return NULL;
-+#if ARCH_COMPAT_ALLOC_USER_SPACE
-+ ptr = arch_compat_alloc_user_space(size);
-+#else
-+ ptr = compat_alloc_user_space(size);
-+#endif
-+ if (unlikely(!access_ok(VERIFY_WRITE, ptr, size)))
-+ return NULL;
-+
-+ return ptr;
- }
-
- #endif // __x86_64__
---- common/lib/modules/fglrx/build_mod/2.6.x/Makefile.orig 2010-09-01 16:05:31.000000000 +0200
-+++ common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-09-23 01:47:46.533415019 +0200
-@@ -66,6 +66,7 @@
- -DFGL_GART_RESERVED_SLOT \
- -DFGL_LINUX253P1_VMA_API \
- -DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \
-+ -DARCH_COMPAT_ALLOC_USER_SPACE=$(ARCH_COMPAT_ALLOC_USER_SPACE) \
-
- ifeq ($(KERNELRELEASE),)
- # on first call from remote location we get into this path
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch b/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch
deleted file mode 100644
index 04248eb7..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-do_mmap.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-15 18:30:13.483762070 +0200
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-17 17:47:36.543041869 +0200
-@@ -2106,6 +2106,12 @@
- }
- }
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
-+# define NO_DO_MMAP
-+# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, f)
-+# define do_munmap(a,b,c) vm_munmap(b, c)
-+#endif
-+
- unsigned long ATI_API_CALL KCL_MEM_AllocLinearAddrInterval(
- KCL_IO_FILE_Handle file,
- unsigned long addr,
-@@ -2117,10 +2123,13 @@
-
- flags = MAP_SHARED;
- prot = PROT_READ|PROT_WRITE;
--
-+#ifdef NO_DO_MMAP
-+ vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff);
-+#else
- down_write(&current->mm->mmap_sem);
- vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff);
- up_write(&current->mm->mmap_sem);
-+#endif
- if (IS_ERR(vaddr))
- return 0;
- else
-@@ -2131,7 +2140,9 @@
- {
- int retcode = 0;
-
-+#ifndef NO_DO_MMAP
- down_write(&current->mm->mmap_sem);
-+#endif
- #ifdef FGL_LINUX_RHEL_MUNMAP_API
- retcode = do_munmap(current->mm,
- addr,
-@@ -2142,7 +2153,9 @@
- addr,
- len);
- #endif
-+#ifndef NO_DO_MMAP
- up_write(&current->mm->mmap_sem);
-+#endif
- return retcode;
- }
-
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch b/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch
deleted file mode 100644
index e2af915a..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-fix_compilation-bug-297322.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -1441,7 +1441,9 @@
- todo !!!
- #endif
-
--unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old,
-+void __cmpxchg_wrong_size(void) {}
-+
-+unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old,
- unsigned long new, int size)
- {
- #ifndef __HAVE_ARCH_CMPXCHG
---- common/lib/modules/fglrx/build_mod/firegl_public.h
-+++ common/lib/modules/fglrx/build_mod/firegl_public.h
-@@ -441,7 +441,8 @@
- extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask);
- extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void);
-
--extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old,
-+extern void __cmpxchg_wrong_size(void);
-+extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old,
- unsigned long new, int size);
-
- #define __ke_cmpxchg(ptr,o,n) \
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-kernel-3.8-acpihandle.patch b/x11-drivers/ati-drivers/files/ati-drivers-kernel-3.8-acpihandle.patch
deleted file mode 100644
index bdff4fb7..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-kernel-3.8-acpihandle.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- common/lib/modules/fglrx/build_mod/kcl_acpi.c 2012-07-04 21:43:47.000000000 +0200
-+++ common/lib/modules/fglrx/build_mod/kcl_acpi.c.new 2012-12-23 11:25:38.000000000 +0100
-@@ -775,11 +775,7 @@
- unsigned int ATI_API_CALL KCL_ACPI_GetHandles(kcl_match_info_t *pInfo)
- {
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
-- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19)
-- pInfo->video_handle = pInfo->pcidev->dev.archdata.acpi_handle;
-- #else
-- pInfo->video_handle = pInfo->pcidev->dev.firmware_data;
-- #endif
-+ pInfo->video_handle = DEVICE_ACPI_HANDLE(&pInfo->pcidev->dev);
- if ( pInfo->video_handle &&
- (KCL_ACPI_videoDevice(pInfo->video_handle) != KCL_ACPI_OK) )
- {
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch b/x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch
deleted file mode 100644
index 9b321955..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-linux-4.0.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
-index 0f7399d..eb23e06 100644
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -4240,8 +4240,13 @@ static void kcl_mem_pat_setup (void *info)
-
- if (cpu_has_pge)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
- cr4 = read_cr4();
- write_cr4(cr4 & ~X86_CR4_PGE);
-+#else
-+ cr4 = __read_cr4();
-+ __write_cr4(cr4 & ~X86_CR4_PGE);
-+#endif
- }
- __flush_tlb();
-
-@@ -4254,7 +4259,11 @@ static void kcl_mem_pat_setup (void *info)
- write_cr0(cr0 & 0xbfffffff);
- if (cpu_has_pge)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
- write_cr4(cr4);
-+#else
-+ __write_cr4(cr4);
-+#endif
- }
- local_irq_restore(flags);
-
-@@ -4281,8 +4290,13 @@ static void kcl_mem_pat_restore (void *info)
-
- if (cpu_has_pge)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
- cr4 = read_cr4();
- write_cr4(cr4 & ~X86_CR4_PGE);
-+#else
-+ cr4 = __read_cr4();
-+ __write_cr4(cr4 & ~X86_CR4_PGE);
-+#endif
- }
- __flush_tlb();
-
-@@ -4294,7 +4308,11 @@ static void kcl_mem_pat_restore (void *info)
- write_cr0(cr0 & 0xbfffffff);
- if (cpu_has_pge)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
- write_cr4(cr4);
-+#else
-+ __write_cr4(cr4);
-+#endif
- }
- local_irq_restore(flags);
-
-diff --git a/common/lib/modules/fglrx/build_mod/kcl_str.c b/common/lib/modules/fglrx/build_mod/kcl_str.c
-index 2d89eb0..6df117c 100644
---- a/common/lib/modules/fglrx/build_mod/kcl_str.c
-+++ b/common/lib/modules/fglrx/build_mod/kcl_str.c
-@@ -169,7 +169,11 @@ int ATI_API_CALL KCL_STR_Strnicmp(const char* s1,
- const char* s2,
- KCL_TYPE_SizeSigned count)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0)
- return strnicmp(s1, s2, count);
-+#else
-+ return strncasecmp(s1, s2, count);
-+#endif
- }
-
- /** \brief Locate character in string
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-old_rsp.patch b/x11-drivers/ati-drivers/files/ati-drivers-old_rsp.patch
deleted file mode 100644
index 0456bd6b..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-old_rsp.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:33:25.044695179 +0200
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:28:39.692699095 +0200
-@@ -4154,7 +4154,7 @@
- {
- unsigned int p;
- KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init);
-- for_each_cpu_mask(p, cpu_possible_map)
-+ for_each_possible_cpu(p)
- {
- KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p);
- preempt_disable();
---- a/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:11:03.402987821 +0200
-+++ b/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:13:00.273986422 +0200
-@@ -217,6 +217,10 @@
- * \param size [in] Number of bytes to allocate
- * \return Pointer to allocated memory
- */
-+#ifndef CONFIG_X86_X32
-+DEFINE_PER_CPU(unsigned long, old_rsp);
-+#endif
-+
- void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
- {
- void __user *ret = COMPAT_ALLOC_USER_SPACE(size); \ No newline at end of file
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-redefine-WARN.patch b/x11-drivers/ati-drivers/files/ati-drivers-redefine-WARN.patch
deleted file mode 100644
index fe5ed2f8..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-redefine-WARN.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- common/lib/modules/fglrx/build_mod/kcl_debug.h.orig 2011-12-30 14:32:00.271391437 +0100
-+++ common/lib/modules/fglrx/build_mod/kcl_debug.h 2011-12-30 15:48:21.647473696 +0100
-@@ -85,8 +85,8 @@
- #ifdef ERROR
- #undef ERROR
- #endif
--#ifdef WARN
--#undef WARN
-+#ifdef AMD_WARN
-+#undef AMD_WARN
- #endif
- #ifdef INFO
- #undef INFO
-@@ -122,7 +122,7 @@
- {
- SPECIAL = 0,
- ERROR ,
-- WARN ,
-+ AMD_WARN ,
- INFO ,
- INFOEX,
- TRACE,
-@@ -163,14 +163,14 @@
- {
- {SPECIAL , 'S'},
- {ERROR , 'E'},
-- {WARN , 'W'},
-+ {AMD_WARN , 'W'},
- {INFO , 'I'},
- {INFOEX , 'X'},
- {TRACE , 'T'},
- {PERFORMANCE , 'P'},
- {DUMP , 'D'},
- };
--#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) ))
-+#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(AMD_WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) ))
- #define INFO_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX)))
- static module_map module_type_map[LOG_M_MAX] =
- {
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-vm-reserverd.patch b/x11-drivers/ati-drivers/files/ati-drivers-vm-reserverd.patch
deleted file mode 100644
index 08045a65..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-vm-reserverd.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- common/lib/modules/fglrx/build_mod/firegl_public.c 2012-10-18 00:29:21.778369464 +0200
-+++ common/lib/modules/fglrx/build_mod/firegl_public.c.new 2012-10-18 00:30:39.647416026 +0200
-@@ -222,6 +222,10 @@
- #define preempt_enable()
- #endif
-
-+#ifndef VM_RESERVED
-+#define VM_RESERVED (VM_DONTEXPAND | VM_DONTDUMP)
-+#endif
-+
- // ============================================================
- /* globals */
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-x32_something_something.patch b/x11-drivers/ati-drivers/files/ati-drivers-x32_something_something.patch
deleted file mode 100644
index d37c1191..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-x32_something_something.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:11:03.402987821 +0200
-+++ b/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:13:00.273986422 +0200
-@@ -217,6 +217,10 @@
- * \param size [in] Number of bytes to allocate
- * \return Pointer to allocated memory
- */
-+#ifndef CONFIG_X86_X32
-+DEFINE_PER_CPU(unsigned long, old_rsp);
-+#endif
-+
- void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
- {
- void __user *ret = COMPAT_ALLOC_USER_SPACE(size);
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-xen.patch b/x11-drivers/ati-drivers/files/ati-drivers-xen.patch
deleted file mode 100644
index a1b88df7..00000000
--- a/x11-drivers/ati-drivers/files/ati-drivers-xen.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- common/lib/modules/fglrx/build_mod/firegl_public.c 2008-12-09 15:17:27.000000000 +0000
-+++ common/lib/modules/fglrx/build_mod/firegl_public.c 2008-12-09 15:12:34.000000000 +0000
-@@ -31,6 +31,9 @@
- #include <linux/autoconf.h>
-
- #if !defined(CONFIG_X86_PC)
-+#if !defined(CONFIG_X86_PC_XEN)
-+#if !defined(CONFIG_X86_XEN)
-+#if !defined(CONFIG_X86_64_XEN)
- #if !defined(CONFIG_X86_64)
- #if !defined(CONFIG_X86_VOYAGER)
- #if !defined(CONFIG_X86_NUMAQ)
-@@ -47,6 +50,9 @@
- #endif
- #endif
- #endif
-+#endif
-+#endif
-+#endif
-
- /* The dirty-page-tracking patch included in NLD 9 SMP kernels defines
- * a static inline function that uses a GPL-only symbol in a header
---- common/lib/modules/fglrx/build_mod/firegl_public.h 2008-12-09 15:17:27.000000000 +0000
-+++ common/lib/modules/fglrx/build_mod/firegl_public.h 2008-12-09 15:15:45.000000000 +0000
-@@ -30,9 +30,13 @@
- #endif
-
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
--
-+#ifdef CONFIG_XEN
-+#define REMAP_PAGE_RANGE_FN io_remap_pfn_range
-+#define REMAP_PAGE_RANGE_STR "io_remap_pfn_range"
-+#else
- #define REMAP_PAGE_RANGE_FN remap_pfn_range
- #define REMAP_PAGE_RANGE_STR "remap_pfn_range"
-+#endif
- #define REMAP_PAGE_RANGE_OFF(offset) ((offset) >> PAGE_SHIFT)
-
- #else /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,9) */
-@@ -43,13 +47,21 @@
-
- #endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) */
-
-+#ifdef CONFIG_XEN
-+#define REMAP_PAGE_RANGE(vma,offset) \
-+ REMAP_PAGE_RANGE_FN((vma), \
-+ (vma)->vm_start, \
-+ REMAP_PAGE_RANGE_OFF(offset), \
-+ (vma)->vm_end - (vma)->vm_start, \
-+ (vma)->vm_page_prot)
-+#else
- #define REMAP_PAGE_RANGE(vma,offset) \
- REMAP_PAGE_RANGE_FN(FGL_VMA_API_PASS \
- (vma)->vm_start, \
- REMAP_PAGE_RANGE_OFF(offset), \
- (vma)->vm_end - (vma)->vm_start, \
- (vma)->vm_page_prot)
--
-+#endif
-
- /* Page table macros */
-
diff --git a/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch
deleted file mode 100644
index f5a35a30..00000000
--- a/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -ur common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh
---- common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2006-07-28 04:22:36.000000000 +0100
-+++ common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2006-08-04 12:19:42.000000000 +0100
-@@ -4,6 +4,8 @@
- # Control script for ACPI lid state and AC adapter state
- #
-
-+aticonfig='/opt/bin/aticonfig'
-+
- getXuser() {
- user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'`
- if [ x"$user" = x"" ]; then
-@@ -47,7 +49,7 @@
- done
-
- #If PPLIB is enabled
--su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB
-+su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB
- if [ $? = 0 ]; then
- echo "Has PPLIB"
- has_pplib=1
-@@ -61,15 +63,15 @@
- if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then
- echo "Low power"
- if [ ${has_pplib} -eq 1 ]; then
-- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"'
-+ su $user -c '$aticonfig --pplib-cmd="notify psrc dc"'
- else
-- su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now"
-+ su $user -c "$aticonfig --set-powerstate=1"
- fi
- else
- echo "high power"
- if [ ${has_pplib} -eq 1 ]; then
-- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"'
-+ su $user -c '$aticonfig --pplib-cmd="notify psrc ac"'
- else
-- su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now"
-+ su $user -c "$aticonfig --set-powerstate=$($aticonfig --lsp | grep 'default state' | cut -c 3)"
- fi
- fi
-
diff --git a/x11-drivers/ati-drivers/files/ati-powermode-opt-path-3.patch b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-3.patch
deleted file mode 100644
index 106e67ee..00000000
--- a/x11-drivers/ati-drivers/files/ati-powermode-opt-path-3.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- a/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2012-08-17 22:39:05.077984979 +0800
-+++ b/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2012-08-17 22:41:15.919976149 +0800
-@@ -4,6 +4,8 @@
- # Control script for ACPI lid state and AC adapter state
- #
-
-+aticonfig='/opt/bin/aticonfig'
-+
- getXuser() {
- user=`who| grep -m1 ":$displaynum " | awk '{print $1}'`
- if [ x"$user" = x"" ]; then
-@@ -47,7 +49,7 @@
- done
-
- #If PPLIB is enabled
--su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB
-+su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB
- if [ $? = 0 ]; then
- echo "Has PPLIB"
- has_pplib=1
-@@ -61,15 +63,15 @@
- if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then
- echo "Low power"
- if [ ${has_pplib} -eq 1 ]; then
-- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"'
-+ su $user -c '$aticonfig --pplib-cmd="notify psrc dc"'
- else
-- su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now"
-+ su $user -c "$aticonfig --set-powerstate=1 --effective=now"
- fi
- else
- echo "high power"
- if [ ${has_pplib} -eq 1 ]; then
-- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"'
-+ su $user -c '$aticonfig --pplib-cmd="notify psrc ac"'
- else
-- su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now"
-+ su $user -c "$aticonfig --set-powerstate=3 --effective=now"
- fi
- fi
diff --git a/x11-drivers/ati-drivers/files/atieventsd.init b/x11-drivers/ati-drivers/files/atieventsd.init
deleted file mode 100644
index 73139ce3..00000000
--- a/x11-drivers/ati-drivers/files/atieventsd.init
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/files/atieventsd.init,v 1.3 2007/05/18 23:58:01 marienz Exp $
-
-depend() {
- need acpid
-}
-
-start() {
- ebegin "Starting ${SVCNAME}"
- start-stop-daemon --start --exec /opt/sbin/atieventsd -- ${ATIEVENTSDOPTS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --quiet --exec /opt/sbin/atieventsd
- eend $?
-} \ No newline at end of file
diff --git a/x11-drivers/ati-drivers/files/buildfix_kernel_3.13.patch b/x11-drivers/ati-drivers/files/buildfix_kernel_3.13.patch
deleted file mode 100644
index 432e6666..00000000
--- a/x11-drivers/ati-drivers/files/buildfix_kernel_3.13.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6ea087272c0774fc86693a6fc379a2226e10b323 Mon Sep 17 00:00:00 2001
-From: Alberto Milone <alberto.milone@canonical.com>
-Date: Wed, 8 Jan 2014 16:09:58 +0100
-Subject: [PATCH 1/1] Add support for Linux 3.13
-
-Do not use the ACPI handle which was removed from struct acpi_dev_node
-in Linux 3.13. Use the ACPI companion device instead.
----
- kcl_acpi.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/kcl_acpi.c b/kcl_acpi.c
-index 5eb9fb1..96b6113 100755
---- a/common/lib/modules/fglrx/build_mod/kcl_acpi.c
-+++ b/common/lib/modules/fglrx/build_mod/kcl_acpi.c
-@@ -793,7 +793,11 @@ unsigned int ATI_API_CALL KCL_ACPI_GetHandles(kcl_match_info_t *pInfo)
- {
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
-+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
-+ pInfo->video_handle = pInfo->pcidev->dev.acpi_node.companion;
-+ #else
- pInfo->video_handle = pInfo->pcidev->dev.acpi_node.handle;
-+ #endif
- #elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19)
- pInfo->video_handle = pInfo->pcidev->dev.archdata.acpi_handle;
- #else
---
-1.7.9.5
-
diff --git a/x11-drivers/ati-drivers/files/check-for-iommu-only-if-iommu-is-supported.patch b/x11-drivers/ati-drivers/files/check-for-iommu-only-if-iommu-is-supported.patch
deleted file mode 100644
index 79324873..00000000
--- a/x11-drivers/ati-drivers/files/check-for-iommu-only-if-iommu-is-supported.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 1633d55aa0fb9c2ceb0ae1eab15bdec5066d35ae Mon Sep 17 00:00:00 2001
-From: Emil Karlson <jekarlson@gmail.com>
-Date: Fri, 2 Aug 2013 01:18:41 +0300
-Subject: [PATCH 1/3] Check for iommu only, if iommu is supported.
-
----
- common/lib/modules/fglrx/build_mod/kcl_iommu.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/common/lib/modules/fglrx/build_mod/kcl_iommu.c b/common/lib/modules/fglrx/build_mod/kcl_iommu.c
-index c6602dd..803455c 100755
---- a/common/lib/modules/fglrx/build_mod/kcl_iommu.c
-+++ b/common/lib/modules/fglrx/build_mod/kcl_iommu.c
-@@ -183,11 +183,13 @@ void ATI_API_CALL KCL_IOMMU_UnbindPasid( KCL_PCI_DevHandle pcidev,int pasid)
- */
- int ATI_API_CALL KCL_IOMMU_CheckInfo( KCL_PCI_DevHandle pcidev)
- {
-+#if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU)
- struct pci_dev* pdev = (struct pci_dev*)pcidev;
-- if ( pdev->dev.archdata.iommu )
-+ if ( pdev->dev.archdata.iommu )
- {
- return 1;
- }
-+#endif
- return 0;
- }
-
---
-1.8.1.5
-
diff --git a/x11-drivers/ati-drivers/files/const-notifier-block.patch b/x11-drivers/ati-drivers/files/const-notifier-block.patch
deleted file mode 100644
index ba1fdb2b..00000000
--- a/x11-drivers/ati-drivers/files/const-notifier-block.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Nur common/lib/modules/fglrx/build_mod/kcl_acpi.c common-r1/lib/modules/fglrx/build_mod/kcl_acpi.c
---- common/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-01-29 17:03:51.000000000 +0200
-+++ common-r1/lib/modules/fglrx/build_mod/kcl_acpi.c 2013-02-15 20:33:10.611838616 +0200
-@@ -15,6 +15,9 @@
- ****************************************************************************/
-
- #include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
-+#include <linux/notifier.h>
-+#endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
- #include <generated/autoconf.h>
- #else
-@@ -145,7 +148,11 @@
- return NOTIFY_OK;
- }
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
-+static notifier_block_no_const firegl_acpi_lid_notifier = {
-+#else
- static struct notifier_block firegl_acpi_lid_notifier = {
-+#endif
- .notifier_call = firegl_acpi_lid_event,
- };
- #endif
diff --git a/x11-drivers/ati-drivers/files/fgl_glxgears-do-not-include-glATI.patch b/x11-drivers/ati-drivers/files/fgl_glxgears-do-not-include-glATI.patch
deleted file mode 100644
index d46e027c..00000000
--- a/x11-drivers/ati-drivers/files/fgl_glxgears-do-not-include-glATI.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nur extra/fgl_glxgears/fgl_glxgears.c extra-r1/fgl_glxgears/fgl_glxgears.c
---- extra/fgl_glxgears/fgl_glxgears.c 2012-08-29 09:59:03.000000000 +0300
-+++ extra-r1/fgl_glxgears/fgl_glxgears.c 2013-09-07 09:26:11.034723135 +0300
-@@ -78,7 +78,6 @@
- #endif // _WIN32
-
- #define INT_PTR ptrdiff_t
--#include <GL/glATI.h>
-
- #ifdef _WIN32
- #include <GL/wglATI.h>
diff --git a/x11-drivers/ati-drivers/files/fix-the-linux-3.17-no_hotplug-error.patch b/x11-drivers/ati-drivers/files/fix-the-linux-3.17-no_hotplug-error.patch
deleted file mode 100644
index a8b54625..00000000
--- a/x11-drivers/ati-drivers/files/fix-the-linux-3.17-no_hotplug-error.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- common/lib/modules/fglrx/build_mod/kcl_acpi.c.orig 2014-07-11 11:46:19.000000000 +0200
-+++ common/lib/modules/fglrx/build_mod/kcl_acpi.c 2014-10-08 15:12:55.535638391 +0200
-@@ -829,6 +829,7 @@
-
- static acpi_status KCL_ACPI_Slot_No_Hotplug(KCL_ACPI_DevHandle handle, u32 lvl, void *data, void **rv)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,7)
- struct acpi_device *tdev;
- struct pci_dev *pdev = (struct pci_dev *)data;
-@@ -844,6 +845,7 @@
- }
- }
- #endif
-+#endif
- return 0;
- }
-
diff --git a/x11-drivers/ati-drivers/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch b/x11-drivers/ati-drivers/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch
deleted file mode 100644
index 1d4e030b..00000000
--- a/x11-drivers/ati-drivers/files/kernel/2.6.31-fglrx_find_task_by_vpid.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- common/lib/modules/fglrx/build_mod/firegl_public.c.orig 2009-09-10 20:14:10.302938534 +0200
-+++ common/lib/modules/fglrx/build_mod/firegl_public.c 2009-09-10 20:16:21.828943780 +0200
-@@ -183,6 +183,7 @@
- #include <linux/string.h>
- #include <linux/gfp.h>
- #include <linux/swap.h>
-+#include <linux/pid.h>
-
- #include "firegl_public.h"
- #include "kcl_osconfig.h"
-@@ -1315,7 +1316,7 @@
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
- p = find_task_by_pid( pid );
- #else
-- p = find_task_by_vpid( pid );
-+ p = pid_task( pid, PIDTYPE_PID );
- #endif
- if (p)
- {
diff --git a/x11-drivers/ati-drivers/files/kernel/2.6.32-9.11-fix_compilation.patch b/x11-drivers/ati-drivers/files/kernel/2.6.32-9.11-fix_compilation.patch
deleted file mode 100644
index 38519d76..00000000
--- a/x11-drivers/ati-drivers/files/kernel/2.6.32-9.11-fix_compilation.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- work/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ work.new/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -1441,7 +1441,9 @@
- todo !!!
- #endif
-
--unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old,
-+void __cmpxchg_wrong_size(void) {}
-+
-+unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old,
- unsigned long new, int size)
- {
- #ifndef __HAVE_ARCH_CMPXCHG
---- work/common/lib/modules/fglrx/build_mod/firegl_public.h
-+++ work.new/common/lib/modules/fglrx/build_mod/firegl_public.h
-@@ -441,7 +441,8 @@
- extern void ATI_API_CALL KCL_SIGNAL_BlockAll(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask);
- extern void ATI_API_CALL KCL_SIGNAL_UnblockAll(void);
-
--extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old,
-+extern void __cmpxchg_wrong_size(void);
-+extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile unsigned long *ptr, unsigned long old,
- unsigned long new, int size);
-
- #define __ke_cmpxchg(ptr,o,n) \
---- work/common/lib/modules/fglrx/build_mod/kcl_io.c
-+++ work.new/common/lib/modules/fglrx/build_mod/kcl_io.c
-@@ -37,8 +37,9 @@
- */
-
- #include <linux/version.h>
- #include <linux/autoconf.h>
- #include <linux/poll.h>
-+#include <linux/signal.h>
- #include <asm/io.h>
-
- #include "kcl_config.h"
diff --git a/x11-drivers/ati-drivers/files/linux-3.10-proc.diff b/x11-drivers/ati-drivers/files/linux-3.10-proc.diff
deleted file mode 100644
index ce4871c0..00000000
--- a/x11-drivers/ati-drivers/files/linux-3.10-proc.diff
+++ /dev/null
@@ -1,293 +0,0 @@
-diff -Nur common/lib/modules/fglrx/build_mod/drmP.h common-r1/lib/modules/fglrx/build_mod/drmP.h
---- common/lib/modules/fglrx/build_mod/drmP.h 2013-05-15 09:26:23.555752577 +0300
-+++ common-r1/lib/modules/fglrx/build_mod/drmP.h 2013-05-16 10:39:17.496212055 +0300
-@@ -901,10 +901,6 @@
- int DRM(stub_unregister)(int minor);
-
- /* Proc support (drm_proc.h) */
--extern struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev,
-- int minor,
-- struct proc_dir_entry *root,
-- struct proc_dir_entry **dev_root);
- extern int DRM(proc_cleanup)(int minor,
- struct proc_dir_entry *root,
- struct proc_dir_entry *dev_root);
-diff -Nur common/lib/modules/fglrx/build_mod/drm_proc.h common-r1/lib/modules/fglrx/build_mod/drm_proc.h
---- common/lib/modules/fglrx/build_mod/drm_proc.h 2013-05-15 09:26:23.555752577 +0300
-+++ common-r1/lib/modules/fglrx/build_mod/drm_proc.h 2013-05-19 02:16:16.584406160 +0300
-@@ -75,61 +75,6 @@
- #define DRM_PROC_ENTRIES (sizeof(DRM(proc_list))/sizeof(DRM(proc_list)[0]))
-
- /**
-- * Initialize the DRI proc filesystem for a device.
-- *
-- * \param dev DRM device.
-- * \param minor device minor number.
-- * \param root DRI proc dir entry.
-- * \param dev_root resulting DRI device proc dir entry.
-- * \return root entry pointer on success, or NULL on failure.
-- *
-- * Create the DRI proc root entry "/proc/ati", the device proc root entry
-- * "/proc/ati/%minor%/", and each entry in proc_list as
-- * "/proc/ati/%minor%/%name%".
-- */
--struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev, int minor,
-- struct proc_dir_entry *root,
-- struct proc_dir_entry **dev_root)
--{
-- struct proc_dir_entry *ent;
-- int i, j;
-- char name[64];
--
-- if (!minor) root = create_proc_entry("dri", S_IFDIR, NULL);
-- if (!root) {
-- DRM_ERROR("Cannot create /proc/ati\n");
-- return NULL;
-- }
--
-- sprintf(name, "%d", minor);
-- *dev_root = create_proc_entry(name, S_IFDIR, root);
-- if (!*dev_root) {
-- DRM_ERROR("Cannot create /proc/ati/%s\n", name);
-- return NULL;
-- }
--
-- for (i = 0; i < DRM_PROC_ENTRIES; i++) {
-- ent = create_proc_entry(DRM(proc_list)[i].name,
-- S_IFREG|S_IRUGO, *dev_root);
-- if (!ent) {
-- DRM_ERROR("Cannot create /proc/ati/%s/%s\n",
-- name, DRM(proc_list)[i].name);
-- for (j = 0; j < i; j++)
-- remove_proc_entry(DRM(proc_list)[i].name,
-- *dev_root);
-- remove_proc_entry(name, root);
-- if (!minor) remove_proc_entry("dri", NULL);
-- return NULL;
-- }
-- ent->read_proc = DRM(proc_list)[i].f;
-- ent->data = dev;
-- }
--
-- return root;
--}
--
--
--/**
- * Cleanup the proc filesystem resources.
- *
- * \param minor device minor number.
-diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modules/fglrx/build_mod/firegl_public.c
---- common/lib/modules/fglrx/build_mod/firegl_public.c 2013-05-15 09:26:23.545752925 +0300
-+++ common-r1/lib/modules/fglrx/build_mod/firegl_public.c 2013-05-19 03:07:10.236552522 +0300
-@@ -583,6 +583,202 @@
- { "NULL", NULL, NULL} // Terminate List!!!
- };
-
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
-+typedef int (read_proc_t)(char *page, char **start, off_t off, int count, int *eof, void *data);
-+typedef int (write_proc_t)(struct file *file, const char __user *buffer, unsigned long count, void *data);
-+#else
-+#define PDE_DATA(inode) (PDE((inode))->data)
-+#endif
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
-+typedef struct {
-+ read_proc_t *read_func;
-+ write_proc_t *write_func;
-+ void *data;
-+} gentoo_proc_wrapper_t;
-+
-+#define GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC 939750305
-+
-+static ssize_t gentoo_proc_wrapper_read (struct file *myfile, char __user *buffer, size_t count, loff_t *offset) {
-+ int is_eof=0, retval;
-+ char *start, *usebuffer=NULL;
-+ gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data);
-+ if (PAGE_SIZE<*offset) {
-+ printk(KERN_ERR "Trying to read beyond 4k on proc\n");
-+ return -EIO;
-+ }
-+ //printk(KERN_NOTICE " call with: dev %p, func %p\n", wrapper_data->data, wrapper_data->read_func);
-+
-+ usebuffer=kmalloc(2*PAGE_SIZE, GFP_KERNEL);
-+ if (!usebuffer)
-+ return -ENOMEM;
-+ ((u32*)usebuffer)[1024]=GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC;
-+
-+ retval=wrapper_data->read_func(usebuffer, &start, *offset, count, &is_eof, wrapper_data->data);
-+
-+ BUG_ON(GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC != ((u32*)usebuffer)[1024]);
-+
-+ if (0 > retval)
-+ {
-+ printk(KERN_ERR "Proc read failed with %d", retval);
-+ goto out;
-+ }
-+
-+ if (copy_to_user(buffer, start, retval)) {
-+ printk(KERN_NOTICE "copy to user failed in amd drivers proc code\n");
-+ retval=-EFAULT;
-+ goto out;
-+ }
-+ *offset+=retval;
-+
-+out:
-+ if (usebuffer)
-+ kfree(usebuffer);
-+ return retval;
-+}
-+static ssize_t gentoo_proc_wrapper_write (struct file *myfile, const char __user *buffer, size_t count, loff_t *offset) {
-+ gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data);
-+ int retval=0;
-+ void *usebuffer=NULL;
-+
-+ BUG_ON(*offset);
-+ if (!wrapper_data->write_func)
-+ return -EPERM;
-+
-+ usebuffer=kmalloc(count, GFP_KERNEL);
-+ if (!usebuffer)
-+ return -ENOMEM;
-+ if (copy_from_user(usebuffer, buffer, count)) {
-+ printk(KERN_NOTICE "copy from user failed in amd drivers proc code\n");
-+ retval=-EFAULT;
-+ goto out;
-+ }
-+
-+ retval=wrapper_data->write_func(myfile, buffer, count, wrapper_data->data);
-+ *offset+=retval;
-+out:
-+ if (usebuffer)
-+ kfree(usebuffer);
-+ return retval;
-+}
-+static int gentoo_proc_wrapper_open(struct inode *myinode, struct file *myfile) {
-+ myfile->private_data=PDE_DATA(myinode);
-+ return generic_file_open(myinode, myfile);
-+}
-+struct file_operations gentoo_proc_fops = {
-+ .read=gentoo_proc_wrapper_read,
-+ .write=gentoo_proc_wrapper_write,
-+ .open=gentoo_proc_wrapper_open,
-+};
-+
-+static void *gentoo_proc_wrapper_data(read_proc_t *reader, write_proc_t *writer, void *mydata) {
-+ gentoo_proc_wrapper_t *retval=kmalloc(sizeof(gentoo_proc_wrapper_t), GFP_KERNEL);
-+ if (!retval)
-+ return retval;
-+ retval->read_func=reader;
-+ retval->write_func=writer;
-+ retval->data=mydata;
-+ return retval;
-+}
-+
-+static struct proc_dir_entry *firegl_proc_init( device_t *dev,
-+ int minor,
-+ struct proc_dir_entry *root,
-+ struct proc_dir_entry **dev_root,
-+ kcl_proc_list_t *proc_list ) // proc_list must be terminated!
-+{
-+ struct proc_dir_entry *ent;
-+ char name[64];
-+ kcl_proc_list_t *list = proc_list;
-+ void *tempdata;
-+ KCL_DEBUG1(FN_FIREGL_PROC, "minor %d, proc_list 0x%08lx\n", minor, (unsigned long)proc_list);
-+ if (!minor)
-+ {
-+ root = proc_mkdir("ati", NULL);
-+ }
-+
-+ if (!root)
-+ {
-+ KCL_DEBUG_ERROR("Cannot create /proc/ati\n");
-+ return NULL;
-+ }
-+
-+ if (minor == 0)
-+ {
-+ // Global major debice number entry
-+ tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_major_proc_read, NULL, NULL);
-+ if (!tempdata)
-+ return NULL;
-+ ent = proc_create_data("major", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata);
-+ if (!ent)
-+ {
-+ remove_proc_entry("ati", NULL);
-+ KCL_DEBUG_ERROR("Cannot create /proc/ati/major\n");
-+ return NULL;
-+ }
-+ }
-+
-+ sprintf(name, "%d", minor);
-+ *dev_root = proc_mkdir(name, root);
-+ if (!*dev_root) {
-+ remove_proc_entry("major", root);
-+ remove_proc_entry("ati", NULL);
-+ KCL_DEBUG_ERROR("Cannot create /proc/ati/%s\n", name);
-+ return NULL;
-+ }
-+
-+ while (list->f || list->fops)
-+ {
-+ struct file_operations *my_fops = &gentoo_proc_fops;
-+ if (list->fops)
-+ {
-+ my_fops = (struct file_operations*)list->fops;
-+ tempdata=(dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev);
-+ }
-+ else {
-+ BUG_ON(!list->f);
-+ tempdata=gentoo_proc_wrapper_data((read_proc_t*)list->f, NULL, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev) );
-+ if (!tempdata)
-+ return NULL;
-+ }
-+ //printk(KERN_NOTICE "name %s, dev %p, func %p, data %p\n", list->name, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev), list->f, tempdata);
-+ ent = proc_create_data(list->name, S_IFREG|S_IRUGO, *dev_root, my_fops, tempdata);
-+
-+ if (!ent)
-+ {
-+ KCL_DEBUG_ERROR("Cannot create /proc/ati/%s/%s\n", name, list->name);
-+ while (proc_list != list)
-+ {
-+ remove_proc_entry(proc_list->name, *dev_root);
-+ proc_list++;
-+ }
-+ remove_proc_entry(name, root);
-+ if (!minor)
-+ {
-+ remove_proc_entry("major", root);
-+ remove_proc_entry("ati", NULL);
-+ }
-+ return NULL;
-+ }
-+
-+ list++;
-+ }
-+
-+ if (minor == 0)
-+ {
-+ // Global debug entry, only create it once
-+ tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_debug_proc_read_wrap, (write_proc_t*)firegl_debug_proc_write_wrap, dev);
-+ if (!tempdata)
-+ return NULL;
-+ ent=proc_create_data("debug", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata);
-+ if (!ent)
-+ return NULL;
-+ }
-+
-+ return root;
-+}
-+#else
- static struct proc_dir_entry *firegl_proc_init( device_t *dev,
- int minor,
- struct proc_dir_entry *root,
-@@ -677,6 +873,7 @@
-
- return root;
- }
-+#endif
-
- static int firegl_proc_cleanup( int minor,
- struct proc_dir_entry *root,
diff --git a/x11-drivers/ati-drivers/files/switchlibGL b/x11-drivers/ati-drivers/files/switchlibGL
deleted file mode 100644
index a6aa4fce..00000000
--- a/x11-drivers/ati-drivers/files/switchlibGL
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-# switchlibGL
-#
-# Copyright (c) 2011 Advanced Micro Devices, Inc.
-#
-# Purpose:
-# For switch between AMD and Intel graphic driver library.
-#
-# Usage:
-# switchlibGL amd|intel|query
-# amd: switches to the AMD version of libGL.
-# intel: switches to the open-source version of libGL .
-# query: checks, which version is currently active and prints either "amd"
-# or "intel" or "unknown" on the standard output.
-# must be root to execute this script
-
-ARCH=`uname -m`
-E_ERR=1
-
-# Check if root
-if [ "`whoami`" != "root" ]; then
- echo "Must be root to run this script." 1>&2
- exit $E_ERR
-fi
-
-# One parameter
-if [ $# -ne 1 ]; then
- echo "Usage: `basename $0` amd|intel|query " 1>&2
- echo "Please choose one parameter " 1>&2
- exit $E_ERR
-fi
-
-current=$(eselect opengl show)
-# Switch to right mode
-case "$1" in
- "amd" )
- if [ $current != ati ] ; then
- eselect opengl set ati || return 1
- fi
- ;;
- "intel" )
- if [ $current != xorg-x11 ] ; then
- eselect opengl set xorg-x11 || return 1
- fi
- ;;
- "query" )
- case "$current" in
- "ati" )
- echo "amd"
- ;;
- "xorg-x11" )
- echo "intel"
- ;;
- esac
- ;;
- * ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;;
- # other than amd|intel|query parameter report an error
-esac
-
-# A zero return value from the script upon exit indicates success.
-exit 0
diff --git a/x11-drivers/ati-drivers/files/typesafe-kuid.diff b/x11-drivers/ati-drivers/files/typesafe-kuid.diff
deleted file mode 100644
index c226ea3d..00000000
--- a/x11-drivers/ati-drivers/files/typesafe-kuid.diff
+++ /dev/null
@@ -1,34 +0,0 @@
-diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
-index d3ad3ce..9362b58 100755
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -34,6 +34,11 @@
- #include <linux/autoconf.h>
- #endif
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
-+#include <linux/uidgid.h>
-+#endif
-+
-+
- #if !defined(CONFIG_X86)
- #if !defined(CONFIG_X86_PC)
- #if !defined(CONFIG_X86_XEN)
-@@ -1543,9 +1548,17 @@ KCL_TYPE_Pid ATI_API_CALL KCL_GetTgid(void)
- KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void)
- {
- #ifdef current_euid
-+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
-+ return __kuid_val(current_euid());
-+# else
- return current_euid();
-+# endif
- #else
-+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
-+ return __kuid_val(current->euid);
-+# else
- return current->euid;
-+# endif
- #endif
- }
-
diff --git a/x11-drivers/ati-drivers/files/use-kernel_fpu_begin.patch b/x11-drivers/ati-drivers/files/use-kernel_fpu_begin.patch
deleted file mode 100644
index f0ba2785..00000000
--- a/x11-drivers/ati-drivers/files/use-kernel_fpu_begin.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-10-27 23:30:58.630304842 +0200
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-10-27 23:32:57.300306011 +0200
-@@ -6389,7 +6389,7 @@
- */
- void ATI_API_CALL KCL_fpu_begin(void)
- {
--#ifdef CONFIG_X86_64
-+#if defined(CONFIG_X86_64) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
- kernel_fpu_begin();
- #else
- #ifdef TS_USEDFPU