From patchwork Wed May 18 16:40:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 9121371 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA77CBF29F for ; Wed, 18 May 2016 16:47:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 623412034B for ; Wed, 18 May 2016 16:47:37 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5091F2035E for ; Wed, 18 May 2016 16:47:36 +0000 (UTC) Received: from localhost ([::1]:46084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b34dD-0001mN-5s for patchwork-qemu-devel@patchwork.kernel.org; Wed, 18 May 2016 12:47:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b34Wt-0004WI-29 for qemu-devel@nongnu.org; Wed, 18 May 2016 12:41:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b34Wl-0001lY-Vi for qemu-devel@nongnu.org; Wed, 18 May 2016 12:41:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b34Wl-0001lT-Pj for qemu-devel@nongnu.org; Wed, 18 May 2016 12:40:55 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 581C372D24 for ; Wed, 18 May 2016 16:40:55 +0000 (UTC) Received: from colepc.redhat.com (ovpn-116-31.phx2.redhat.com [10.3.116.31]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4IGeqjc018070; Wed, 18 May 2016 12:40:54 -0400 From: Cole Robinson To: qemu-devel@nongnu.org Date: Wed, 18 May 2016 12:40:51 -0400 Message-Id: <543c98f507a30a92c42f1d240b47ad90f0efdad3.1463588606.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 18 May 2016 16:40:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/3] virtio-gpu: Warn if UI config will disable virgl X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Cole Robinson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Give users a hint if their config is wrong. Signed-off-by: Cole Robinson Reviewed-by: Marc-André Lureau --- 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); }