From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923561; cv=none; d=zohomail.com; s=zohoarc; b=OXN2VKkmjgHqCtTjAxlAWuclMv0F3hKAPceaEO8NC775Im+ibJd1xP81wraBISHzYZrOY/cM1n1xvcddWpkFzcK0k7BlARHOq/Kejw8eH7kSwqfyDPaz/y8hFhWZ5c0f7LPfrjrDZdXzojVJGMI+dScN68hH6Qk4QwgohOCZtSM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923561; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Hc2QZ4nBETh7OVuaqnBgC4zCwlBNWGsCzCg39ebpqu8=; b=mdfF321pTYtzgM0+pbfDON3ED/LXGrLqDOOSjwBRTGy8Fjyt2GYPo8tOYWqRxFWd/LJ6KF9H3OBmKfXe8lWprwu/jjaS3y34EFJOYzpC+3YASLp7e/xO5Tig65ANluTXCZD08MgzT6NvJCiEDlP7HIJZi25fFqQ1BsbefQxZ95g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169692356121223.684176778068604; Tue, 10 Oct 2023 00:39:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7KJ-0000E0-RH; Tue, 10 Oct 2023 03:38:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7KI-0000Cp-9F for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:38:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.145.221.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7KG-0001bZ-GY for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:38:46 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-2-HSwQyOjEOLyqJTV1JgG2nw-1; Tue, 10 Oct 2023 03:38:39 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4580780349A; Tue, 10 Oct 2023 07:38:39 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5D8840C6EBF; Tue, 10 Oct 2023 07:38:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Hc2QZ4nBETh7OVuaqnBgC4zCwlBNWGsCzCg39ebpqu8=; b=ArB+A9Fc2qu5OZyujIqkxAHMa82N3S9JhY0eZBpn+Q/uBC025VjTFN4dRCzkhtLENFurUy H+XR4EU0YfMJ5xK7ga+jhZxJK/sI1mayiwN1Qj+gfICUZaif5cYsmM5yKwlcfYzcDx+QIJ FibJS1uDiwTigA+BUYArgdOw2mA+8Ko= X-MC-Unique: HSwQyOjEOLyqJTV1JgG2nw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 01/18] build-sys: add a "pixman" feature Date: Tue, 10 Oct 2023 11:38:13 +0400 Message-ID: <20231010073830.606570-2-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=216.145.221.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923563126100003 From: Marc-Andr=C3=A9 Lureau For now, pixman is mandatory, but we set config_host.h and Kconfig. Once compilation is fixed, "pixman" will become actually optional. Signed-off-by: Marc-Andr=C3=A9 Lureau --- meson.build | 10 ++++++++-- include/ui/qemu-pixman.h | 2 ++ Kconfig.host | 3 +++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 79aef19bdc..c30da15ce6 100644 --- a/meson.build +++ b/meson.build @@ -813,10 +813,14 @@ if 'ust' in get_option('trace_backends') method: 'pkg-config') endif pixman =3D not_found -if have_system or have_tools - pixman =3D dependency('pixman-1', required: have_system, version:'>=3D0.= 21.8', +if not get_option('pixman').auto() or have_system or have_tools + pixman =3D dependency('pixman-1', required: get_option('pixman'), versio= n:'>=3D0.21.8', method: 'pkg-config') endif +if not pixman.found() and (have_system or have_tools) + error('FIXME: pixman is currently required') +endif + zlib =3D dependency('zlib', required: true) =20 libaio =3D not_found @@ -2118,6 +2122,7 @@ config_host_data.set('CONFIG_SECCOMP', seccomp.found(= )) if seccomp.found() config_host_data.set('CONFIG_SECCOMP_SYSRAWRC', seccomp_has_sysrawrc) endif +config_host_data.set('CONFIG_PIXMAN', pixman.found()) config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_SOLARIS', targetos =3D=3D 'sunos') if get_option('tcg').allowed() @@ -2836,6 +2841,7 @@ have_ivshmem =3D config_host_data.get('CONFIG_EVENTFD= ') host_kconfig =3D \ (get_option('fuzzing') ? ['CONFIG_FUZZ=3Dy'] : []) + \ (have_tpm ? ['CONFIG_TPM=3Dy'] : []) + \ + (pixman.found() ? ['CONFIG_PIXMAN=3Dy'] : []) + \ (spice.found() ? ['CONFIG_SPICE=3Dy'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ (opengl.found() ? ['CONFIG_OPENGL=3Dy'] : []) + \ diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index e587c48b1f..d37feb5e3c 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @@ -6,11 +6,13 @@ #ifndef QEMU_PIXMAN_H #define QEMU_PIXMAN_H =20 +#ifdef CONFIG_PIXMAN /* pixman-0.16.0 headers have a redundant declaration */ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wredundant-decls" #include #pragma GCC diagnostic pop +#endif =20 /* * pixman image formats are defined to be native endian, diff --git a/Kconfig.host b/Kconfig.host index d763d89269..b6ac2b9316 100644 --- a/Kconfig.host +++ b/Kconfig.host @@ -11,6 +11,9 @@ config OPENGL config X11 bool =20 +config PIXMAN + bool + config SPICE bool =20 diff --git a/meson_options.txt b/meson_options.txt index 6a17b90968..0bc886f2dc 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -222,6 +222,8 @@ option('l2tpv3', type : 'feature', value : 'auto', description: 'l2tpv3 network backend support') option('netmap', type : 'feature', value : 'auto', description: 'netmap network backend support') +option('pixman', type : 'feature', value : 'auto', + description: 'pixman support') option('slirp', type: 'feature', value: 'auto', description: 'libslirp user mode network backend support') option('vde', type : 'feature', value : 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 2a74b0275b..2dda295236 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -148,6 +148,7 @@ meson_options_help() { printf "%s\n" ' pa PulseAudio sound support' printf "%s\n" ' parallels parallels image format support' printf "%s\n" ' pipewire PipeWire sound support' + printf "%s\n" ' pixman pixman support' printf "%s\n" ' png PNG support with libpng' printf "%s\n" ' pvrdma Enable PVRDMA support' printf "%s\n" ' qcow1 qcow1 image format support' @@ -401,6 +402,8 @@ _meson_option_parse() { --disable-parallels) printf "%s" -Dparallels=3Ddisabled ;; --enable-pipewire) printf "%s" -Dpipewire=3Denabled ;; --disable-pipewire) printf "%s" -Dpipewire=3Ddisabled ;; + --enable-pixman) printf "%s" -Dpixman=3Denabled ;; + --disable-pixman) printf "%s" -Dpixman=3Ddisabled ;; --with-pkgversion=3D*) quote_sh "-Dpkgversion=3D$2" ;; --enable-plugins) printf "%s" -Dplugins=3Dtrue ;; --disable-plugins) printf "%s" -Dplugins=3Dfalse ;; --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923648; cv=none; d=zohomail.com; s=zohoarc; b=RO8klMGsW5Uy40T1D+upuXphpB8xqmtWPDkdgb265/P30YC9ocHIVSTkxSHK/UBQNjyivoGKKQYsFUPHhz2O+BAVOYuNikRKJdC68CHa+yI1Ti7exam2itARTJO3nP24mHg7ZRnbqTjl1lhKTlx/JSeRXarDYfBDwYyeqlOSQVc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923648; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=l+IZUKD09t3G6wmp5MMdis6/O6ier4TPRlMSI55FW6I=; b=Y01emsntUYNKLZ+3jHJ+cH1IbSKfDxrfHfYzFtdWLnY98yiMcX5UOipeXMmcA9S6zafT/bBao7qs0m4hb+6hjOmS+Bs+4afjV5ZAMhtBNTFLA76MjYrX2UNsmeTSUpzzbHZvmei8wo21FYNF1q+krAlBrAt4NfBprYQCnHhikXo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923648293765.9511107557768; Tue, 10 Oct 2023 00:40:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7KQ-0000IG-BX; Tue, 10 Oct 2023 03:38:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7KN-0000Eh-1M for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:38:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7KL-0001cg-4H for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:38:50 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-235-srTjd0AvNfWB9__E0IMipg-1; Tue, 10 Oct 2023 03:38:44 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C2FE82825E92; Tue, 10 Oct 2023 07:38:43 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C68515C2F; Tue, 10 Oct 2023 07:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l+IZUKD09t3G6wmp5MMdis6/O6ier4TPRlMSI55FW6I=; b=Bn3AVrzyzl099dmsZDf3lWtIjVC5tB4HUoD1AOg16tz0v1yazOw+V2R7a7PsVMFPRwnkBr aCLKp6MLsL/onm0089Lcu5pHLPrSQpo9/KBomfdD9WXrXlLPlEKBAYjAGRVVKxQr7c73XS kTXUevoye0Vuf3rkANfjpkVzghn/ANU= X-MC-Unique: srTjd0AvNfWB9__E0IMipg-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 02/18] ui: compile out some qemu-pixman functions when !PIXMAN Date: Tue, 10 Oct 2023 11:38:14 +0400 Message-ID: <20231010073830.606570-3-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923649249100007 From: Marc-Andr=C3=A9 Lureau Those functions require the PIXMAN library. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/qemu-pixman.h | 7 +++++-- ui/qemu-pixman.c | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index d37feb5e3c..2ff6c4a656 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @@ -76,17 +76,17 @@ pixman_format_code_t qemu_default_pixman_format(int bpp= , bool native_endian); pixman_format_code_t qemu_drm_format_to_pixman(uint32_t drm_format); uint32_t qemu_pixman_to_drm_format(pixman_format_code_t pixman); int qemu_pixman_get_type(int rshift, int gshift, int bshift); -pixman_format_code_t qemu_pixman_get_format(PixelFormat *pf); bool qemu_pixman_check_format(DisplayChangeListener *dcl, pixman_format_code_t format); =20 +#ifdef CONFIG_PIXMAN +pixman_format_code_t qemu_pixman_get_format(PixelFormat *pf); pixman_image_t *qemu_pixman_linebuf_create(pixman_format_code_t format, int width); void qemu_pixman_linebuf_fill(pixman_image_t *linebuf, pixman_image_t *fb, int width, int x, int y); pixman_image_t *qemu_pixman_mirror_create(pixman_format_code_t format, pixman_image_t *image); -void qemu_pixman_image_unref(pixman_image_t *image); =20 pixman_image_t *qemu_pixman_glyph_from_vgafont(int height, const uint8_t *= font, unsigned int ch); @@ -95,6 +95,9 @@ void qemu_pixman_glyph_render(pixman_image_t *glyph, pixman_color_t *fgcol, pixman_color_t *bgcol, int x, int y, int cw, int ch); +#endif + +void qemu_pixman_image_unref(pixman_image_t *image); =20 G_DEFINE_AUTOPTR_CLEANUP_FUNC(pixman_image_t, qemu_pixman_image_unref) =20 diff --git a/ui/qemu-pixman.c b/ui/qemu-pixman.c index b43ec38bf0..5ca55dd199 100644 --- a/ui/qemu-pixman.c +++ b/ui/qemu-pixman.c @@ -145,6 +145,7 @@ int qemu_pixman_get_type(int rshift, int gshift, int bs= hift) return type; } =20 +#ifdef CONFIG_PIXMAN pixman_format_code_t qemu_pixman_get_format(PixelFormat *pf) { pixman_format_code_t format; @@ -158,6 +159,7 @@ pixman_format_code_t qemu_pixman_get_format(PixelFormat= *pf) } return format; } +#endif =20 /* * Return true for known-good pixman conversions. @@ -186,6 +188,7 @@ bool qemu_pixman_check_format(DisplayChangeListener *dc= l, } } =20 +#ifdef CONFIG_PIXMAN pixman_image_t *qemu_pixman_linebuf_create(pixman_format_code_t format, int width) { @@ -211,6 +214,7 @@ pixman_image_t *qemu_pixman_mirror_create(pixman_format= _code_t format, NULL, pixman_image_get_stride(image)); } +#endif =20 void qemu_pixman_image_unref(pixman_image_t *image) { @@ -220,6 +224,7 @@ void qemu_pixman_image_unref(pixman_image_t *image) pixman_image_unref(image); } =20 +#ifdef CONFIG_PIXMAN pixman_image_t *qemu_pixman_glyph_from_vgafont(int height, const uint8_t *= font, unsigned int ch) { @@ -262,3 +267,4 @@ void qemu_pixman_glyph_render(pixman_image_t *glyph, pixman_image_unref(ifg); pixman_image_unref(ibg); } +#endif /* CONFIG_PIXMAN */ --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923738; cv=none; d=zohomail.com; s=zohoarc; b=FLhtV/OpPQHcHM+hXzCsAfkbp93MCk7b7iVzpOoZ30zhgVh4Bs+Gk9nf8xfo3yNiSobwj4aA7QET7caN6upbHCfTDfrHmbOmIJtRkBfi7E3xpoIxw6lc9aKv24kpF1EXSt+V3ZnjZZuSNnUbENHOgnNtVFyZWOfguh3NnY5gOBU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923738; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SpqaCFk4RGXQOGp0t6Oqrm/YZpYrp9qY1NBjwvsxqIs=; b=DoT0ZHhksat3XXe7m3eMUrjCiw6QECdH45HAIDzqtB+nyK/hs9TnVINwYtODMdWs50CMV2xVFOmH2VPJpFmE/Z80pNj+kMJuei7UzMWtRBn9KCjlW5Zz8NlEzoatqHWK5WZhaFfJNFdQApXM1e2gc0YR/4vmC1h58HQIJbwkqB4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923738856509.4570435485915; Tue, 10 Oct 2023 00:42:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7KX-0000LR-8j; Tue, 10 Oct 2023 03:39:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7KU-0000KW-99 for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:38:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7KR-0001ec-FQ for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:38:57 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-447-69BV7YhUNUC-RvfyNtU1ww-1; Tue, 10 Oct 2023 03:38:48 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EDE792825E86; Tue, 10 Oct 2023 07:38:47 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD6BD215670B; Tue, 10 Oct 2023 07:38:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SpqaCFk4RGXQOGp0t6Oqrm/YZpYrp9qY1NBjwvsxqIs=; b=Jo9y/nYzUF8XGlpSZbxq+oYSGejGFqmWLOcXNCZmamepipA8h+ofbktULJz3elUG/m2K5m IE6EonR0mmygFjBCVM/04y5nMmxvSuHg/8IoMebzCpCRWkIoPseu1Idvba5eB4g6CwD0yt /oMP/IsjHQp3BdbYzAEWj/KqI41aI80= X-MC-Unique: 69BV7YhUNUC-RvfyNtU1ww-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 03/18] ui: add pixman-compat.h Date: Tue, 10 Oct 2023 11:38:15 +0400 Message-ID: <20231010073830.606570-4-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923739711100001 From: Marc-Andr=C3=A9 Lureau This is a tiny subset of PIXMAN API that is used pervasively in QEMU codebase to manage images and identify the underlying format. It doesn't seems worth to wrap this in a QEMU-specific API. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/pixman-compat.h | 195 +++++++++++++++++++++++++++++++++++++ include/ui/qemu-pixman.h | 2 + 2 files changed, 197 insertions(+) create mode 100644 include/ui/pixman-compat.h diff --git a/include/ui/pixman-compat.h b/include/ui/pixman-compat.h new file mode 100644 index 0000000000..91590b4e4c --- /dev/null +++ b/include/ui/pixman-compat.h @@ -0,0 +1,195 @@ +/* + * SPDX-License-Identifier: MIT + * + * Tiny subset of PIXMAN API commonly used by QEMU. + * + * Copyright 1987, 1988, 1989, 1998 The Open Group + * Copyright 1987, 1988, 1989 Digital Equipment Corporation + * Copyright 1999, 2004, 2008 Keith Packard + * Copyright 2000 SuSE, Inc. + * Copyright 2000 Keith Packard, member of The XFree86 Project, Inc. + * Copyright 2004, 2005, 2007, 2008, 2009, 2010 Red Hat, Inc. + * Copyright 2004 Nicholas Miell + * Copyright 2005 Lars Knoll & Zack Rusin, Trolltech + * Copyright 2005 Trolltech AS + * Copyright 2007 Luca Barbato + * Copyright 2008 Aaron Plattner, NVIDIA Corporation + * Copyright 2008 Rodrigo Kumpera + * Copyright 2008 Andr=C3=A9 Tupinamb=C3=A1 + * Copyright 2008 Mozilla Corporation + * Copyright 2008 Frederic Plourde + * Copyright 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright 2009, 2010 Nokia Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software= "), + * to deal in the Software without restriction, including without limitati= on + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the ne= xt + * paragraph) shall be included in all copies or substantial portions of t= he + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OT= HER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifndef PIXMAN_COMPAT_H +#define PIXMAN_COMPAT_H + +#define PIXMAN_TYPE_OTHER 0 +#define PIXMAN_TYPE_ARGB 2 +#define PIXMAN_TYPE_ABGR 3 +#define PIXMAN_TYPE_BGRA 8 +#define PIXMAN_TYPE_RGBA 9 + +#define PIXMAN_FORMAT(bpp,type,a,r,g,b) (((bpp) << 24) | \ + ((type) << 16) | \ + ((a) << 12) | \ + ((r) << 8) | \ + ((g) << 4) | \ + ((b))) + +#define PIXMAN_FORMAT_RESHIFT(val, ofs, num) \ + (((val >> (ofs)) & ((1 << (num)) - 1)) << ((val >> 22) & 3)) + +#define PIXMAN_FORMAT_BPP(f) PIXMAN_FORMAT_RESHIFT(f, 24, 8) +#define PIXMAN_FORMAT_TYPE(f) (((f) >> 16) & 0x3f) +#define PIXMAN_FORMAT_A(f) PIXMAN_FORMAT_RESHIFT(f, 12, 4) +#define PIXMAN_FORMAT_R(f) PIXMAN_FORMAT_RESHIFT(f, 8, 4) +#define PIXMAN_FORMAT_G(f) PIXMAN_FORMAT_RESHIFT(f, 4, 4) +#define PIXMAN_FORMAT_B(f) PIXMAN_FORMAT_RESHIFT(f, 0, 4) +#define PIXMAN_FORMAT_DEPTH(f) (PIXMAN_FORMAT_A(f) + \ + PIXMAN_FORMAT_R(f) + \ + PIXMAN_FORMAT_G(f) + \ + PIXMAN_FORMAT_B(f)) + +typedef enum { + /* 32bpp formats */ + PIXMAN_a8r8g8b8 =3D PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,8,8,8,8), + PIXMAN_x8r8g8b8 =3D PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,8,8,8), + PIXMAN_a8b8g8r8 =3D PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,8,8,8,8), + PIXMAN_x8b8g8r8 =3D PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,8,8,8), + PIXMAN_b8g8r8a8 =3D PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,8,8,8,8), + PIXMAN_b8g8r8x8 =3D PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,0,8,8,8), + PIXMAN_r8g8b8a8 =3D PIXMAN_FORMAT(32,PIXMAN_TYPE_RGBA,8,8,8,8), + PIXMAN_r8g8b8x8 =3D PIXMAN_FORMAT(32,PIXMAN_TYPE_RGBA,0,8,8,8), + /* 24bpp formats */ + PIXMAN_r8g8b8 =3D PIXMAN_FORMAT(24,PIXMAN_TYPE_ARGB,0,8,8,8), + PIXMAN_b8g8r8 =3D PIXMAN_FORMAT(24,PIXMAN_TYPE_ABGR,0,8,8,8), + /* 16bpp formats */ + PIXMAN_r5g6b5 =3D PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,0,5,6,5), + PIXMAN_a1r5g5b5 =3D PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,1,5,5,5), + PIXMAN_x1r5g5b5 =3D PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,0,5,5,5), +} pixman_format_code_t; + +typedef struct pixman_image pixman_image_t; + +typedef void (* pixman_image_destroy_func_t)(pixman_image_t *image, void *= data); + +struct pixman_image { + int ref_count; + pixman_format_code_t format; + int width; + int height; + int stride; + uint32_t *data; + uint32_t *free_me; + pixman_image_destroy_func_t destroy_func; + void *destroy_data; +}; + +typedef struct pixman_color { + uint16_t red; + uint16_t green; + uint16_t blue; + uint16_t alpha; +} pixman_color_t; + +static inline pixman_image_t *pixman_image_create_bits(pixman_format_code_= t format, + int width, + int height, + uint32_t *bits, + int rowstride_bytes) +{ + pixman_image_t *i =3D g_new0(pixman_image_t, 1); + + i->width =3D width; + i->height =3D height; + i->stride =3D rowstride_bytes ?: width * DIV_ROUND_UP(PIXMAN_FORMAT_BP= P(format), 8); + i->format =3D format; + if (bits) { + i->data =3D bits; + } else { + i->free_me =3D i->data =3D g_malloc0(rowstride_bytes * height); + } + i->ref_count =3D 1; + + return i; +} + +static inline pixman_image_t *pixman_image_ref(pixman_image_t *i) +{ + i->ref_count++; + return i; +} + +static inline bool pixman_image_unref(pixman_image_t *i) +{ + i->ref_count--; + + if (i->ref_count =3D=3D 0) { + if (i->destroy_func) { + i->destroy_func(i, i->destroy_data); + } + g_free(i->free_me); + g_free(i); + + return true; + } + + return false; +} + +static inline void pixman_image_set_destroy_function(pixman_image_t *i, + pixman_image_destroy_= func_t func, + void *data) + +{ + i->destroy_func =3D func; + i->destroy_data =3D data; +} + +static inline uint32_t* pixman_image_get_data(pixman_image_t *i) +{ + return i->data; +} + +static inline int pixman_image_get_height(pixman_image_t *i) +{ + return i->height; +} + +static inline int pixman_image_get_width(pixman_image_t *i) +{ + return i->width; +} + +static inline int pixman_image_get_stride(pixman_image_t *i) +{ + return i->stride; +} + +static inline pixman_format_code_t pixman_image_get_format(pixman_image_t = *i) +{ + return i->format; +} + +#endif /* PIXMAN_COMPAT_H */ diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index 2ff6c4a656..de303d7654 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @@ -12,6 +12,8 @@ #pragma GCC diagnostic ignored "-Wredundant-decls" #include #pragma GCC diagnostic pop +#else +#include "pixman-compat.h" #endif =20 /* --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923649; cv=none; d=zohomail.com; s=zohoarc; b=cj+jFvCW3L0O1s5Zberg7GntcQHNN4QlYrHsHqoSLJ8apGA20XvaI/sIXUcxcXAEf/ZPbD0tUMG8n7i1YrdIOfaDI/45GE6JWgJAq1nbOF1hvGwSo1Qv5Wmb3GL66/GEC8j1ZhJGo8psN2y8Fmua4DK3FUTffeVYLEz95BAbO1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923649; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XDBdFDwzGoJBA15B3JwPTwuFy3AVUOJpQPH9zhQ5cqc=; b=U/cNeNoPrzbJYElcT+GYTJJnl1W+LUi1OSmm0OU6bQRnqIpLFHfqhdhyO+DGEuMQ9gnyu0H8wDL1oEXhdmbWR8rKhU14bqGhySZ8ryWKETO1Tsxy2gcXj7KfoNT3Cb7DiyQ77zQe30RXmLTtkXntgP+iwyUneL7NCcBV1tHnFKQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923649298616.9274048258615; Tue, 10 Oct 2023 00:40:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7Ka-0000UZ-97; Tue, 10 Oct 2023 03:39:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7KX-0000LT-94 for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7KS-0001eu-MY for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:01 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-625-_Hlb88v4NRCatA94h6tmWg-1; Tue, 10 Oct 2023 03:38:52 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2B5341C11703; Tue, 10 Oct 2023 07:38:52 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03820492B16; Tue, 10 Oct 2023 07:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XDBdFDwzGoJBA15B3JwPTwuFy3AVUOJpQPH9zhQ5cqc=; b=eoyV9ve9MzpkzFQ+ycshMFUBuQ+cmdfr8ABNJ4ev0E8x5uejD10EqDxAIpmfCBbkahfCgZ vH6d4zi4U0RErP741uA4A9SWPOhJ2NGgLBB+k12k95O+7UjsLabJaexNrWa4dN1FEQ3aGO EQowvvfDot8RYnux2VmfqUytzqurl+g= X-MC-Unique: _Hlb88v4NRCatA94h6tmWg-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 04/18] ui/console: allow to override the default VC Date: Tue, 10 Oct 2023 11:38:16 +0400 Message-ID: <20231010073830.606570-5-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923651249100011 From: Marc-Andr=C3=A9 Lureau If a display is backed by a specialized VC, allow to override the default "vc:80Cx24C". For that, set the dpy.type just before creating the default serial/parallel/monitor. As suggested by Paolo, if the display doesn't implement a VC (get_vc() returns NULL), use a fallback that will use a muxed console on stdio. This changes the behaviour of "qemu -display none", to create a muxed serial/monitor by default. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 2 ++ system/vl.c | 62 +++++++++++++++++++++++++------------------- ui/console.c | 14 ++++++++++ 3 files changed, 51 insertions(+), 27 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index acb61a7f15..a4a49ffc64 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -462,12 +462,14 @@ struct QemuDisplay { DisplayType type; void (*early_init)(DisplayOptions *opts); void (*init)(DisplayState *ds, DisplayOptions *opts); + const char *vc; }; =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); +const char *qemu_display_get_vc(DisplayOptions *opts); void qemu_display_help(void); =20 /* vnc.c */ diff --git a/system/vl.c b/system/vl.c index ba83040675..b7b2310c4c 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1363,24 +1363,49 @@ static void qemu_create_default_devices(void) } } =20 - if (nographic) { - if (default_parallel) +#if defined(CONFIG_VNC) + if (!QTAILQ_EMPTY(&(qemu_find_opts("vnc")->head))) { + display_remote++; + } +#endif + if (dpy.type =3D=3D DISPLAY_TYPE_DEFAULT && !display_remote) { + if (!qemu_display_find_default(&dpy)) { + dpy.type =3D DISPLAY_TYPE_NONE; +#if defined(CONFIG_VNC) + vnc_parse("localhost:0,to=3D99,id=3Ddefault"); +#endif + } + } + if (dpy.type =3D=3D DISPLAY_TYPE_DEFAULT) { + dpy.type =3D DISPLAY_TYPE_NONE; + } + + const char *vc =3D qemu_display_get_vc(&dpy); + + if (nographic || (!vc && !is_daemonized() && isatty(STDOUT_FILENO))) { + if (default_parallel) { add_device_config(DEV_PARALLEL, "null"); + } if (default_serial && default_monitor) { add_device_config(DEV_SERIAL, "mon:stdio"); } else { - if (default_serial) + if (default_serial) { add_device_config(DEV_SERIAL, "stdio"); - if (default_monitor) + } + if (default_monitor) { monitor_parse("stdio", "readline", false); + } } } else { - if (default_serial) - add_device_config(DEV_SERIAL, "vc:80Cx24C"); - if (default_parallel) - add_device_config(DEV_PARALLEL, "vc:80Cx24C"); - if (default_monitor) - monitor_parse("vc:80Cx24C", "readline", false); + if (default_serial) { + add_device_config(DEV_SERIAL, vc ?: "null"); + } + if (default_parallel) { + add_device_config(DEV_PARALLEL, vc ?: "null"); + } + if (default_monitor && vc) { + monitor_parse(vc, "readline", false); + } } =20 if (default_net) { @@ -1391,23 +1416,6 @@ static void qemu_create_default_devices(void) #endif } =20 -#if defined(CONFIG_VNC) - if (!QTAILQ_EMPTY(&(qemu_find_opts("vnc")->head))) { - display_remote++; - } -#endif - if (dpy.type =3D=3D DISPLAY_TYPE_DEFAULT && !display_remote) { - if (!qemu_display_find_default(&dpy)) { - dpy.type =3D DISPLAY_TYPE_NONE; -#if defined(CONFIG_VNC) - vnc_parse("localhost:0,to=3D99,id=3Ddefault"); -#endif - } - } - if (dpy.type =3D=3D DISPLAY_TYPE_DEFAULT) { - dpy.type =3D DISPLAY_TYPE_NONE; - } - /* If no default VGA is requested, the default is "none". */ if (default_vga) { vga_model =3D get_default_vga_model(machine_class); diff --git a/ui/console.c b/ui/console.c index 8ee66d10c5..a758ed62ad 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1675,6 +1675,20 @@ void qemu_display_init(DisplayState *ds, DisplayOpti= ons *opts) dpys[opts->type]->init(ds, opts); } =20 +const char *qemu_display_get_vc(DisplayOptions *opts) +{ + assert(opts->type < DISPLAY_TYPE__MAX); + if (opts->type =3D=3D DISPLAY_TYPE_NONE) { + return NULL; + } + assert(dpys[opts->type] !=3D NULL); + if (dpys[opts->type]->vc) { + return dpys[opts->type]->vc; + } else { + return "vc:80Cx24C"; + } +} + void qemu_display_help(void) { int idx; --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923646; cv=none; d=zohomail.com; s=zohoarc; b=inW+Vi37aM9LBLIjLO2pybPZWvrrs66CjvK4ONesiGXDxMzzQ2sdUKvR09KCWnu2DM/p/mWo6vbbUklvycLq3ymDtewZ6hpMTlfXvsc427NV0wjqOHXHwRjvNHqrIKX2lZeJ8EpO7WDppQFS9Mh7fIkmYcNwZv8WHN+eA/OxYgU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923646; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LLtp42eavMrt9LDrZHqCTM5yCoIPlb9aqGSwIquAUUE=; b=NV1dWN9ykAoKZj2+EYNRzMjFt5x/2JJENLG4COqc7vvpxJIUp8CxV2T3T4wDTf7/wXoKcp5G020NOuV5bHk9ckWTtDCxbzS+WkYrvDoq2uoJ1TwgxFMggPsf0dsN/CGgcRxy+jtUQfVt8uubhEge8K06eny5TkxutVicz71aS/Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923646825560.7152396502318; Tue, 10 Oct 2023 00:40:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7Kg-0000aB-KN; Tue, 10 Oct 2023 03:39:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Ke-0000ZG-Fc for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Kc-0001gl-UW for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:08 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-77-CHEBv1GFNhyUYiH7fX5LVA-1; Tue, 10 Oct 2023 03:38:56 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 746023812599; Tue, 10 Oct 2023 07:38:56 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19CC9C0FE2D; Tue, 10 Oct 2023 07:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LLtp42eavMrt9LDrZHqCTM5yCoIPlb9aqGSwIquAUUE=; b=e8QEbx0iw1fJ3nWt38sSeR1DLAAErcT53n96Ph7xHMUDtXEsfyb/ismJWh7g0lIYIzN5Lw AlbzMqXuprnOIzYUc8KJuP9iJPl+fb2BpDMDbKQ/kUxUn7tNcImhSKe4npP2/PGcyrMg/w lbJVgNdG1EVJw0jyMMLFaPldnNoTms4= X-MC-Unique: CHEBv1GFNhyUYiH7fX5LVA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 05/18] ui/vc: console-vc requires PIXMAN Date: Tue, 10 Oct 2023 11:38:17 +0400 Message-ID: <20231010073830.606570-6-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923647472100001 From: Marc-Andr=C3=A9 Lureau Add stubs for the fallback paths. get_vc() now returns NULL by default if !PIXMAN. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc-stubs.c | 32 ++++++++++++++++++++++++++++++++ ui/console.c | 3 +++ ui/meson.build | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 ui/console-vc-stubs.c diff --git a/ui/console-vc-stubs.c b/ui/console-vc-stubs.c new file mode 100644 index 0000000000..0827961b2b --- /dev/null +++ b/ui/console-vc-stubs.c @@ -0,0 +1,32 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * QEMU VC stubs + */ +#include "qemu/osdep.h" + +#include "qapi/error.h" +#include "qemu/error-report.h" +#include "qemu/option.h" +#include "chardev/char.h" +#include "ui/console-priv.h" + +void qemu_text_console_select(QemuTextConsole *c) +{ +} + +const char * qemu_text_console_get_label(QemuTextConsole *c) +{ + return NULL; +} + +void qemu_text_console_update_cursor(void) +{ +} + +void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym) +{ +} + +void qemu_console_early_init(void) +{ +} diff --git a/ui/console.c b/ui/console.c index a758ed62ad..a72c495b5a 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1685,8 +1685,11 @@ const char *qemu_display_get_vc(DisplayOptions *opts) if (dpys[opts->type]->vc) { return dpys[opts->type]->vc; } else { +#ifdef CONFIG_PIXMAN return "vc:80Cx24C"; +#endif } + return NULL; } =20 void qemu_display_help(void) diff --git a/ui/meson.build b/ui/meson.build index 0a1e8272a3..3085e10a72 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -6,7 +6,6 @@ system_ss.add(png) system_ss.add(files( 'clipboard.c', 'console.c', - 'console-vc.c', 'cursor.c', 'input-keymap.c', 'input-legacy.c', @@ -19,6 +18,7 @@ system_ss.add(files( 'ui-qmp-cmds.c', 'util.c', )) +system_ss.add(when: pixman, if_true: files('console-vc.c'), if_false: file= s('console-vc-stubs.c')) if dbus_display system_ss.add(files('dbus-module.c')) endif --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923695; cv=none; d=zohomail.com; s=zohoarc; b=ABQevXN95whQtNdmbu//F4zQuqJkh90gdCD83PEJNQYVFzxzdQYeTV55sH2HUAd5bHQ5gkj3o7XciwRIspI6yKBN1KgIrxWEUfuloaEpUHhyIegqp7EIDJJMTZC+U3LeMtpr/SiQL3Y8C+Ceo45xkKg71DaH+3KnVUddicv2yEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923695; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=t2z+Jyqs3B+QrIMXiV5YUpL+rrIemvToEH1MmhrX9vA=; b=RgqkLGjBXdyBfkuWlSZSRf7UuxFlDrfLpF0J23rm6rqDc+qUcMO0yXT95ZzunKvZAzq8GPfb8rQ7nTKx2zq2kAngV+68JKElaETxFCQmdFMtH4OkaKl8O7AlIQnPqeZa87EwZjaVR+/adQBgapXR0+1oVt92I4x42ewXP4Aj8x8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169692369555638.74479120040917; Tue, 10 Oct 2023 00:41:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7Ku-0000rl-M4; Tue, 10 Oct 2023 03:39:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Ks-0000ke-HF for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Kr-0001kb-12 for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:22 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-369-F-Qp26oaP1uTu0rBBox6fw-1; Tue, 10 Oct 2023 03:39:01 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9C8283C40C0C; Tue, 10 Oct 2023 07:39:00 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C4E149BB9A; Tue, 10 Oct 2023 07:38:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t2z+Jyqs3B+QrIMXiV5YUpL+rrIemvToEH1MmhrX9vA=; b=GsUjhf9W70Zwtu+Q7DHjUAHR8nNNa1/v93U5HzHuVAWe27RvfoZgipCPX7hJT3vGQ5tXzU 3/b3ciFh0x/spPxyJWMlhbibrlc1m02HzQI7DUnKfZBm9MqhUF0NZ0+/jZwT2cDcZO2nkw K7X+111lwftw67128m7BV+NLeb6rDgs= X-MC-Unique: F-Qp26oaP1uTu0rBBox6fw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 06/18] qmp/hmp: disable screendump if PIXMAN is missing Date: Tue, 10 Oct 2023 11:38:18 +0400 Message-ID: <20231010073830.606570-7-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923697425100003 From: Marc-Andr=C3=A9 Lureau The command requires color conversion and line-by-line feeding. We could have a simple fallback for simple formats though. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- qapi/ui.json | 3 ++- ui/ui-hmp-cmds.c | 2 ++ ui/ui-qmp-cmds.c | 2 ++ hmp-commands.hx | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/qapi/ui.json b/qapi/ui.json index 006616aa77..e74cc3efb6 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -200,7 +200,8 @@ { 'command': 'screendump', 'data': {'filename': 'str', '*device': 'str', '*head': 'int', '*format': 'ImageFormat'}, - 'coroutine': true } + 'coroutine': true, + 'if': 'CONFIG_PIXMAN' } =20 ## # =3D=3D Spice diff --git a/ui/ui-hmp-cmds.c b/ui/ui-hmp-cmds.c index c671389473..26c8ced1f2 100644 --- a/ui/ui-hmp-cmds.c +++ b/ui/ui-hmp-cmds.c @@ -437,6 +437,7 @@ void sendkey_completion(ReadLineState *rs, int nb_args,= const char *str) } } =20 +#ifdef CONFIG_PIXMAN void coroutine_fn hmp_screendump(Monitor *mon, const QDict *qdict) { @@ -458,6 +459,7 @@ hmp_screendump(Monitor *mon, const QDict *qdict) end: hmp_handle_error(mon, err); } +#endif =20 void hmp_client_migrate_info(Monitor *mon, const QDict *qdict) { diff --git a/ui/ui-qmp-cmds.c b/ui/ui-qmp-cmds.c index debc07d678..d772e1cb7f 100644 --- a/ui/ui-qmp-cmds.c +++ b/ui/ui-qmp-cmds.c @@ -212,6 +212,7 @@ void qmp_client_migrate_info(const char *protocol, cons= t char *hostname, error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "protocol", "'spice'"); } =20 +#ifdef CONFIG_PIXMAN #ifdef CONFIG_PNG /** * png_save: Take a screenshot as PNG @@ -391,3 +392,4 @@ qmp_screendump(const char *filename, const char *device, } } } +#endif /* CONFIG_PIXMAN */ diff --git a/hmp-commands.hx b/hmp-commands.hx index 63eac22734..c343d82fbc 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -252,6 +252,7 @@ SRST =20 ERST =20 +#ifdef CONFIG_PIXMAN { .name =3D "screendump", .args_type =3D "filename:F,format:-fs,device:s?,head:i?", @@ -267,6 +268,7 @@ SRST ``screendump`` *filename* Save screen into PPM image *filename*. ERST +#endif =20 { .name =3D "logfile", --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923634; cv=none; d=zohomail.com; s=zohoarc; b=X/JRRkBGZX98ozUJ6nFeLRxbffSpTo3rmC0K5d/pW6z6Ydk79vl+j2M5wM0huY/5sR8MTwVUYr3p34OTubAabj5nq4jnmmY0J8pROI7mO3lq/R0guPfgFGJHk2cfId8wxHBP6A0UBuEth/wfJJ1kiI3n5Xu02lw8+Y9bmfDkcjs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923634; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=s5+e3JFYr7c0mztuM2EMhEesHcY+DdlysGfXNZqQu98=; b=VTX88cp8OyiGAU6Gnv7l+yfjQX85/dtEEHOm3GRR09+RHdQyKNUR9OGOuLnB6ZNUDZWKFf7c88Lu2LLqYUTDCB8ADH503LFMKhAO6cWsbr85D92l/eXD2DZlBQnnN/RaonqOsNIchmU1zhIOKqBOTLN754fZ0nXzyWiqFWX5UoU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923634403634.7649136603274; Tue, 10 Oct 2023 00:40:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7L1-0001D9-HG; Tue, 10 Oct 2023 03:39:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Ky-00013l-Ve for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Kw-0001mK-VT for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:28 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-lhlL1MipNomIdgzE7hs5yQ-1; Tue, 10 Oct 2023 03:39:05 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A61933C40C22; Tue, 10 Oct 2023 07:39:04 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7AA722027019; Tue, 10 Oct 2023 07:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s5+e3JFYr7c0mztuM2EMhEesHcY+DdlysGfXNZqQu98=; b=ZssLRVx3vfwD0pZjMbUKzHKtJtlZBaevvVDZ0jL9CELnAdwHyzu8dr8hQqcsAt+Fb35BXP pYfCTctD+4GU07w0UOwP+2giRRle8zNrOXOHq3j6d7oHGIDYbtlA7Wo5zHuNLg5MtZIeN9 yLI9MWHl5xAhe7ezh3CPH4VJirJdAAk= X-MC-Unique: lhlL1MipNomIdgzE7hs5yQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 07/18] virtio-gpu: replace PIXMAN for region/rect test Date: Tue, 10 Oct 2023 11:38:19 +0400 Message-ID: <20231010073830.606570-8-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923635244100005 From: Marc-Andr=C3=A9 Lureau Use a simpler implementation for rectangle geometry & intersect, drop the need for (more complex) PIXMAN functions. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/rect.h | 55 +++++++++++++++++++++++++++++++++++++++++ hw/display/virtio-gpu.c | 30 +++++++++------------- 2 files changed, 66 insertions(+), 19 deletions(-) create mode 100644 include/ui/rect.h diff --git a/include/ui/rect.h b/include/ui/rect.h new file mode 100644 index 0000000000..63edf7a39d --- /dev/null +++ b/include/ui/rect.h @@ -0,0 +1,55 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef QEMU_RECT_H +#define QEMU_RECT_H + +#include +#include + +typedef struct QemuRect { + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; +} QemuRect; + +static inline void qemu_rect_init(QemuRect* rect, int16_t x, int16_t y, ui= nt16_t width, uint16_t height) +{ + rect->x =3D x; + rect->y =3D x; + rect->width =3D width; + rect->height =3D height; +} + +static inline void qemu_rect_translate(QemuRect* rect, int16_t dx, int16_t= dy) +{ + rect->x +=3D dx; + rect->y +=3D dy; +} + +static inline bool qemu_rect_intersect(const QemuRect* a, const QemuRect* = b, QemuRect *res) +{ + int16_t x1, x2, y1, y2; + + x1 =3D MAX(a->x, b->x); + y1 =3D MAX(a->y, b->y); + x2 =3D MIN(a->x + a->width, b->x + b->width); + y2 =3D MIN(a->y + a->height, b->y + b->height); + + if (x1 >=3D x2 || y1 >=3D y2) { + if (res) { + qemu_rect_init(res, 0, 0, 0, 0); + } + + return false; + } + + if (res) { + qemu_rect_init(res, x1, y1, x2 - x1, y2 - y1); + } + + return true; +} + +#endif diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 93857ad523..fdb7b25a70 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -16,6 +16,7 @@ #include "qemu/iov.h" #include "sysemu/cpus.h" #include "ui/console.h" +#include "ui/rect.h" #include "trace.h" #include "sysemu/dma.h" #include "sysemu/sysemu.h" @@ -507,7 +508,7 @@ static void virtio_gpu_resource_flush(VirtIOGPU *g, struct virtio_gpu_simple_resource *res; struct virtio_gpu_resource_flush rf; struct virtio_gpu_scanout *scanout; - pixman_region16_t flush_region; + QemuRect flush_rect; bool within_bounds =3D false; bool update_submitted =3D false; int i; @@ -569,34 +570,25 @@ static void virtio_gpu_resource_flush(VirtIOGPU *g, return; } =20 - pixman_region_init_rect(&flush_region, - rf.r.x, rf.r.y, rf.r.width, rf.r.height); + qemu_rect_init(&flush_rect, rf.r.x, rf.r.y, rf.r.width, rf.r.height); for (i =3D 0; i < g->parent_obj.conf.max_outputs; i++) { - pixman_region16_t region, finalregion; - pixman_box16_t *extents; + QemuRect rect; =20 if (!(res->scanout_bitmask & (1 << i))) { continue; } scanout =3D &g->parent_obj.scanout[i]; =20 - pixman_region_init(&finalregion); - pixman_region_init_rect(®ion, scanout->x, scanout->y, - scanout->width, scanout->height); + qemu_rect_init(&rect, scanout->x, scanout->y, + scanout->width, scanout->height); =20 - pixman_region_intersect(&finalregion, &flush_region, ®ion); - pixman_region_translate(&finalregion, -scanout->x, -scanout->y); - extents =3D pixman_region_extents(&finalregion); /* work out the area we need to update for each console */ - dpy_gfx_update(g->parent_obj.scanout[i].con, - extents->x1, extents->y1, - extents->x2 - extents->x1, - extents->y2 - extents->y1); - - pixman_region_fini(®ion); - pixman_region_fini(&finalregion); + if (qemu_rect_intersect(&flush_rect, &rect, &rect)) { + qemu_rect_translate(&rect, -scanout->x, -scanout->y); + dpy_gfx_update(g->parent_obj.scanout[i].con, + rect.x, rect.y, rect.width, rect.height); + } } - pixman_region_fini(&flush_region); } =20 static void virtio_unref_resource(pixman_image_t *image, void *data) --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923670; cv=none; d=zohomail.com; s=zohoarc; b=E4efpZMgFZS17u6xllSmXV2pBTo3Sp5smsOOxpH5KTyKSHH/okG7zADYY/Xz3BBF4G5FETW7JOVTU21HCVlh3kD5NtSUqya6z/BNrtaMNbHUxZtHOE2jfyO+h58BoPcBT2H6qR0jIsGnN4tkOfz+NNljAu8FUMTVUFVPy5GDj1Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923670; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=T6xjrN7887k/ybU0jIiiMTuLEWDRldLbFb/r1uyi5ms=; b=NG/YGtoxO2EoOnYRGyc5DzB67B/bxfkWATjefUrmMB4pcWRVgJ7a2qyDp6wx5VoNEqeFo9aLVeQtamouvyPCebFnXROulkgoo5kbIZIV58zND6pGk+wAENYoBP91oymVNf77wSKVrd4c0fmlfDpg6XbNGItlcCkadyd+LLxohUA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169692367094717.391454004102684; Tue, 10 Oct 2023 00:41:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7Kn-0000e2-MT; Tue, 10 Oct 2023 03:39:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Kl-0000cl-PM for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Kk-0001if-H3 for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:15 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-455-GQxLBPXjNza6W6__roqHSA-1; Tue, 10 Oct 2023 03:39:09 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D80B3C40C15; Tue, 10 Oct 2023 07:39:09 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 076F110F1BEA; Tue, 10 Oct 2023 07:39:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T6xjrN7887k/ybU0jIiiMTuLEWDRldLbFb/r1uyi5ms=; b=AoKoVb6ranAo79ZOASiJ9s08+BC58AmQz2PuYMrwK5/XDbtSkp269cR2+gwAs79dunSEmB 7NWVFYXH0G7KIhu27Id5y1PV5H/j2uvgilQ3ZrieJWtXfS5EzDnPGEWvQTIt4FW3EH9eIq LsYYE/YsxR0lpXZFTP0L/dbJXDu3M2Q= X-MC-Unique: GQxLBPXjNza6W6__roqHSA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 08/18] ui/console: when PIXMAN is unavailable, don't draw placeholder msg Date: Tue, 10 Oct 2023 11:38:20 +0400 Message-ID: <20231010073830.606570-9-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923671328100004 From: Marc-Andr=C3=A9 Lureau When we can't draw text, simply show a blank display. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/console.c b/ui/console.c index a72c495b5a..8e688d3569 100644 --- a/ui/console.c +++ b/ui/console.c @@ -584,6 +584,7 @@ DisplaySurface *qemu_create_placeholder_surface(int w, = int h, const char *msg) { DisplaySurface *surface =3D qemu_create_displaysurface(w, h); +#ifdef CONFIG_PIXMAN pixman_color_t bg =3D QEMU_PIXMAN_COLOR_BLACK; pixman_color_t fg =3D QEMU_PIXMAN_COLOR_GRAY; pixman_image_t *glyph; @@ -598,6 +599,7 @@ DisplaySurface *qemu_create_placeholder_surface(int w, = int h, x+i, y, FONT_WIDTH, FONT_HEIGHT); qemu_pixman_image_unref(glyph); } +#endif surface->flags |=3D QEMU_PLACEHOLDER_FLAG; return surface; } --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923644; cv=none; d=zohomail.com; s=zohoarc; b=On4DSQzlpcLhJjfhftwxl2pw/UZVIC37KSR1crSnoEDiEeptyBb8TQO6vm3FPoMVaLFUqSHWgtged4fOcu3FiUpw66hPSQNcR9aMpv3Ncuaa8+wT6YcYXt6roax1r9uLTfaHC8XcCAiNFztyZjteQT1KF+tbo65cGWF3ZBvcViE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923644; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kJiPpvjKWBAnBlGP3KkhDI2+e8BdQyJQjN7KhYL75jw=; b=FlhZ8n9ESRP8McmixjzkCy8IkHZEPDvWxG9IZUoHc6cepMv6FqvumN5+6Y9LvGQOohbPzly8JRKehc0dx1+ZjHMhuH2v0c1q8QZOKbNyIFH+Fk1Mr72aa1f3kSwGwMvMOnDZXKD69B36guzbI7lXOQtr9/NxsBqP77jdAbmSGM4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923644345946.1453662360983; Tue, 10 Oct 2023 00:40:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7Kp-0000fR-Jl; Tue, 10 Oct 2023 03:39:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Ko-0000eY-9f for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Kn-0001jY-0r for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:18 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-54--wkMQp_XO8i3S2ZMYuvpWA-1; Tue, 10 Oct 2023 03:39:13 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B5E4028EC10A; Tue, 10 Oct 2023 07:39:12 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA42B2026D37; Tue, 10 Oct 2023 07:39:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kJiPpvjKWBAnBlGP3KkhDI2+e8BdQyJQjN7KhYL75jw=; b=Gy5vXWuc3ZeoKE0FxwZx7526ov3+i3vCz67Xy/Oj/OJ3AX3uwbSw9W98WqCf5+CX2fv6Ci uISy1FZXPXu1oqY7i4em/NyE6BGv08y296GN/ZytFuwrbjrn27IFWmqKuTSI60VNY1MsXB xpQj0qIlcs2Bqs8hODxih6zYaenbBDU= X-MC-Unique: -wkMQp_XO8i3S2ZMYuvpWA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 09/18] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN Date: Tue, 10 Oct 2023 11:38:21 +0400 Message-ID: <20231010073830.606570-10-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923645264100015 From: Marc-Andr=C3=A9 Lureau This simply means that 2d drawing updates won't be handled, but 3d should work. Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/display/vhost-user-gpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index 1150521d9d..709c8a02a1 100644 --- a/hw/display/vhost-user-gpu.c +++ b/hw/display/vhost-user-gpu.c @@ -307,6 +307,7 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUse= rGpuMsg *msg) dpy_gl_update(con, m->x, m->y, m->width, m->height); break; } +#ifdef CONFIG_PIXMAN case VHOST_USER_GPU_UPDATE: { VhostUserGpuUpdate *m =3D &msg->payload.update; =20 @@ -334,6 +335,7 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUse= rGpuMsg *msg) } break; } +#endif default: g_warning("unhandled message %d %d", msg->request, msg->size); } --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923672; cv=none; d=zohomail.com; s=zohoarc; b=iHKFM9Css8KcyK9L3Db02gJtZ80805r40LVOwxDC0P59l0vC5Htu7tx300/NEe05Xy3f1QF4cFtlWjU7YcWuCZcUQVYqZYJbY5LnsAyi0VJBVce/WBmoqhFU1VgD988CMhG4A+E34KWXytrUQelzknjW9FwXFEZHzs8Zt/ZaR1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923672; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4SZ/OasRCxgbsCQYI36rdtboQkh+0BPjMMpQl7MHELU=; b=nK8Amw5MAJjG83Tz1IYn84g5HTAEoKdEmtxtAYEuuxOATFECYaz/UYnTFnZmg/iii8j21dhseF34Zpfeqme9tK9ipmJGvqr1zN3lwEvYsPTgblo+z/pKiZsCwUfo1J4cpYwFLh8gDY6CLhVfBeap/D/VJAgtYHNXenZ8OzyqTaI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923672544852.3302289014048; Tue, 10 Oct 2023 00:41:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7Kx-00011t-IK; Tue, 10 Oct 2023 03:39:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Kw-0000tg-3g for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Kt-0001lV-N2 for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:24 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-210-VkZBKONhMx-whdJikSoTtw-1; Tue, 10 Oct 2023 03:39:17 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0EC8A3C40C06; Tue, 10 Oct 2023 07:39:17 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA163492B16; Tue, 10 Oct 2023 07:39:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4SZ/OasRCxgbsCQYI36rdtboQkh+0BPjMMpQl7MHELU=; b=F/6VKYbhf9atkyyVGwS3vsWdxVIer5lGGnY9l0xchWsvtPk6TFb35K3sNI30PNipqn+cAc nU9f2Eqy2sfQ/+U+jWntwSLA/AhxCb9oMjymHca9EI54f8JbD6RD5OYrs2Se6+tXlv/hY7 JkXx8SXD1Qs1QueDF482ksoS0SZsJY4= X-MC-Unique: VkZBKONhMx-whdJikSoTtw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 10/18] ui/gl: opengl doesn't require PIXMAN Date: Tue, 10 Oct 2023 11:38:22 +0400 Message-ID: <20231010073830.606570-11-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923673318100011 From: Marc-Andr=C3=A9 Lureau The QEMU fallback covers the requirements. We still need the flags of header inclusion with CONFIG_PIXMAN. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/meson.build b/ui/meson.build index 3085e10a72..7c99613950 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -60,8 +60,8 @@ endif system_ss.add(opengl) if opengl.found() opengl_ss =3D ss.source_set() - opengl_ss.add(gbm) - opengl_ss.add(when: [opengl, pixman], + opengl_ss.add(gbm, pixman) + opengl_ss.add(when: [opengl], if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c',= 'egl-context.c')) ui_modules +=3D {'opengl' : opengl_ss} endif --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923632; cv=none; d=zohomail.com; s=zohoarc; b=hCu9kEYHgP/Cisqkm2CRTDQI7ajzCA0aKXuFqEtP08AhlySCEQMFXVsSZlp/jHYFu8tXVPfKNeMTS9tDzbPCQms/2A1Kd0HIbJGjoAJsfQMOOm0eETZ3AnBHOQaIJvgdoV3fqAat+Wg8bwVoM5MwPufsqX0LOxZCZfKfS9DHmrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923632; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Hbsn4rTGgQj0//AeZ8bh7v4t7ojgUd1qBUk6GwwIL1Q=; b=O7zU77zgJgA87DqfS4F4U9xahqrCSUFG0LGTS5vC1WQqz9jo3iYZXvK3SvjcUg93iW/q7fOjYsuuSpqpw4zvBHmfKb661AYv6mJ+kf43qinnbKd32FFw7hWRjICvOGDuHga0Nd6+zYSuMhBk50SiFtTHFQ/qvPDInybx3VWR5F8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923632981647.0424072032849; Tue, 10 Oct 2023 00:40:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7L0-000198-UA; Tue, 10 Oct 2023 03:39:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Ky-00013e-OR for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7Kw-0001mI-FH for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:28 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-426-RhjS6utfPcSkjAygSjrcog-1; Tue, 10 Oct 2023 03:39:21 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3BFFA817050; Tue, 10 Oct 2023 07:39:21 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A84D1C060DE; Tue, 10 Oct 2023 07:39:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Hbsn4rTGgQj0//AeZ8bh7v4t7ojgUd1qBUk6GwwIL1Q=; b=fTRZL4Qjhp9WHTyjCbuD5LnzbnKYJ2nJLlm6FR3kbaPRbWDsQPtvXSVRlmJlWOQphwd77B KgY6Kmvql/WRtTlYvK/PTKS+Q87vvmpk4kuISIyiye5qSuZAc24vS/WvZzYYC7t/O5srXy JgFJ6apNCwMTdV2RpXXvAoLkSuUldmc= X-MC-Unique: RhjS6utfPcSkjAygSjrcog-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 11/18] ui/vnc: VNC requires PIXMAN Date: Tue, 10 Oct 2023 11:38:23 +0400 Message-ID: <20231010073830.606570-12-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923633195100001 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau --- meson.build | 6 +++++- ui/meson.build | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index c30da15ce6..291c2f1301 100644 --- a/meson.build +++ b/meson.build @@ -1530,7 +1530,11 @@ endif vnc =3D not_found jpeg =3D not_found sasl =3D not_found -if get_option('vnc').allowed() and have_system +if get_option('vnc') \ + .disable_auto_if(not have_system) \ + .require(pixman.found(), + error_message: 'cannot enable VNC if pixman is not a= vailable') \ + .allowed() vnc =3D declare_dependency() # dummy dependency jpeg =3D dependency('libjpeg', required: get_option('vnc_jpeg'), method: 'pkg-config') diff --git a/ui/meson.build b/ui/meson.build index 7c99613950..b3525ef064 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -46,8 +46,8 @@ vnc_ss.add(files( )) vnc_ss.add(zlib, jpeg, gnutls) vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c')) -system_ss.add_all(when: vnc, if_true: vnc_ss) -system_ss.add(when: vnc, if_false: files('vnc-stubs.c')) +system_ss.add_all(when: [vnc, pixman], if_true: vnc_ss) +system_ss.add(when: [vnc, pixman], if_false: files('vnc-stubs.c')) =20 ui_modules =3D {} =20 --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923641; cv=none; d=zohomail.com; s=zohoarc; b=ZGpl+01ZFh0gm93SPHz3ESQ82c+oN2fmlomrJCSffpD/NsrO6WGhxI+8SMvu+cGk/ziDmogIzsWHwEUFG6uWPf8OsfLcUyAuZE8dX1iPJ3G7Ik/lXMgxhIO/b72h/yRsfr20zyUEks+icikfC30YP+C/lBNSJ7cFpp+5QP+/9Zo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923641; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OcLFKisrvdsUnoI6kjiP3anO/6zUJnpkUfqLjcRmuyA=; b=WmTpKNthOdZwUDxtLepCxbb9S/JMra33+Wq1f4UxG55EgF7ySdxrFC6w1C7X0YbDSVoMCJIRrPgtIYsXdiLR9yPvfxIzlFB+F3Om6Oq0y9IGsxWnPlOjKpSrbM/JfC8SoEhojk36ro6G9z3v0YmgCN/OZRkwYBnj+skQAiUmi7E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923641553281.8246577676481; Tue, 10 Oct 2023 00:40:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7LT-0002RB-NM; Tue, 10 Oct 2023 03:39:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LG-00023f-OY for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7L5-0001pe-2u for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:46 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-42-f4yctnwrOnuBGSXEIrcY9Q-1; Tue, 10 Oct 2023 03:39:26 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 840EA802C1A; Tue, 10 Oct 2023 07:39:25 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 68D21C154CE; Tue, 10 Oct 2023 07:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OcLFKisrvdsUnoI6kjiP3anO/6zUJnpkUfqLjcRmuyA=; b=b46FgVv4Bj53hnrncNLR261+VSUf2HdeL0YwfUNYf495aCb/pFYMHOkNtY4LLOdwYWmP61 vAbWAcuV0z5aaK3Tj+ymMawVndF/o8Fp+y72fJ6Lkd0wxSyX2Zd0nAL/HWrJopa3Yilg8x BXjfEzXm1Njo36gT63LKV8NETuh+GvM= X-MC-Unique: f4yctnwrOnuBGSXEIrcY9Q-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 12/18] ui/spice: SPICE/QXL requires PIXMAN Date: Tue, 10 Oct 2023 11:38:24 +0400 Message-ID: <20231010073830.606570-13-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923643329100011 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau --- meson.build | 6 +++++- hw/display/Kconfig | 2 +- ui/meson.build | 10 +++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 291c2f1301..a84a2f25d0 100644 --- a/meson.build +++ b/meson.build @@ -1015,7 +1015,11 @@ if not get_option('spice_protocol').auto() or have_s= ystem method: 'pkg-config') endif spice =3D not_found -if not get_option('spice').auto() or have_system +if get_option('spice') \ + .disable_auto_if(not have_system) \ + .require(pixman.found(), + error_message: 'cannot enable SPICE if pixman is not= available') \ + .allowed() spice =3D dependency('spice-server', version: '>=3D0.14.0', required: get_option('spice'), method: 'pkg-config') diff --git a/hw/display/Kconfig b/hw/display/Kconfig index 7b3da68d1c..4d8b0cec40 100644 --- a/hw/display/Kconfig +++ b/hw/display/Kconfig @@ -93,7 +93,7 @@ config VGA =20 config QXL bool - depends on SPICE && PCI + depends on SPICE && PCI && PIXMAN select VGA =20 config VIRTIO_GPU diff --git a/ui/meson.build b/ui/meson.build index b3525ef064..7f806a6d48 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -141,12 +141,12 @@ if spice.found() 'spice-display.c' )) ui_modules +=3D {'spice-core' : spice_core_ss} -endif =20 -if spice.found() and gio.found() - spice_ss =3D ss.source_set() - spice_ss.add(spice, gio, pixman, files('spice-app.c')) - ui_modules +=3D {'spice-app': spice_ss} + if gio.found() + spice_ss =3D ss.source_set() + spice_ss.add(spice, gio, pixman, files('spice-app.c')) + ui_modules +=3D {'spice-app': spice_ss} + endif endif =20 keymaps =3D [ --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923717; cv=none; d=zohomail.com; s=zohoarc; b=Pr2ildlPC65/1oVttLsUonEbEyQU6+W2Gx3J6fir4yj5K1/wE6DkZP0+eOtO/k+NngVkxe/oD2k3Y7n89Do/v+WxVujV3CZ2yNHP+YZQ33FuyEXYSfR2HVn4rhRLrlM6qeOL9y0Vjw07O++stkDtItaldiayOR3y0w/nXmTgCFQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923717; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fAYbo/22+Lk3//KJ9ZZBNn5UriCHW++RvethisZHvBg=; b=mwfQvouj3BKai1zU1CBFb/GgwdHGW2PQs3/3B0jX91XJa93pOg5UwvBzbCiYgzsqAty92wUizw8/kuKpLQP2QKIC81jj2ybhas+xUArWmz394iau6tYbSzavMq3ky7h9lpziihBpmHZOzUXwX+gxG4s+inXUVxF5FubmMekuIOY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923717187691.6443384979989; Tue, 10 Oct 2023 00:41:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7LW-0002nO-D5; Tue, 10 Oct 2023 03:40:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LT-0002RX-FH for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LQ-0001ug-Gb for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:58 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-368-lk0RaqW6ObO6KKUPzYM0lg-1; Tue, 10 Oct 2023 03:39:30 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B926F8039CB; Tue, 10 Oct 2023 07:39:29 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id BCF672026D37; Tue, 10 Oct 2023 07:39:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fAYbo/22+Lk3//KJ9ZZBNn5UriCHW++RvethisZHvBg=; b=deNsM/UN14Hc3kGQaT+79yS6YRTOClOhyKDgQWveG7ZDhTHx1mIHgJhAnS9kFKzH3TZk/Y ianag7R1jr7rLKgudT3mnuVB6eLm2LCb4vzjtWX1EqPvp+6CvsGVh30Xzol8+rHDxerZ5k sDANDtBHN1hp94SnBn9YWIUFegBson0= X-MC-Unique: lk0RaqW6ObO6KKUPzYM0lg-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 13/18] ui/gtk: -display gtk requires PIXMAN Date: Tue, 10 Oct 2023 11:38:25 +0400 Message-ID: <20231010073830.606570-14-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923717512100001 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index a84a2f25d0..64d2aca79b 100644 --- a/meson.build +++ b/meson.build @@ -1501,7 +1501,11 @@ gtkx11 =3D not_found vte =3D not_found have_gtk_clipboard =3D get_option('gtk_clipboard').enabled() =20 -if not get_option('gtk').auto() or have_system +if get_option('gtk') \ + .disable_auto_if(not have_system) \ + .require(pixman.found(), + error_message: 'cannot enable GTK if pixman is not a= vailable') \ + .allowed() gtk =3D dependency('gtk+-3.0', version: '>=3D3.22.0', method: 'pkg-config', required: get_option('gtk')) --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923706; cv=none; d=zohomail.com; s=zohoarc; b=fVHRWeHnoZQcF+CZr0akGqWCuOe4DQu5Z0yT8w061Ez4JQqlIImGG1P7yRuxDprOyghrXRSunM2XCpHNwgReSTrSIWjmHSharI0os7qUo4BuU3KW6TAkM0UVguz6/VyRfazuCcsThPueUV5Ugnew213QfJ8MYFEJXggCHBiMPnA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923706; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=hpm0HOG5vZIwPmHYIl8ik31ZakaFR6CI7reDeaoS1AI=; b=Vv2+qwRvK23ya/B3uCcfs7XaEX9SMFL8pnSjsr0VVwWKhmKrPPg+vJGUa54bZYdZlaXpEqw8koS0/z8+aArCM1lZQPUDL7ms2LveISUQ10SSoZ6g3OyAvk9J1MB3+Y6UrPjI+h8wbMhYPkpZZedumCAKHvvnpxnlTP7AjvdqoTY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923706393104.55929848447704; Tue, 10 Oct 2023 00:41:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7LU-0002WH-7r; Tue, 10 Oct 2023 03:40:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LO-0002KJ-NC for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LM-0001tL-Aj for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:54 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-649-g54jNRdbOqSicZou5R_3Ow-1; Tue, 10 Oct 2023 03:39:35 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 71E303812595; Tue, 10 Oct 2023 07:39:34 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBB2C1143F; Tue, 10 Oct 2023 07:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hpm0HOG5vZIwPmHYIl8ik31ZakaFR6CI7reDeaoS1AI=; b=Qm2dYyPDbOn9NmAc6/sMvd5p8csjGPwtXxRMp+BFF7OHzi7iPvJiq2MskN4dlmwNZDEFUU OwpIIEoyn0SyWeADQZFph0m2SrLgFe1+Uj2XG/AUMy+A0A6JJVATHMrNFdoUeBpNAvCy4A wtAb6/IrMl5lhtx6bfcXA+2OoQhS6VY= X-MC-Unique: g54jNRdbOqSicZou5R_3Ow-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 14/18] ui/dbus: do not require PIXMAN Date: Tue, 10 Oct 2023 11:38:26 +0400 Message-ID: <20231010073830.606570-15-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923707503100003 From: Marc-Andr=C3=A9 Lureau Implement a fallback path for region 2D update. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/dbus-listener.c | 88 ++++++++++++++++++++++++++++++++-------------- ui/meson.build | 2 +- 2 files changed, 62 insertions(+), 28 deletions(-) diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index 36548a7f52..436afb8baa 100644 --- a/ui/dbus-listener.c +++ b/ui/dbus-listener.c @@ -26,9 +26,6 @@ #include "qapi/error.h" #include "sysemu/sysemu.h" #include "dbus.h" -#ifdef CONFIG_OPENGL -#include -#endif #ifdef G_OS_UNIX #include #endif @@ -41,6 +38,7 @@ #include "ui/shader.h" #include "ui/egl-helpers.h" #include "ui/egl-context.h" +#include "ui/qemu-pixman.h" #endif #include "trace.h" =20 @@ -62,9 +60,11 @@ struct _DBusDisplayListener { =20 QemuDBusDisplay1Listener *proxy; =20 -#ifdef CONFIG_OPENGL +#ifdef CONFIG_PIXMAN /* Keep track of the damage region */ pixman_region32_t gl_damage; +#else + int gl_damage; #endif =20 DisplayChangeListener dcl; @@ -545,6 +545,7 @@ static void dbus_gl_refresh(DisplayChangeListener *dcl) return; } =20 +#ifdef CONFIG_PIXMAN int n_rects =3D pixman_region32_n_rects(&ddl->gl_damage); =20 for (int i =3D 0; i < n_rects; i++) { @@ -555,6 +556,13 @@ static void dbus_gl_refresh(DisplayChangeListener *dcl) box->x2 - box->x1, box->y2 - box->y1); } pixman_region32_clear(&ddl->gl_damage); +#else + if (ddl->gl_damage) { + dbus_call_update_gl(dcl, 0, 0, + surface_width(ddl->ds), surface_height(ddl->ds= )); + ddl->gl_damage =3D 0; + } +#endif } #endif /* OPENGL */ =20 @@ -569,20 +577,62 @@ static void dbus_gl_gfx_update(DisplayChangeListener = *dcl, { DBusDisplayListener *ddl =3D container_of(dcl, DBusDisplayListener, dc= l); =20 +#ifdef CONFIG_PIXMAN pixman_region32_t rect_region; pixman_region32_init_rect(&rect_region, x, y, w, h); pixman_region32_union(&ddl->gl_damage, &ddl->gl_damage, &rect_region); pixman_region32_fini(&rect_region); +#else + ddl->gl_damage++; +#endif } #endif =20 +static void dbus_gfx_update_sub(DBusDisplayListener *ddl, + int x, int y, int w, int h) +{ + pixman_image_t *img; + size_t stride; + GVariant *v_data; + + /* make a copy, since gvariant only handles linear data */ + stride =3D w * DIV_ROUND_UP(PIXMAN_FORMAT_BPP(surface_format(ddl->ds))= , 8); + img =3D pixman_image_create_bits(surface_format(ddl->ds), + w, h, NULL, stride); +#ifdef CONFIG_PIXMAN + pixman_image_composite(PIXMAN_OP_SRC, ddl->ds->image, NULL, img, + x, y, 0, 0, 0, 0, w, h); +#else + { + uint8_t *src =3D (uint8_t *)pixman_image_get_data(ddl->ds->image); + uint8_t *dst =3D (uint8_t *)pixman_image_get_data(img); + int bp =3D PIXMAN_FORMAT_BPP(surface_format(ddl->ds)) / 8; + int hh; + + for (hh =3D 0; hh < h; hh++) { + memcpy(&dst[stride * hh], &src[surface_stride(ddl->ds) * (hh += y) + x * bp], stride); + } + } +#endif + v_data =3D g_variant_new_from_data( + G_VARIANT_TYPE("ay"), + pixman_image_get_data(img), + pixman_image_get_stride(img) * h, + TRUE, + (GDestroyNotify)pixman_image_unref, + img); + qemu_dbus_display1_listener_call_update(ddl->proxy, + x, y, w, h, pixman_image_get_stride(img), pixman_image_get_format(= img), + v_data, + G_DBUS_CALL_FLAGS_NONE, + DBUS_DEFAULT_TIMEOUT, NULL, NULL, NULL); +} + static void dbus_gfx_update(DisplayChangeListener *dcl, int x, int y, int w, int h) { DBusDisplayListener *ddl =3D container_of(dcl, DBusDisplayListener, dc= l); - pixman_image_t *img; GVariant *v_data; - size_t stride; =20 assert(ddl->ds); =20 @@ -619,25 +669,7 @@ static void dbus_gfx_update(DisplayChangeListener *dcl, return; } =20 - /* make a copy, since gvariant only handles linear data */ - stride =3D w * DIV_ROUND_UP(PIXMAN_FORMAT_BPP(surface_format(ddl->ds))= , 8); - img =3D pixman_image_create_bits(surface_format(ddl->ds), - w, h, NULL, stride); - pixman_image_composite(PIXMAN_OP_SRC, ddl->ds->image, NULL, img, - x, y, 0, 0, 0, 0, w, h); - - v_data =3D g_variant_new_from_data( - G_VARIANT_TYPE("ay"), - pixman_image_get_data(img), - pixman_image_get_stride(img) * h, - TRUE, - (GDestroyNotify)pixman_image_unref, - img); - qemu_dbus_display1_listener_call_update(ddl->proxy, - x, y, w, h, pixman_image_get_stride(img), pixman_image_get_format(= img), - v_data, - G_DBUS_CALL_FLAGS_NONE, - DBUS_DEFAULT_TIMEOUT, NULL, NULL, NULL); + dbus_gfx_update_sub(ddl, x, y, w, h); } =20 #ifdef CONFIG_OPENGL @@ -751,8 +783,10 @@ dbus_display_listener_dispose(GObject *object) g_clear_object(&ddl->map_proxy); g_clear_object(&ddl->d3d11_proxy); g_clear_pointer(&ddl->peer_process, CloseHandle); -#ifdef CONFIG_OPENGL +#ifdef CONFIG_PIXMAN pixman_region32_fini(&ddl->gl_damage); +#endif +#ifdef CONFIG_OPENGL egl_fb_destroy(&ddl->fb); #endif #endif @@ -787,7 +821,7 @@ dbus_display_listener_class_init(DBusDisplayListenerCla= ss *klass) static void dbus_display_listener_init(DBusDisplayListener *ddl) { -#ifdef CONFIG_OPENGL +#ifdef CONFIG_PIXMAN pixman_region32_init(&ddl->gl_damage); #endif } diff --git a/ui/meson.build b/ui/meson.build index 7f806a6d48..521843c356 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -93,7 +93,7 @@ if dbus_display '--generate-c-code', '@BASENAME@= ']) dbus_display1_lib =3D static_library('dbus-display1', dbus_display1, dep= endencies: gio) dbus_display1_dep =3D declare_dependency(link_with: dbus_display1_lib, i= nclude_directories: include_directories('.')) - dbus_ss.add(when: [gio, pixman, dbus_display1_dep], + dbus_ss.add(when: [gio, dbus_display1_dep], if_true: [files( 'dbus-chardev.c', 'dbus-clipboard.c', --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923639; cv=none; d=zohomail.com; s=zohoarc; b=Za4i9DnkWUCJvcL5b2Mr25sKiQ4bz3ky7ymu9gR1Qarbojt8MCr+kzXtPxAt4IPGRemH1GztXon/jLuFvWFmbltS/DqSKnBZfNLjJx+dEZetc6bPwyNEdEDtJRxsaC5kalugr2ZU9axHPjWRoPqSR5p23JZ1t+pkVcjPutMyjyU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923639; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/eZ1mJQUZQMMM+HiW565rTWdLBIwZUgzLgf/IQftMcA=; b=AL335F1Xg+UlqLj1aL7lTiHWJPDgyv+W8Bl0GF6S6CZT32fu64RI9USxm2UWPXcuBdNg9PlIH0MPbUFihQgH6VzXRE8twSHMSk6xgqn/WcEoutBXjIQj59hGd1WRTzcx/FEqiXSb5821N7o5c6dJEebw7oS22Uoaw6aNcMJmJqk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923639963744.6607148958159; Tue, 10 Oct 2023 00:40:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7LK-00026z-Ed; Tue, 10 Oct 2023 03:39:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LE-0001zo-O4 for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LB-0001qe-Aa for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:44 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-101-zwya3xcGMZGhF1-w309gHQ-1; Tue, 10 Oct 2023 03:39:39 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B6F22858281; Tue, 10 Oct 2023 07:39:38 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC08A40C6EC0; Tue, 10 Oct 2023 07:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/eZ1mJQUZQMMM+HiW565rTWdLBIwZUgzLgf/IQftMcA=; b=f+mNEhLGM4/Uek06fiRr9PWMmPNSkj0/ArRxIZrn/Hx+a7/lAifl1J4HSWQEnUcNEisz3F cZZvYHUzQU4KDgxkFCYL+ggmwTKdOwmCSvDc/OTeGupWwqN2W/moTSMpl93nKHChPBZYzF goiod+UeXUzIBgdMi81f56nZmabStF0= X-MC-Unique: zwya3xcGMZGhF1-w309gHQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 15/18] arm/kconfig: XLNX_ZYNQMP_ARM depends on PIXMAN Date: Tue, 10 Oct 2023 11:38:27 +0400 Message-ID: <20231010073830.606570-16-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923641429100005 From: Marc-Andr=C3=A9 Lureau The Display Port has some strong PIXMAN dependency. Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/arm/Kconfig | 3 ++- hw/display/Kconfig | 5 +++++ hw/display/meson.build | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 7e68348440..57178bc299 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -451,7 +451,7 @@ config STM32F405_SOC config XLNX_ZYNQMP_ARM bool default y - depends on TCG && AARCH64 + depends on TCG && AARCH64 && PIXMAN select AHCI select ARM_GIC select CADENCE @@ -463,6 +463,7 @@ config XLNX_ZYNQMP_ARM select XILINX_AXI select XILINX_SPIPS select XLNX_CSU_DMA + select XLNX_DISPLAYPORT select XLNX_ZYNQMP select XLNX_ZDMA select USB_DWC3 diff --git a/hw/display/Kconfig b/hw/display/Kconfig index 4d8b0cec40..1aafe1923d 100644 --- a/hw/display/Kconfig +++ b/hw/display/Kconfig @@ -134,3 +134,8 @@ config MACFB bool select FRAMEBUFFER depends on NUBUS + +config XLNX_DISPLAYPORT + bool + # defaults to "N", enabled by specific boards + depends on PIXMAN diff --git a/hw/display/meson.build b/hw/display/meson.build index 05619c6968..14a57703d3 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -58,7 +58,7 @@ if config_all_devices.has_key('CONFIG_QXL') endif =20 system_ss.add(when: 'CONFIG_DPCD', if_true: files('dpcd.c')) -system_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx_dp.c')) +system_ss.add(when: 'CONFIG_XLNX_DISPLAYPORT', if_true: files('xlnx_dp.c')) =20 system_ss.add(when: 'CONFIG_ARTIST', if_true: files('artist.c')) =20 --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923640; cv=none; d=zohomail.com; s=zohoarc; b=PuQW8rngHX+NWYO3M91PGfSb14avnRZiMnKCFB5LIRVSbS2HhFRFFJ0zZqkZJJpbpT7ip1wlYB+d61wRtVoRlqH6sEFEtA7C+E7X3ZAo4a7FZU7ykB83bSl3ZsGGsLw6l0qnltRdl++UrpB6t8+DYPsJEiJAiovEvrGKK2XYVPc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923640; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JC/Mi2SAtx0SK4D2fKY6EQG36CAz09MgpCp2U83f0eI=; b=dRysjn+fk990d+OU9x0C7nRNrem47cUMuLV7wwyfxHPUtzYY0T5rOllPhQ8mGzzot6TCgBcGSdWK/NzAhYRcK59uJQ0EdSd5YUhylxnkWNBG1IBxyQfY3aDvdA3v1ds5dOBOzoWILJZly6wpfMaUvTphhE/WbEzcYRaP65h9jvU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923640195249.71542153861787; Tue, 10 Oct 2023 00:40:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7LV-0002iS-Lb; Tue, 10 Oct 2023 03:40:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LN-0002Gk-V2 for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LK-0001sb-AL for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:52 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-588-yEMgOGHSOGar1cDVcJWeog-1; Tue, 10 Oct 2023 03:39:43 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 70B58381259A; Tue, 10 Oct 2023 07:39:43 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1AFC940D1BC; Tue, 10 Oct 2023 07:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JC/Mi2SAtx0SK4D2fKY6EQG36CAz09MgpCp2U83f0eI=; b=hp0pZYORKNIcSxEMdTggU9DwDVtMdwwy2WXUvOT4M+VkJzFB9N9pfKrvzEpHV2uGdVcWim TSekeGrI6FB7AGifp0YPvfrhw+JPkz5fuKKeweL5I3FWKP0XpdQFARfqPmsG7qgciNXdb1 X1RaihW3CJVT0Saglsmc7suQMiZGong= X-MC-Unique: yEMgOGHSOGar1cDVcJWeog-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 16/18] hw/sm501: allow compiling without PIXMAN Date: Tue, 10 Oct 2023 11:38:28 +0400 Message-ID: <20231010073830.606570-17-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923641476100006 From: Marc-Andr=C3=A9 Lureau Drop the "x-pixman" property and use fallback path in such case. Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/display/sm501.c | 46 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 0eecd00701..bc5faa19f0 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -438,6 +438,12 @@ #define SM501_HWC_WIDTH 64 #define SM501_HWC_HEIGHT 64 =20 +#ifdef CONFIG_PIXMAN +#define DEFAULT_X_PIXMAN 7 +#else +#define DEFAULT_X_PIXMAN 0 +#endif + /* SM501 local memory size taken from "linux/drivers/mfd/sm501.c" */ static const uint32_t sm501_mem_local_size[] =3D { [0] =3D 4 * MiB, @@ -730,7 +736,6 @@ static void sm501_2d_operation(SM501State *s) switch (cmd) { case 0: /* BitBlt */ { - static uint32_t tmp_buf[16384]; unsigned int src_x =3D (s->twoD_source >> 16) & 0x01FFF; unsigned int src_y =3D s->twoD_source & 0xFFFF; uint32_t src_base =3D s->twoD_source_base & 0x03FFFFFF; @@ -828,9 +833,11 @@ static void sm501_2d_operation(SM501State *s) de =3D db + (width + (height - 1) * dst_pitch) * bypp; overlap =3D (db < se && sb < de); } +#ifdef CONFIG_PIXMAN if (overlap && (s->use_pixman & BIT(2))) { /* pixman can't do reverse blit: copy via temporary */ int tmp_stride =3D DIV_ROUND_UP(width * bypp, sizeof(uint3= 2_t)); + static uint32_t tmp_buf[16384]; uint32_t *tmp =3D tmp_buf; =20 if (tmp_stride * sizeof(uint32_t) * height > sizeof(tmp_bu= f)) { @@ -860,9 +867,12 @@ static void sm501_2d_operation(SM501State *s) dst_pitch * bypp / sizeof(uint32_t), 8 * bypp, 8 * bypp, src_x, src_y, dst_x, dst_y, width, height); - } else { + } else +#else + { fallback =3D true; } +#endif if (fallback) { uint8_t *sp =3D s->local_mem + src_base; uint8_t *d =3D s->local_mem + dst_base; @@ -894,10 +904,13 @@ static void sm501_2d_operation(SM501State *s) color =3D cpu_to_le16(color); } =20 +#ifdef CONFIG_PIXMAN if (!(s->use_pixman & BIT(0)) || (width =3D=3D 1 && height =3D=3D = 1) || !pixman_fill((uint32_t *)&s->local_mem[dst_base], dst_pitch * bypp / sizeof(uint32_t), 8 * bypp, - dst_x, dst_y, width, height, color)) { + dst_x, dst_y, width, height, color)) +#endif + { /* fallback when pixman failed or we don't want to call it */ uint8_t *d =3D s->local_mem + dst_base; unsigned int x, y, i; @@ -1875,9 +1888,16 @@ static void sm501_reset(SM501State *s) s->twoD_wrap =3D 0; } =20 -static void sm501_init(SM501State *s, DeviceState *dev, - uint32_t local_mem_bytes) +static bool sm501_init(SM501State *s, DeviceState *dev, + uint32_t local_mem_bytes, Error **errp) { +#ifndef CONFIG_PIXMAN + if (s->use_pixman !=3D 0) { + error_setg(errp, "x-pixman!=3D0, however PIXMAN is not available"); + return false; + } +#endif + s->local_mem_size_index =3D get_local_mem_size_index(local_mem_bytes); =20 /* local memory */ @@ -1916,6 +1936,7 @@ static void sm501_init(SM501State *s, DeviceState *de= v, =20 /* create qemu graphic console */ s->con =3D graphic_console_init(dev, 0, &sm501_ops, s); + return true; } =20 static const VMStateDescription vmstate_sm501_state =3D { @@ -2014,7 +2035,9 @@ static void sm501_realize_sysbus(DeviceState *dev, Er= ror **errp) SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); MemoryRegion *mr; =20 - sm501_init(&s->state, dev, s->vram_size); + if (!sm501_init(&s->state, dev, s->vram_size, errp)) { + return; + } if (get_local_mem_size(&s->state) !=3D s->vram_size) { error_setg(errp, "Invalid VRAM size, nearest valid size is %" PRIu= 32, get_local_mem_size(&s->state)); @@ -2038,7 +2061,8 @@ static void sm501_realize_sysbus(DeviceState *dev, Er= ror **errp) =20 static Property sm501_sysbus_properties[] =3D { DEFINE_PROP_UINT32("vram-size", SM501SysBusState, vram_size, 0), - DEFINE_PROP_UINT8("x-pixman", SM501SysBusState, state.use_pixman, 7), + /* TODO: consider PROP_BIT instead */ + DEFINE_PROP_UINT8("x-pixman", SM501SysBusState, state.use_pixman, DEFA= ULT_X_PIXMAN), DEFINE_PROP_END_OF_LIST(), }; =20 @@ -2112,7 +2136,9 @@ static void sm501_realize_pci(PCIDevice *dev, Error *= *errp) { SM501PCIState *s =3D PCI_SM501(dev); =20 - sm501_init(&s->state, DEVICE(dev), s->vram_size); + if (!sm501_init(&s->state, DEVICE(dev), s->vram_size, errp)) { + return; + } if (get_local_mem_size(&s->state) !=3D s->vram_size) { error_setg(errp, "Invalid VRAM size, nearest valid size is %" PRIu= 32, get_local_mem_size(&s->state)); @@ -2126,7 +2152,7 @@ static void sm501_realize_pci(PCIDevice *dev, Error *= *errp) =20 static Property sm501_pci_properties[] =3D { DEFINE_PROP_UINT32("vram-size", SM501PCIState, vram_size, 64 * MiB), - DEFINE_PROP_UINT8("x-pixman", SM501PCIState, state.use_pixman, 7), + DEFINE_PROP_UINT8("x-pixman", SM501PCIState, state.use_pixman, DEFAULT= _X_PIXMAN), DEFINE_PROP_END_OF_LIST(), }; =20 @@ -2169,8 +2195,10 @@ static void sm501_pci_class_init(ObjectClass *klass,= void *data) =20 static void sm501_pci_init(Object *o) { +#ifdef CONFIG_PIXMAN object_property_set_description(o, "x-pixman", "Use pixman for: " "1: fill, 2: blit, 4: overlap blit"); +#endif } =20 static const TypeInfo sm501_pci_info =3D { --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923664; cv=none; d=zohomail.com; s=zohoarc; b=DSnCaNBO0siJMR6vs98qFrF3ZXn06D9utp5i4mwhiWCo0fvDPWuh6vdY52BjtOTWyp2qX1iDVMu12LGX3wnGU40r6p2w8bTtZ3rUqhG5SJG4S+Ic2eWGeLEx70r57Oy8jmzIO1wdKyv5dSZUqO9dvcxNHzkTlGNvKpqqvZhuyus= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923664; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XC4NKm1yRTXryw6yI2hxLbWJMT7Ux98nMCEoj70d+Mw=; b=esPe21fq74XRnOKDrF2zEhv3zA7qcHWVh6ifXD7qK1l6vag13sELGI0GRF2gJLpeDbibV5yHaqKDgJe+j2JMmYfJuexV4M/VQ+0kRdMgIQKOP9fSkfTtnXjfSDUYsastuHs4GCuIu8c1tEy0Qqpw2p/w+DNlDSx0w4X+gj/jRvs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923664547199.94035956112805; Tue, 10 Oct 2023 00:41:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7Ld-0002q1-Cv; Tue, 10 Oct 2023 03:40:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LT-0002Rt-HL for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LQ-0001uk-Te for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:59 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-125-grfV2L7iPsiBYXtkFN13Vg-1; Tue, 10 Oct 2023 03:39:47 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6FA7B810BDA; Tue, 10 Oct 2023 07:39:47 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E56D1B9C; Tue, 10 Oct 2023 07:39:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XC4NKm1yRTXryw6yI2hxLbWJMT7Ux98nMCEoj70d+Mw=; b=UY4xUl9G1WgIazdkAOQR4jluH+ygzEYAQb2ghxnE4kXRDhS+qnVhzKQnyOHjNWT6Mjp+4v QAOsqA3kzeKTXEsKJtmr7eoyyVhaAonHf+iX87S0cFp0SvU9Xy3fl+FSUEdnnTZnzNkgtS BCBXKu1GiobRxGnKkLBvs8o1fUpTNWc= X-MC-Unique: grfV2L7iPsiBYXtkFN13Vg-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 17/18] hw/display: make ATI_VGA depend on PIXMAN Date: Tue, 10 Oct 2023 11:38:29 +0400 Message-ID: <20231010073830.606570-18-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923665330100003 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Acked-by: BALATON Zoltan --- configs/devices/mips64el-softmmu/default.mak | 2 +- hw/display/Kconfig | 2 +- hw/display/meson.build | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/devices/mips64el-softmmu/default.mak b/configs/devices= /mips64el-softmmu/default.mak index d5188f7ea5..8d85607571 100644 --- a/configs/devices/mips64el-softmmu/default.mak +++ b/configs/devices/mips64el-softmmu/default.mak @@ -3,7 +3,7 @@ include ../mips-softmmu/common.mak CONFIG_FULOONG=3Dy CONFIG_LOONGSON3V=3Dy -CONFIG_ATI_VGA=3Dy +# CONFIG_ATI_VGA=3Dn CONFIG_RTL8139_PCI=3Dy CONFIG_JAZZ=3Dy CONFIG_VT82C686=3Dy diff --git a/hw/display/Kconfig b/hw/display/Kconfig index 1aafe1923d..4d8a6c4af8 100644 --- a/hw/display/Kconfig +++ b/hw/display/Kconfig @@ -125,7 +125,7 @@ config DPCD config ATI_VGA bool default y if PCI_DEVICES - depends on PCI + depends on PCI && PIXMAN select VGA select BITBANG_I2C select DDC diff --git a/hw/display/meson.build b/hw/display/meson.build index 14a57703d3..4a10040c19 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -62,7 +62,7 @@ system_ss.add(when: 'CONFIG_XLNX_DISPLAYPORT', if_true: f= iles('xlnx_dp.c')) =20 system_ss.add(when: 'CONFIG_ARTIST', if_true: files('artist.c')) =20 -system_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: files('ati.c', 'a= ti_2d.c', 'ati_dbg.c')) +system_ss.add(when: 'CONFIG_ATI_VGA', if_true: [files('ati.c', 'ati_2d.c',= 'ati_dbg.c'), pixman]) =20 =20 if config_all_devices.has_key('CONFIG_VIRTIO_GPU') --=20 2.41.0 From nobody Tue Feb 10 20:28:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696923734; cv=none; d=zohomail.com; s=zohoarc; b=YSWxe5/Bixykq5YYYB/c84584dOlZIte1+xDlmQZnqDSCcNHHLPzpdZSglomcrVIVRQA5911k3fvMznaFHV4O0GPV79zJloggBt1VfR1GotExAymFxHJhLIuGJV9ZjR6LkCS0uh+bDSKys1ERSJrgUun1BteTuT8mCGX9hjBp2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696923734; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=luG8MNFoBo+9xrNK3btdo0HEw8saff2GlFzHGAbN/Po=; b=QVx3tsyiZDmFKhfcAWr7JvtQyi5ddaVsS8oKfks0oU+2YXPsMH3gKHQ0o53RHtTvDYDI+jtApdb048vNM7pTF8l9jUIPgTXvsW07+dxjg/fca/0VYOGsBRmGwXbazc5NCIO7tSPC9qVa2q5GIC1yeXFHxjA3VvVzkEvJoiF3Llo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696923734844180.94321991933396; Tue, 10 Oct 2023 00:42:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq7LW-0002nw-LM; Tue, 10 Oct 2023 03:40:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LR-0002RD-Th for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qq7LQ-0001uV-Es for qemu-devel@nongnu.org; Tue, 10 Oct 2023 03:39:57 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-550-3PYAYUocMnmdzTAfx6Qwtw-1; Tue, 10 Oct 2023 03:39:52 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9B469858F1B; Tue, 10 Oct 2023 07:39:51 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 62662400F36; Tue, 10 Oct 2023 07:39:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=luG8MNFoBo+9xrNK3btdo0HEw8saff2GlFzHGAbN/Po=; b=HqJX3PykC7ZkyKXvgEtNRz7BD4/zuNcOQkFaM02vBXjGr71o47uN36qlDkWsvSOsVpbV2i WpmraWwQsi/Lf9jPinTIFL/MpiVEqsN4r+AZIwxI2QwApB9QLJ3xbdL4BIY+CZJCrlq+1K AushjyF2+0R3NY01KfTER0RJxKWHLQ8= X-MC-Unique: 3PYAYUocMnmdzTAfx6Qwtw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , qemu-arm@nongnu.org, Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Peter Maydell , BALATON Zoltan , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 18/18] build-sys: make pixman actually optional Date: Tue, 10 Oct 2023 11:38:30 +0400 Message-ID: <20231010073830.606570-19-marcandre.lureau@redhat.com> In-Reply-To: <20231010073830.606570-1-marcandre.lureau@redhat.com> References: <20231010073830.606570-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696923735581100001 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau --- meson.build | 3 --- 1 file changed, 3 deletions(-) diff --git a/meson.build b/meson.build index 64d2aca79b..a35eb8e2ee 100644 --- a/meson.build +++ b/meson.build @@ -817,9 +817,6 @@ if not get_option('pixman').auto() or have_system or ha= ve_tools pixman =3D dependency('pixman-1', required: get_option('pixman'), versio= n:'>=3D0.21.8', method: 'pkg-config') endif -if not pixman.found() and (have_system or have_tools) - error('FIXME: pixman is currently required') -endif =20 zlib =3D dependency('zlib', required: true) =20 --=20 2.41.0