From: Leonid Shatz <leonid.sh...@oracle.com> SVGA_CMD_UPDATE_VERBOSE has one more extra argument to fetch from command fifo, as compared to SVGA_CMD_UPDATE command. From Linux kernel drivers/gpu/drm/vmwgfx/device_include/svga_reg.h: "Just like SVGA_CMD_UPDATE, but also provide a per-rectangle 'reason' value, an opaque cookie which is used by internal debugging tools. Third party drivers should not use this command."
Signed-off-by: Leonid Shatz <leonid.sh...@oracle.com> Reviewed-by: Darren Kenny <darren.ke...@oracle.com> Signed-off-by: Liran Alon <liran.a...@oracle.com> --- hw/display/vmware_vga.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 2fbb9e7f6c9f..d3a78809673d 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -611,8 +611,11 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s) switch (cmd = vmsvga_fifo_read(s)) { /* Implemented commands */ - case SVGA_CMD_UPDATE: case SVGA_CMD_UPDATE_VERBOSE: + /* One extra word: an opaque cookie which is used for debugging */ + len -= 1; + /* fall through */ + case SVGA_CMD_UPDATE: len -= 5; if (len < 0) { goto rewind; @@ -622,6 +625,8 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s) y = vmsvga_fifo_read(s); width = vmsvga_fifo_read(s); height = vmsvga_fifo_read(s); + if (cmd == SVGA_CMD_UPDATE_VERBOSE) + vmsvga_fifo_read(s); vmsvga_update_rect_delayed(s, x, y, width, height); break; -- 1.9.1