diff -Naur evdi-1.9.1/module/evdi_modeset.c evdi-1.9.1.new/module/evdi_modeset.c --- evdi-1.9.1/module/evdi_modeset.c 2021-07-20 14:26:40.983419676 +0200 +++ evdi-1.9.1.new/module/evdi_modeset.c 2021-07-20 14:26:56.602606461 +0200 @@ -25,10 +25,10 @@ #include "evdi_drm_drv.h" #include "evdi_cursor.h" #include "evdi_params.h" -#if KERNEL_VERSION(5, 13, 0) < LINUX_VERSION_CODE -#include -#else +#if KERNEL_VERSION(5, 13, 0) <= LINUX_VERSION_CODE #include +#else +#include #endif static void evdi_crtc_dpms(__always_unused struct drm_crtc *crtc, @@ -207,15 +207,16 @@ }; static void evdi_plane_atomic_update(struct drm_plane *plane, -#if KERNEL_VERSION(5, 13, 0) < LINUX_VERSION_CODE - struct drm_plane_state *old_state -#else +#if KERNEL_VERSION(5, 13, 0) <= LINUX_VERSION_CODE struct drm_atomic_state *atom_state +#else + struct drm_plane_state *old_state #endif ) { -#if KERNEL_VERSION(5, 13, 0) >= LINUX_VERSION_CODE +#if KERNEL_VERSION(5, 13, 0) <= LINUX_VERSION_CODE struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(atom_state, plane); +#else #endif struct drm_plane_state *state; struct evdi_device *evdi; @@ -280,15 +281,16 @@ } static void evdi_cursor_atomic_update(struct drm_plane *plane, -#if KERNEL_VERSION(5, 13, 0) < LINUX_VERSION_CODE - struct drm_plane_state *old_state -#else +#if KERNEL_VERSION(5, 13, 0) <= LINUX_VERSION_CODE struct drm_atomic_state *atom_state +#else + struct drm_plane_state *old_state #endif ) { -#if KERNEL_VERSION(5, 13, 0) >= LINUX_VERSION_CODE +#if KERNEL_VERSION(5, 13, 0) <= LINUX_VERSION_CODE struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(atom_state, plane); +#else #endif if (plane && plane->state && plane->dev && plane->dev->dev_private) { struct drm_plane_state *state = plane->state; @@ -349,19 +351,19 @@ static const struct drm_plane_helper_funcs evdi_plane_helper_funcs = { .atomic_update = evdi_plane_atomic_update, -#if KERNEL_VERSION(5, 13, 0) < LINUX_VERSION_CODE - .prepare_fb = drm_gem_fb_prepare_fb -#else +#if KERNEL_VERSION(5, 13, 0) <= LINUX_VERSION_CODE .prepare_fb = drm_gem_plane_helper_prepare_fb +#else + .prepare_fb = drm_gem_fb_prepare_fb #endif }; static const struct drm_plane_helper_funcs evdi_cursor_helper_funcs = { .atomic_update = evdi_cursor_atomic_update, -#if KERNEL_VERSION(5, 13, 0) < LINUX_VERSION_CODE - .prepare_fb = drm_gem_fb_prepare_fb -#else +#if KERNEL_VERSION(5, 13, 0) <= LINUX_VERSION_CODE .prepare_fb = drm_gem_plane_helper_prepare_fb +#else + .prepare_fb = drm_gem_fb_prepare_fb #endif };