- Update "fixes_for_4.14.patch" to handle additional API changes in kernel 4.14.
These include the following: removal of gamma_set and gamma_get from struct drm_fb_helper_funcs removal of set_busid from struct drm_driver replacement of drm_pci_init() with pci_register_driver() replacement of drm_pci_exit() with pci_unregister_driver() removal of load_lut from struct drm_crtc_helper_func OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=365
This commit is contained in:
parent
646f6d71d8
commit
76f0fe63c0
@ -1,3 +1,18 @@
|
|||||||
|
Patch VirtualBox source for changes in the kernel API for 4.14.x
|
||||||
|
|
||||||
|
The following issues are addressed:
|
||||||
|
vfs_write() is replaced by kernel_write()
|
||||||
|
symbol SKB_GSO_UDP is removed
|
||||||
|
removal of gamma_set and gamma_get from struct drm_fb_helper_funcs
|
||||||
|
removal of set_busid from struct drm_driver
|
||||||
|
replacement of drm_pci_init() with pci_register_driver()
|
||||||
|
replacement of drm_pci_exit() with pci_unregister_driver()
|
||||||
|
removal of load_lut from struct drm_crtc_helper_func
|
||||||
|
|
||||||
|
This patch is licensed under the MIT license.
|
||||||
|
|
||||||
|
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
|
||||||
|
|
||||||
Index: VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
|
Index: VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- VirtualBox-5.1.28.orig/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
|
--- VirtualBox-5.1.28.orig/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
|
||||||
@ -47,3 +62,89 @@ Index: VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.
|
|||||||
case PDMNETWORKGSOTYPE_IPV6_TCP:
|
case PDMNETWORKGSOTYPE_IPV6_TCP:
|
||||||
fGsoType = SKB_GSO_TCPV6;
|
fGsoType = SKB_GSO_TCPV6;
|
||||||
break;
|
break;
|
||||||
|
Index: VirtualBox-5.1.28/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||||
|
===================================================================
|
||||||
|
--- VirtualBox-5.1.28.orig/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||||
|
+++ VirtualBox-5.1.28/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||||
|
@@ -381,6 +381,7 @@ out:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
|
static void vbox_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
|
||||||
|
u16 blue, int regno)
|
||||||
|
{
|
||||||
|
@@ -394,10 +395,13 @@ static void vbox_fb_gamma_get(struct drm
|
||||||
|
*green = regno;
|
||||||
|
*blue = regno;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
|
.gamma_set = vbox_fb_gamma_set,
|
||||||
|
.gamma_get = vbox_fb_gamma_get,
|
||||||
|
+#endif
|
||||||
|
.fb_probe = vboxfb_create,
|
||||||
|
};
|
||||||
|
|
||||||
|
Index: VirtualBox-5.1.28/src/VBox/Additions/linux/drm/vbox_drv.c
|
||||||
|
===================================================================
|
||||||
|
--- VirtualBox-5.1.28.orig/src/VBox/Additions/linux/drm/vbox_drv.c
|
||||||
|
+++ VirtualBox-5.1.28/src/VBox/Additions/linux/drm/vbox_drv.c
|
||||||
|
@@ -281,7 +281,7 @@ static struct drm_driver driver =
|
||||||
|
.lastclose = vbox_driver_lastclose,
|
||||||
|
.master_set = vbox_master_set,
|
||||||
|
.master_drop = vbox_master_drop,
|
||||||
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_73)
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_73)) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
|
.set_busid = drm_pci_set_busid,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -326,11 +326,19 @@ static int __init vbox_init(void)
|
||||||
|
if (vbox_modeset == 0)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
|
return drm_pci_init(&driver, &vbox_pci_driver);
|
||||||
|
+#else
|
||||||
|
+ return pci_register_driver(&vbox_pci_driver);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
static void __exit vbox_exit(void)
|
||||||
|
{
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
|
drm_pci_exit(&driver, &vbox_pci_driver);
|
||||||
|
+#else
|
||||||
|
+ pci_unregister_driver(&vbox_pci_driver);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(vbox_init);
|
||||||
|
Index: VirtualBox-5.1.28/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||||
|
===================================================================
|
||||||
|
--- VirtualBox-5.1.28.orig/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||||
|
+++ VirtualBox-5.1.28/src/VBox/Additions/linux/drm/vbox_mode.c
|
||||||
|
@@ -152,10 +152,12 @@ static int vbox_set_view(struct drm_crtc
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
|
static void vbox_crtc_load_lut(struct drm_crtc *crtc)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
static void vbox_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||||
|
{
|
||||||
|
@@ -301,7 +303,9 @@ static const struct drm_crtc_helper_func
|
||||||
|
.mode_set = vbox_crtc_mode_set,
|
||||||
|
/* .mode_set_base = vbox_crtc_mode_set_base, */
|
||||||
|
.disable = vbox_crtc_disable,
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
|
.load_lut = vbox_crtc_load_lut,
|
||||||
|
+#endif
|
||||||
|
.prepare = vbox_crtc_prepare,
|
||||||
|
.commit = vbox_crtc_commit,
|
||||||
|
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 24 14:45:02 UTC 2017 - Larry.Finger@lwfinger.net
|
||||||
|
|
||||||
|
- Update "fixes_for_4.14.patch" to handle additional API changes in kernel 4.14.
|
||||||
|
These include the following:
|
||||||
|
removal of gamma_set and gamma_get from struct drm_fb_helper_funcs
|
||||||
|
removal of set_busid from struct drm_driver
|
||||||
|
replacement of drm_pci_init() with pci_register_driver()
|
||||||
|
replacement of drm_pci_exit() with pci_unregister_driver()
|
||||||
|
removal of load_lut from struct drm_crtc_helper_func
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 21 13:49:01 UTC 2017 - Larry.Finger@lwfinger.net
|
Thu Sep 21 13:49:01 UTC 2017 - Larry.Finger@lwfinger.net
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user