From nobody Sun Nov 24 12:37:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722440545; cv=none; d=zohomail.com; s=zohoarc; b=DATfC4ZyYXvVXlutwTRrqL9Rv/WKQfrGGBgOZldlcnCjzL36qOJEPyxVDz3+wd936u5/fRYFaoLk+0yW1sONOhBY2bYjjvsMDUvk88nsSqWLjeYZbypP3NMRqJsb885nof8Hr8sdmVXzlbFLQl/iK3+d6exTjx9j1Z6FVwy7CdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722440545; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kZ10jbqGcmWPbSCdFNpYZxcGrhjEM23ozxTz71ZPu1U=; b=gvEjrDgUISfsrgy63Y68CFJ8XnzXA5IQUt+YuswaHx+ixXlUejbKoHIm4Tld5rnHQG7EbW1lSzl8HO1+CJyV4+v0NCckHaPnaLdjXRXoO5wvb7EyzsaaSsN1lSqs84947PfTdf5HnxQeBl7EH2+h+26TWhyU5UHmOhrAvWqJ0JA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722440545394348.9892357523903; Wed, 31 Jul 2024 08:42:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZBSQ-0001qX-W0; Wed, 31 Jul 2024 11:41:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZBSP-0001pY-Sj for qemu-devel@nongnu.org; Wed, 31 Jul 2024 11:41:41 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sZBSN-00056R-Qt for qemu-devel@nongnu.org; Wed, 31 Jul 2024 11:41:41 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4281f00e70cso26739335e9.1 for ; Wed, 31 Jul 2024 08:41:39 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4282bba283fsm25201295e9.46.2024.07.31.08.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jul 2024 08:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722440498; x=1723045298; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kZ10jbqGcmWPbSCdFNpYZxcGrhjEM23ozxTz71ZPu1U=; b=ypuQwVmsIkcGCS40v++HpFFC6BRvdf2eyT4ylkd1dj0EYwBgR8bAjuzs7ITqp8KB6G J9gK5079Gq4vCVufqnNvl+/ctBE3nQZKB50EsgpupM+4iCIOAco36gvkLhPgi3Muaa/S sgi8+eHhTAonXpXcFCu5u18T1Y3XM2emMqghs2tdyL62SCFNmwcRSD6QTxYR3mYP7hSU hOQp88PjOHkyU7LUmfnQDB8enTIidMLRt3ZYY5U5mR7b5WFvW5Tky/22qrbJL/AUQKyJ trBMcCrzwD6hkaeCi1iBA6qVHdVRsQsvJFPjvMi2/BX/DRvO+hegxuCxIeG0VLrzo6o1 NqUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722440498; x=1723045298; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kZ10jbqGcmWPbSCdFNpYZxcGrhjEM23ozxTz71ZPu1U=; b=jf/3dvzdHRFlET/xrIElQyfDMLD1M5tSN2rv4d5PEbneIL1JVYIo+F+/GDkS/+RX+p qkxhviMaG28+D1d40kbMJcH8zgDVdL3t8gz7cfMbudTs7ZsQS1BSYNznefux9NOBwGkY hlmar7Eg2mM6VJxrdLrFk/8NJk1SL9hg38IbomVF3oGSnYxd6dDRsvDD4dJ6w707at0S OcAn+fnIcWtMFIFZyIWmczRJJS1gwUe5RP7DSVBB8xuQmDkzEpTUd6BgvPgN5mVnZ02p /6JXUC0KsbGkyGsDWTJEJkNiw9RY0JqnPTwnREUk6s1g1OEoqjpwZRuE0OXx2yFBOzOj Fk5g== X-Gm-Message-State: AOJu0YwBHkImlEG6/re/Xej7hPKPEweySQ2RUs3ZzKzqGd0buRBRpoLs bhn95zCbMZ3ccsRaLJZR/1fRqKnOGi9XQLWtvZG22CRMS2fHN/XAOHLaSCXhf4Cf9zCizbp7BX4 p X-Google-Smtp-Source: AGHT+IHF2TCyvbBkTlG+hT5aJajNMLdrRz+Kpskcp6h10iWANi/Nt0LyRs2k9ClTXs8QrHgk+LboGA== X-Received: by 2002:a05:600c:a03:b0:427:9db3:46ad with SMTP id 5b1f17b1804b1-42811dd1a29mr91291585e9.23.1722440498129; Wed, 31 Jul 2024 08:41:38 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH 1/3] hw/display/virtio-gpu: Improve "opengl is not available" error message Date: Wed, 31 Jul 2024 16:41:34 +0100 Message-Id: <20240731154136.3494621-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240731154136.3494621-1-peter.maydell@linaro.org> References: <20240731154136.3494621-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722440546929116600 Content-Type: text/plain; charset="utf-8" If the user tries to use the virtio-gpu-gl device but the display backend doesn't have OpenGL support enabled, we currently print a rather uninformative error message: $ qemu-system-aarch64 -M virt -device virtio-gpu-gl qemu-system-aarch64: -device virtio-gpu-gl: opengl is not available Since OpenGL is not enabled on display frontends by default, users are quite likely to run into this. Improve the error message to be more specific and to suggest to the user a path forward. Note that the case of "user tried to enable OpenGL but the display backend doesn't handle it" is caught elsewhere first, so we can assume that isn't the problem: $ qemu-system-aarch64 -M virt -device virtio-gpu-gl -display curses,gl=3Don qemu-system-aarch64: OpenGL is not supported by the display (Use of error_append_hint() requires us to add an ERRP_GUARD() to the function, as noted in include/qapi/error.h.) With this commit we now produce the hopefully more helpful error: $ ./build/x86/qemu-system-aarch64 -M virt -device virtio-gpu-gl qemu-system-aarch64: -device virtio-gpu-gl: The display backend does not ha= ve OpenGL support enabled It can be enabled with '-display BACKEND,gl=3Don' where BACKEND is the name= of the display backend to use. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2443 Signed-off-by: Peter Maydell Acked-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/display/virtio-gpu-gl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c index 952820a4256..49cb61edd23 100644 --- a/hw/display/virtio-gpu-gl.c +++ b/hw/display/virtio-gpu-gl.c @@ -107,6 +107,7 @@ static void virtio_gpu_gl_reset(VirtIODevice *vdev) static void virtio_gpu_gl_device_realize(DeviceState *qdev, Error **errp) { VirtIOGPU *g =3D VIRTIO_GPU(qdev); + ERRP_GUARD(); =20 #if HOST_BIG_ENDIAN error_setg(errp, "virgl is not supported on bigendian platforms"); @@ -119,7 +120,12 @@ static void virtio_gpu_gl_device_realize(DeviceState *= qdev, Error **errp) } =20 if (!display_opengl) { - error_setg(errp, "opengl is not available"); + error_setg(errp, + "The display backend does not have OpenGL support enabl= ed"); + error_append_hint(errp, + "It can be enabled with '-display BACKEND,gl=3Do= n' " + "where BACKEND is the name of the display backen= d " + "to use.\n"); return; } =20 --=20 2.34.1 From nobody Sun Nov 24 12:37:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722440560; cv=none; d=zohomail.com; s=zohoarc; b=fu4NZztJcsXv96iSok8qEQGRfxSxJIIGqSGN2uItVEGubsQxaHdIsGvMC39uKj1SBkoQd1L3PI2+XbylAc+Su2J6SUKSfBCrbkhaI6wV6NQd9AhlZV824GF6kIc//sK5k1b+0hZQoraGTQHfDINZ18bgH9RPXV//rmGwr1f8dig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722440560; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EgQ8hDnd//FyBdrootoUTzW/R8QU7nkSIuMQVQDrypA=; b=XuTv9iyn75seNw7cOZ/vVVVMdd98ftaQwZ5+Kb2eFhz0eJZyeTBAlAJjmJM3MlMmZ/WMRxetu6eb7SBucL7FKcZVKhFfH/nIO/9+jqONdYboWvQigzKhP6eG5b79rJd00kDlOFBBjODjQMukvX01eIkZIjZOVWR9Nc1lc/CdJgw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722440560670816.1010578863938; Wed, 31 Jul 2024 08:42:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZBSS-0001vJ-6g; Wed, 31 Jul 2024 11:41:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZBSQ-0001qY-VP for qemu-devel@nongnu.org; Wed, 31 Jul 2024 11:41:42 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sZBSO-000574-6k for qemu-devel@nongnu.org; Wed, 31 Jul 2024 11:41:42 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4281f00e70cso26739415e9.1 for ; Wed, 31 Jul 2024 08:41:39 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4282bba283fsm25201295e9.46.2024.07.31.08.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jul 2024 08:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722440499; x=1723045299; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EgQ8hDnd//FyBdrootoUTzW/R8QU7nkSIuMQVQDrypA=; b=AVvwR50+/kmhwbEeqMpaKH2pd+PSPF5z/VT9OntQt8GrfH5w5AIaFz125RQJQBpkcQ yCaxdwRSvB/UyA81bBElg0vB6UZwIuMVlqoAAWwvjj4UG3TQHfL3J2+u4fUd3WnuEEgT LEM9b3dVGG4fJNGOCHmUFGOLl9oN/LXCwIvfcS2rJ8Eys8TT7qQZIcuTy2XyPQBzXJew APUu3ur8daXrdfUhF7if55iu7AJNJrouMKecGzYaYaNfwj+/olXpDeTvPO1EYIyyA1q7 fzRxKmU4UBLlvqNZknFDxasm7J3m5bHe+Z6amgUQjv5XcNArsxfS/Rgf6+m2BOqqw4tl gWdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722440499; x=1723045299; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EgQ8hDnd//FyBdrootoUTzW/R8QU7nkSIuMQVQDrypA=; b=m8r5/6lXYDEd7Ini8TqKkl0HYfZgB+GmWT0QFt0CE6locclc2NNZEJHavODWXCi+G5 Vx9RtDqhtwWJHJdIPniBSfxYTgZoW8XitdC6ipRvvepJ5Vqg0zjXxf9JeHDtKYsoM0Sa czexkjmvXLJos+y/XdivIihLt2mWvb5uK5sNoWubY91W0kTFGSRdlB3he3QKbg2lYU0i D1FlcwexYXr6Vwm+X+y7er92Xl1kcr76BBUTpq0mvX/zHKIIuAe8mzt34nx3IwI8XlkL 6S4mIl0f8PNKMLcKHiMFtMGbcF5117cwZPOz9fdpwp48xVdElMtZe8zssUPuaJ/iNQZy UNJQ== X-Gm-Message-State: AOJu0YxzO+o5T7sKCdJ3KJ35YSA4Ufrp2bRWFTMnXSGBX/w+P5V084LF JOjs2voFxUaUn3iY4knnB4JuM/5gOD+yociTiVtLl7bP4mkdy+xrGIjMMZzvRNdaBEjhQ6jrlO2 L X-Google-Smtp-Source: AGHT+IH7dQ9OafYUo2O2yvrE3VcGFSQQ6UhmemrZomlAEWufVXG19XuyPke7fFwSRbc2ZABlWPxGJA== X-Received: by 2002:a05:600c:1d03:b0:426:5cdf:2674 with SMTP id 5b1f17b1804b1-42811d735c9mr94933405e9.4.1722440498715; Wed, 31 Jul 2024 08:41:38 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH 2/3] system/vl.c: Expand OpenGL related errors Date: Wed, 31 Jul 2024 16:41:35 +0100 Message-Id: <20240731154136.3494621-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240731154136.3494621-1-peter.maydell@linaro.org> References: <20240731154136.3494621-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722440560931116600 Content-Type: text/plain; charset="utf-8" Expand the OpenGL related error messages we produce for various "OpenGL not present/not supported" cases, to hopefully guide the user towards how to fix things. Now if the user tries to enable GL on a backend that doesn't support it the error message is a bit more precise: $ qemu-system-aarch64 -M virt -device virtio-gpu-gl -display curses,gl=3Don qemu-system-aarch64: OpenGL is not supported by display backend 'curses' Signed-off-by: Peter Maydell Acked-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Antonio Caggiano Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- system/vl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/vl.c b/system/vl.c index 9e8f16f1551..213ee6a6a92 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1973,9 +1973,10 @@ static void qemu_create_early_backends(void) =20 if (dpy.has_gl && dpy.gl !=3D DISPLAYGL_MODE_OFF && display_opengl =3D= =3D 0) { #if defined(CONFIG_OPENGL) - error_report("OpenGL is not supported by the display"); + error_report("OpenGL is not supported by display backend '%s'", + DisplayType_str(dpy.type)); #else - error_report("OpenGL support is disabled"); + error_report("OpenGL support was disabled when QEMU was compiled"); #endif exit(1); } --=20 2.34.1 From nobody Sun Nov 24 12:37:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722440546; cv=none; d=zohomail.com; s=zohoarc; b=YMCgVWcXZQvbseo/lPDpTaC6l0H2adG/x3HMH/qvjGUoge4+DJPzlivGCoEDTIT4IZYWfdBqsSZQniNVRm4tXYIqv+yVdVFy7URZaVFzedZaBK9g2HcpAFaxKAQhl1sHx29qAf55V4oxmE7ec+njS1qAeZKAy1gYez52Z7bibog= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722440546; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=u0Xf6TSWqP5X6W6Y62S5VXV1XsPi4SWZOscEiUZ5BTE=; b=ixey35YHrPMZ76k83VXmMf0TsvAurdVB5MLtdBo2gdRXPRwi15ujTYdWTArfoMJmb4k8DK/vYgnRk3PcKLBbo8VqpExHmINNodGmKojIYLAfm3Sn/os70E56S/blHbDx03g2WF2AJM7AGXjs01fjF8lIJU1kJQqUl9EvgDAMwgc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722440546105585.4540297611368; Wed, 31 Jul 2024 08:42:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZBSS-0001vY-7X; Wed, 31 Jul 2024 11:41:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZBSR-0001qw-3A for qemu-devel@nongnu.org; Wed, 31 Jul 2024 11:41:43 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sZBSO-00057I-QT for qemu-devel@nongnu.org; Wed, 31 Jul 2024 11:41:42 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-42122ac2f38so6801765e9.1 for ; Wed, 31 Jul 2024 08:41:40 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4282bba283fsm25201295e9.46.2024.07.31.08.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jul 2024 08:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722440499; x=1723045299; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u0Xf6TSWqP5X6W6Y62S5VXV1XsPi4SWZOscEiUZ5BTE=; b=rCsvKL8KITL34sGCMLLy9I7fgUr7XsiIbS8sdULFwQHylF9y4wjTWuRzgevMCOkH2j WnA+cGzQW99FD+10yiSjxK9qKamjGx/z+kv2tTltrpKfpQL7SkAgSwaViOfSWwCEXlkS rq1k/6dQwJIGta0IAjDezg4j+LDky14AXO0kUp0WK9e8dqDRhgYY4+fG/oo5eibMySAe XGt9tO+VMfnTW6kMc7UthGyqXrxZKhcmZuGvBUdICS/h5AEOs0y3q13Y13M9iRcMpl9p msx73MyPEktXbmProoGkv5E94uwbqTzM/u3BwLwvJPPhq4Vc1dy89PghZf9ooVYGMBan f8Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722440499; x=1723045299; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u0Xf6TSWqP5X6W6Y62S5VXV1XsPi4SWZOscEiUZ5BTE=; b=NPOCKN866cZQsWgeI55cy25L2pfyM1C837c1URufAfbkKnwZTtv9DKcbl/s+lRJXUm FWsgzPVvEUkg9I2YR2OrwU2jp1lpVFIa0GKVM1fCG8jjpQrPbYr6tAvaQk+jw21hDnLF 2oH7Lb4IzxUsQGWEs4o1HobUd/9ClezYrlVdYD4GDOttHsN2XDzhs8DggPZx8X3D64yZ gdOV3z+4PFSQ2LND/CmAMl83xIV0n1y7MtL2f0mVpQvlC7lcj+G7RO6NMO7+RlcZK4Kb aQfW0bilJia7ResEDZMeRzMpOmR3/eBX7oCIBFamq+aR/+jZZvq6f4mFM9VE8rCKPbuR Omnw== X-Gm-Message-State: AOJu0Yyj5KNCSYV6Zu9XKsxvW5K0UJnOF0k8yXuaGpiMGaHRfRRZmFNw iVNASaQNaXKLkBWO5vXCws2X02Eg9BnBtnxaU2nofEH38w2S+ziDoMt4dwHbseJLwRM0F9ReJuZ Z X-Google-Smtp-Source: AGHT+IHES1N0FwejfguzXRrIqpr3MkS/Vl0v03PYBY+/Hse5hj+NgShxkAfpJWuDDbLVhXkmvlY29w== X-Received: by 2002:a05:600c:4707:b0:424:7871:2e9e with SMTP id 5b1f17b1804b1-42824400d54mr44598045e9.6.1722440499231; Wed, 31 Jul 2024 08:41:39 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH 3/3] ui/console: Note in '-display help' that some backends support suboptions Date: Wed, 31 Jul 2024 16:41:36 +0100 Message-Id: <20240731154136.3494621-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240731154136.3494621-1-peter.maydell@linaro.org> References: <20240731154136.3494621-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722440546923116600 Content-Type: text/plain; charset="utf-8" Currently '-display help' only prints the available backends. Some of those backends support suboptions (e.g. '-display gtk,gl=3Don'). Mention that in the help output, and point the user to where they might be able to find more information about the suboptions. The new output looks like this: $ qemu-system-aarch64 -display help Available display backend types: none gtk sdl egl-headless curses spice-app dbus Some display backends support suboptions, which can be set with -display backend,option=3Dvalue,option=3Dvalue... For a short list of the suboptions for each display, see the top-level -hel= p output; more detail is in the documentation. Signed-off-by: Peter Maydell Acked-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- The ideal here would be to programmatically list all the suboptions, so you could say '-display gtk,help', but that seems like a lot of work and I'm not entirely sure how to do it :-) --- ui/console.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/console.c b/ui/console.c index e8f0083af71..105a0e2c708 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1632,4 +1632,9 @@ void qemu_display_help(void) printf("%s\n", DisplayType_str(dpys[idx]->type)); } } + printf("\n" + "Some display backends support suboptions, which can be set wit= h\n" + " -display backend,option=3Dvalue,option=3Dvalue...\n" + "For a short list of the suboptions for each display, see the " + "top-level -help output; more detail is in the documentation.\n= "); } --=20 2.34.1