diff -Nru evdi-1.9.1/debian/changelog evdi-1.9.1/debian/changelog --- evdi-1.9.1/debian/changelog 2021-04-01 11:24:23.000000000 -0300 +++ evdi-1.9.1/debian/changelog 2021-06-24 14:29:32.000000000 -0300 @@ -1,3 +1,21 @@ +evdi (1.9.1-1ubuntu3~21.04.1) hirsute; urgency=medium + + * Backport to hirsute to add support to 5.13 kernels. (LP: #1932163) + + -- Thadeu Lima de Souza Cascardo Thu, 24 Jun 2021 14:29:32 -0300 + +evdi (1.9.1-1ubuntu3) impish; urgency=medium + + * Fix regression with Linux 5.11 + + -- Paolo Pisati Wed, 16 Jun 2021 08:33:25 +0000 + +evdi (1.9.1-1ubuntu2) impish; urgency=medium + + * Fix build with Linux 5.13 + + -- Paolo Pisati Tue, 01 Jun 2021 10:48:39 +0000 + evdi (1.9.1-1ubuntu1) hirsute; urgency=medium * New upstream release 1.9.1 diff -Nru evdi-1.9.1/debian/patches/0003-convert-.atomic_update-hooks-to-handle-atomic_state.patch evdi-1.9.1/debian/patches/0003-convert-.atomic_update-hooks-to-handle-atomic_state.patch --- evdi-1.9.1/debian/patches/0003-convert-.atomic_update-hooks-to-handle-atomic_state.patch 1969-12-31 21:00:00.000000000 -0300 +++ evdi-1.9.1/debian/patches/0003-convert-.atomic_update-hooks-to-handle-atomic_state.patch 2021-06-16 05:33:25.000000000 -0300 @@ -0,0 +1,63 @@ +From 3c1739da91ec6f68f38a6ac93b302a3dba4cfdc9 Mon Sep 17 00:00:00 2001 +From: Paolo Pisati +Date: Tue, 1 Jun 2021 10:00:26 +0000 +Subject: [PATCH 1/2] convert .atomic_update() hooks to handle atomic_state + +See also, coccinelle upstream conversion: + +commit 977697e20b3d758786b67edc33941e5c410ffe4d +Author: Maxime Ripard +Date: Fri Feb 19 13:00:29 2021 +0100 + + drm/atomic: Pass the full state to planes atomic disable and update + +Signed-off-by: Paolo Pisati + +Origin: vendor, https://bugs.launchpad.net/ubuntu/+source/evdi/+bug/1929189 +--- + module/evdi_modeset.c | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +diff --git a/module/evdi_modeset.c b/module/evdi_modeset.c +index f1d9269..3e61b79 100644 +--- a/module/evdi_modeset.c ++++ b/module/evdi_modeset.c +@@ -203,8 +203,16 @@ static const struct drm_crtc_funcs evdi_crtc_funcs = { + }; + + static void evdi_plane_atomic_update(struct drm_plane *plane, +- struct drm_plane_state *old_state) ++#if KERNEL_VERSION(5, 13, 0) > LINUX_VERSION_CODE ++ struct drm_plane_state *old_state ++#else ++ struct drm_atomic_state *atom_state ++#endif ++ ) + { ++#if KERNEL_VERSION(5, 13, 0) <= LINUX_VERSION_CODE ++ struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(atom_state, plane); ++#endif + struct drm_plane_state *state; + struct evdi_device *evdi; + struct evdi_painter *painter; +@@ -268,8 +276,16 @@ static void evdi_cursor_atomic_get_rect(struct drm_clip_rect *rect, + } + + static void evdi_cursor_atomic_update(struct drm_plane *plane, +- struct drm_plane_state *old_state) ++#if KERNEL_VERSION(5, 13, 0) > LINUX_VERSION_CODE ++ struct drm_plane_state *old_state ++#else ++ struct drm_atomic_state *atom_state ++#endif ++ ) + { ++#if KERNEL_VERSION(5, 13, 0) <= LINUX_VERSION_CODE ++ struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(atom_state, plane); ++#endif + if (plane && plane->state && plane->dev && plane->dev->dev_private) { + struct drm_plane_state *state = plane->state; + struct evdi_device *evdi = plane->dev->dev_private; +-- +2.31.1 + diff -Nru evdi-1.9.1/debian/patches/0004-convert-drm_gem_fb_prepare_fb-to-GEM-atomic-helpers.patch evdi-1.9.1/debian/patches/0004-convert-drm_gem_fb_prepare_fb-to-GEM-atomic-helpers.patch --- evdi-1.9.1/debian/patches/0004-convert-drm_gem_fb_prepare_fb-to-GEM-atomic-helpers.patch 1969-12-31 21:00:00.000000000 -0300 +++ evdi-1.9.1/debian/patches/0004-convert-drm_gem_fb_prepare_fb-to-GEM-atomic-helpers.patch 2021-06-16 05:33:25.000000000 -0300 @@ -0,0 +1,60 @@ +From 45ed6f17dc0dcc6ba5ff18d3cbefcc52e3cf6c13 Mon Sep 17 00:00:00 2001 +From: Paolo Pisati +Date: Tue, 1 Jun 2021 11:01:00 +0000 +Subject: [PATCH 2/2] convert drm_gem_fb_prepare_fb() to GEM atomic helpers + +See also upstream: + +commit 820c1707177c6fe96beed7f8cc842a683afbf890 +Author: Thomas Zimmermann +Date: Mon Feb 22 15:17:56 2021 +0100 + + drm/gem: Move drm_gem_fb_prepare_fb() to GEM atomic helpers + +Signed-off-by: Paolo Pisati + +Origin: vendor, https://bugs.launchpad.net/ubuntu/+source/evdi/+bug/1929189 +--- + module/evdi_modeset.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/module/evdi_modeset.c b/module/evdi_modeset.c +index 3e61b79..d9091a0 100644 +--- a/module/evdi_modeset.c ++++ b/module/evdi_modeset.c +@@ -25,7 +25,11 @@ + #include "evdi_drm_drv.h" + #include "evdi_cursor.h" + #include "evdi_params.h" ++#if KERNEL_VERSION(5, 13, 0) > LINUX_VERSION_CODE + #include ++#else ++#include ++#endif + + static void evdi_crtc_dpms(__always_unused struct drm_crtc *crtc, + __always_unused int mode) +@@ -345,12 +349,20 @@ static void evdi_cursor_atomic_update(struct drm_plane *plane, + + 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 ++ .prepare_fb = drm_gem_plane_helper_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 ++ .prepare_fb = drm_gem_plane_helper_prepare_fb ++#endif + }; + + static const struct drm_plane_funcs evdi_plane_funcs = { +-- +2.31.1 + diff -Nru evdi-1.9.1/debian/patches/series evdi-1.9.1/debian/patches/series --- evdi-1.9.1/debian/patches/series 2021-04-01 11:24:23.000000000 -0300 +++ evdi-1.9.1/debian/patches/series 2021-06-01 07:48:39.000000000 -0300 @@ -1,2 +1,4 @@ 0001-Merge-branch-private-dczerwik-enable-cursor-ioctl-in.patch 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