[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/29] vmsvga: Do not print error message for ignore
From: |
Liran Alon |
Subject: |
[Qemu-devel] [PATCH 04/29] vmsvga: Do not print error message for ignored commands |
Date: |
Thu, 9 Aug 2018 14:46:17 +0300 |
Future patches will add handling of commands that are parsed but
deliberately ignored. This change adds required framework for
avoiding printing parsing error messages for these commands,
when we encounter them in the FIFO.
Reviewed-by: Darren Kenny <address@hidden>
Signed-off-by: Liran Alon <address@hidden>
---
hw/display/vmware_vga.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index a244f43a866f..2e6ac5dfad8a 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -600,11 +600,13 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
int x, y, dx, dy, width, height;
struct vmsvga_cursor_definition_s cursor;
uint32_t cmd_start;
+ bool cmd_ignored;
len = vmsvga_fifo_length(s);
while (len > 0 && --maxloop > 0) {
/* May need to go back to the start of the command if incomplete */
cmd_start = s->fifo_stop;
+ cmd_ignored = false;
switch (cmd = vmsvga_fifo_read(s)) {
@@ -759,6 +761,9 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
default:
args = 0;
+ goto badcmd;
+ ignoredcmd:
+ cmd_ignored = true;
badcmd:
len -= args;
if (len < 0) {
@@ -767,8 +772,10 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
while (args--) {
vmsvga_fifo_read(s);
}
- printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
- __func__, cmd);
+ if (!cmd_ignored) {
+ printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
+ __func__, cmd);
+ }
break;
rewind:
--
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 <=
- [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, 2018/08/09
- [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