DisplayLink / evdi

Extensible Virtual Display Interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DisplayLink/EVDI breaks on Kernel 6.2

SimPilotAdamT opened this issue · comments

  • Are you using the latest driver? yes
  • Are you using the latest EVDI version? yes, as compiled from the devel branch
  • If you are using a DisplayLink device, have you checked 'troubleshooting'
    on DisplayLink's website? yes
  • Is this issue related to evdi/kernel? yes
  • Linux distribution and its version: Arch Linux rolling with all unstable and testing repos enabled
  • Linux kernel version: 6.2.0-arch1-1
  • Xorg version (if used): N/A
  • Desktop environment in use: KDE Plasma

Here are my logs for building the DKMS module of EVDI as compiled from the devel branch, from the AUR.

commented

+1 :)
the build works on 6.1.* kernels, but on 6.2 the same errors...

@SimPilotAdamT @verasminsk I've created a PR for this #401. Hope the devs merge it.

Can you try this patch?

From a90ecd5f0f09e976e4b8784fa16b92804138b1bd Mon Sep 17 00:00:00 2001
From: listout <listout@protonmail.com>
Date: Wed, 22 Feb 2023 13:09:40 +0530
Subject: [PATCH] Original patch was suggested by Crashdummyy.

Since commit 9877d8f6bc374912b08dfe862cddbb78b395a5ef
feild fbdev has been renamed to info in struct drm_fb_helper.

Fixes: https://github.com/DisplayLink/evdi/issues/402
Fixes: https://github.com/DisplayLink/evdi/issues/394
Fixes: https://github.com/DisplayLink/evdi/issues/384
Signed-off-by: listout <listout@protonmail.com>
---
 module/evdi_fb.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/module/evdi_fb.c b/module/evdi_fb.c
index 6b367fe..f5de81f 100644
--- a/module/evdi_fb.c
+++ b/module/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, 2, 0) <= LINUX_VERSION_CODE
+	efbdev->helper.info = info;
+#else
 	efbdev->helper.fbdev = 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, 2, 0) <= LINUX_VERSION_CODE
+	if (efbdev->helper.info) {
+		info = efbdev->helper.info;
+#else
 	if (efbdev->helper.fbdev) {
 		info = efbdev->helper.fbdev;
+#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, 2, 0) <= LINUX_VERSION_CODE
+	if (efbdev->helper.info) {
+		struct fb_info *info;
+
+		info = efbdev->helper.info;
+#else
 	if (efbdev->helper.fbdev) {
 		struct fb_info *info;
 
 		info = efbdev->helper.fbdev;
+#endif
 #if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE || defined(EL8)
 		unregister_framebuffer(info);
 #else
-- 
2.39.2

commented

@listout, thank you, it worked! :)

~$ dkms status
asus-wmi-sensors/202f6c1, 6.2.0-060200-generic, x86_64: installed
evdi/1.12.0, 6.2.0-060200-generic, x86_64: installed
virtualbox/6.1.38, 6.2.0-060200-generic, x86_64: installed

@verasminsk thanks a lot for testing. Glad it worked.

I'm also seeing this on kernel 6.2,

Error! Bad return status for module build on kernel: 6.2.0-arch1-1 (x86_64)
Consult /var/lib/dkms/evdi/1.12.0/build/make.log for more information.

If this was mainlined (see #25), this wouldn't be an issue.

@dylanmtaylor, yeah that's the error message... Have you tried @listout's fix in #401?

Seeing it here, too. Linux kernel v6.2.2, evdi 1.12.0.

The changes in the third comment is present in commit a47ded875c20 made 2023-01-03 (but pushed in March?).

And since that commit was included in release v1.13.0 made a month ago I guess this issue could be closed?

I still have this issue and I don't see a evdi release v1.13.0 on their GitHub page. @hlovdal can you point me to the v1.13.0 release?

@floeschie use the develop branch it doesn't seemed to be released yet

@floeschie there is a v1.13.1 tag if you're looking for a more stable ref.

I'm closing this issue now, the fix has been merged into the dev branch, and there is a stable tag with the fix applied.