[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/29] vmsvga: Handle SVGA_CMD_FRONT_ROP_FILL comman
From: |
Liran Alon |
Subject: |
[Qemu-devel] [PATCH 07/29] vmsvga: Handle SVGA_CMD_FRONT_ROP_FILL command |
Date: |
Thu, 9 Aug 2018 14:46:20 +0300 |
From: Leonid Shatz <address@hidden>
We parse the command structure, but ignore the hint given by command.
Without doing so, command FIFO could get out of sync and cause
vmware-svga device to hang.
>From Linux kernel drivers/gpu/drm/vmwgfx/device_include/svga_reg.h:
/*
* SVGA_CMD_FRONT_ROP_FILL --
*
* This is a hint which tells the SVGA device that the driver has
* just filled a rectangular region of the GFB with a solid
* color. Instead of reading these pixels from the GFB, the device
* can assume that they all equal 'color'. This is primarily used
* for remote desktop protocols.
*
* Availability:
* SVGA_FIFO_CAP_ACCELFRONT
*/
typedef
struct {
uint32 color; /* In the same format as the GFB */
uint32 x;
uint32 y;
uint32 width;
uint32 height;
uint32 rop; /* Must be SVGA_ROP_COPY */
}
SVGAFifoCmdFrontRopFill;
Signed-off-by: Leonid Shatz <address@hidden>
Reviewed-by: Darren Kenny <address@hidden>
Signed-off-by: Liran Alon <address@hidden>
---
hw/display/vmware_vga.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index d3a78809673d..fab6443a87e2 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -693,6 +693,14 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
goto badcmd;
#endif
+ case SVGA_CMD_FRONT_ROP_FILL:
+ len -= 1;
+ if (len < 0) {
+ goto rewind;
+ }
+ args = 6;
+ goto ignoredcmd;
+
/*
* Deprecated commands are neither documented in VMware SVGA
development kit
* nor in Linux kernel vmware-svga driver source code.
@@ -759,7 +767,6 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
*/
case SVGA_CMD_SURFACE_FILL:
case SVGA_CMD_SURFACE_COPY:
- case SVGA_CMD_FRONT_ROP_FILL:
case SVGA_CMD_FENCE:
case SVGA_CMD_INVALID_CMD:
break; /* Nop */
--
1.9.1
- [Qemu-devel] [PATCH 00/29]: vmsvga: Various fixes and enhancements, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 01/29] vmsvga: Stop using redundant fifo pointer variable, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 02/29] vmsvga: Group together commands by their handling, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 03/29] vmsvga: Explictly mark deprecated commands, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 04/29] vmsvga: Do not print error message for ignored commands, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 05/29] vmsvga: Show registers and commands on debug output as decimals, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 06/29] vmsvga: Fix parse of SVGA_CMD_UPDATE_VERBOSE to consider additional opaque cookie, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 07/29] vmsvga: Handle SVGA_CMD_FRONT_ROP_FILL command,
Liran Alon <=
- [Qemu-devel] [PATCH 08/29] vmsvga: Parse SVGA_CMD_FENCE command to avoid FIFO desync, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 09/29] vmsvga: Account for length of command word when parsing commands, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 10/29] vmsvga: Remove treatment of deprecated commands as Nop, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 11/29] vmsvga: Remove handler of SVGA_CMD_INVALID_CMD, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 12/29] vmsvga: Add definitions of FIFO registers and report their number, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 13/29] vmsvga: Add support for extended FIFO registers, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 14/29] vmsvga: Setup interrupt pin, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 15/29] vmsvga: Add interrupt mask and status registers, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 16/29] vmsvga: Add framework code for SVGA command to raise interrupt, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 17/29] vmsvga: Define interrupt source flags for interrupt status and mask registers, Liran Alon, 2018/08/09