aboutsummaryrefslogtreecommitdiff
path: root/hw/display/vmware_vga.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-01-12 16:16:08 +0000
committerGerd Hoffmann <kraxel@redhat.com>2021-01-27 09:48:04 +0100
commit15b08119add1e49ccbc7f7d6b3a04932d2430d7e (patch)
tree417769dfcfe065c0b824f561f655e25c5a631f5c /hw/display/vmware_vga.c
parent104b8d193248032bb3357ef7f6f2f2dd5824731e (diff)
hw/display/vmware_vga: Remove dependency on VNC header
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>
Diffstat (limited to 'hw/display/vmware_vga.c')
-rw-r--r--hw/display/vmware_vga.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index bef0d7d69a..e2969a6c81 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