qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] virtio-gpu: Warn if UI config will disable


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH 3/3] virtio-gpu: Warn if UI config will disable virgl
Date: Thu, 19 May 2016 17:19:11 +0200

Hi

On Wed, May 18, 2016 at 6:40 PM, Cole Robinson <address@hidden> wrote:
> Give users a hint if their config is wrong.
>
> Signed-off-by: Cole Robinson <address@hidden>
> ---
> 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= ?

Good point, there should be a way by parsing options (but would that
work with monitor created devices?). I don't see anything from
qdev_property_add_static/object_property_set that would differentiate
the default value from explicit value.

>
>  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
>
>

I don't mind the error_report() so,

Reviewed-by: Marc-André Lureau <address@hidden>




-- 
Marc-André Lureau



reply via email to

[Prev in Thread] Current Thread [Next in Thread]