diff --git a/displaylink-debian.sh b/displaylink-debian.sh index 6dc5ccf..c915b5a 100755 --- a/displaylink-debian.sh +++ b/displaylink-debian.sh @@ -461,16 +461,6 @@ patchName="displaylink-installer.patch" finalPatchPath="$resourcesDir$patchName" patch -Np0 $driver_dir/displaylink-driver-${version}/displaylink-installer.sh <$finalPatchPath -if [ "$(ver2int $kernel_check)" -ge "$(ver2int 6.0.0)" ]; then - # Patch displaylink-installer.sh to patch a evdi file to support kernel 6.0 & higher - secondPatchName="displaylink-two.patch" - evdiPatchName="evdi.patch" - patch_location="$resourcesDir$evdiPatchName" - sed -i "s|PatchPath|$patch_location|g" "$resourcesDir$secondPatchName" - - patch -Np0 $driver_dir/displaylink-driver-${version}/displaylink-installer.sh <$resourcesDir$secondPatchName -fi - # run displaylink install echo -e "\nInstalling driver version: $version\n" cd $driver_dir/displaylink-driver-${version} diff --git a/resources/displaylink-two.patch b/resources/displaylink-two.patch deleted file mode 100644 index baf677f..0000000 --- a/resources/displaylink-two.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- displaylink-installer.sh -+++ displaylink-installer.sh -@@ -41,6 +41,8 @@ - return 1 - fi - -+ patch -d ${EVDI} -Np0 - #endif - #if KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE || defined(EL9) --#include -+#include - #else - #include - #endif ---- module/evdi_fb.c -+++ 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