From nobody Fri Oct 24 21:59: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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520240174210821.7899533404582; Mon, 5 Mar 2018 00:56:14 -0800 (PST) Received: from localhost ([::1]:47921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslun-00020P-BT for importer@patchew.org; Mon, 05 Mar 2018 03:56:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnm-0003qq-Hb for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:49:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003aW-BZ for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39012 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 1eslnj-0003Z2-3I for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE76340363B6 for ; Mon, 5 Mar 2018 08:48:49 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35AFD202699C; Mon, 5 Mar 2018 08:48:45 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 80A4517514; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:32 +0100 Message-Id: <20180305084844.18222-2-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 05 Mar 2018 08:48:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 05 Mar 2018 08:48:49 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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 01/13] console: add qemu display registry, add gtk 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 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" Add a registry for user interfaces. Add qemu_display_init and qemu_display_early_init helper functions for display initialization. Hook up gtk ui as first user. Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-2-kraxel@redhat.com --- include/ui/console.h | 32 ++++++++++++-------------------- ui/console.c | 34 ++++++++++++++++++++++++++++++++++ ui/gtk.c | 17 +++++++++++++++-- vl.c | 18 ++++++------------ 4 files changed, 67 insertions(+), 34 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index f29bacd625..817f9b9bcc 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -432,6 +432,18 @@ void surface_gl_setup_viewport(QemuGLShader *gls, int ww, int wh); #endif =20 +typedef struct QemuDisplay QemuDisplay; + +struct QemuDisplay { + DisplayType type; + void (*early_init)(DisplayOptions *opts); + void (*init)(DisplayState *ds, DisplayOptions *opts); +}; + +void qemu_display_register(QemuDisplay *ui); +void qemu_display_early_init(DisplayOptions *opts); +void qemu_display_init(DisplayState *ds, DisplayOptions *opts); + /* sdl.c */ #ifdef CONFIG_SDL void sdl_display_early_init(DisplayOptions *opts); @@ -487,26 +499,6 @@ static inline void curses_display_init(DisplayState *d= s, DisplayOptions *opts) /* input.c */ int index_from_key(const char *key, size_t key_length); =20 -/* gtk.c */ -#ifdef CONFIG_GTK -void early_gtk_display_init(DisplayOptions *opts); -void gtk_display_init(DisplayState *ds, DisplayOptions *opts); -#else -static inline void gtk_display_init(DisplayState *ds, DisplayOptions *opts) -{ - /* This must never be called if CONFIG_GTK is disabled */ - error_report("GTK support is disabled"); - abort(); -} - -static inline void early_gtk_display_init(DisplayOptions *opts) -{ - /* This must never be called if CONFIG_GTK is disabled */ - error_report("GTK support is disabled"); - abort(); -} -#endif - /* egl-headless.c */ void egl_headless_init(DisplayOptions *opts); =20 diff --git a/ui/console.c b/ui/console.c index e22931a396..a11b120fc8 100644 --- a/ui/console.c +++ b/ui/console.c @@ -2180,6 +2180,40 @@ PixelFormat qemu_default_pixelformat(int bpp) return pf; } =20 +static QemuDisplay *dpys[DISPLAY_TYPE__MAX]; + +void qemu_display_register(QemuDisplay *ui) +{ + assert(ui->type < DISPLAY_TYPE__MAX); + dpys[ui->type] =3D ui; +} + +void qemu_display_early_init(DisplayOptions *opts) +{ + assert(opts->type < DISPLAY_TYPE__MAX); + if (opts->type =3D=3D DISPLAY_TYPE_NONE) { + return; + } + if (dpys[opts->type] =3D=3D NULL) { + error_report("Display '%s' is not available.", + DisplayType_lookup.array[opts->type]); + exit(1); + } + if (dpys[opts->type]->early_init) { + dpys[opts->type]->early_init(opts); + } +} + +void qemu_display_init(DisplayState *ds, DisplayOptions *opts) +{ + assert(opts->type < DISPLAY_TYPE__MAX); + if (opts->type =3D=3D DISPLAY_TYPE_NONE) { + return; + } + assert(dpys[opts->type] !=3D NULL); + dpys[opts->type]->init(ds, opts); +} + void qemu_chr_parse_vc(QemuOpts *opts, ChardevBackend *backend, Error **er= rp) { int val; diff --git a/ui/gtk.c b/ui/gtk.c index ab646b70e1..c63408e036 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2297,7 +2297,7 @@ static void gd_create_menus(GtkDisplayState *s) =20 static gboolean gtkinit; =20 -void gtk_display_init(DisplayState *ds, DisplayOptions *opts) +static void gtk_display_init(DisplayState *ds, DisplayOptions *opts) { VirtualConsole *vc; =20 @@ -2407,7 +2407,7 @@ void gtk_display_init(DisplayState *ds, DisplayOption= s *opts) } } =20 -void early_gtk_display_init(DisplayOptions *opts) +static void early_gtk_display_init(DisplayOptions *opts) { /* The QEMU code relies on the assumption that it's always run in * the C locale. Therefore it is not prepared to deal with @@ -2450,3 +2450,16 @@ void early_gtk_display_init(DisplayOptions *opts) type_register(&char_gd_vc_type_info); #endif } + +static QemuDisplay qemu_display_gtk =3D { + .type =3D DISPLAY_TYPE_GTK, + .early_init =3D early_gtk_display_init, + .init =3D gtk_display_init, +}; + +static void register_gtk(void) +{ + qemu_display_register(&qemu_display_gtk); +} + +type_init(register_gtk); diff --git a/vl.c b/vl.c index a33ac008fb..a84b1372b8 100644 --- a/vl.c +++ b/vl.c @@ -2180,7 +2180,6 @@ static void parse_display(const char *p) exit(1); #endif } else if (strstart(p, "gtk", &opts)) { -#ifdef CONFIG_GTK dpy.type =3D DISPLAY_TYPE_GTK; while (*opts) { const char *nextopt; @@ -2212,10 +2211,6 @@ static void parse_display(const char *p) } opts =3D nextopt; } -#else - error_report("GTK support is disabled"); - exit(1); -#endif } else if (strstart(p, "none", &opts)) { dpy.type =3D DISPLAY_TYPE_NONE; } else { @@ -4331,6 +4326,9 @@ int main(int argc, char **argv, char **envp) dpy.type =3D DISPLAY_TYPE_NONE; #endif } + if (dpy.type =3D=3D DISPLAY_TYPE_DEFAULT) { + dpy.type =3D DISPLAY_TYPE_NONE; + } =20 if ((no_frame || alt_grab || ctrl_grab) && dpy.type !=3D DISPLAY_TYPE_= SDL) { error_report("-no-frame, -alt-grab and -ctrl-grab are only valid " @@ -4342,12 +4340,10 @@ int main(int argc, char **argv, char **envp) "ignoring option"); } =20 - if (dpy.type =3D=3D DISPLAY_TYPE_GTK) { - early_gtk_display_init(&dpy); - } - if (dpy.type =3D=3D DISPLAY_TYPE_SDL) { sdl_display_early_init(&dpy); + } else { + qemu_display_early_init(&dpy); } =20 qemu_console_early_init(); @@ -4687,10 +4683,8 @@ int main(int argc, char **argv, char **envp) case DISPLAY_TYPE_COCOA: cocoa_display_init(ds, &dpy); break; - case DISPLAY_TYPE_GTK: - gtk_display_init(ds, &dpy); - break; default: + qemu_display_init(ds, &dpy); break; } =20 --=20 2.9.3 From nobody Fri Oct 24 21:59: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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520240036662815.0155965150175; Mon, 5 Mar 2018 00:53:56 -0800 (PST) Received: from localhost ([::1]:47898 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslsZ-0007w5-Qt for importer@patchew.org; Mon, 05 Mar 2018 03:53:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnm-0003qv-IF for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:49:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003ah-AL for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36727 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 1eslnj-0003Z4-3V for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B5AE08182D0C for ; Mon, 5 Mar 2018 08:48:49 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35FB32166BB2; Mon, 5 Mar 2018 08:48:45 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8C0611751D; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:33 +0100 Message-Id: <20180305084844.18222-3-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 05 Mar 2018 08:48:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 05 Mar 2018 08:48:49 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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 02/13] sdl: switch over to new display registry 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 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" Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-3-kraxel@redhat.com --- include/ui/console.h | 19 ------------------- ui/sdl.c | 24 +++++++++++++----------- ui/sdl2.c | 17 +++++++++++++++-- vl.c | 15 +-------------- 4 files changed, 29 insertions(+), 46 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 817f9b9bcc..cb86e6a0dd 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -444,25 +444,6 @@ void qemu_display_register(QemuDisplay *ui); void qemu_display_early_init(DisplayOptions *opts); void qemu_display_init(DisplayState *ds, DisplayOptions *opts); =20 -/* sdl.c */ -#ifdef CONFIG_SDL -void sdl_display_early_init(DisplayOptions *opts); -void sdl_display_init(DisplayState *ds, DisplayOptions *opts); -#else -static inline void sdl_display_early_init(DisplayOptions *opts) -{ - /* This must never be called if CONFIG_SDL is disabled */ - error_report("SDL support is disabled"); - abort(); -} -static inline void sdl_display_init(DisplayState *ds, DisplayOptions *opts) -{ - /* This must never be called if CONFIG_SDL is disabled */ - error_report("SDL support is disabled"); - abort(); -} -#endif - /* cocoa.m */ #ifdef CONFIG_COCOA void cocoa_display_init(DisplayState *ds, DisplayOptions *opts); diff --git a/ui/sdl.c b/ui/sdl.c index c4ae7ab05d..a5fd503c25 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -901,17 +901,7 @@ static const DisplayChangeListenerOps dcl_ops =3D { .dpy_cursor_define =3D sdl_mouse_define, }; =20 -void sdl_display_early_init(DisplayOptions *opts) -{ - if (opts->has_gl && opts->gl) { - fprintf(stderr, - "SDL1 display code has no opengl support.\n" - "Please recompile qemu with SDL2, using\n" - "./configure --enable-sdl --with-sdlabi=3D2.0\n"); - } -} - -void sdl_display_init(DisplayState *ds, DisplayOptions *o) +static void sdl1_display_init(DisplayState *ds, DisplayOptions *o) { int flags; uint8_t data =3D 0; @@ -1023,3 +1013,15 @@ void sdl_display_init(DisplayState *ds, DisplayOptio= ns *o) =20 atexit(sdl_cleanup); } + +static QemuDisplay qemu_display_sdl1 =3D { + .type =3D DISPLAY_TYPE_SDL, + .init =3D sdl1_display_init, +}; + +static void register_sdl1(void) +{ + qemu_display_register(&qemu_display_sdl1); +} + +type_init(register_sdl1); diff --git a/ui/sdl2.c b/ui/sdl2.c index b5a0fa1d13..83b917fa37 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -751,7 +751,7 @@ static const DisplayChangeListenerOps dcl_gl_ops =3D { }; #endif =20 -void sdl_display_early_init(DisplayOptions *o) +static void sdl2_display_early_init(DisplayOptions *o) { assert(o->type =3D=3D DISPLAY_TYPE_SDL); if (o->has_gl && o->gl) { @@ -761,7 +761,7 @@ void sdl_display_early_init(DisplayOptions *o) } } =20 -void sdl_display_init(DisplayState *ds, DisplayOptions *o) +static void sdl2_display_init(DisplayState *ds, DisplayOptions *o) { int flags; uint8_t data =3D 0; @@ -861,3 +861,16 @@ void sdl_display_init(DisplayState *ds, DisplayOptions= *o) =20 atexit(sdl_cleanup); } + +static QemuDisplay qemu_display_sdl2 =3D { + .type =3D DISPLAY_TYPE_SDL, + .early_init =3D sdl2_display_early_init, + .init =3D sdl2_display_init, +}; + +static void register_sdl1(void) +{ + qemu_display_register(&qemu_display_sdl2); +} + +type_init(register_sdl1); diff --git a/vl.c b/vl.c index a84b1372b8..5b2410d564 100644 --- a/vl.c +++ b/vl.c @@ -2092,7 +2092,6 @@ static void parse_display(const char *p) const char *opts; =20 if (strstart(p, "sdl", &opts)) { -#ifdef CONFIG_SDL dpy.type =3D DISPLAY_TYPE_SDL; while (*opts) { const char *nextopt; @@ -2153,10 +2152,6 @@ static void parse_display(const char *p) } opts =3D nextopt; } -#else - error_report("SDL support is disabled"); - exit(1); -#endif } else if (strstart(p, "vnc", &opts)) { if (*opts =3D=3D '=3D') { vnc_parse(opts + 1, &error_fatal); @@ -4340,12 +4335,7 @@ int main(int argc, char **argv, char **envp) "ignoring option"); } =20 - if (dpy.type =3D=3D DISPLAY_TYPE_SDL) { - sdl_display_early_init(&dpy); - } else { - qemu_display_early_init(&dpy); - } - + qemu_display_early_init(&dpy); qemu_console_early_init(); =20 if (dpy.has_gl && dpy.gl && display_opengl =3D=3D 0) { @@ -4677,9 +4667,6 @@ int main(int argc, char **argv, char **envp) case DISPLAY_TYPE_CURSES: curses_display_init(ds, &dpy); break; - case DISPLAY_TYPE_SDL: - sdl_display_init(ds, &dpy); - break; case DISPLAY_TYPE_COCOA: cocoa_display_init(ds, &dpy); break; --=20 2.9.3 From nobody Fri Oct 24 21:59: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 1520239878859296.878194166281; Mon, 5 Mar 2018 00:51:18 -0800 (PST) Received: from localhost ([::1]:47887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslpt-0005Rq-8q for importer@patchew.org; Mon, 05 Mar 2018 03:51:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnm-0003qs-Hc for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003aR-AR for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36726 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 1eslnj-0003Yz-3P for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1796814DF4C; Mon, 5 Mar 2018 08:48:49 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 434D02166BAE; Mon, 5 Mar 2018 08:48:45 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9608A1751E; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:34 +0100 Message-Id: <20180305084844.18222-4-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 05 Mar 2018 08:48:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 05 Mar 2018 08:48:49 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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 03/13] cocoa: switch over to new display registry 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: Peter Maydell , Gerd Hoffmann , Paolo Bonzini 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" Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-4-kraxel@redhat.com --- include/ui/console.h | 12 ------------ vl.c | 3 --- ui/cocoa.m | 14 +++++++++++++- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index cb86e6a0dd..f8c462106a 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -444,18 +444,6 @@ void qemu_display_register(QemuDisplay *ui); void qemu_display_early_init(DisplayOptions *opts); void qemu_display_init(DisplayState *ds, DisplayOptions *opts); =20 -/* cocoa.m */ -#ifdef CONFIG_COCOA -void cocoa_display_init(DisplayState *ds, DisplayOptions *opts); -#else -static inline void cocoa_display_init(DisplayState *ds, DisplayOptions *op= ts) -{ - /* This must never be called if CONFIG_COCOA is disabled */ - error_report("Cocoa support is disabled"); - abort(); -} -#endif - /* vnc.c */ void vnc_display_init(const char *id); void vnc_display_open(const char *id, Error **errp); diff --git a/vl.c b/vl.c index 5b2410d564..377140ebd9 100644 --- a/vl.c +++ b/vl.c @@ -4667,9 +4667,6 @@ int main(int argc, char **argv, char **envp) case DISPLAY_TYPE_CURSES: curses_display_init(ds, &dpy); break; - case DISPLAY_TYPE_COCOA: - cocoa_display_init(ds, &dpy); - break; default: qemu_display_init(ds, &dpy); break; diff --git a/ui/cocoa.m b/ui/cocoa.m index 90d9aa57ea..8b0dce90cb 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1683,7 +1683,7 @@ static void addRemovableDevicesMenuItems(void) qapi_free_BlockInfoList(pointerToFree); } =20 -void cocoa_display_init(DisplayState *ds, DisplayOptions *opts) +static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts) { COCOA_DEBUG("qemu_cocoa: cocoa_display_init\n"); =20 @@ -1713,3 +1713,15 @@ void cocoa_display_init(DisplayState *ds, DisplayOpt= ions *opts) */ addRemovableDevicesMenuItems(); } + +static QemuDisplay qemu_display_cocoa =3D { + .type =3D DISPLAY_TYPE_COCOA, + .init =3D cocoa_display_init, +}; + +static void register_cocoa(void) +{ + qemu_display_register(&qemu_display_cocoa); +} + +type_init(register_cocoa); --=20 2.9.3 From nobody Fri Oct 24 21:59: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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520240036221998.7303856675261; Mon, 5 Mar 2018 00:53:56 -0800 (PST) Received: from localhost ([::1]:47897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslsZ-0007tN-E8 for importer@patchew.org; Mon, 05 Mar 2018 03:53:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnm-0003qr-HW for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003a8-9Q for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55946 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 1eslnj-0003Yy-2t for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7DA8240FB655 for ; Mon, 5 Mar 2018 08:48:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35E5EAFD5C; Mon, 5 Mar 2018 08:48:45 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A02A317528; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:35 +0100 Message-Id: <20180305084844.18222-5-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.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 04/13] curses: switch over to new display registry 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 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" Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-5-kraxel@redhat.com --- include/ui/console.h | 12 ------------ ui/curses.c | 14 +++++++++++++- vl.c | 17 ++--------------- 3 files changed, 15 insertions(+), 28 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index f8c462106a..3ea6cf0870 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -453,18 +453,6 @@ int vnc_display_pw_expire(const char *id, time_t expir= es); QemuOpts *vnc_parse(const char *str, Error **errp); int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp); =20 -/* curses.c */ -#ifdef CONFIG_CURSES -void curses_display_init(DisplayState *ds, DisplayOptions *opts); -#else -static inline void curses_display_init(DisplayState *ds, DisplayOptions *o= pts) -{ - /* This must never be called if CONFIG_CURSES is disabled */ - error_report("curses support is disabled"); - abort(); -} -#endif - /* input.c */ int index_from_key(const char *key, size_t key_length); =20 diff --git a/ui/curses.c b/ui/curses.c index 597e47fd4a..59d819fd4d 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -435,7 +435,7 @@ static const DisplayChangeListenerOps dcl_ops =3D { .dpy_text_cursor =3D curses_cursor_position, }; =20 -void curses_display_init(DisplayState *ds, DisplayOptions *opts) +static void curses_display_init(DisplayState *ds, DisplayOptions *opts) { #ifndef _WIN32 if (!isatty(1)) { @@ -456,3 +456,15 @@ void curses_display_init(DisplayState *ds, DisplayOpti= ons *opts) =20 invalidate =3D 1; } + +static QemuDisplay qemu_display_curses =3D { + .type =3D DISPLAY_TYPE_CURSES, + .init =3D curses_display_init, +}; + +static void register_curses(void) +{ + qemu_display_register(&qemu_display_curses); +} + +type_init(register_curses); diff --git a/vl.c b/vl.c index 377140ebd9..5b2fca8bd3 100644 --- a/vl.c +++ b/vl.c @@ -2168,12 +2168,7 @@ static void parse_display(const char *p) exit(1); #endif } else if (strstart(p, "curses", &opts)) { -#ifdef CONFIG_CURSES dpy.type =3D DISPLAY_TYPE_CURSES; -#else - error_report("curses support is disabled"); - exit(1); -#endif } else if (strstart(p, "gtk", &opts)) { dpy.type =3D DISPLAY_TYPE_GTK; while (*opts) { @@ -4660,17 +4655,9 @@ int main(int argc, char **argv, char **envp) qemu_register_reset(restore_boot_order, g_strdup(boot_order)); } =20 - ds =3D init_displaystate(); - /* init local displays */ - switch (dpy.type) { - case DISPLAY_TYPE_CURSES: - curses_display_init(ds, &dpy); - break; - default: - qemu_display_init(ds, &dpy); - break; - } + ds =3D init_displaystate(); + qemu_display_init(ds, &dpy); =20 /* must be after terminal init, SDL library changes signal handlers */ os_setup_signal_handling(); --=20 2.9.3 From nobody Fri Oct 24 21:59: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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520240172671702.9422800878258; Mon, 5 Mar 2018 00:56:12 -0800 (PST) Received: from localhost ([::1]:47920 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esluk-0001yj-Ue for importer@patchew.org; Mon, 05 Mar 2018 03:56:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnm-0003qu-Hm for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003a7-9J for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55938 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 1eslnj-0003Yu-2a for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7F7AE40FB64A for ; Mon, 5 Mar 2018 08:48:50 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 435BE2166BAE; Mon, 5 Mar 2018 08:48:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AA423A1EB; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:36 +0100 Message-Id: <20180305084844.18222-6-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:50 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:50 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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 05/13] egl-headless: switch over to new display registry 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 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" Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-6-kraxel@redhat.com --- include/ui/console.h | 3 --- ui/egl-headless.c | 20 +++++++++++++++++++- vl.c | 12 ------------ 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 3ea6cf0870..94726cf190 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -456,7 +456,4 @@ int vnc_init_func(void *opaque, QemuOpts *opts, Error *= *errp); /* input.c */ int index_from_key(const char *key, size_t key_length); =20 -/* egl-headless.c */ -void egl_headless_init(DisplayOptions *opts); - #endif diff --git a/ui/egl-headless.c b/ui/egl-headless.c index b33e0b21fd..7c877122d3 100644 --- a/ui/egl-headless.c +++ b/ui/egl-headless.c @@ -164,7 +164,12 @@ static const DisplayChangeListenerOps egl_ops =3D { .dpy_gl_update =3D egl_scanout_flush, }; =20 -void egl_headless_init(DisplayOptions *opts) +static void early_egl_headless_init(DisplayOptions *opts) +{ + display_opengl =3D 1; +} + +static void egl_headless_init(DisplayState *ds, DisplayOptions *opts) { QemuConsole *con; egl_dpy *edpy; @@ -188,3 +193,16 @@ void egl_headless_init(DisplayOptions *opts) register_displaychangelistener(&edpy->dcl); } } + +static QemuDisplay qemu_display_egl =3D { + .type =3D DISPLAY_TYPE_EGL_HEADLESS, + .early_init =3D early_egl_headless_init, + .init =3D egl_headless_init, +}; + +static void register_egl(void) +{ + qemu_display_register(&qemu_display_egl); +} + +type_init(register_egl); diff --git a/vl.c b/vl.c index 5b2fca8bd3..93fc841e7c 100644 --- a/vl.c +++ b/vl.c @@ -2160,13 +2160,7 @@ static void parse_display(const char *p) exit(1); } } else if (strstart(p, "egl-headless", &opts)) { -#ifdef CONFIG_OPENGL_DMABUF - display_opengl =3D 1; dpy.type =3D DISPLAY_TYPE_EGL_HEADLESS; -#else - error_report("egl support is disabled"); - exit(1); -#endif } else if (strstart(p, "curses", &opts)) { dpy.type =3D DISPLAY_TYPE_CURSES; } else if (strstart(p, "gtk", &opts)) { @@ -4672,12 +4666,6 @@ int main(int argc, char **argv, char **envp) qemu_spice_display_init(); } =20 -#ifdef CONFIG_OPENGL_DMABUF - if (dpy.type =3D=3D DISPLAY_TYPE_EGL_HEADLESS) { - egl_headless_init(&dpy); - } -#endif - if (foreach_device_config(DEV_GDB, gdbserver_start) < 0) { exit(1); } --=20 2.9.3 From nobody Fri Oct 24 21:59: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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152024030288565.54406755812374; Mon, 5 Mar 2018 00:58:22 -0800 (PST) Received: from localhost ([::1]:47932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslwq-0003mS-4g for importer@patchew.org; Mon, 05 Mar 2018 03:58:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnm-0003qp-Hd for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003a0-9Z for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55942 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 1eslnj-0003Z1-38 for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8BD7340FB65B for ; Mon, 5 Mar 2018 08:48:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41794AFD6E; Mon, 5 Mar 2018 08:48:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B4292A1F0; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:37 +0100 Message-Id: <20180305084844.18222-7-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.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/13] console: add and use qemu_display_find_default 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 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" Using the new display registry instead of #ifdefs in vl.c. Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-7-kraxel@redhat.com --- include/ui/console.h | 1 + ui/console.c | 19 +++++++++++++++++++ vl.c | 15 +++++---------- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 94726cf190..3a53db9360 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -441,6 +441,7 @@ struct QemuDisplay { }; =20 void qemu_display_register(QemuDisplay *ui); +bool qemu_display_find_default(DisplayOptions *opts); void qemu_display_early_init(DisplayOptions *opts); void qemu_display_init(DisplayState *ds, DisplayOptions *opts); =20 diff --git a/ui/console.c b/ui/console.c index a11b120fc8..25d342cdcb 100644 --- a/ui/console.c +++ b/ui/console.c @@ -2188,6 +2188,25 @@ void qemu_display_register(QemuDisplay *ui) dpys[ui->type] =3D ui; } =20 +bool qemu_display_find_default(DisplayOptions *opts) +{ + static DisplayType prio[] =3D { + DISPLAY_TYPE_GTK, + DISPLAY_TYPE_SDL, + DISPLAY_TYPE_COCOA + }; + int i; + + for (i =3D 0; i < ARRAY_SIZE(prio); i++) { + if (dpys[prio[i]] =3D=3D NULL) { + continue; + } + opts->type =3D prio[i]; + return true; + } + return false; +} + void qemu_display_early_init(DisplayOptions *opts) { assert(opts->type < DISPLAY_TYPE__MAX); diff --git a/vl.c b/vl.c index 93fc841e7c..e5f6de1843 100644 --- a/vl.c +++ b/vl.c @@ -4298,17 +4298,12 @@ int main(int argc, char **argv, char **envp) } #endif if (dpy.type =3D=3D DISPLAY_TYPE_DEFAULT && !display_remote) { -#if defined(CONFIG_GTK) - dpy.type =3D DISPLAY_TYPE_GTK; -#elif defined(CONFIG_SDL) - dpy.type =3D DISPLAY_TYPE_SDL; -#elif defined(CONFIG_COCOA) - dpy.type =3D DISPLAY_TYPE_COCOA; -#elif defined(CONFIG_VNC) - vnc_parse("localhost:0,to=3D99,id=3Ddefault", &error_abort); -#else - dpy.type =3D DISPLAY_TYPE_NONE; + if (!qemu_display_find_default(&dpy)) { + dpy.type =3D DISPLAY_TYPE_NONE; +#if defined(CONFIG_VNC) + vnc_parse("localhost:0,to=3D99,id=3Ddefault", &error_abort); #endif + } } if (dpy.type =3D=3D DISPLAY_TYPE_DEFAULT) { dpy.type =3D DISPLAY_TYPE_NONE; --=20 2.9.3 From nobody Fri Oct 24 21:59: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 1520240222967599.3442415562665; Mon, 5 Mar 2018 00:57:02 -0800 (PST) Received: from localhost ([::1]:47922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslvV-0002e1-6T for importer@patchew.org; Mon, 05 Mar 2018 03:56:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnn-0003rP-OS for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:49:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003b5-OO for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:59 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55950 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 1eslnj-0003a5-HW for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -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 B67E5410FBA1 for ; Mon, 5 Mar 2018 08:48:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4778110B0F25; Mon, 5 Mar 2018 08:48:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BE0ADEB4; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:38 +0100 Message-Id: <20180305084844.18222-8-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-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.7]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:51 +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 07/13] console: add ui module loading support 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: 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" If a requested user interface is not available, try loading it as module, simliar to block layer modules. Needed to keep things working when followup patches start to build user interfaces as modules. Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-8-kraxel@redhat.com --- Makefile.objs | 1 + include/qemu/module.h | 1 + ui/console.c | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/Makefile.objs b/Makefile.objs index 5dc134818c..57ca6d908b 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -56,6 +56,7 @@ common-obj-y +=3D hw/ common-obj-y +=3D replay/ =20 common-obj-y +=3D ui/ +common-obj-m +=3D ui/ common-obj-y +=3D bt-host.o bt-vhci.o bt-host.o-cflags :=3D $(BLUEZ_CFLAGS) =20 diff --git a/include/qemu/module.h b/include/qemu/module.h index 56dd218205..9fea75aaeb 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -53,6 +53,7 @@ typedef enum { #define trace_init(function) module_init(function, MODULE_INIT_TRACE) =20 #define block_module_load_one(lib) module_load_one("block-", lib) +#define ui_module_load_one(lib) module_load_one("ui-", lib) =20 void register_module_init(void (*fn)(void), module_init_type type); void register_dso_module_init(void (*fn)(void), module_init_type type); diff --git a/ui/console.c b/ui/console.c index 25d342cdcb..78efab269a 100644 --- a/ui/console.c +++ b/ui/console.c @@ -2199,6 +2199,9 @@ bool qemu_display_find_default(DisplayOptions *opts) =20 for (i =3D 0; i < ARRAY_SIZE(prio); i++) { if (dpys[prio[i]] =3D=3D NULL) { + ui_module_load_one(DisplayType_lookup.array[prio[i]]); + } + if (dpys[prio[i]] =3D=3D NULL) { continue; } opts->type =3D prio[i]; @@ -2214,6 +2217,9 @@ void qemu_display_early_init(DisplayOptions *opts) return; } if (dpys[opts->type] =3D=3D NULL) { + ui_module_load_one(DisplayType_lookup.array[opts->type]); + } + if (dpys[opts->type] =3D=3D NULL) { error_report("Display '%s' is not available.", DisplayType_lookup.array[opts->type]); exit(1); --=20 2.9.3 From nobody Fri Oct 24 21:59: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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520239877958931.395546971707; Mon, 5 Mar 2018 00:51:17 -0800 (PST) Received: from localhost ([::1]:47888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslpx-0005U9-81 for importer@patchew.org; Mon, 05 Mar 2018 03:51:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnm-0003qt-Hw for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:49:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003ac-9s for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34740 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 1eslnj-0003Z3-3K for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8E52587ABA for ; Mon, 5 Mar 2018 08:48:50 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48F022026E03; Mon, 5 Mar 2018 08:48:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C71B0ED0; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:39 +0100 Message-Id: <20180305084844.18222-9-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 05 Mar 2018 08:48:50 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 05 Mar 2018 08:48:50 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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 08/13] configure: add X11 vars to config-host.mak 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: 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" Simplifies handling the X11 dependency, also makes ui/Makefile.objs more readable. Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-9-kraxel@redhat.com --- configure | 10 ++++++++-- ui/Makefile.objs | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 00c4b63cfa..3d2aef95f8 100755 --- a/configure +++ b/configure @@ -2520,9 +2520,8 @@ fi =20 ########################################## # X11 probe -x11_cflags=3D -x11_libs=3D-lX11 if $pkg_config --exists "x11"; then + have_x11=3Dyes x11_cflags=3D$($pkg_config --cflags x11) x11_libs=3D$($pkg_config --libs x11) fi @@ -2555,6 +2554,7 @@ if test "$gtk" !=3D "no"; then gtk_libs=3D$($pkg_config --libs $gtkpackage) gtk_version=3D$($pkg_config --modversion $gtkpackage) if $pkg_config --exists "$gtkx11package >=3D $gtkversion"; then + need_x11=3Dyes gtk_cflags=3D"$gtk_cflags $x11_cflags" gtk_libs=3D"$gtk_libs $x11_libs" fi @@ -2923,6 +2923,7 @@ if test "$sdl" =3D "yes" ; then int main(void) { return 0; } EOF if compile_prog "$sdl_cflags $x11_cflags" "$sdl_libs $x11_libs" ; then + need_x11=3Dyes sdl_cflags=3D"$sdl_cflags $x11_cflags" sdl_libs=3D"$sdl_libs $x11_libs" fi @@ -6036,6 +6037,11 @@ if test "$modules" =3D "yes"; then echo "CONFIG_STAMP=3D_$( (echo $qemu_version; echo $pkgversion; cat $0) = | $shacmd - | cut -f1 -d\ )" >> $config_host_mak echo "CONFIG_MODULES=3Dy" >> $config_host_mak fi +if test "$have_x11" =3D "yes" -a "$need_x11" =3D "yes"; then + echo "CONFIG_X11=3Dy" >> $config_host_mak + echo "X11_CFLAGS=3D$x11_cflags" >> $config_host_mak + echo "X11_LIBS=3D$x11_libs" >> $config_host_mak +fi if test "$sdl" =3D "yes" ; then echo "CONFIG_SDL=3Dy" >> $config_host_mak echo "CONFIG_SDLABI=3D$sdlabi" >> $config_host_mak diff --git a/ui/Makefile.objs b/ui/Makefile.objs index ced7d91a63..9b725b07aa 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -17,7 +17,10 @@ common-obj-$(CONFIG_CURSES) +=3D curses.o common-obj-$(CONFIG_VNC) +=3D $(vnc-obj-y) common-obj-$(call lnot,$(CONFIG_VNC)) +=3D vnc-stubs.o common-obj-$(CONFIG_GTK) +=3D gtk.o -common-obj-$(if $(CONFIG_WIN32),n,$(if $(CONFIG_SDL),y,$(CONFIG_GTK))) += =3D x_keymap.o + +common-obj-$(CONFIG_X11) +=3D x_keymap.o +x_keymap.o-cflags :=3D $(X11_CFLAGS) +x_keymap.o-libs :=3D $(X11_LIBS) =20 ifeq ($(CONFIG_SDLABI),1.2) sdl.mo-objs :=3D sdl.o sdl_zoom.o --=20 2.9.3 From nobody Fri Oct 24 21:59: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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520240301147749.4757383350077; Mon, 5 Mar 2018 00:58:21 -0800 (PST) Received: from localhost ([::1]:47933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslwq-0003mt-Dd for importer@patchew.org; Mon, 05 Mar 2018 03:58:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnn-0003rK-Lq for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:49:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003bA-OV for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:59 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55948 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 1eslnj-0003aF-IR for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -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 9361240FB65E for ; Mon, 5 Mar 2018 08:48:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4DEB510B0F26; Mon, 5 Mar 2018 08:48:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CEE4499A; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:40 +0100 Message-Id: <20180305084844.18222-10-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-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.7]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:51 +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 09/13] configure: opengl doesn't depend on x11 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: 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" So remove x11 from pkg-config check and don't add x11 cflags/libs to opengl cflags/libs. Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-10-kraxel@redhat.com --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 3d2aef95f8..fbfbb64029 100755 --- a/configure +++ b/configure @@ -3779,9 +3779,9 @@ libs_softmmu=3D"$libs_softmmu $fdt_libs" =20 if test "$opengl" !=3D "no" ; then opengl_pkgs=3D"epoxy libdrm gbm" - if $pkg_config $opengl_pkgs x11; then - opengl_cflags=3D"$($pkg_config --cflags $opengl_pkgs) $x11_cflags" - opengl_libs=3D"$($pkg_config --libs $opengl_pkgs) $x11_libs" + if $pkg_config $opengl_pkgs; then + opengl_cflags=3D"$($pkg_config --cflags $opengl_pkgs)" + opengl_libs=3D"$($pkg_config --libs $opengl_pkgs)" opengl=3Dyes if test "$gtk" =3D "yes" && $pkg_config --exists "$gtkpackage >=3D 3.1= 6"; then gtk_gl=3D"yes" --=20 2.9.3 From nobody Fri Oct 24 21:59: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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520240037535696.9789382996731; Mon, 5 Mar 2018 00:53:57 -0800 (PST) Received: from localhost ([::1]:47899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslsa-0007wi-QW for importer@patchew.org; Mon, 05 Mar 2018 03:53:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnm-0003qn-Hd for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003aA-92 for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55940 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 1eslnj-0003Z0-2d for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A4D6340FB648 for ; Mon, 5 Mar 2018 08:48:50 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F5BE202699C; Mon, 5 Mar 2018 08:48:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D7CDF99B; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:41 +0100 Message-Id: <20180305084844.18222-11-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:50 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:50 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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 10/13] ui/gtk: build as module 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: 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" Also drop gtk and vte libs from libs_softmmu, so the libs are not pulled in unless the gtk module actually gets loaded. Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-11-kraxel@redhat.com --- configure | 5 ++--- ui/Makefile.objs | 17 +++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/configure b/configure index fbfbb64029..ad36320a4c 100755 --- a/configure +++ b/configure @@ -2558,7 +2558,6 @@ if test "$gtk" !=3D "no"; then gtk_cflags=3D"$gtk_cflags $x11_cflags" gtk_libs=3D"$gtk_libs $x11_libs" fi - libs_softmmu=3D"$gtk_libs $libs_softmmu" gtk=3D"yes" elif test "$gtk" =3D "yes"; then feature_not_found "gtk" "Install gtk3-devel" @@ -2808,7 +2807,6 @@ if test "$vte" !=3D "no"; then vte_cflags=3D$($pkg_config --cflags $vtepackage) vte_libs=3D$($pkg_config --libs $vtepackage) vteversion=3D$($pkg_config --modversion $vtepackage) - libs_softmmu=3D"$vte_libs $libs_softmmu" vte=3D"yes" elif test "$vte" =3D "yes"; then if test "$gtkabi" =3D "3.0"; then @@ -6149,7 +6147,7 @@ if test "$glib_subprocess" =3D "yes" ; then echo "CONFIG_HAS_GLIB_SUBPROCESS_TESTS=3Dy" >> $config_host_mak fi if test "$gtk" =3D "yes" ; then - echo "CONFIG_GTK=3Dy" >> $config_host_mak + echo "CONFIG_GTK=3Dm" >> $config_host_mak echo "CONFIG_GTKABI=3D$gtkabi" >> $config_host_mak echo "GTK_CFLAGS=3D$gtk_cflags" >> $config_host_mak echo "GTK_LIBS=3D$gtk_libs" >> $config_host_mak @@ -6200,6 +6198,7 @@ fi if test "$vte" =3D "yes" ; then echo "CONFIG_VTE=3Dy" >> $config_host_mak echo "VTE_CFLAGS=3D$vte_cflags" >> $config_host_mak + echo "VTE_LIBS=3D$vte_libs" >> $config_host_mak fi if test "$virglrenderer" =3D "yes" ; then echo "CONFIG_VIRGL=3Dy" >> $config_host_mak diff --git a/ui/Makefile.objs b/ui/Makefile.objs index 9b725b07aa..49223b0573 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -16,7 +16,6 @@ common-obj-$(CONFIG_COCOA) +=3D cocoa.o common-obj-$(CONFIG_CURSES) +=3D curses.o common-obj-$(CONFIG_VNC) +=3D $(vnc-obj-y) common-obj-$(call lnot,$(CONFIG_VNC)) +=3D vnc-stubs.o -common-obj-$(CONFIG_GTK) +=3D gtk.o =20 common-obj-$(CONFIG_X11) +=3D x_keymap.o x_keymap.o-cflags :=3D $(X11_CFLAGS) @@ -34,6 +33,12 @@ endif sdl.mo-cflags :=3D $(SDL_CFLAGS) sdl.mo-libs :=3D $(SDL_LIBS) =20 +# ui-gtk module +common-obj-$(CONFIG_GTK) +=3D gtk.mo +gtk.mo-objs :=3D gtk.o +gtk.mo-cflags :=3D $(GTK_CFLAGS) $(VTE_CFLAGS) +gtk.mo-libs :=3D $(GTK_LIBS) $(VTE_LIBS) + ifeq ($(CONFIG_OPENGL),y) common-obj-y +=3D shader.o common-obj-y +=3D console-gl.o @@ -41,17 +46,13 @@ common-obj-y +=3D egl-helpers.o common-obj-y +=3D egl-context.o common-obj-$(CONFIG_OPENGL_DMABUF) +=3D egl-headless.o ifeq ($(CONFIG_GTK_GL),y) -common-obj-$(CONFIG_GTK) +=3D gtk-gl-area.o +gtk.mo-objs +=3D gtk-gl-area.o else -common-obj-$(CONFIG_GTK) +=3D gtk-egl.o +gtk.mo-objs +=3D gtk-egl.o +gtk.mo-libs +=3D $(OPENGL_LIBS) endif endif =20 -gtk.o-cflags :=3D $(GTK_CFLAGS) $(VTE_CFLAGS) -gtk-egl.o-cflags :=3D $(GTK_CFLAGS) $(VTE_CFLAGS) -gtk-gl-area.o-cflags :=3D $(GTK_CFLAGS) $(VTE_CFLAGS) - -gtk-egl.o-libs +=3D $(OPENGL_LIBS) shader.o-libs +=3D $(OPENGL_LIBS) console-gl.o-libs +=3D $(OPENGL_LIBS) egl-helpers.o-libs +=3D $(OPENGL_LIBS) --=20 2.9.3 From nobody Fri Oct 24 21:59: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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520240038592787.8281416413516; Mon, 5 Mar 2018 00:53:58 -0800 (PST) Received: from localhost ([::1]:47900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslsb-0007yX-R9 for importer@patchew.org; Mon, 05 Mar 2018 03:53:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnp-0003sx-Ic for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:49:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslno-0003dU-KY for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:49:01 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39002 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 1eslno-0003dD-Ek for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:49:00 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C86CD84250; Mon, 5 Mar 2018 08:48:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 767542166BAE; Mon, 5 Mar 2018 08:48:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E1B9399C; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:42 +0100 Message-Id: <20180305084844.18222-12-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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 11/13] ui/curses: build as module 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: Guan Xuetao , 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" Also drop curses libs from libs_softmmu. Add CURSES_{CFLAGS,LIBS} variables so we can use them for linking the curses module. Also make target/unicore32/helper.o depend on curses which uses curses directly for some reason ... Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-12-kraxel@redhat.com --- configure | 6 +++--- target/unicore32/Makefile.objs | 4 ++++ ui/Makefile.objs | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/configure b/configure index ad36320a4c..e651533466 100755 --- a/configure +++ b/configure @@ -3280,8 +3280,6 @@ EOF unset IFS if compile_prog "$curses_inc" "$curses_lib" ; then curses_found=3Dyes - QEMU_CFLAGS=3D"$curses_inc $QEMU_CFLAGS" - libs_softmmu=3D"$curses_lib $libs_softmmu" break fi done @@ -6050,7 +6048,9 @@ if test "$cocoa" =3D "yes" ; then echo "CONFIG_COCOA=3Dy" >> $config_host_mak fi if test "$curses" =3D "yes" ; then - echo "CONFIG_CURSES=3Dy" >> $config_host_mak + echo "CONFIG_CURSES=3Dm" >> $config_host_mak + echo "CURSES_CFLAGS=3D$curses_inc" >> $config_host_mak + echo "CURSES_LIBS=3D$curses_lib" >> $config_host_mak fi if test "$pipe2" =3D "yes" ; then echo "CONFIG_PIPE2=3Dy" >> $config_host_mak diff --git a/target/unicore32/Makefile.objs b/target/unicore32/Makefile.objs index 6b41b1e9ef..35d8bf530d 100644 --- a/target/unicore32/Makefile.objs +++ b/target/unicore32/Makefile.objs @@ -2,3 +2,7 @@ obj-y +=3D translate.o op_helper.o helper.o cpu.o obj-y +=3D ucf64_helper.o =20 obj-$(CONFIG_SOFTMMU) +=3D softmmu.o + +# Huh? Uses curses directly instead of using ui/console.h interfaces ... +helper.o-cflags :=3D $(CURSES_CFLAGS) +helper.o-libs :=3D $(CURSES_LIBS) diff --git a/ui/Makefile.objs b/ui/Makefile.objs index 49223b0573..a37232762b 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -13,7 +13,6 @@ common-obj-$(CONFIG_LINUX) +=3D input-linux.o common-obj-$(CONFIG_SPICE) +=3D spice-core.o spice-input.o spice-display.o common-obj-$(CONFIG_SDL) +=3D sdl.mo common-obj-$(CONFIG_COCOA) +=3D cocoa.o -common-obj-$(CONFIG_CURSES) +=3D curses.o common-obj-$(CONFIG_VNC) +=3D $(vnc-obj-y) common-obj-$(call lnot,$(CONFIG_VNC)) +=3D vnc-stubs.o =20 @@ -39,6 +38,11 @@ gtk.mo-objs :=3D gtk.o gtk.mo-cflags :=3D $(GTK_CFLAGS) $(VTE_CFLAGS) gtk.mo-libs :=3D $(GTK_LIBS) $(VTE_LIBS) =20 +common-obj-$(CONFIG_CURSES) +=3D curses.mo +curses.mo-objs :=3D curses.o +curses.mo-cflags :=3D $(CURSES_CFLAGS) +curses.mo-libs :=3D $(CURSES_LIBS) + ifeq ($(CONFIG_OPENGL),y) common-obj-y +=3D shader.o common-obj-y +=3D console-gl.o --=20 2.9.3 From nobody Fri Oct 24 21:59: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 1520239878783421.97249215344004; Mon, 5 Mar 2018 00:51:18 -0800 (PST) Received: from localhost ([::1]:47886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslpu-0005Qh-43 for importer@patchew.org; Mon, 05 Mar 2018 03:51:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnm-0003qm-H1 for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003am-BV for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55944 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 1eslnj-0003Yv-37 for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4EC8A40FB653 for ; Mon, 5 Mar 2018 08:48:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 171652166BAE; Mon, 5 Mar 2018 08:48:51 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EC01D99D; Mon, 5 Mar 2018 09:48:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:43 +0100 Message-Id: <20180305084844.18222-13-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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 12/13] audio: rename CONFIG_* to CONFIG_AUDIO_* 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: 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" This avoids a name clash for CONFIG_SDL, which is used by both sdl video support and sdl audio support. It also more clear that this is a audio driver configuration. Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-13-kraxel@redhat.com --- configure | 2 +- audio/audio_int.h | 2 +- audio/Makefile.objs | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/configure b/configure index e651533466..269add1187 100755 --- a/configure +++ b/configure @@ -5981,7 +5981,7 @@ if test "$cap_ng" =3D "yes" ; then fi echo "CONFIG_AUDIO_DRIVERS=3D$audio_drv_list" >> $config_host_mak for drv in $audio_drv_list; do - def=3DCONFIG_$(echo $drv | LC_ALL=3DC tr '[a-z]' '[A-Z]') + def=3DCONFIG_AUDIO_$(echo $drv | LC_ALL=3DC tr '[a-z]' '[A-Z]') echo "$def=3Dy" >> $config_host_mak done echo "ALSA_LIBS=3D$alsa_libs" >> $config_host_mak diff --git a/audio/audio_int.h b/audio/audio_int.h index 5b25da0a37..700bd43143 100644 --- a/audio/audio_int.h +++ b/audio/audio_int.h @@ -25,7 +25,7 @@ #ifndef QEMU_AUDIO_INT_H #define QEMU_AUDIO_INT_H =20 -#ifdef CONFIG_COREAUDIO +#ifdef CONFIG_AUDIO_COREAUDIO #define FLOAT_MIXENG /* #define RECIPROCAL */ #endif diff --git a/audio/Makefile.objs b/audio/Makefile.objs index 8a5ede6e2b..f6ce5c6744 100644 --- a/audio/Makefile.objs +++ b/audio/Makefile.objs @@ -1,11 +1,11 @@ common-obj-y =3D audio.o noaudio.o wavaudio.o mixeng.o -common-obj-$(CONFIG_SDL) +=3D sdlaudio.o -common-obj-$(CONFIG_OSS) +=3D ossaudio.o +common-obj-$(CONFIG_AUDIO_SDL) +=3D sdlaudio.o +common-obj-$(CONFIG_AUDIO_OSS) +=3D ossaudio.o common-obj-$(CONFIG_SPICE) +=3D spiceaudio.o -common-obj-$(CONFIG_COREAUDIO) +=3D coreaudio.o -common-obj-$(CONFIG_ALSA) +=3D alsaaudio.o -common-obj-$(CONFIG_DSOUND) +=3D dsoundaudio.o -common-obj-$(CONFIG_PA) +=3D paaudio.o +common-obj-$(CONFIG_AUDIO_COREAUDIO) +=3D coreaudio.o +common-obj-$(CONFIG_AUDIO_ALSA) +=3D alsaaudio.o +common-obj-$(CONFIG_AUDIO_DSOUND) +=3D dsoundaudio.o +common-obj-$(CONFIG_AUDIO_PA) +=3D paaudio.o common-obj-$(CONFIG_AUDIO_PT_INT) +=3D audio_pt_int.o common-obj-$(CONFIG_AUDIO_WIN_INT) +=3D audio_win_int.o common-obj-y +=3D wavcapture.o --=20 2.9.3 From nobody Fri Oct 24 21:59: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 1520239877169698.6306367529891; Mon, 5 Mar 2018 00:51:17 -0800 (PST) Received: from localhost ([::1]:47885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslpu-0005QS-17 for importer@patchew.org; Mon, 05 Mar 2018 03:51:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslnm-0003qo-HI for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslnj-0003aM-A5 for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39014 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 1eslnj-0003Yw-3F for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:48:55 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 17728404084A for ; Mon, 5 Mar 2018 08:48:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id D17002024CAD; Mon, 5 Mar 2018 08:48:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 013346DC; Mon, 5 Mar 2018 09:48:45 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:48:44 +0100 Message-Id: <20180305084844.18222-14-kraxel@redhat.com> In-Reply-To: <20180305084844.18222-1-kraxel@redhat.com> References: <20180305084844.18222-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 05 Mar 2018 08:48:51 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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 13/13] ui/sdl: build as module 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: 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" Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-14-kraxel@redhat.com --- configure | 2 +- ui/Makefile.objs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 269add1187..cb4fdb3573 100755 --- a/configure +++ b/configure @@ -6039,7 +6039,7 @@ if test "$have_x11" =3D "yes" -a "$need_x11" =3D "yes= "; then echo "X11_LIBS=3D$x11_libs" >> $config_host_mak fi if test "$sdl" =3D "yes" ; then - echo "CONFIG_SDL=3Dy" >> $config_host_mak + echo "CONFIG_SDL=3Dm" >> $config_host_mak echo "CONFIG_SDLABI=3D$sdlabi" >> $config_host_mak echo "SDL_CFLAGS=3D$sdl_cflags" >> $config_host_mak echo "SDL_LIBS=3D$sdl_libs" >> $config_host_mak diff --git a/ui/Makefile.objs b/ui/Makefile.objs index a37232762b..dcd54a5287 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -11,7 +11,6 @@ common-obj-y +=3D keymaps.o console.o cursor.o qemu-pixma= n.o common-obj-y +=3D input.o input-keymap.o input-legacy.o common-obj-$(CONFIG_LINUX) +=3D input-linux.o common-obj-$(CONFIG_SPICE) +=3D spice-core.o spice-input.o spice-display.o -common-obj-$(CONFIG_SDL) +=3D sdl.mo common-obj-$(CONFIG_COCOA) +=3D cocoa.o common-obj-$(CONFIG_VNC) +=3D $(vnc-obj-y) common-obj-$(call lnot,$(CONFIG_VNC)) +=3D vnc-stubs.o @@ -20,6 +19,8 @@ common-obj-$(CONFIG_X11) +=3D x_keymap.o x_keymap.o-cflags :=3D $(X11_CFLAGS) x_keymap.o-libs :=3D $(X11_LIBS) =20 +# ui-sdl module +common-obj-$(CONFIG_SDL) +=3D sdl.mo ifeq ($(CONFIG_SDLABI),1.2) sdl.mo-objs :=3D sdl.o sdl_zoom.o endif --=20 2.9.3