diff -uNpar kernel-source-evdi-1.14.1.orig/evdi_drm_drv.c kernel-source-evdi-1.14.1/evdi_drm_drv.c --- kernel-source-evdi-1.14.1.orig/evdi_drm_drv.c 2023-09-05 11:01:57.000000000 +0200 +++ kernel-source-evdi-1.14.1/evdi_drm_drv.c 2023-09-05 11:06:34.459922358 +0200 @@ -12,7 +12,7 @@ */ #include -#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || defined(EL9) +#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) #include #include #include diff -uNpar kernel-source-evdi-1.14.1.orig/evdi_drm_drv.h kernel-source-evdi-1.14.1/evdi_drm_drv.h --- kernel-source-evdi-1.14.1.orig/evdi_drm_drv.h 2023-09-05 11:01:57.000000000 +0200 +++ kernel-source-evdi-1.14.1/evdi_drm_drv.h 2023-09-05 11:08:37.941132063 +0200 @@ -18,7 +18,7 @@ #include #include #include -#if KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8) || defined(EL9) +#if KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8) || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) #include #include #include @@ -26,7 +26,7 @@ #else #include #endif -#if KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE || defined(EL8) || defined(EL9) +#if KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE || defined(EL8) || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) #include #else #include @@ -129,7 +129,7 @@ int evdi_gem_vmap(struct evdi_gem_object void evdi_gem_vunmap(struct evdi_gem_object *obj); int evdi_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); -#if KERNEL_VERSION(4, 17, 0) <= LINUX_VERSION_CODE +#if KERNEL_VERSION(4, 17, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) vm_fault_t evdi_gem_fault(struct vm_fault *vmf); #else int evdi_gem_fault(struct vm_fault *vmf); diff -uNpar kernel-source-evdi-1.14.1.orig/evdi_fb.c kernel-source-evdi-1.14.1/evdi_fb.c --- kernel-source-evdi-1.14.1.orig/evdi_fb.c 2023-09-05 11:01:57.000000000 +0200 +++ kernel-source-evdi-1.14.1/evdi_fb.c 2023-09-05 11:06:34.459922358 +0200 @@ -404,7 +404,7 @@ static int evdifb_create(struct drm_fb_h fb = &efbdev->efb.base; efbdev->helper.fb = fb; -#if KERNEL_VERSION(6, 2, 0) <= LINUX_VERSION_CODE +#if KERNEL_VERSION(6, 2, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) efbdev->helper.info = info; #else efbdev->helper.fbdev = info; @@ -463,7 +463,7 @@ static void evdi_fbdev_destroy(__always_ { struct fb_info *info; -#if KERNEL_VERSION(6, 2, 0) <= LINUX_VERSION_CODE +#if KERNEL_VERSION(6, 2, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) if (efbdev->helper.info) { info = efbdev->helper.info; #else @@ -500,7 +500,7 @@ int evdi_fbdev_init(struct drm_device *d return -ENOMEM; evdi->fbdev = efbdev; -#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE +#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) drm_fb_helper_prepare(dev, &efbdev->helper, 32, &evdi_fb_helper_funcs); #else drm_fb_helper_prepare(dev, &efbdev->helper, &evdi_fb_helper_funcs); @@ -521,7 +521,7 @@ int evdi_fbdev_init(struct drm_device *d drm_fb_helper_single_add_all_connectors(&efbdev->helper); #endif -#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE +#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) ret = drm_fb_helper_initial_config(&efbdev->helper); #else ret = drm_fb_helper_initial_config(&efbdev->helper, 32); @@ -555,7 +555,7 @@ void evdi_fbdev_unplug(struct drm_device return; efbdev = evdi->fbdev; -#if KERNEL_VERSION(6, 2, 0) <= LINUX_VERSION_CODE +#if KERNEL_VERSION(6, 2, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) if (efbdev->helper.info) { struct fb_info *info; diff -uNpar kernel-source-evdi-1.14.1.orig/evdi_gem.c kernel-source-evdi-1.14.1/evdi_gem.c --- kernel-source-evdi-1.14.1.orig/evdi_gem.c 2023-09-05 11:01:57.000000000 +0200 +++ kernel-source-evdi-1.14.1/evdi_gem.c 2023-09-05 11:23:31.448962453 +0200 @@ -10,11 +10,11 @@ #include #include -#if KERNEL_VERSION(5, 18, 0) <= LINUX_VERSION_CODE || defined(EL8) || defined(EL9) +#if KERNEL_VERSION(5, 18, 0) <= LINUX_VERSION_CODE || defined(EL8) || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) #elif KERNEL_VERSION(5, 11, 0) <= LINUX_VERSION_CODE #include #endif -#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || defined(EL9) +#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) #include #include #elif KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8) @@ -27,7 +27,7 @@ #include #include -#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || defined(EL9) +#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) MODULE_IMPORT_NS(DMA_BUF); #endif @@ -193,7 +193,7 @@ int evdi_drm_gem_mmap(struct file *filp, return ret; } -#if KERNEL_VERSION(4, 17, 0) <= LINUX_VERSION_CODE +#if KERNEL_VERSION(4, 17, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) vm_fault_t evdi_gem_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; @@ -289,7 +289,7 @@ int evdi_gem_vmap(struct evdi_gem_object int ret; if (evdi_drm_gem_object_use_import_attach(&obj->base)) { -#if KERNEL_VERSION(5, 18, 0) <= LINUX_VERSION_CODE || defined(EL8) || defined(EL9) +#if KERNEL_VERSION(5, 18, 0) <= LINUX_VERSION_CODE || defined(EL8) || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) struct iosys_map map = IOSYS_MAP_INIT_VADDR(NULL); #elif KERNEL_VERSION(5, 11, 0) <= LINUX_VERSION_CODE || defined(EL8) struct dma_buf_map map = DMA_BUF_MAP_INIT_VADDR(NULL); @@ -322,7 +322,7 @@ int evdi_gem_vmap(struct evdi_gem_object void evdi_gem_vunmap(struct evdi_gem_object *obj) { if (evdi_drm_gem_object_use_import_attach(&obj->base)) { -#if KERNEL_VERSION(5, 18, 0) <= LINUX_VERSION_CODE || defined(EL8) || defined(EL9) +#if KERNEL_VERSION(5, 18, 0) <= LINUX_VERSION_CODE || defined(EL8) || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) struct iosys_map map = IOSYS_MAP_INIT_VADDR(NULL); if (obj->vmap_is_iomem) diff -uNpar kernel-source-evdi-1.14.1.orig/evdi_ioc32.c kernel-source-evdi-1.14.1/evdi_ioc32.c --- kernel-source-evdi-1.14.1.orig/evdi_ioc32.c 2023-09-05 11:01:57.000000000 +0200 +++ kernel-source-evdi-1.14.1/evdi_ioc32.c 2023-09-05 11:06:34.459922358 +0200 @@ -22,7 +22,7 @@ #include #include -#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || defined(EL9) +#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) #include #elif KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE || defined(EL8) #else diff -uNpar kernel-source-evdi-1.14.1.orig/evdi_modeset.c kernel-source-evdi-1.14.1/evdi_modeset.c --- kernel-source-evdi-1.14.1.orig/evdi_modeset.c 2023-09-05 11:01:57.000000000 +0200 +++ kernel-source-evdi-1.14.1/evdi_modeset.c 2023-09-05 11:06:34.459922358 +0200 @@ -12,7 +12,7 @@ */ #include -#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || defined(EL9) +#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) #include #include #elif KERNEL_VERSION(5, 0, 0) <= LINUX_VERSION_CODE || defined(EL8) diff -uNpar kernel-source-evdi-1.14.1.orig/evdi_painter.c kernel-source-evdi-1.14.1/evdi_painter.c --- kernel-source-evdi-1.14.1.orig/evdi_painter.c 2023-09-05 11:01:57.000000000 +0200 +++ kernel-source-evdi-1.14.1/evdi_painter.c 2023-09-05 11:06:34.459922358 +0200 @@ -10,7 +10,7 @@ #include "linux/thread_info.h" #include "linux/mm.h" #include -#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || defined(EL9) +#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) #include #include #include @@ -31,7 +31,7 @@ #include -#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || defined(EL9) +#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE || (RHEL_RELEASE_VERSION(9, 0) <= RHEL_RELEASE_CODE) MODULE_IMPORT_NS(DMA_BUF); #endif