File leap153.patch of Package displaylink
diff -ur evdi-0.11.0/module/evdi_connector.c evdi-0.11.0.p/module/evdi_connector.c
--- evdi-0.11.0/module/evdi_connector.c 2022-04-28 09:47:43.000000000 +0200
+++ evdi-0.11.0.p/module/evdi_connector.c 2022-06-04 13:53:10.250138899 +0200
@@ -108,7 +108,7 @@
static struct drm_encoder *evdi_best_encoder(struct drm_connector *connector)
{
-#if KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
struct drm_encoder *encoder;
drm_connector_for_each_possible_encoder(connector, encoder) {
diff -ur evdi-0.11.0/module/evdi_cursor.c evdi-0.11.0.p/module/evdi_cursor.c
--- evdi-0.11.0/module/evdi_cursor.c 2022-04-28 09:47:43.000000000 +0200
+++ evdi-0.11.0.p/module/evdi_cursor.c 2022-06-04 13:53:10.250138899 +0200
@@ -23,7 +23,7 @@
#include <linux/mutex.h>
#include <linux/version.h>
-#if KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
#else
#include <drm/drmP.h>
#endif
@@ -55,7 +55,7 @@
if (obj)
drm_gem_object_get(&obj->base);
if (cursor->obj)
-#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
drm_gem_object_put(&cursor->obj->base);
#else
drm_gem_object_put_unlocked(&cursor->obj->base);
diff -ur evdi-0.11.0/module/evdi_cursor.h evdi-0.11.0.p/module/evdi_cursor.h
--- evdi-0.11.0/module/evdi_cursor.h 2022-04-28 09:47:43.000000000 +0200
+++ evdi-0.11.0.p/module/evdi_cursor.h 2022-06-04 13:53:10.250138899 +0200
@@ -23,7 +23,7 @@
#include <linux/version.h>
#include <linux/module.h>
-#if KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
#else
#include <drm/drmP.h>
#endif
diff -ur evdi-0.11.0/module/evdi_drm_drv.c evdi-0.11.0.p/module/evdi_drm_drv.c
--- evdi-0.11.0/module/evdi_drm_drv.c 2022-04-28 09:47:43.000000000 +0200
+++ evdi-0.11.0.p/module/evdi_drm_drv.c 2022-06-04 13:56:06.998558338 +0200
@@ -17,7 +17,7 @@
#include <drm/drm_file.h>
#include <drm/drm_drv.h>
#include <drm/drm_vblank.h>
-#elif KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#elif KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
#else
#include <drm/drmP.h>
#endif
@@ -89,7 +89,7 @@
#endif
static struct drm_driver driver = {
-#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
#else
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME
@@ -101,8 +101,8 @@
.postclose = evdi_driver_postclose,
/* gem hooks */
-#if KERNEL_VERSION(5, 11, 0) <= LINUX_VERSION_CODE || defined(EL8)
-#elif KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE
+#if KERNEL_VERSION(5, 11, 0) <= LINUX_VERSION_CODE
+#elif KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
.gem_free_object_unlocked = evdi_gem_free_object,
#else
.gem_free_object = evdi_gem_free_object,
diff -ur evdi-0.11.0/module/evdi_drm_drv.h evdi-0.11.0.p/module/evdi_drm_drv.h
--- evdi-0.11.0/module/evdi_drm_drv.h 2022-04-28 09:47:43.000000000 +0200
+++ evdi-0.11.0.p/module/evdi_drm_drv.h 2022-06-04 13:53:10.250138899 +0200
@@ -15,9 +15,9 @@
#include <linux/module.h>
#include <linux/version.h>
-#include <linux/mutex.h>
#include <linux/device.h>
-#if KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8)
+
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
#include <drm/drm_drv.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_ioctl.h>
@@ -34,7 +34,7 @@
#include <drm/drm_crtc_helper.h>
#include <drm/drm_rect.h>
#include <drm/drm_gem.h>
-#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
#include <linux/dma-resv.h>
#else
#include <linux/reservation.h>
@@ -70,7 +70,7 @@
bool vmap_is_iomem;
#endif
struct sg_table *sg;
-#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
struct dma_resv *resv;
struct dma_resv _resv;
#else
diff -ur evdi-0.11.0/module/evdi_encoder.c evdi-0.11.0.p/module/evdi_encoder.c
--- evdi-0.11.0/module/evdi_encoder.c 2022-04-28 09:47:43.000000000 +0200
+++ evdi-0.11.0.p/module/evdi_encoder.c 2022-06-04 13:53:10.250138899 +0200
@@ -12,7 +12,7 @@
*/
#include <linux/version.h>
-#if KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
#else
#include <drm/drmP.h>
#endif
diff -ur evdi-0.11.0/module/evdi_fb.c evdi-0.11.0.p/module/evdi_fb.c
--- evdi-0.11.0/module/evdi_fb.c 2022-04-28 09:47:43.000000000 +0200
+++ evdi-0.11.0.p/module/evdi_fb.c 2022-06-04 13:57:36.788803116 +0200
@@ -17,7 +17,7 @@
#endif /* CONFIG_FB */
#include <linux/dma-buf.h>
#include <linux/version.h>
-#if KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
#else
#include <drm/drmP.h>
#endif
@@ -319,7 +319,7 @@
EVDI_CHECKPT();
if (efb->obj)
-#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
drm_gem_object_put(&efb->obj->base);
#else
drm_gem_object_put_unlocked(&efb->obj->base);
@@ -441,7 +441,7 @@
return ret;
out_gfree:
-#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
drm_gem_object_put(&efbdev->efb.obj->base);
#else
drm_gem_object_put_unlocked(&efbdev->efb.obj->base);
@@ -471,7 +471,7 @@
if (efbdev->efb.obj) {
drm_framebuffer_unregister_private(&efbdev->efb.base);
drm_framebuffer_cleanup(&efbdev->efb.base);
-#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
drm_gem_object_put(&efbdev->efb.obj->base);
#else
drm_gem_object_put_unlocked(&efbdev->efb.obj->base);
@@ -493,7 +493,7 @@
evdi->fbdev = efbdev;
drm_fb_helper_prepare(dev, &efbdev->helper, &evdi_fb_helper_funcs);
-#if KERNEL_VERSION(5, 7, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
ret = drm_fb_helper_init(dev, &efbdev->helper);
#else
ret = drm_fb_helper_init(dev, &efbdev->helper, 1);
@@ -503,7 +503,7 @@
return ret;
}
-#if KERNEL_VERSION(5, 7, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
#else
drm_fb_helper_single_add_all_connectors(&efbdev->helper);
#endif
@@ -541,7 +541,7 @@
struct fb_info *info;
info = efbdev->helper.fbdev;
-#if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
unregister_framebuffer(info);
#else
unlink_framebuffer(info);
diff -ur evdi-0.11.0/module/evdi_gem.c evdi-0.11.0.p/module/evdi_gem.c
--- evdi-0.11.0/module/evdi_gem.c 2022-04-28 09:47:43.000000000 +0200
+++ evdi-0.11.0.p/module/evdi_gem.c 2022-06-04 13:53:10.250138899 +0200
@@ -17,7 +17,7 @@
#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE
#include <drm/drm_prime.h>
#include <drm/drm_file.h>
-#elif KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#elif KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
#else
#include <drm/drmP.h>
#endif
@@ -101,7 +101,7 @@
return NULL;
}
-#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
dma_resv_init(&obj->_resv);
#else
reservation_object_init(&obj->_resv);
@@ -139,7 +139,7 @@
kfree(obj);
return ret;
}
-#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
drm_gem_object_put(&obj->base);
#else
drm_gem_object_put_unlocked(&obj->base);
@@ -373,7 +373,7 @@
if (gem_obj->dev->vma_offset_manager)
drm_gem_free_mmap_offset(gem_obj);
-#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
dma_resv_fini(&obj->_resv);
#else
reservation_object_fini(&obj->_resv);
diff -ur evdi-0.11.0/module/evdi_ioc32.c evdi-0.11.0.p/module/evdi_ioc32.c
--- evdi-0.11.0/module/evdi_ioc32.c 2022-04-28 09:47:43.000000000 +0200
+++ evdi-0.11.0.p/module/evdi_ioc32.c 2022-06-04 13:53:10.250138899 +0200
@@ -24,7 +24,7 @@
#include <linux/version.h>
#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE
#include <drm/drm_ioctl.h>
-#elif KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#elif KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
#else
#include <drm/drmP.h>
#endif
diff -ur evdi-0.11.0/module/evdi_modeset.c evdi-0.11.0.p/module/evdi_modeset.c
--- evdi-0.11.0/module/evdi_modeset.c 2022-04-28 09:47:43.000000000 +0200
+++ evdi-0.11.0.p/module/evdi_modeset.c 2022-06-04 13:53:10.250138899 +0200
@@ -146,7 +146,7 @@
evdi_cursor_set(evdi->cursor,
eobj, width, height, hot_x, hot_y,
format, stride);
-#if KERNEL_VERSION(5, 9, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#if KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
drm_gem_object_put(obj);
#else
drm_gem_object_put_unlocked(obj);
diff -ur evdi-0.11.0/module/evdi_painter.c evdi-0.11.0.p/module/evdi_painter.c
--- evdi-0.11.0/module/evdi_painter.c 2022-04-28 09:47:43.000000000 +0200
+++ evdi-0.11.0.p/module/evdi_painter.c 2022-06-04 13:53:10.250138899 +0200
@@ -14,7 +14,7 @@
#include <drm/drm_file.h>
#include <drm/drm_vblank.h>
#include <drm/drm_ioctl.h>
-#elif KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#elif KERNEL_VERSION(5, 3, 0) <= LINUX_VERSION_CODE || defined(EL8)
#else
#include <drm/drmP.h>
#endif