mga-vid module fails to build on kernels >=3.4
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mga-vid (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Relevant version information:
mga-vid: 2.6.32-1
Kernel: 3.12.0-7-generic #15-Ubuntu SMP
It is not possible to build the mga-vid module on kernels >= 3.4.
In kernel 3.4, asm/system.h was removed; this file is referred to by mga_vid.c and its absence causes the compilation to fail.
Further, in kernel 3.7, VM_RESERVED was removed; this symbol is also referred to by mga_vid.c and its absence causes the compilation to fail.
This compilation failure will occur on all versions of Ubuntu which use kernels >= 3.4 by default, ie. everything from quantal onwards.
To reproduce the bug, install mga-vid-source and execute "sudo m-a a-i mga-vid" on a system running a kernel >=3.4 (>=3.7 to see both failures).
Below is a patch which resolves the problem. With this patch, the compilation succeeds; mga_vid_test produces the expected results; mplayer works fine; and I am getting 288fps from glxgears on a G450 with 16MB RAM.
--- modules/
+++ modules/
@@ -52,6 +52,16 @@
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
+/*
+ * VM_RESERVED is not in kernels >= 3.7
+ * Bug fix cribbed from:
+ * http://
+ * https:/
+ *
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
+#define VM_RESERVED (VM_IO | VM_DONTEXPAND | VM_DONTDUMP)
+#endif
#include <linux/string.h>
#include <linux/errno.h>
@@ -70,7 +80,15 @@
#endif
#include <asm/uaccess.h>
+/*
+ * asm/system.h is not in kernels >= 3.4
+ * Bug fix cribbed from:
+ * https:/
+ *
+ */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
#include <asm/system.h>
+#endif
#include <asm/io.h>
#ifndef PCI_DEVICE_
The attachment "Patch to fix mga-vid module compilation failure on kernels >= 3.4" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]