From nobody Fri Oct 24 22:15:43 2025 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 15191348783751010.0875559629753; Tue, 20 Feb 2018 05:54:38 -0800 (PST) Received: from localhost ([::1]:55656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eo8NM-0001jX-He for importer@patchew.org; Tue, 20 Feb 2018 08:54:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eo8Gi-0005Gj-9c for qemu-devel@nongnu.org; Tue, 20 Feb 2018 08:47:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eo8Ge-0006yG-EP for qemu-devel@nongnu.org; Tue, 20 Feb 2018 08:47:40 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:33822 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eo8Ge-0006xI-7y for qemu-devel@nongnu.org; Tue, 20 Feb 2018 08:47:36 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7FC2CEB70A for ; Tue, 20 Feb 2018 13:47:31 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3006A10A9DC5; Tue, 20 Feb 2018 13:47:29 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EAF1717533; Tue, 20 Feb 2018 14:47:23 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 20 Feb 2018 14:47:17 +0100 Message-Id: <20180220134723.11776-7-kraxel@redhat.com> In-Reply-To: <20180220134723.11776-1-kraxel@redhat.com> References: <20180220134723.11776-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 20 Feb 2018 13:47:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 20 Feb 2018 13:47:31 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 06/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 , Gerd Hoffmann , Markus Armbruster 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 Message-id: 20180202111022.19269-8-kraxel@redhat.com 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 4e4d027936..183d9f2913 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -505,6 +505,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 f52bc3b879..38c18ef2e6 100644 --- a/vl.c +++ b/vl.c @@ -2178,6 +2178,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 error_report("egl support is disabled"); exit(1); @@ -4726,7 +4727,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 2efe9675b7..43de75fa27 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1020,7 +1020,7 @@ # ## { 'enum' : 'DisplayType', - 'data' : [ 'none', 'gtk', 'sdl' ] } + 'data' : [ 'none', 'gtk', 'sdl', 'egl-headless' ] } =20 ## # @DisplayOptions: @@ -1043,4 +1043,5 @@ 'discriminator' : 'type', 'data' : { 'none' : 'DisplayNoOpts', 'gtk' : 'DisplayGTK', - 'sdl' : 'DisplayNoOpts' } } + 'sdl' : 'DisplayNoOpts', + 'egl-headless' : 'DisplayNoOpts' } } --=20 2.9.3