diff -Nru evdi-1.9.1/debian/changelog evdi-1.9.1/debian/changelog --- evdi-1.9.1/debian/changelog 2021-06-24 17:29:32.000000000 +0000 +++ evdi-1.9.1/debian/changelog 2021-07-20 14:32:12.000000000 +0000 @@ -1,3 +1,9 @@ +evdi (1.9.1-1ubuntu4~20.04.1) focal; urgency=medium + + * Support USB-less systems (e.g. s390x). (LP: #1932163) + + -- Andrea Righi Tue, 20 Jul 2021 14:32:12 +0000 + evdi (1.9.1-1ubuntu3~20.04.1) focal; urgency=medium * Backport to focal to add support to 5.11 kernels. (LP: #1932163) diff -Nru evdi-1.9.1/debian/patches/0005-evdi-support-usbless-systems.patch evdi-1.9.1/debian/patches/0005-evdi-support-usbless-systems.patch --- evdi-1.9.1/debian/patches/0005-evdi-support-usbless-systems.patch 1970-01-01 00:00:00.000000000 +0000 +++ evdi-1.9.1/debian/patches/0005-evdi-support-usbless-systems.patch 2021-07-20 14:32:12.000000000 +0000 @@ -0,0 +1,99 @@ +From: Andrea Righi +Subject: support USB-less systems +Description: Allow to compile the module also on systems where + CONFIG_USB_SUPPORT is disabled. +Author: Andrea Righi + +diff -urpN evdi-1.9.1.orig/module/evdi_platform_drv.c evdi-1.9.1/module/evdi_platform_drv.c +--- evdi-1.9.1.orig/module/evdi_platform_drv.c 2021-07-20 12:35:10.000000000 +0000 ++++ evdi-1.9.1/module/evdi_platform_drv.c 2021-07-20 14:29:04.230957406 +0000 +@@ -12,7 +12,9 @@ + #include + #include + #include ++#ifdef CONFIG_USB_SUPPORT + #include ++#endif + + #include "evdi_params.h" + #include "evdi_debug.h" +@@ -30,7 +32,9 @@ static struct evdi_platform_drv_context + struct device *root_dev; + unsigned int dev_count; + struct platform_device *devices[EVDI_DEVICE_COUNT_MAX]; ++#ifdef CONFIG_USB_SUPPORT + struct notifier_block usb_notifier; ++#endif + struct mutex lock; + } g_ctx; + +@@ -40,6 +44,7 @@ static struct evdi_platform_drv_context + #define evdi_platform_drv_context_unlock(ctx) \ + mutex_unlock(&ctx->lock) + ++#ifdef CONFIG_USB_SUPPORT + static int evdi_platform_drv_usb(__always_unused struct notifier_block *nb, + unsigned long action, + void *data) +@@ -69,6 +74,7 @@ static int evdi_platform_drv_usb(__alway + } + return 0; + } ++#endif + + static int evdi_platform_drv_get_free_idx(struct evdi_platform_drv_context *ctx) + { +@@ -213,11 +219,15 @@ static int __init evdi_init(void) + + memset(&g_ctx, 0, sizeof(g_ctx)); + g_ctx.root_dev = root_device_register(DRIVER_NAME); ++#ifdef CONFIG_USB_SUPPORT + g_ctx.usb_notifier.notifier_call = evdi_platform_drv_usb; ++#endif + mutex_init(&g_ctx.lock); + dev_set_drvdata(g_ctx.root_dev, &g_ctx); + ++#ifdef CONFIG_USB_SUPPORT + usb_register_notify(&g_ctx.usb_notifier); ++#endif + evdi_sysfs_init(g_ctx.root_dev); + ret = platform_driver_register(&evdi_platform_driver); + if (ret) +@@ -238,7 +248,9 @@ static void __exit evdi_exit(void) + + if (!PTR_ERR_OR_ZERO(g_ctx.root_dev)) { + evdi_sysfs_exit(g_ctx.root_dev); ++#ifdef CONFIG_USB_SUPPORT + usb_unregister_notify(&g_ctx.usb_notifier); ++#endif + dev_set_drvdata(g_ctx.root_dev, NULL); + root_device_unregister(g_ctx.root_dev); + } +diff -urpN evdi-1.9.1.orig/module/evdi_sysfs.c evdi-1.9.1/module/evdi_sysfs.c +--- evdi-1.9.1.orig/module/evdi_sysfs.c 2021-07-20 12:35:10.000000000 +0000 ++++ evdi-1.9.1/module/evdi_sysfs.c 2021-07-20 14:28:45.940957406 +0000 +@@ -51,6 +51,7 @@ struct evdi_usb_addr { + struct usb_device *usb; + }; + ++#ifdef CONFIG_USB_SUPPORT + static int evdi_platform_device_attach(struct device *device, + struct evdi_usb_addr *parent_addr); + +@@ -166,6 +167,16 @@ static int evdi_platform_device_attach(s + return evdi_platform_device_add(device, parent); + } + ++#else /* !CONFIG_USB_SUPPORT */ ++ ++static ssize_t add_device_with_usb_path(struct device *dev, ++ const char *buf, size_t count) ++{ ++ return -EINVAL; ++} ++ ++#endif /* CONFIG_USB_SUPPORT */ ++ + static ssize_t add_store(struct device *dev, + __always_unused struct device_attribute *attr, + const char *buf, size_t count) diff -Nru evdi-1.9.1/debian/patches/series evdi-1.9.1/debian/patches/series --- evdi-1.9.1/debian/patches/series 2021-06-01 10:48:39.000000000 +0000 +++ evdi-1.9.1/debian/patches/series 2021-07-20 14:31:58.000000000 +0000 @@ -2,3 +2,4 @@ 0002-Add-support-for-5.11-and-5.12-kernels.patch 0003-convert-.atomic_update-hooks-to-handle-atomic_state.patch 0004-convert-drm_gem_fb_prepare_fb-to-GEM-atomic-helpers.patch +0005-evdi-support-usbless-systems.patch