From bb02da1371f5300ab8effde385aed1a2ed5efbbc89afc999be76e5f74861d4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 25 Jul 2014 19:03:35 +0000 Subject: [PATCH] Accepting request 242427 from home:a_faerber:branches:Virtualization Backport VNC fixes OBS-URL: https://build.opensuse.org/request/show/242427 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=221 --- ...-fix-full-frame-updates-for-VNC-clie.patch | 33 ++++++++++ 0040-vnc-update-fix.patch | 65 +++++++++++++++++++ qemu-linux-user.changes | 8 +++ qemu-linux-user.spec | 4 ++ qemu.changes | 9 +++ qemu.spec | 4 ++ 6 files changed, 123 insertions(+) create mode 100644 0039-fix-full-frame-updates-for-VNC-clie.patch create mode 100644 0040-vnc-update-fix.patch diff --git a/0039-fix-full-frame-updates-for-VNC-clie.patch b/0039-fix-full-frame-updates-for-VNC-clie.patch new file mode 100644 index 0000000..a3641a7 --- /dev/null +++ b/0039-fix-full-frame-updates-for-VNC-clie.patch @@ -0,0 +1,33 @@ +From 7e160ac64df6af7f53c45d5a3cdb2185a2db5720 Mon Sep 17 00:00:00 2001 +From: Stephan Kulow +Date: Wed, 23 Jul 2014 16:03:14 +0200 +Subject: [PATCH] fix full frame updates for VNC clients +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If the client asks for !incremental frame updates, it has lost its content +so dirty doesn't matter - it has to see the full frame, so setting force_update + +Signed-off-by: Stephan Kulow +Signed-off-by: Gerd Hoffmann +Reviewed-by: Peter Lieven +(cherry picked from commit 07535a890200e640517be0ae04fcff28860ecd37) +[AF: BNC#888142] +Signed-off-by: Andreas Färber +--- + ui/vnc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ui/vnc.c b/ui/vnc.c +index ab03ee3..75dd0a1 100644 +--- a/ui/vnc.c ++++ b/ui/vnc.c +@@ -1887,6 +1887,7 @@ static void framebuffer_update_request(VncState *vs, int incremental, + return; + } + ++ vs->force_update = 1; + vnc_set_area_dirty(vs->dirty, width, height, x, y, w, h); + } + diff --git a/0040-vnc-update-fix.patch b/0040-vnc-update-fix.patch new file mode 100644 index 0000000..f8284e3 --- /dev/null +++ b/0040-vnc-update-fix.patch @@ -0,0 +1,65 @@ +From 6fc52b247a1e6ff8870ea5e826ceab01983b8b90 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Wed, 23 Jul 2014 11:52:02 +0200 +Subject: [PATCH] vnc update fix +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We need to remember has_updates for each vnc client. Otherwise it might +happen that vnc_update_client(has_dirty=1) takes the first exit due to +output buffers not being flushed yet and subsequent calls with +has_dirty=0 take the second exit, wrongly assuming there is nothing to +do because the work defered in the first call is ignored. + +Signed-off-by: Gerd Hoffmann +Reviewed-by: Peter Lieven +(cherry picked from commit 6365828003c8e88bff67d351af4b66c406568a26) +[AF: Relates to BNC#888142] +Signed-off-by: Andreas Färber +--- + ui/vnc.c | 4 +++- + ui/vnc.h | 1 + + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/ui/vnc.c b/ui/vnc.c +index 75dd0a1..48e6591 100644 +--- a/ui/vnc.c ++++ b/ui/vnc.c +@@ -888,6 +888,7 @@ static int find_and_clear_dirty_height(struct VncState *vs, + + static int vnc_update_client(VncState *vs, int has_dirty, bool sync) + { ++ vs->has_dirty += has_dirty; + if (vs->need_update && vs->csock != -1) { + VncDisplay *vd = vs->vd; + VncJob *job; +@@ -899,7 +900,7 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync) + /* kernel send buffers are full -> drop frames to throttle */ + return 0; + +- if (!has_dirty && !vs->audio_cap && !vs->force_update) ++ if (!vs->has_dirty && !vs->audio_cap && !vs->force_update) + return 0; + + /* +@@ -942,6 +943,7 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync) + vnc_jobs_join(vs); + } + vs->force_update = 0; ++ vs->has_dirty = 0; + return n; + } + +diff --git a/ui/vnc.h b/ui/vnc.h +index 8f582fd..334de9d 100644 +--- a/ui/vnc.h ++++ b/ui/vnc.h +@@ -263,6 +263,7 @@ struct VncState + VncDisplay *vd; + int need_update; + int force_update; ++ int has_dirty; + uint32_t features; + int absolute; + int last_x; diff --git a/qemu-linux-user.changes b/qemu-linux-user.changes index 7fb501b..addf2ea 100644 --- a/qemu-linux-user.changes +++ b/qemu-linux-user.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Jul 25 14:44:47 UTC 2014 - afaerber@suse.de + +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.1 +* Patches added: + 0039-fix-full-frame-updates-for-VNC-clie.patch + 0040-vnc-update-fix.patch + ------------------------------------------------------------------- Wed Jul 23 12:36:41 UTC 2014 - afaerber@suse.de diff --git a/qemu-linux-user.spec b/qemu-linux-user.spec index 9c71744..3bb65d5 100644 --- a/qemu-linux-user.spec +++ b/qemu-linux-user.spec @@ -63,6 +63,8 @@ Patch0035: 0035-virtfs-proxy-helper-Provide-__u64-f.patch Patch0036: 0036-configure-Enable-PIE-for-ppc-and-pp.patch Patch0037: 0037-tests-Don-t-run-qom-test-twice.patch Patch0038: 0038-qtest-Increase-socket-timeout.patch +Patch0039: 0039-fix-full-frame-updates-for-VNC-clie.patch +Patch0040: 0040-vnc-update-fix.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy Source300: rpmlintrc @@ -154,6 +156,8 @@ run cross-architecture builds. %patch0036 -p1 %patch0037 -p1 %patch0038 -p1 +%patch0039 -p1 +%patch0040 -p1 %build ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ diff --git a/qemu.changes b/qemu.changes index 2a3f529..624cf95 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jul 25 14:44:43 UTC 2014 - afaerber@suse.de + +- Backported VNC fixes for openQA (bnc#888142): +* Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.1 +* Patches added: + 0039-fix-full-frame-updates-for-VNC-clie.patch + 0040-vnc-update-fix.patch + ------------------------------------------------------------------- Wed Jul 23 12:36:37 UTC 2014 - afaerber@suse.de diff --git a/qemu.spec b/qemu.spec index b49964e..4646efb 100644 --- a/qemu.spec +++ b/qemu.spec @@ -92,6 +92,8 @@ Patch0035: 0035-virtfs-proxy-helper-Provide-__u64-f.patch Patch0036: 0036-configure-Enable-PIE-for-ppc-and-pp.patch Patch0037: 0037-tests-Don-t-run-qom-test-twice.patch Patch0038: 0038-qtest-Increase-socket-timeout.patch +Patch0039: 0039-fix-full-frame-updates-for-VNC-clie.patch +Patch0040: 0040-vnc-update-fix.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy @@ -524,6 +526,8 @@ This package provides a service file for starting and stopping KSM. %patch0036 -p1 %patch0037 -p1 %patch0038 -p1 +%patch0039 -p1 +%patch0040 -p1 %if %{build_x86_fw_from_source} # as a safeguard, delete the firmware files that we intend to build