1
0
forked from pool/virtualbox
virtualbox/fixes_for_5.7.patch

37 lines
1.2 KiB
Diff
Raw Normal View History

Index: VirtualBox-6.1.4/src/VBox/Additions/linux/drm/vbox_fb.c
===================================================================
--- VirtualBox-6.1.4.orig/src/VBox/Additions/linux/drm/vbox_fb.c
+++ VirtualBox-6.1.4/src/VBox/Additions/linux/drm/vbox_fb.c
@@ -47,7 +47,6 @@
#include <drm/drm_crtc.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_crtc_helper.h>
-
#include <VBoxVideo.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0) && !defined(RHEL_74)
@@ -431,7 +430,11 @@ int vbox_fbdev_init(struct drm_device *d
drm_fb_helper_prepare(dev, &fbdev->helper, &vbox_fb_helper_funcs);
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) || defined(RHEL_75)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
+ ret = drm_fb_helper_init(dev, &fbdev->helper);
+#else
ret = drm_fb_helper_init(dev, &fbdev->helper, vbox->num_crtcs);
+#endif
#else
ret =
drm_fb_helper_init(dev, &fbdev->helper, vbox->num_crtcs,
@@ -440,7 +443,11 @@ int vbox_fbdev_init(struct drm_device *d
if (ret)
return ret;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
+ ret = 0;
+#else
ret = drm_fb_helper_single_add_all_connectors(&fbdev->helper);
+#endif
if (ret)
goto err_fini;