public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/kmscon] f43: Fix freeze with vmwgfx driver
@ 2026-09-11 9:04 Jocelyn Falempe
0 siblings, 0 replies; only message in thread
From: Jocelyn Falempe @ 2026-09-11 9:04 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/kmscon
Branch : f43
Commit : 4f70438622a1d052748f36e818262e23a06d90ee
Author : Jocelyn Falempe <jfalempe@redhat.com>
Date : 2026-09-11T10:19:23+02:00
Stats : +94/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/kmscon/c/4f70438622a1d052748f36e818262e23a06d90ee?branch=f43
Log:
Fix freeze with vmwgfx driver
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
---
diff --git a/kmscon.spec b/kmscon.spec
index 47505dd..b779b61 100644
--- a/kmscon.spec
+++ b/kmscon.spec
@@ -30,6 +30,9 @@ BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(xkbcommon) >= 0.5.0
BuildRequires: pkgconfig(zlib)
+# Upstream patch to fix pageflip with vmwgfx
+Patch1: terminal-Fix-error-handling-when-pageflip-failed.patch
+
%description
Kmscon is a simple terminal emulator based on linux kernel mode setting (KMS).
It is an attempt to replace the in-kernel VT implementation with a userspace
diff --git a/terminal-Fix-error-handling-when-pageflip-failed.patch b/terminal-Fix-error-handling-when-pageflip-failed.patch
new file mode 100644
index 0000000..9830cb1
--- /dev/null
+++ b/terminal-Fix-error-handling-when-pageflip-failed.patch
@@ -0,0 +1,91 @@
+From 0e526b59b86484e4db46b38bd20b3af5c1b606f1 Mon Sep 17 00:00:00 2001
+From: Jocelyn Falempe <jfalempe@redhat.com>
+Date: Thu, 3 Sep 2026 12:52:04 +0200
+Subject: [PATCH 1/2] terminal: Fix error handling when pageflip failed.
+
+When a pageflip returns -EBUSY, scr->swapping can stay true, and the
+display is then never refreshed.
+So remove scr->swapping and directly call display_is_swapping().
+
+This caused kmscon to freeze on vmwgfx, as this driver returns -EBUSY
+regularly.
+
+Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
+---
+ src/terminal.c | 18 ++++--------------
+ 1 file changed, 4 insertions(+), 14 deletions(-)
+
+diff --git a/src/terminal.c b/src/terminal.c
+index b6962e7..be8f7b2 100644
+--- a/src/terminal.c
++++ b/src/terminal.c
+@@ -59,7 +59,6 @@ struct screen {
+ struct display *disp;
+ struct kmscon_text *txt;
+
+- bool swapping;
+ bool pending;
+ bool hw_cursor;
+ bool enabled;
+@@ -274,7 +273,7 @@ static void disable_screen(struct screen *scr)
+ int ret;
+
+ log_debug("Disabling screen %s", display_name(scr->disp));
+- if (scr->swapping)
++ if (display_is_swapping(scr->disp))
+ scr->pending = true;
+ else {
+ log_info("Disabling screen %s", display_name(scr->disp));
+@@ -290,7 +289,6 @@ static void disable_screen(struct screen *scr)
+ scr->pending = true;
+ }
+ }
+- scr->swapping = true;
+ }
+ scr->enabled = false;
+ }
+@@ -319,13 +317,8 @@ static void do_redraw_screen(struct screen *scr)
+ kmscon_text_render(scr->txt);
+
+ ret = display_swap(scr->disp);
+- if (ret) {
+- if (ret != -EBUSY)
+- log_warning("cannot swap display [%s] %d", display_name(scr->disp), ret);
+- return;
+- }
+-
+- scr->swapping = true;
++ if (ret && ret != -EBUSY)
++ log_warning("cannot swap display [%s] %d", display_name(scr->disp), ret);
+ }
+
+ static void redraw_screen(struct screen *scr)
+@@ -333,7 +326,7 @@ static void redraw_screen(struct screen *scr)
+ if (!scr->term->awake || !scr->enabled)
+ return;
+
+- if (scr->swapping)
++ if (display_is_swapping(scr->disp))
+ scr->pending = true;
+ else
+ do_redraw_screen(scr);
+@@ -420,8 +413,6 @@ static void redraw_all_text(struct kmscon_terminal *term)
+ shl_dlist_for_each(iter, &term->screens)
+ {
+ scr = shl_dlist_entry(iter, struct screen, list);
+- if (display_is_swapping(scr->disp))
+- scr->swapping = true;
+ redraw_screen(scr);
+ }
+ }
+@@ -430,7 +421,6 @@ static void display_pageflip(void *unused, void *unused2, void *data)
+ {
+ struct screen *scr = data;
+
+- scr->swapping = false;
+ if (scr->pending)
+ do_redraw_screen(scr);
+ }
+--
+2.55.0
+
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 9:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 9:04 [rpms/kmscon] f43: Fix freeze with vmwgfx driver Jocelyn Falempe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox