qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/3] Ui 20210127 patches
@ 2021-01-27 11:01 Gerd Hoffmann
  2021-01-27 11:01 ` [PULL 1/3] Revert "vnc: move initialization to framebuffer_update_request" Gerd Hoffmann
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2021-01-27 11:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

The following changes since commit 9cd69f1a270235b652766f00b94114f48a2d603f:

  Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2021-01-25=
-1' into staging (2021-01-26 09:51:02 +0000)

are available in the Git repository at:

  git://git.kraxel.org/qemu tags/ui-20210127-pull-request

for you to fetch changes up to 15b08119add1e49ccbc7f7d6b3a04932d2430d7e:

  hw/display/vmware_vga: Remove dependency on VNC header (2021-01-27 09:48:04=
 +0100)

----------------------------------------------------------------
vnc: fix gtk-vnc compatibility issues.
vnc: vmware svga cleanup

----------------------------------------------------------------

Gerd Hoffmann (2):
  Revert "vnc: move initialization to framebuffer_update_request"
  vnc: send extended desktop resize on update requests

Peter Maydell (1):
  hw/display/vmware_vga: Remove dependency on VNC header

 hw/display/vmware_vga.c |  3 +--
 ui/vnc.c                | 14 ++++++++++----
 2 files changed, 11 insertions(+), 6 deletions(-)

--=20
2.29.2




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PULL 1/3] Revert "vnc: move initialization to framebuffer_update_request"
  2021-01-27 11:01 [PULL 0/3] Ui 20210127 patches Gerd Hoffmann
@ 2021-01-27 11:01 ` Gerd Hoffmann
  2021-01-27 11:01 ` [PULL 2/3] vnc: send extended desktop resize on update requests Gerd Hoffmann
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2021-01-27 11:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laszlo Ersek, Gerd Hoffmann

This reverts commit 9e1632ad07ca49de99da4bb231e9e2f22f2d8df5.

Older gtk-vnc versions can't deal with non-incremental update
requests sending pseudo-encodings, so trying to send full server
state (including desktop size, cursor etc. which is done using
pseudo-encodings) doesn't fly.  Return to old behavior to send
those only for new connects and when changes happen.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210125104041.495274-2-kraxel@redhat.com>
---
 ui/vnc.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/ui/vnc.c b/ui/vnc.c
index 66f7c1b9361e..2622f82a5a9f 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -687,6 +687,10 @@ static void vnc_desktop_resize(VncState *vs)
                             !vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT))) {
         return;
     }
+    if (vs->client_width == pixman_image_get_width(vs->vd->server) &&
+        vs->client_height == pixman_image_get_height(vs->vd->server)) {
+        return;
+    }
 
     assert(pixman_image_get_width(vs->vd->server) < 65536 &&
            pixman_image_get_width(vs->vd->server) >= 0);
@@ -2042,10 +2046,6 @@ static void framebuffer_update_request(VncState *vs, int incremental,
     } else {
         vs->update = VNC_STATE_UPDATE_FORCE;
         vnc_set_area_dirty(vs->dirty, vs->vd, x, y, w, h);
-        vnc_colordepth(vs);
-        vnc_desktop_resize(vs);
-        vnc_led_state_change(vs);
-        vnc_cursor_define(vs);
     }
 }
 
@@ -2189,7 +2189,10 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
             break;
         }
     }
+    vnc_desktop_resize(vs);
     check_pointer_type_change(&vs->mouse_mode_notifier, NULL);
+    vnc_led_state_change(vs);
+    vnc_cursor_define(vs);
 }
 
 static void set_pixel_conversion(VncState *vs)
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PULL 2/3] vnc: send extended desktop resize on update requests
  2021-01-27 11:01 [PULL 0/3] Ui 20210127 patches Gerd Hoffmann
  2021-01-27 11:01 ` [PULL 1/3] Revert "vnc: move initialization to framebuffer_update_request" Gerd Hoffmann
@ 2021-01-27 11:01 ` Gerd Hoffmann
  2021-01-27 11:01 ` [PULL 3/3] hw/display/vmware_vga: Remove dependency on VNC header Gerd Hoffmann
  2021-01-28 12:30 ` [PULL 0/3] Ui 20210127 patches Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2021-01-27 11:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laszlo Ersek, Gerd Hoffmann

Unlike other pseudo-encodings these don't break gtk-vnc
because older versions don't suport the extended desktop
resize extension in the first place.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210125104041.495274-3-kraxel@redhat.com>
---
 ui/vnc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ui/vnc.c b/ui/vnc.c
index 2622f82a5a9f..16bb3be770b2 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2046,6 +2046,9 @@ static void framebuffer_update_request(VncState *vs, int incremental,
     } else {
         vs->update = VNC_STATE_UPDATE_FORCE;
         vnc_set_area_dirty(vs->dirty, vs->vd, x, y, w, h);
+        if (vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT)) {
+            vnc_desktop_resize_ext(vs, 0);
+        }
     }
 }
 
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PULL 3/3] hw/display/vmware_vga: Remove dependency on VNC header
  2021-01-27 11:01 [PULL 0/3] Ui 20210127 patches Gerd Hoffmann
  2021-01-27 11:01 ` [PULL 1/3] Revert "vnc: move initialization to framebuffer_update_request" Gerd Hoffmann
  2021-01-27 11:01 ` [PULL 2/3] vnc: send extended desktop resize on update requests Gerd Hoffmann
@ 2021-01-27 11:01 ` Gerd Hoffmann
  2021-01-28 12:30 ` [PULL 0/3] Ui 20210127 patches Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2021-01-27 11:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Gerd Hoffmann

From: Peter Maydell <peter.maydell@linaro.org>

In commit 2f487a3d40faff1 we fixed a problem observed with using the
vmware-vga device and the VNC UI frontend in a belt-and-braces
manner:
 * we made the VNC frontend handle non-multiple-of-16 surface widths
 * we rounded up the vmware-vga display width to a multiple of 16

However this introduced a spurious dependency of a device model on a
UI frontend header.  vmware-vga isn't special and should not care
about what UI frontend it is using, and the VNC frontend needs to
handle arbitrary surface widths because other display device models
could use them.  Moreover, even if the maximum width in vmware-vga is
made a multiple of 16, the guest itself can always program a
different width.

Remove the dependency on the VNC header.  Since we have been using
the rounded-up width value since 2014, stick with it rather than
introducing a behaviour change, but don't calculate it by rounding up
to VNC_DIRTY_BITS_PER_PIXEL any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210112161608.16055-1-peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/vmware_vga.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index bef0d7d69a79..e2969a6c81c8 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -29,7 +29,6 @@
 #include "qemu/log.h"
 #include "hw/loader.h"
 #include "trace.h"
-#include "ui/vnc.h"
 #include "hw/pci/pci.h"
 #include "hw/qdev-properties.h"
 #include "migration/vmstate.h"
@@ -220,7 +219,7 @@ enum {
 
 /* These values can probably be changed arbitrarily.  */
 #define SVGA_SCRATCH_SIZE               0x8000
-#define SVGA_MAX_WIDTH                  ROUND_UP(2360, VNC_DIRTY_PIXELS_PER_BIT)
+#define SVGA_MAX_WIDTH                  2368
 #define SVGA_MAX_HEIGHT                 1770
 
 #ifdef VERBOSE
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PULL 0/3] Ui 20210127 patches
  2021-01-27 11:01 [PULL 0/3] Ui 20210127 patches Gerd Hoffmann
                   ` (2 preceding siblings ...)
  2021-01-27 11:01 ` [PULL 3/3] hw/display/vmware_vga: Remove dependency on VNC header Gerd Hoffmann
@ 2021-01-28 12:30 ` Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2021-01-28 12:30 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On Wed, 27 Jan 2021 at 11:06, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> The following changes since commit 9cd69f1a270235b652766f00b94114f48a2d603f:
>
>   Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2021-01-25=
> -1' into staging (2021-01-26 09:51:02 +0000)
>
> are available in the Git repository at:
>
>   git://git.kraxel.org/qemu tags/ui-20210127-pull-request
>
> for you to fetch changes up to 15b08119add1e49ccbc7f7d6b3a04932d2430d7e:
>
>   hw/display/vmware_vga: Remove dependency on VNC header (2021-01-27 09:48:04=
>  +0100)
>
> ----------------------------------------------------------------
> vnc: fix gtk-vnc compatibility issues.
> vnc: vmware svga cleanup
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/6.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-28 12:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 11:01 [PULL 0/3] Ui 20210127 patches Gerd Hoffmann
2021-01-27 11:01 ` [PULL 1/3] Revert "vnc: move initialization to framebuffer_update_request" Gerd Hoffmann
2021-01-27 11:01 ` [PULL 2/3] vnc: send extended desktop resize on update requests Gerd Hoffmann
2021-01-27 11:01 ` [PULL 3/3] hw/display/vmware_vga: Remove dependency on VNC header Gerd Hoffmann
2021-01-28 12:30 ` [PULL 0/3] Ui 20210127 patches Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).