qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cole Robinson <crobinso@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Cole Robinson" <crobinso@redhat.com>
Subject: [Qemu-devel] [PATCH 3/3] virtio-gpu: Warn if UI config will disable virgl
Date: Wed, 18 May 2016 12:40:51 -0400	[thread overview]
Message-ID: <543c98f507a30a92c42f1d240b47ad90f0efdad3.1463588606.git.crobinso@redhat.com> (raw)
In-Reply-To: <cover.1463588606.git.crobinso@redhat.com>
In-Reply-To: <cover.1463588606.git.crobinso@redhat.com>

Give users a hint if their config is wrong.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
If virgl support is built into qemu, virgl=on is the default, so this
could be noisy in cases where people don't even care about virgl. So
I won't object if this is dropped.

The message also pops up once via make check, probably from
tests/display-vga-test.c , but doesn't cause a failure or anything.

Is there a way to check that user explicitly specified virgl= ?

 hw/display/virtio-gpu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index c181fb3..d3c567f 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -13,6 +13,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
+#include "qemu/error-report.h"
 #include "qemu/iov.h"
 #include "ui/console.h"
 #include "trace.h"
@@ -944,6 +945,10 @@ static void virtio_gpu_device_realize(DeviceState *qdev, Error **errp)
     have_virgl = display_opengl;
 #endif
     if (!have_virgl) {
+        if (virtio_gpu_virgl_enabled(g->conf)) {
+            error_report("Display isn't configured for GL support. "
+                         "Disabling virgl");
+        }
         g->conf.flags &= ~(1 << VIRTIO_GPU_FLAG_VIRGL_ENABLED);
     }
 
-- 
2.7.4

  parent reply	other threads:[~2016-05-18 16:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 16:40 [Qemu-devel] [PATCH 0/3] ui: improve feedback if gl setup fails Cole Robinson
2016-05-18 16:40 ` [Qemu-devel] [PATCH 1/3] ui: egl: Replace fprintf with error_report Cole Robinson
2016-05-18 16:50   ` Eric Blake
2016-05-19 15:19   ` Marc-André Lureau
2016-05-18 16:40 ` [Qemu-devel] [PATCH 2/3] ui: spice: Exit if gl=on EGL init fails Cole Robinson
2016-05-19 15:19   ` Marc-André Lureau
2016-05-18 16:40 ` Cole Robinson [this message]
2016-05-19 15:19   ` [Qemu-devel] [PATCH 3/3] virtio-gpu: Warn if UI config will disable virgl Marc-André Lureau
2016-05-20  5:53   ` Gerd Hoffmann
2016-05-20 14:49     ` Cole Robinson
2016-05-23  7:34       ` Gerd Hoffmann

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=543c98f507a30a92c42f1d240b47ad90f0efdad3.1463588606.git.crobinso@redhat.com \
    --to=crobinso@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).