~ubuntu-branches/ubuntu/vivid/virtualbox/vivid

« back to all changes in this revision

Viewing changes to debian/patches/37-wheezy-kernel-drm.patch

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2013-03-31 23:25:01 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20130331232501-l72jhvixkeyyz6xc
Tags: 4.2.10-dfsg-0ubuntu1
* Start the virtualbox-guest-x11 init script earlier.
  The vboxvideo module needs to be loaded before X starts.
* Change runlevels of virtualbox-guest-x11 init script on upgrade.
* Fix build failure with the Debian wheezy kernel which backports the drm
  subsystem from Linux 3.4. (Closes: #703358)
* Drop build-dependency on bcc as it's not needed anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Fix build failure with the Debian wheezy kernel which backports the drm subsystem from Linux 3.4.
 
2
Bug-Debian: http://bugs.debian.org/703358
 
3
Author: Felix Geyer <fgeyer@debian.org>
 
4
 
 
5
diff --git a/src/VBox/Additions/linux/drm/vboxvideo_drm.c b/src/VBox/Additions/linux/drm/vboxvideo_drm.c
 
6
--- a/src/VBox/Additions/linux/drm/vboxvideo_drm.c
 
7
+++ b/src/VBox/Additions/linux/drm/vboxvideo_drm.c
 
8
@@ -76,6 +76,12 @@
 
9
 #include "drm/drmP.h"
 
10
 #include "vboxvideo_drm.h"
 
11
 
 
12
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
 
13
+#  ifdef DRM_IOCTL_MODE_GETPLANE
 
14
+#   define DRM_DEBIAN70
 
15
+#  endif
 
16
+# endif
 
17
+
 
18
 static struct pci_device_id pciidlist[] = {
 
19
         vboxvideo_PCI_IDS
 
20
 };
 
21
@@ -88,7 +94,7 @@ int vboxvideo_driver_load(struct drm_device * dev, unsigned long flags)
 
22
     return 0;
 
23
 #endif
 
24
 }
 
25
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63)
 
26
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63) || defined(DRM_DEBIAN70)
 
27
 /* since linux-3.3.0-rc1 drm_driver::fops is pointer */
 
28
 static struct file_operations driver_fops =
 
29
 {
 
30
@@ -114,7 +120,7 @@ static struct drm_driver driver =
 
31
     .get_map_ofs = drm_core_get_map_ofs,
 
32
     .get_reg_ofs = drm_core_get_reg_ofs,
 
33
 #endif
 
34
-# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) && !defined(DRM_RHEL63)
 
35
+# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) && !defined(DRM_RHEL63) && !defined(DRM_DEBIAN70)
 
36
     .fops =
 
37
     {
 
38
         .owner = THIS_MODULE,
 
39
@@ -131,7 +137,7 @@ static struct drm_driver driver =
 
40
         .poll = drm_poll,
 
41
         .fasync = drm_fasync,
 
42
     },
 
43
-#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63) */
 
44
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63) || defined(DRM_DEBIAN70) */
 
45
     .fops = &driver_fops,
 
46
 #endif
 
47
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) && !defined(DRM_RHEL61)