From nobody Wed Oct 1 11:44:43 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548778402639915.3036281309969; Tue, 29 Jan 2019 08:13:22 -0800 (PST) Received: from [127.0.0.1] (port=50737 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goUzL-0002xM-2K for importer@patchew.org; Tue, 29 Jan 2019 10:07:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goUtJ-0008Q8-Fe for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:01:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goUt5-0003ck-I3 for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:01:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37126) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goUt2-0003bq-Pf for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:01:19 -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 EB4FC7F6B3; Tue, 29 Jan 2019 15:01:11 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4BA906E71F; Tue, 29 Jan 2019 15:01:02 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Tue, 29 Jan 2019 16:00:25 +0100 Message-Id: <20190129150029.29829-2-philmd@redhat.com> In-Reply-To: <20190129150029.29829-1-philmd@redhat.com> References: <20190129150029.29829-1-philmd@redhat.com> MIME-Version: 1.0 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.25]); Tue, 29 Jan 2019 15:01:12 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 1/5] hw/lm32: Move LM32 specific hardware out of common-obj list 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: Fam Zheng , Peter Maydell , Michael Walle , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Brad Smith Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The LM32 specific hardware is only used by the LM32 target, it is pointless to compile those objects in other targets. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/audio/Makefile.objs | 2 +- hw/char/Makefile.objs | 6 +++--- hw/display/Makefile.objs | 4 ++-- hw/intc/Makefile.objs | 2 +- hw/timer/Makefile.objs | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/audio/Makefile.objs b/hw/audio/Makefile.objs index 63db383709..c771797c2d 100644 --- a/hw/audio/Makefile.objs +++ b/hw/audio/Makefile.objs @@ -13,6 +13,6 @@ common-obj-$(CONFIG_PL041) +=3D pl041.o lm4549.o =20 common-obj-$(CONFIG_CS4231) +=3D cs4231.o common-obj-$(CONFIG_MARVELL_88W8618) +=3D marvell_88w8618.o -common-obj-$(CONFIG_MILKYMIST) +=3D milkymist-ac97.o +obj-$(CONFIG_MILKYMIST) +=3D milkymist-ac97.o =20 common-obj-y +=3D soundhw.o diff --git a/hw/char/Makefile.objs b/hw/char/Makefile.objs index c4947d7ae7..2c8999a910 100644 --- a/hw/char/Makefile.objs +++ b/hw/char/Makefile.objs @@ -26,9 +26,9 @@ common-obj-$(CONFIG_ETRAXFS) +=3D etraxfs_ser.o common-obj-$(CONFIG_ISA_DEBUG) +=3D debugcon.o common-obj-$(CONFIG_GRLIB) +=3D grlib_apbuart.o common-obj-$(CONFIG_IMX) +=3D imx_serial.o -common-obj-$(CONFIG_LM32) +=3D lm32_juart.o -common-obj-$(CONFIG_LM32) +=3D lm32_uart.o -common-obj-$(CONFIG_MILKYMIST) +=3D milkymist-uart.o +obj-$(CONFIG_LM32) +=3D lm32_juart.o +obj-$(CONFIG_LM32) +=3D lm32_uart.o +obj-$(CONFIG_MILKYMIST) +=3D milkymist-uart.o common-obj-$(CONFIG_SCLPCONSOLE) +=3D sclpconsole.o sclpconsole-lm.o =20 obj-$(CONFIG_VIRTIO) +=3D virtio-serial-bus.o diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index 97acd5b6cb..5b770817c7 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -25,10 +25,10 @@ common-obj-$(CONFIG_BOCHS_DISPLAY) +=3D edid-region.o common-obj-$(CONFIG_BLIZZARD) +=3D blizzard.o common-obj-$(CONFIG_EXYNOS4) +=3D exynos4210_fimd.o common-obj-$(CONFIG_FRAMEBUFFER) +=3D framebuffer.o -common-obj-$(CONFIG_MILKYMIST) +=3D milkymist-vgafb.o +obj-$(CONFIG_MILKYMIST) +=3D milkymist-vgafb.o common-obj-$(CONFIG_ZAURUS) +=3D tc6393xb.o =20 -common-obj-$(CONFIG_MILKYMIST_TMU2) +=3D milkymist-tmu2.o +obj-$(CONFIG_MILKYMIST_TMU2) +=3D milkymist-tmu2.o milkymist-tmu2.o-cflags :=3D $(X11_CFLAGS) milkymist-tmu2.o-libs :=3D $(X11_LIBS) =20 diff --git a/hw/intc/Makefile.objs b/hw/intc/Makefile.objs index 301a8e972d..82bbbefdeb 100644 --- a/hw/intc/Makefile.objs +++ b/hw/intc/Makefile.objs @@ -7,7 +7,7 @@ common-obj-$(CONFIG_XLNX_ZYNQMP) +=3D xlnx-pmu-iomod-intc.o common-obj-$(CONFIG_XLNX_ZYNQMP) +=3D xlnx-zynqmp-ipi.o common-obj-$(CONFIG_ETRAXFS) +=3D etraxfs_pic.o common-obj-$(CONFIG_IMX) +=3D imx_avic.o imx_gpcv2.o -common-obj-$(CONFIG_LM32) +=3D lm32_pic.o +obj-$(CONFIG_LM32) +=3D lm32_pic.o common-obj-$(CONFIG_REALVIEW) +=3D realview_gic.o common-obj-$(CONFIG_SLAVIO) +=3D slavio_intctl.o common-obj-$(CONFIG_IOAPIC) +=3D ioapic_common.o diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs index 0e9a4530f8..3a7740f447 100644 --- a/hw/timer/Makefile.objs +++ b/hw/timer/Makefile.objs @@ -20,8 +20,8 @@ common-obj-$(CONFIG_ETRAXFS) +=3D etraxfs_timer.o common-obj-$(CONFIG_GRLIB) +=3D grlib_gptimer.o common-obj-$(CONFIG_IMX) +=3D imx_epit.o common-obj-$(CONFIG_IMX) +=3D imx_gpt.o -common-obj-$(CONFIG_LM32) +=3D lm32_timer.o -common-obj-$(CONFIG_MILKYMIST) +=3D milkymist-sysctl.o +obj-$(CONFIG_LM32) +=3D lm32_timer.o +obj-$(CONFIG_MILKYMIST) +=3D milkymist-sysctl.o common-obj-$(CONFIG_XLNX_ZYNQMP) +=3D xlnx-zynqmp-rtc.o common-obj-$(CONFIG_NRF51_SOC) +=3D nrf51_timer.o =20 --=20 2.20.1 From nobody Wed Oct 1 11:44:43 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.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 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548777543885767.2827793084408; Tue, 29 Jan 2019 07:59:03 -0800 (PST) Received: from localhost ([127.0.0.1]:50837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goV56-0006jT-2O for importer@patchew.org; Tue, 29 Jan 2019 10:13:44 -0500 Received: from [209.51.188.92] (port=50603 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goUtk-00008x-Fb for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:02:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goUtG-0003gy-HG for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:01:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37224) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goUtF-0003cL-TN for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:01:30 -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 E4A3881F10; Tue, 29 Jan 2019 15:01:16 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 74A6360462; Tue, 29 Jan 2019 15:01:12 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Tue, 29 Jan 2019 16:00:26 +0100 Message-Id: <20190129150029.29829-3-philmd@redhat.com> In-Reply-To: <20190129150029.29829-1-philmd@redhat.com> References: <20190129150029.29829-1-philmd@redhat.com> MIME-Version: 1.0 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.25]); Tue, 29 Jan 2019 15:01:17 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 2/5] configure: LM32 Milkymist Texture Mapping Unit (tmu2) also depends of 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: Fam Zheng , Peter Maydell , Michael Walle , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Brad Smith Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Commit 5f9b1e35060b8 remove the dependency between OpenGL and X11. However the milkymist-tmu2 device do require X11. When using SDL, the configure script sets need_x11=3Dyes, so the X11 flags are populated to the makefiles. When building without SDL, X11 is not pulled and populated, leading to a link failure: LINK lm32-softmmu/qemu-system-lm32 hw/lm32/milkymist.o: In function `milkymist_tmu2_create': hw/lm32/milkymist-hw.h:114: undefined reference to `XOpenDisplay' hw/lm32/milkymist-hw.h:140: undefined reference to `XFree' hw/lm32/milkymist-hw.h:141: undefined reference to `XCloseDisplay' hw/lm32/milkymist-hw.h:130: undefined reference to `XCloseDisplay' ../hw/display/milkymist-tmu2.o: In function `tmu2_glx_init': hw/display/milkymist-tmu2.c:112: undefined reference to `XOpenDisplay' hw/display/milkymist-tmu2.c:123: undefined reference to `XFree' collect2: error: ld returned 1 exit status gmake[1]: *** [Makefile:199: qemu-system-lm32] Error 1 Enforce the X11 dependency when the LM32 target is built. This will allow us to build QEMU without SDL. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- configure | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure b/configure index b18281c61f..c7024d6662 100755 --- a/configure +++ b/configure @@ -4047,6 +4047,16 @@ EOF fi fi =20 +if test "$opengl" =3D "yes" -a "$have_x11" =3D "yes"; then + for target in $target_list; do + case $target in + lm32-softmmu) # milkymist-tmu2 requires X11 and OpenGL + need_x11=3Dyes + ;; + esac + done +fi + ########################################## # libxml2 probe if test "$libxml2" !=3D "no" ; then --=20 2.20.1 From nobody Wed Oct 1 11:44:43 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548775347886559.3463192307751; Tue, 29 Jan 2019 07:22:27 -0800 (PST) Received: from localhost ([127.0.0.1]:50966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goVDQ-0003Ki-Rp for importer@patchew.org; Tue, 29 Jan 2019 10:22:20 -0500 Received: from [209.51.188.92] (port=50648 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goUv1-0000t6-Ux for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:03:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goUtW-0003lN-5x for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:01:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29093) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goUtU-0003jY-51 for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:01:46 -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 1A5C037E74; Tue, 29 Jan 2019 15:01:41 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4997760462; Tue, 29 Jan 2019 15:01:17 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Tue, 29 Jan 2019 16:00:27 +0100 Message-Id: <20190129150029.29829-4-philmd@redhat.com> In-Reply-To: <20190129150029.29829-1-philmd@redhat.com> References: <20190129150029.29829-1-philmd@redhat.com> MIME-Version: 1.0 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.29]); Tue, 29 Jan 2019 15:01:41 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 3/5] hw/display/milkymist-tmu2: Explicit the dependency to both X11 / OpenGL 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: Fam Zheng , Peter Maydell , Michael Walle , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Brad Smith Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The TMU device requires both X11 and OpenGL. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- default-configs/lm32-softmmu.mak | 2 +- hw/display/Makefile.objs | 4 ++-- hw/lm32/milkymist-hw.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/default-configs/lm32-softmmu.mak b/default-configs/lm32-softmm= u.mak index 4889348a10..4049b23562 100644 --- a/default-configs/lm32-softmmu.mak +++ b/default-configs/lm32-softmmu.mak @@ -2,7 +2,7 @@ =20 CONFIG_LM32=3Dy CONFIG_MILKYMIST=3Dy -CONFIG_MILKYMIST_TMU2=3D$(CONFIG_OPENGL) +CONFIG_MILKYMIST_TMU2=3D$(call land,$(CONFIG_X11),$(CONFIG_OPENGL)) CONFIG_FRAMEBUFFER=3Dy CONFIG_PTIMER=3Dy CONFIG_PFLASH_CFI01=3Dy diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index 5b770817c7..7c4ae9a0fd 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -29,8 +29,8 @@ obj-$(CONFIG_MILKYMIST) +=3D milkymist-vgafb.o common-obj-$(CONFIG_ZAURUS) +=3D tc6393xb.o =20 obj-$(CONFIG_MILKYMIST_TMU2) +=3D milkymist-tmu2.o -milkymist-tmu2.o-cflags :=3D $(X11_CFLAGS) -milkymist-tmu2.o-libs :=3D $(X11_LIBS) +milkymist-tmu2.o-cflags :=3D $(X11_CFLAGS) $(OPENGL_CFLAGS) +milkymist-tmu2.o-libs :=3D $(X11_LIBS) $(OPENGL_LIBS) =20 obj-$(CONFIG_OMAP) +=3D omap_dss.o obj-$(CONFIG_OMAP) +=3D omap_lcdc.o diff --git a/hw/lm32/milkymist-hw.h b/hw/lm32/milkymist-hw.h index d3be0cfb3a..32c344ef9f 100644 --- a/hw/lm32/milkymist-hw.h +++ b/hw/lm32/milkymist-hw.h @@ -88,7 +88,7 @@ static inline DeviceState *milkymist_pfpu_create(hwaddr b= ase, return dev; } =20 -#ifdef CONFIG_OPENGL +#if defined(CONFIG_X11) && defined(CONFIG_OPENGL) #include #include #include @@ -103,7 +103,7 @@ static const int glx_fbconfig_attr[] =3D { static inline DeviceState *milkymist_tmu2_create(hwaddr base, qemu_irq irq) { -#ifdef CONFIG_OPENGL +#if defined(CONFIG_X11) && defined(CONFIG_OPENGL) DeviceState *dev; Display *d; GLXFBConfig *configs; --=20 2.20.1 From nobody Wed Oct 1 11:44:43 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548774801680263.8433993976615; Tue, 29 Jan 2019 07:13:21 -0800 (PST) Received: from localhost ([127.0.0.1]:50818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goV4J-0006D4-Ia for importer@patchew.org; Tue, 29 Jan 2019 10:12:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goUw9-0001W5-Vf for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:04:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goUuR-0003zg-8C for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:02:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59530) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goUuQ-0003q2-Cj for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:02:43 -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 72058C07C583; Tue, 29 Jan 2019 15:02:10 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4AA160462; Tue, 29 Jan 2019 15:01:41 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Tue, 29 Jan 2019 16:00:28 +0100 Message-Id: <20190129150029.29829-5-philmd@redhat.com> In-Reply-To: <20190129150029.29829-1-philmd@redhat.com> References: <20190129150029.29829-1-philmd@redhat.com> MIME-Version: 1.0 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.32]); Tue, 29 Jan 2019 15:02:10 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 4/5] configure: Let SDL support be optional on OpenBSD 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: Fam Zheng , Peter Maydell , Michael Walle , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Brad Smith Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Currently if we try to build QEMU on OpenBSD with SDL disabled, we get: $ ./configure --cc=3Dx86_64-unknown-openbsd6.1-gcc-4.9.4 --python=3Dpytho= n2.7 --disable-sdl ERROR: sdl not found or disabled, can not use sdl audio driver Since SDL is not a requirement for OpenBSD, let it be optional. If it is not found, or the user explicitly disable it, remove it from the audio_drv_list. If no audio backends are available, QEMU will fall back to the null driver. Instead of displaying nothing when audio_drv_list ends up empty, display an informative "none". This does not change the default behavior: $ ./configure --cc=3Dx86_64-unknown-openbsd6.1-gcc-4.9.4 --python=3Dpytho= n2.7 SDL support yes (1.2.15) Audio drivers sdl WARNING: Use of SDL 1.2 is deprecated and will be removed in WARNING: future releases. Please switch to using SDL 2.0 GEN config-host.h ... but allows to build without SDL: $ ./configure --cc=3Dx86_64-unknown-openbsd6.1-gcc-4.9.4 --python=3Dpytho= n2.7 --disable-sdl WARN: sdl not found or disabled, can not use sdl audio driver SDL support no Audio drivers none GEN config-host.h ... Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index c7024d6662..df10601fee 100755 --- a/configure +++ b/configure @@ -3380,7 +3380,8 @@ for drv in $audio_drv_list; do =20 sdl) if test "$sdl" =3D "no"; then - error_exit "sdl not found or disabled, can not use sdl audio drive= r" + echo "WARNING: SDL not found or disabled, can not use sdl audio dr= iver" + audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/sdl *//g') fi ;; =20 @@ -3417,6 +3418,9 @@ for drv in $audio_drv_list; do ;; esac done +if test -z "$audio_drv_list"; then + audio_drv_list=3D"none" +fi =20 ########################################## # BrlAPI probe --=20 2.20.1 From nobody Wed Oct 1 11:44:43 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.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 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548774882084643.5911056201131; Tue, 29 Jan 2019 07:14:42 -0800 (PST) Received: from localhost ([127.0.0.1]:50845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goV5U-0006yK-5Z for importer@patchew.org; Tue, 29 Jan 2019 10:14:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goUuZ-0000dp-Lm for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:03:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goUuA-0003vZ-Pk for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:02:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11814) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goUuA-0003qk-FK for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:02:26 -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 DFCEC6EB99; Tue, 29 Jan 2019 15:02:14 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7B97704C0; Tue, 29 Jan 2019 15:02:10 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Tue, 29 Jan 2019 16:00:29 +0100 Message-Id: <20190129150029.29829-6-philmd@redhat.com> In-Reply-To: <20190129150029.29829-1-philmd@redhat.com> References: <20190129150029.29829-1-philmd@redhat.com> MIME-Version: 1.0 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.25]); Tue, 29 Jan 2019 15:02:15 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 5/5] hw/display/milkymist-tmu2: Move inlined code from header to source 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: Fam Zheng , Peter Maydell , Michael Walle , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Brad Smith Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Move the complexity of milkymist_tmu2_create() into the source file. Doing so we avoid to include the X11/OpenGL headers in all LM32 devices, and we also avoid the duplicate declaration of glx_fbconfig_attr[] (it is already declared in hw/display/milkymist-tmu2.c). Since TYPE_MILKYMIST_TMU2 is now accessible, use it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 1 + hw/display/milkymist-tmu2.c | 49 ++++++++++++++++++++++ hw/lm32/milkymist-hw.h | 63 ----------------------------- hw/lm32/milkymist.c | 1 + include/hw/display/milkymist_tmu2.h | 41 +++++++++++++++++++ 5 files changed, 92 insertions(+), 63 deletions(-) create mode 100644 include/hw/display/milkymist_tmu2.h diff --git a/MAINTAINERS b/MAINTAINERS index b334b53979..737a33b102 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -185,6 +185,7 @@ F: disas/lm32.c F: hw/lm32/ F: hw/*/lm32_* F: hw/*/milkymist-* +F: include/hw/display/milkymist_tmu2.h F: include/hw/char/lm32_juart.h F: include/hw/lm32/ F: tests/tcg/lm32/ diff --git a/hw/display/milkymist-tmu2.c b/hw/display/milkymist-tmu2.c index 3ce44fdfce..b33fc234e9 100644 --- a/hw/display/milkymist-tmu2.c +++ b/hw/display/milkymist-tmu2.c @@ -31,6 +31,7 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "qapi/error.h" +#include "hw/display/milkymist_tmu2.h" =20 #include #include @@ -499,3 +500,51 @@ static void milkymist_tmu2_register_types(void) } =20 type_init(milkymist_tmu2_register_types) + +DeviceState *milkymist_tmu2_create(hwaddr base, qemu_irq irq) +{ + DeviceState *dev; + Display *d; + GLXFBConfig *configs; + int nelements; + int ver_major, ver_minor; + + /* check that GLX will work */ + d =3D XOpenDisplay(NULL); + if (d =3D=3D NULL) { + return NULL; + } + + if (!glXQueryVersion(d, &ver_major, &ver_minor)) { + /* + * Yeah, sometimes getting the GLX version can fail. + * Isn't X beautiful? + */ + XCloseDisplay(d); + return NULL; + } + + if ((ver_major < 1) || ((ver_major =3D=3D 1) && (ver_minor < 3))) { + printf("Your GLX version is %d.%d," + "but TMU emulation needs at least 1.3. TMU disabled.\n", + ver_major, ver_minor); + XCloseDisplay(d); + return NULL; + } + + configs =3D glXChooseFBConfig(d, 0, glx_fbconfig_attr, &nelements); + if (configs =3D=3D NULL) { + XCloseDisplay(d); + return NULL; + } + + XFree(configs); + XCloseDisplay(d); + + dev =3D qdev_create(NULL, TYPE_MILKYMIST_TMU2); + qdev_init_nofail(dev); + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq); + + return dev; +} diff --git a/hw/lm32/milkymist-hw.h b/hw/lm32/milkymist-hw.h index 32c344ef9f..976cf9254d 100644 --- a/hw/lm32/milkymist-hw.h +++ b/hw/lm32/milkymist-hw.h @@ -88,69 +88,6 @@ static inline DeviceState *milkymist_pfpu_create(hwaddr = base, return dev; } =20 -#if defined(CONFIG_X11) && defined(CONFIG_OPENGL) -#include -#include -#include -static const int glx_fbconfig_attr[] =3D { - GLX_GREEN_SIZE, 5, - GLX_GREEN_SIZE, 6, - GLX_BLUE_SIZE, 5, - None -}; -#endif - -static inline DeviceState *milkymist_tmu2_create(hwaddr base, - qemu_irq irq) -{ -#if defined(CONFIG_X11) && defined(CONFIG_OPENGL) - DeviceState *dev; - Display *d; - GLXFBConfig *configs; - int nelements; - int ver_major, ver_minor; - - /* check that GLX will work */ - d =3D XOpenDisplay(NULL); - if (d =3D=3D NULL) { - return NULL; - } - - if (!glXQueryVersion(d, &ver_major, &ver_minor)) { - /* Yeah, sometimes getting the GLX version can fail. - * Isn't X beautiful? */ - XCloseDisplay(d); - return NULL; - } - - if ((ver_major < 1) || ((ver_major =3D=3D 1) && (ver_minor < 3))) { - printf("Your GLX version is %d.%d," - "but TMU emulation needs at least 1.3. TMU disabled.\n", - ver_major, ver_minor); - XCloseDisplay(d); - return NULL; - } - - configs =3D glXChooseFBConfig(d, 0, glx_fbconfig_attr, &nelements); - if (configs =3D=3D NULL) { - XCloseDisplay(d); - return NULL; - } - - XFree(configs); - XCloseDisplay(d); - - dev =3D qdev_create(NULL, "milkymist-tmu2"); - qdev_init_nofail(dev); - sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); - sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq); - - return dev; -#else - return NULL; -#endif -} - static inline DeviceState *milkymist_ac97_create(hwaddr base, qemu_irq crrequest_irq, qemu_irq crreply_irq, qemu_irq dmar_irq, qemu_irq dmaw_irq) diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c index 63c6894c95..26a2398354 100644 --- a/hw/lm32/milkymist.c +++ b/hw/lm32/milkymist.c @@ -32,6 +32,7 @@ #include "hw/loader.h" #include "elf.h" #include "milkymist-hw.h" +#include "hw/display/milkymist_tmu2.h" #include "lm32.h" #include "exec/address-spaces.h" =20 diff --git a/include/hw/display/milkymist_tmu2.h b/include/hw/display/milky= mist_tmu2.h new file mode 100644 index 0000000000..148a119a1d --- /dev/null +++ b/include/hw/display/milkymist_tmu2.h @@ -0,0 +1,41 @@ +/* + * QEMU model of the Milkymist texture mapping unit. + * + * Copyright (c) 2010 Michael Walle + * Copyright (c) 2010 Sebastien Bourdeauducq + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * + * Specification available at: + * http://milkymist.walle.cc/socdoc/tmu2.pdf + * + */ + +#ifndef HW_DISPLAY_MILKYMIST_TMU2_H +#define HW_DISPLAY_MILKYMIST_TMU2_H + +#include "hw/qdev.h" + +#if defined(CONFIG_X11) && defined(CONFIG_OPENGL) +DeviceState *milkymist_tmu2_create(hwaddr base, qemu_irq irq); +#else +static inline DeviceState *milkymist_tmu2_create(hwaddr base, qemu_irq irq) +{ + return NULL; +} +#endif + +#endif /* HW_DISPLAY_MILKYMIST_TMU2_H */ --=20 2.20.1