From: Alon Levy <alevy@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/4] qxl: interface_get_command: fix reported mode
Date: Sun, 10 Apr 2011 13:26:03 +0300 [thread overview]
Message-ID: <1302431166-17771-2-git-send-email-alevy@redhat.com> (raw)
In-Reply-To: <1302431166-17771-1-git-send-email-alevy@redhat.com>
report correct mode when in undefined mode.
---
hw/qxl.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index fe4212b..63e295b 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -336,6 +336,21 @@ static void interface_get_init_info(QXLInstance *sin, QXLDevInitInfo *info)
info->n_surfaces = NUM_SURFACES;
}
+static const char *qxl_mode_to_string(int mode)
+{
+ switch (mode) {
+ case QXL_MODE_COMPAT:
+ return "compat";
+ case QXL_MODE_NATIVE:
+ return "native";
+ case QXL_MODE_UNDEFINED:
+ return "undefined";
+ case QXL_MODE_VGA:
+ return "vga";
+ }
+ return "unknown";
+}
+
/* called from spice server thread context only */
static int interface_get_command(QXLInstance *sin, struct QXLCommandExt *ext)
{
@@ -358,8 +373,7 @@ static int interface_get_command(QXLInstance *sin, struct QXLCommandExt *ext)
case QXL_MODE_COMPAT:
case QXL_MODE_NATIVE:
case QXL_MODE_UNDEFINED:
- dprint(qxl, 2, "%s: %s\n", __FUNCTION__,
- qxl->cmdflags ? "compat" : "native");
+ dprint(qxl, 2, "%s: %s\n", __FUNCTION__, qxl_mode_to_string(qxl->mode));
ring = &qxl->ram->cmd_ring;
if (SPICE_RING_IS_EMPTY(ring)) {
return false;
--
1.7.4.2
next prev parent reply other threads:[~2011-04-10 10:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-10 10:26 [Qemu-devel] [PATCH 0/4] qxl: debug related fixes Alon Levy
2011-04-10 10:26 ` Alon Levy [this message]
2011-04-10 10:26 ` [Qemu-devel] [PATCH 2/4] qxl: add mode to debugprint on destroy primary Alon Levy
2011-04-10 10:26 ` [Qemu-devel] [PATCH 3/4] qxl: add debug_cs and cmdlog_cs Alon Levy
2011-04-10 10:26 ` [Qemu-devel] [PATCH 4/4] qxl: allow QXL_IO_LOG also in vga Alon Levy
2011-04-10 11:37 ` Brad Hards
2011-04-10 11:48 ` Alon Levy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1302431166-17771-2-git-send-email-alevy@redhat.com \
--to=alevy@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.