54 lines
1.4 KiB
Diff
54 lines
1.4 KiB
Diff
# Original patch was suggested by Crashdummyy.
|
|
#
|
|
# Since commit 9877d8f6bc374912b08dfe862cddbb78b395a5ef in the linux kernel feild
|
|
# fbdev has been renamed to info in struct drm_fb_helper.
|
|
#
|
|
# Reffer: DisplayLink#394
|
|
# Reffer: DisplayLink#384
|
|
--- a/evdi_fb.c
|
|
+++ b/evdi_fb.c
|
|
@@ -405,7 +405,11 @@ static int evdifb_create(struct drm_fb_helper *helper,
|
|
fb = &efbdev->efb.base;
|
|
|
|
efbdev->helper.fb = fb;
|
|
+#if KERNEL_VERSION(6, 1, 12) >= LINUX_VERSION_CODE
|
|
efbdev->helper.fbdev = info;
|
|
+#else
|
|
+ efbdev->helper.info = info;
|
|
+#endif
|
|
|
|
strcpy(info->fix.id, "evdidrmfb");
|
|
|
|
@@ -459,8 +463,13 @@ static void evdi_fbdev_destroy(__always_unused struct drm_device *dev,
|
|
{
|
|
struct fb_info *info;
|
|
|
|
+#if KERNEL_VERSION(6, 1, 12) >= LINUX_VERSION_CODE
|
|
if (efbdev->helper.fbdev) {
|
|
info = efbdev->helper.fbdev;
|
|
+#else
|
|
+ if (efbdev->helper.info) {
|
|
+ info = efbdev->helper.info;
|
|
+#endif
|
|
unregister_framebuffer(info);
|
|
if (info->cmap.len)
|
|
fb_dealloc_cmap(&info->cmap);
|
|
@@ -537,10 +546,17 @@ void evdi_fbdev_unplug(struct drm_device *dev)
|
|
return;
|
|
|
|
efbdev = evdi->fbdev;
|
|
+#if KERNEL_VERSION(6, 1, 12) >= LINUX_VERSION_CODE
|
|
if (efbdev->helper.fbdev) {
|
|
struct fb_info *info;
|
|
|
|
info = efbdev->helper.fbdev;
|
|
+#else
|
|
+ if (efbdev->helper.info) {
|
|
+ struct fb_info *info;
|
|
+
|
|
+ info = efbdev->helper.info;
|
|
+#endif
|
|
#if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE || defined(EL8)
|
|
unregister_framebuffer(info);
|
|
#else
|