From nobody Tue Feb 10 07:39:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517584852237474.9595380337056; Fri, 2 Feb 2018 07:20:52 -0800 (PST) Received: from localhost ([::1]:36308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehd91-00071x-F2 for importer@patchew.org; Fri, 02 Feb 2018 10:20:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehcfn-0006XM-Jy for qemu-devel@nongnu.org; Fri, 02 Feb 2018 09:50:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehcfZ-0006pf-CA for qemu-devel@nongnu.org; Fri, 02 Feb 2018 09:50:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42122) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehcfZ-0006pB-1S for qemu-devel@nongnu.org; Fri, 02 Feb 2018 09:50:25 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9A82187624 for ; Fri, 2 Feb 2018 11:10:26 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-227.ams2.redhat.com [10.36.116.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4E55518A5A; Fri, 2 Feb 2018 11:10:26 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 053D342300; Fri, 2 Feb 2018 12:10:23 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 2 Feb 2018 12:10:17 +0100 Message-Id: <20180202111022.19269-8-kraxel@redhat.com> In-Reply-To: <20180202111022.19269-1-kraxel@redhat.com> References: <20180202111022.19269-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 02 Feb 2018 11:10:26 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 07/12] egl-headless: use DisplayOptions 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: Paolo Bonzini , Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Switch egl-headless ui to use qapi DisplayOptions for configuration. Signed-off-by: Gerd Hoffmann Reviewed-by: Eric Blake --- include/ui/console.h | 2 +- ui/egl-headless.c | 2 +- vl.c | 3 ++- qapi/ui.json | 5 +++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index deee5bb606..4cb623112e 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -530,6 +530,6 @@ static inline void early_gtk_display_init(DisplayOption= s *opts) #endif =20 /* egl-headless.c */ -void egl_headless_init(void); +void egl_headless_init(DisplayOptions *opts); =20 #endif diff --git a/ui/egl-headless.c b/ui/egl-headless.c index 5d50226869..38b3766548 100644 --- a/ui/egl-headless.c +++ b/ui/egl-headless.c @@ -154,7 +154,7 @@ static const DisplayChangeListenerOps egl_ops =3D { .dpy_gl_update =3D egl_scanout_flush, }; =20 -void egl_headless_init(void) +void egl_headless_init(DisplayOptions *opts) { QemuConsole *con; egl_dpy *edpy; diff --git a/vl.c b/vl.c index c17dedfa4e..1d801dd96d 100644 --- a/vl.c +++ b/vl.c @@ -2181,6 +2181,7 @@ static LegacyDisplayType select_display(const char *p) request_opengl =3D 1; display_opengl =3D 1; display =3D DT_EGL; + dpy.type =3D DISPLAY_TYPE_EGL_HEADLESS; #else fprintf(stderr, "egl support is disabled\n"); exit(1); @@ -4737,7 +4738,7 @@ int main(int argc, char **argv, char **envp) =20 #ifdef CONFIG_OPENGL_DMABUF if (display_type =3D=3D DT_EGL) { - egl_headless_init(); + egl_headless_init(&dpy); } #endif =20 diff --git a/qapi/ui.json b/qapi/ui.json index 52220ed373..cc489b7856 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1017,7 +1017,7 @@ # ## { 'enum' : 'DisplayType', - 'data' : [ 'none', 'gtk', 'sdl' ] } + 'data' : [ 'none', 'gtk', 'sdl', 'egl-headless' ] } =20 ## # @DisplayOptions: @@ -1040,4 +1040,5 @@ 'discriminator' : 'type', 'data' : { 'none' : 'DisplayNoOpts', 'gtk' : 'DisplayGTK', - 'sdl' : 'DisplayNoOpts' } } + 'sdl' : 'DisplayNoOpts', + 'egl-headless' : 'DisplayNoOpts' } } --=20 2.9.3