From nobody Sun Feb 8 22:08:09 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 Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1510914794002937.1746574760879; Fri, 17 Nov 2017 02:33:14 -0800 (PST) Received: from localhost ([::1]:44978 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFdxJ-000221-29 for importer@patchew.org; Fri, 17 Nov 2017 05:33:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFdvB-0000lq-Jp for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:30:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFdvA-0007KO-Ch for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:30:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51880) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eFdvA-0007Jf-6E for qemu-devel@nongnu.org; Fri, 17 Nov 2017 05:30:52 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54057C01F291 for ; Fri, 17 Nov 2017 10:30:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-103.ams2.redhat.com [10.36.116.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id E55948B11F; Fri, 17 Nov 2017 10:30:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9F112409CE; Fri, 17 Nov 2017 11:30:46 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 17 Nov 2017 11:30:30 +0100 Message-Id: <20171117103046.15943-9-kraxel@redhat.com> In-Reply-To: <20171117103046.15943-1-kraxel@redhat.com> References: <20171117103046.15943-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 17 Nov 2017 10:30:51 +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 08/24] 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 --- 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 d461800f13..b5cf02bb46 100644 --- a/vl.c +++ b/vl.c @@ -2214,6 +2214,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); @@ -4845,7 +4846,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 e7d3e8729b..372205c98f 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1009,7 +1009,7 @@ # ## { 'enum' : 'DisplayType', - 'data' : [ 'default', 'none', 'gtk', 'sdl' ] } + 'data' : [ 'default', 'none', 'gtk', 'sdl', 'egl-headless' ] } =20 ## # @DisplayOptions: @@ -1026,4 +1026,5 @@ 'data' : { 'default' : 'DisplayNoOpts', 'none' : 'DisplayNoOpts', 'gtk' : 'DisplayGTK', - 'sdl' : 'DisplayNoOpts' } } + 'sdl' : 'DisplayNoOpts', + 'egl-headless' : 'DisplayNoOpts' } } --=20 2.9.3