File Tumbleweed.patch of Package displaylink
diff --git a/README.md b/README.md
index 6288c41..860926f 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ EVDI is usually combined with the DisplayLink driver, we release it as a deb pac
There is an community driven GitHub project at [DisplayLink RPM](https://github.com/displaylink-rpm/displaylink-rpm) which is generating RPM package for Fedora, CentOS Stream, Rocky Linux and AlmaLinux OS. It uses our code as the basis to create the RPM packages.
-There is also an [AUR package](https://aur.archlinux.org/packages/evdi) maintained by the community.
+There is also an [AUR package](https://aur.archlinux.org/packages/evdi-dkms) maintained by the community.
## Contributing
diff --git a/module/Makefile b/module/Makefile
index 5bb0134..a6bdf8e 100644
--- a/module/Makefile
+++ b/module/Makefile
@@ -9,7 +9,7 @@
include /etc/os-release
ifneq (,$(findstring rhel,$(ID_LIKE)))
-ELFLAG := -DEL$(VERSION_ID)
+ELFLAG := -DEL$(shell echo $(VERSION_ID) | cut -d. -f1)
endif
Raspbian := $(shell grep -Eic 'raspb(erry|ian)' /proc/cpuinfo /etc/os-release 2>/dev/null )
diff --git a/module/evdi_connector.c b/module/evdi_connector.c
index 2155507..77e524b 100644
--- a/module/evdi_connector.c
+++ b/module/evdi_connector.c
@@ -78,7 +78,7 @@ static bool is_lowest_frequency_mode_of_given_resolution(
}
static enum drm_mode_status evdi_mode_valid(struct drm_connector *connector,
-#if KERNEL_VERSION(6, 15, 0) <= LINUX_VERSION_CODE
+#if KERNEL_VERSION(6, 15, 0) <= LINUX_VERSION_CODE || defined(EL9) || defined(EL10)
const struct drm_display_mode *mode)
#else
struct drm_display_mode *mode)
diff --git a/module/evdi_drm_drv.c b/module/evdi_drm_drv.c
index dba8b4b..1a42496 100644
--- a/module/evdi_drm_drv.c
+++ b/module/evdi_drm_drv.c
@@ -153,7 +153,7 @@ static struct drm_driver driver = {
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
-#if KERNEL_VERSION(6, 14, 0) <= LINUX_VERSION_CODE
+#if KERNEL_VERSION(6, 14, 0) <= LINUX_VERSION_CODE || defined(EL9) || defined(EL10)
#else
.date = DRIVER_DATE,
#endif
diff --git a/module/evdi_fb.c b/module/evdi_fb.c
index e96ec98..13c70fb 100644
--- a/module/evdi_fb.c
+++ b/module/evdi_fb.c
@@ -471,7 +471,7 @@ int evdifb_create(struct drm_fb_helper *helper,
return ret;
}
-#if KERNEL_VERSION(6, 15, 0) <= LINUX_VERSION_CODE
+#if KERNEL_VERSION(6, 15, 0) <= LINUX_VERSION_CODE || defined(EL9) || defined(EL10)
#else
static struct drm_fb_helper_funcs evdi_fb_helper_funcs = {
.fb_probe = evdifb_create,
@@ -520,7 +520,7 @@ int evdi_fbdev_init(struct drm_device *dev)
return -ENOMEM;
evdi->fbdev = efbdev;
-#if KERNEL_VERSION(6, 15, 0) <= LINUX_VERSION_CODE
+#if KERNEL_VERSION(6, 15, 0) <= LINUX_VERSION_CODE || defined(EL9) || defined(EL10)
drm_fb_helper_prepare(dev, &efbdev->helper, 32, NULL);
#elif KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE || defined(EL8) || defined(EL9)
drm_fb_helper_prepare(dev, &efbdev->helper, 32, &evdi_fb_helper_funcs);
diff --git a/module/evdi_gem.c b/module/evdi_gem.c
index f594d1b..ee1dbcf 100644
--- a/module/evdi_gem.c
+++ b/module/evdi_gem.c
@@ -402,11 +402,9 @@ int evdi_gem_mmap(struct drm_file *file,
struct drm_gem_object *obj;
int ret = 0;
- mutex_lock(&dev->struct_mutex);
obj = drm_gem_object_lookup(file, handle);
if (obj == NULL) {
- ret = -ENOENT;
- goto unlock;
+ return -ENOENT;
}
gobj = to_evdi_bo(obj);
@@ -429,8 +427,6 @@ int evdi_gem_mmap(struct drm_file *file,
out:
drm_gem_object_put(&gobj->base);
- unlock:
- mutex_unlock(&dev->struct_mutex);
return ret;
}
diff --git a/module/evdi_modeset.c b/module/evdi_modeset.c
index cadd791..6674e4b 100644
--- a/module/evdi_modeset.c
+++ b/module/evdi_modeset.c
@@ -134,13 +134,11 @@ static int evdi_crtc_cursor_set(struct drm_crtc *crtc,
EVDI_CHECKPT();
if (handle) {
- mutex_lock(&dev->struct_mutex);
obj = drm_gem_object_lookup(file, handle);
if (obj)
eobj = to_evdi_bo(obj);
else
EVDI_ERROR("Failed to lookup gem object.\n");
- mutex_unlock(&dev->struct_mutex);
}
evdi_cursor_set(evdi->cursor,
@@ -343,8 +341,6 @@ static void evdi_cursor_atomic_update(struct drm_plane *plane,
int32_t cursor_position_x = 0;
int32_t cursor_position_y = 0;
- mutex_lock(&plane->dev->struct_mutex);
-
evdi_cursor_position(evdi->cursor, &cursor_position_x,
&cursor_position_y);
evdi_cursor_move(evdi->cursor, state->crtc_x, state->crtc_y);
@@ -369,7 +365,6 @@ static void evdi_cursor_atomic_update(struct drm_plane *plane,
cursor_changed = true;
}
- mutex_unlock(&plane->dev->struct_mutex);
if (!evdi->cursor_events_enabled) {
if (fb != NULL) {
if (efb->obj->allow_sw_cursor_rect_updates) {
diff --git a/module/evdi_painter.c b/module/evdi_painter.c
index 47e0acd..c5d1251 100644
--- a/module/evdi_painter.c
+++ b/module/evdi_painter.c
@@ -862,7 +862,6 @@ evdi_painter_connect(struct evdi_device *evdi,
{
struct evdi_painter *painter = evdi->painter;
struct edid *new_edid = NULL;
- unsigned int expected_edid_size = 0;
char buf[100];
evdi_log_process(buf, sizeof(buf));
@@ -887,15 +886,6 @@ evdi_painter_connect(struct evdi_device *evdi,
return -EFAULT;
}
- expected_edid_size = sizeof(struct edid) +
- new_edid->extensions * EDID_EXT_BLOCK_SIZE;
- if (expected_edid_size != edid_length) {
- EVDI_ERROR("Wrong edid size. Expected %d but is %d\n",
- expected_edid_size, edid_length);
- kfree(new_edid);
- return -EINVAL;
- }
-
if (painter->drm_filp)
EVDI_WARN("(card%d) Double connect - replacing %p with %p\n",
evdi->dev_index, painter->drm_filp, file);