From nobody Fri May 17 23:19:55 2024 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=1699341771; cv=none; d=zohomail.com; s=zohoarc; b=iP8USBOeyG6u3G8H2CZjV0sBMs7GAuvdFCjTOIHlM2jLIEydwFlzQiR/jNWNyObZZWuALrZdSvd3ATV1ZUTMvQ/9HOSxO5z+cXwpMdKXLRanocBaIyn+6dvhybMZMa1e9+fcMYSC1EhkTd5EML+gOuOCezrGLh4c5bBBQQwQpkc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341771; 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=erVMUMUO7k3S+w2G+PFiU9c5NG94cSKzdwuUdI1Dtlc=; b=Wg4dTizjOM3i84m/J0ln6ZGLiZE/+V/ShzFrQAMKQsNUmwBehrPou9jQ5yMTCP9ahpxSTaw4FrL4/BKxKH66XVKqtKz5oyYvjIDgeRSc4lDYdmvpZTZnNUlgeup5O5KZ8n8nRqIrDozsZ/5edTA7a3MhD5O8OCnvBjx+MvD4TEU= 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 1699341771632789.6255926559858; Mon, 6 Nov 2023 23:22:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GNG-0007l3-R5; Tue, 07 Nov 2023 02:19:47 -0500 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 1r0GNE-0007kL-Rt for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:44 -0500 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 1r0GN9-0002f3-TF for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:44 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-311-Ssicwb_QOAWcPplg7FKMCA-1; Tue, 07 Nov 2023 02:19:24 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 798DA38107A0; Tue, 7 Nov 2023 07:19:24 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 09D802026D66; Tue, 7 Nov 2023 07:19:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341579; 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=erVMUMUO7k3S+w2G+PFiU9c5NG94cSKzdwuUdI1Dtlc=; b=D/z3PYR0ouCCdDSrtk6j1IKnBIuI9Jo2+TWRTUaa0O/z8t5OUjIfkOK+FIu8vf609MIkjn 2e55+Vy2zaHRvyO5Q52M/CP9LjGaa7KtKIqKKTDoLs7MW2qKo0jLkgHr/VCggXmwaAgzdK iXDR2h96BOxunTkvFK938OQSxR8QCOI= X-MC-Unique: Ssicwb_QOAWcPplg7FKMCA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth Subject: [PATCH v8 01/24] build-sys: add a "pixman" feature Date: Tue, 7 Nov 2023 11:18:51 +0400 Message-ID: <20231107071915.2459115-2-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-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: 1699341772173100001 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 Reviewed-by: Thomas Huth --- 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 51a51075db..505cc591b9 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 @@ -2149,6 +2153,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() @@ -2868,6 +2873,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 2ee71578f3..f496475f8e 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 5c212fcd45..c9baeda639 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -226,6 +226,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 e9d6d39279..680fa3f581 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -160,6 +160,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" ' plugins TCG plugins via shared library loading' printf "%s\n" ' png PNG support with libpng' printf "%s\n" ' pvrdma Enable PVRDMA support' @@ -419,6 +420,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 Fri May 17 23:19:55 2024 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=1699341667; cv=none; d=zohomail.com; s=zohoarc; b=Yrs9L1PYhrDyXrGFrZe6Sjbz7ujkS4xmr/uy1vlqFBYZZ5Za5HZOb4UDbq40gll74FClmtfFYBP9P/OFlRCfBJJMvmpReK+2Ja0cmwtLnBC/wWAgx446gIx1JoyDLTBBC6TjmFq+GQ8f9snZVMCwtbZGezkaDJ/DtTdoy63FJ4s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341667; 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=LW9Q6HUwTBSWEYBKDcnLAGqV7TDghC3wekacCLuoge8=; b=PMEmStGYS3i2ZL/515iTNukzE2c61cj0g5WhbPcVDVNcIh2YKYqinZHpOxDNjqh+EfpNXsCfDWgX9oefNMCUVOpawlF/nejCyi4mrDPPDKIshugB0+7Wjqla5Cm7znRoDUVcieznAWhhuXSQTFMX988l6vWqCN1BZIS+HysoAn8= 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 1699341667750439.7736964463995; Mon, 6 Nov 2023 23:21:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GNC-0007iL-5r; Tue, 07 Nov 2023 02:19:42 -0500 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 1r0GNA-0007h3-1u for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:40 -0500 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 1r0GN1-0002el-JO for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:39 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-449-mdyf47soMfKNwrFlsthuAw-1; Tue, 07 Nov 2023 02:19:29 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D8C8F101A529; Tue, 7 Nov 2023 07:19:28 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id D0104492BFA; Tue, 7 Nov 2023 07:19:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341570; 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=LW9Q6HUwTBSWEYBKDcnLAGqV7TDghC3wekacCLuoge8=; b=S82a7pMpHRYzxzOhHhdKjpC8pYM2out4MHpUnifRAj9pAubjfTV0KSNU2v8P5nYikrzsWz K52L1VGr6g+pjVGyRKXR/yjSyYhVhiZBoM3WonVubH+SPDbb6krUJPzfQVGg5O4tGqmUA4 K/v4WuRpDwGwMo0xl0/Ou+eADk5Qvo8= X-MC-Unique: mdyf47soMfKNwrFlsthuAw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v8 02/24] build-sys: drop needless warning pragmas for old pixman Date: Tue, 7 Nov 2023 11:18:52 +0400 Message-ID: <20231107071915.2459115-3-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341669914100003 From: Marc-Andr=C3=A9 Lureau Since commit 236f282c1c7 ("configure: check for pixman-1 version"), QEMU requires >=3D 0.21.8. Suggested-by: Thomas Huth Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- include/ui/qemu-pixman.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index d37feb5e3c..4bfa8fae0c 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @@ -7,11 +7,7 @@ #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 /* --=20 2.41.0 From nobody Fri May 17 23:19:55 2024 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=1699341856; cv=none; d=zohomail.com; s=zohoarc; b=m7sFaLKmA4xUvlV323MSRN+1LEvo4hFCtke3cprhJEKIfZLSeS+AYH+NRPIyBv07aSY8KL+lcLV0fbcSARL9CzHr5/OgUwCpi1W+HiLTLU1UxlmyU1s+vagOJw7fKvaWsjZUVU53eNiIWa1RiFoLWmot5b9KfMCS1PjDeJ5n2mg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341856; 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=jn0M5HddPTW3wCc5nq/h0iBnVCjIfSYvQaej6oaWHQo=; b=fZuMPqs0KPTp2zWXT1wyC5xoILBECRv/pJelmUIiFyTjk8EhxQ5KYk7SJUtXYJ/Mq/2cyu4tSjdiInzMUMlTP0v7X59TptH/x3ZkH3cFZA9y//O3NQeKrchie4FHpurPTWeULxQCvQHk3aMgGnakDrnKNpxGaKuZW2A/2qcKxQM= 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 1699341856361764.2538312999543; Mon, 6 Nov 2023 23:24:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GND-0007j6-8y; Tue, 07 Nov 2023 02:19:43 -0500 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 1r0GNB-0007hh-FI for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:41 -0500 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 1r0GN8-0002ey-Kj for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:41 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-96-kOtRBCZlMUWBaykjcPhz_g-1; Tue, 07 Nov 2023 02:19:33 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 371AD811E86; Tue, 7 Nov 2023 07:19:33 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C83540C6EB9; Tue, 7 Nov 2023 07:19:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341577; 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=jn0M5HddPTW3wCc5nq/h0iBnVCjIfSYvQaej6oaWHQo=; b=K8xTfknCkv/YsC6JvwfrwzQfxBk9bIeZmNF6sBZPcD1IDQKHryQ/A4qAhQI/JtI/FrUNT3 HUwA2e5PUMGVk54tH4jTB0TL+30dFeilMiG0pCYoUx+o3k1ayD2XygPxNecFv2Fp+YYB7b IyofslZXEi/FD+4BhqUo0DIH7E1CliU= X-MC-Unique: kOtRBCZlMUWBaykjcPhz_g-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v8 03/24] ui: compile out some qemu-pixman functions when !PIXMAN Date: Tue, 7 Nov 2023 11:18:53 +0400 Message-ID: <20231107071915.2459115-4-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341857258100001 From: Marc-Andr=C3=A9 Lureau Those functions require the PIXMAN library. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- 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 4bfa8fae0c..c140cd84b6 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @@ -72,17 +72,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); @@ -91,6 +91,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 Fri May 17 23:19:55 2024 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=1699341594; cv=none; d=zohomail.com; s=zohoarc; b=j+mQwyjxCfgudQSlmRkW7vrYOr6dqDaLalKXngI7Ka/6yZcjKHhlPgpvjgvG52YJsaRh5jnKJp9LTHTv4l4JV8IDZ0BfgS+wlbFZD9XU0ss7Aud3aB8GjtqL4/x/K5YLwRpUtU1ys3KSCVkQGdmg2aDsVSc7S9Ap+jHQAaj0A/U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341594; 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=AMPwwzvkGtI1530yAC+qrKlrh8Wsf5pzf8NLRChUMss=; b=WkF3kV8s0uE3+O8eKXwtq8Vo1AmPj+xTawzuVSEYoQ9JRB+ZTSAR74CF9CjtcK8CYF8k8nyRfY8XhlebU+1QKnbNDO6mbttu1aIQ3yiURi0rmCfmj85On84gS+hb1KBrWFRQF9Rqni7eguGto3ApKtpcy3qKIYJ/YTPI1dhrZMg= 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 1699341594750964.2542793776252; Mon, 6 Nov 2023 23:19:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GNM-0007rY-Ia; Tue, 07 Nov 2023 02:19:52 -0500 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 1r0GNK-0007n9-Lo for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:50 -0500 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 1r0GNI-0002fv-Q1 for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:50 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-221-cSdY0BfUMTSMz5Jwhb1ZkQ-1; Tue, 07 Nov 2023 02:19:38 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CDE2B3810782; Tue, 7 Nov 2023 07:19:37 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id A71842026D66; Tue, 7 Nov 2023 07:19:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341585; 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=AMPwwzvkGtI1530yAC+qrKlrh8Wsf5pzf8NLRChUMss=; b=WQEBgR0kwZLkJn8dxKvFlVCV6m/wJKVvqlaU3i4cL4kZfyA7SkKeUUTws0xO1eJcilJ+9R 7BAsLJuMKMzthxkoXn2Y2WJZWXWvquXspxraEpcZ3Aw1nR2v0OZzCdhvPMJQKGR2LEYZ+H 0P8/77/QYFHPP0m1av3OQ767uxRL5s8= X-MC-Unique: cSdY0BfUMTSMz5Jwhb1ZkQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v8 04/24] ui: add pixman-minimal.h Date: Tue, 7 Nov 2023 11:18:54 +0400 Message-ID: <20231107071915.2459115-5-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341595684100005 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 Acked-by: Thomas Huth --- include/ui/pixman-minimal.h | 195 ++++++++++++++++++++++++++++++++++++ include/ui/qemu-pixman.h | 2 + 2 files changed, 197 insertions(+) create mode 100644 include/ui/pixman-minimal.h diff --git a/include/ui/pixman-minimal.h b/include/ui/pixman-minimal.h new file mode 100644 index 0000000000..efcf570c9e --- /dev/null +++ b/include/ui/pixman-minimal.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_MINIMAL_H +#define PIXMAN_MINIMAL_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 *d= ata); + +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_MINIMAL_H */ diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index c140cd84b6..ef13a8210c 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @@ -8,6 +8,8 @@ =20 #ifdef CONFIG_PIXMAN #include +#else +#include "pixman-minimal.h" #endif =20 /* --=20 2.41.0 From nobody Fri May 17 23:19:55 2024 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=1699341858; cv=none; d=zohomail.com; s=zohoarc; b=ATNo6fw/IjlLhz3+NDllD4VXH6dykw+Yg5egOl3Zql/VYZPItHY1zWZq5IKQNIUiw7mnrPdC1wa1ey2DYxTEECMQ7NEGwmCggR9n+VVVgLrOq0/VJBzjLVzvOH0CtvPbIHrdeFFaxS7EJdaZU5Wx55sjYqBDKMZmIBU4fWyqssA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341858; 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=I9D+WsgQUn58hPq9Nowxn6qP6OypiJidZorSMGCHn4E=; b=aVrclOgObKR1wCQlPw8qzraxJVYBO25DCOum6A7vy/+qgNo4H0JGYc+kQ+wPmP4AY+TKMTLZHjSb26OaoZjgD+gF5OgQVVkeiuP0POoG7MqJWr9pcQVG6cM1DOsFV7yBpOidbCOwN2c8yo7WDrjwB1pZdGtbmd/YAqF6McvlrNQ= 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 1699341858177146.53590348915122; Mon, 6 Nov 2023 23:24:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GNK-0007nD-OF; Tue, 07 Nov 2023 02:19:50 -0500 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 1r0GNJ-0007mK-1e for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:49 -0500 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 1r0GNF-0002fk-33 for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:48 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-320-o7WxbxAqMC2fKs6uRWaBjA-1; Tue, 07 Nov 2023 02:19:42 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B4CFB101A5B2; Tue, 7 Nov 2023 07:19:41 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id B93C92026D66; Tue, 7 Nov 2023 07:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341584; 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=I9D+WsgQUn58hPq9Nowxn6qP6OypiJidZorSMGCHn4E=; b=T9BqfmGkKcSfSYRe9n7ip34YW2ftMoGdH3DVlsWanVVcX7AatOXk7GGUIjBZcut8e+UCDu ljhXbnY2DfZYWSutUJRsn00+mHL4JZrcuwctmGT8SuFoV6UqxKuIljCTv2eirnDAF8UWiZ Nt+9b2B1bCOS75DzTB+lIiL5WCH7VdE= X-MC-Unique: o7WxbxAqMC2fKs6uRWaBjA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Subject: [PATCH v8 05/24] vl: drop needless -spice checks Date: Tue, 7 Nov 2023 11:18:55 +0400 Message-ID: <20231107071915.2459115-6-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341859272100009 From: Marc-Andr=C3=A9 Lureau Since commit 5324e3e958e ("qemu-options: define -spice only #ifdef CONFIG_SPICE"), it is unnecessary to check at runtime for "-spice" option. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth --- system/vl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/system/vl.c b/system/vl.c index 3fb569254a..fb0389e4d0 100644 --- a/system/vl.c +++ b/system/vl.c @@ -3475,12 +3475,7 @@ void qemu_init(int argc, char **argv) break; #ifdef CONFIG_SPICE case QEMU_OPTION_spice: - olist =3D qemu_find_opts_err("spice", NULL); - if (!olist) { - error_report("spice support is disabled"); - exit(1); - } - opts =3D qemu_opts_parse_noisily(olist, optarg, false); + opts =3D qemu_opts_parse_noisily(qemu_find_opts("spice"), = optarg, false); if (!opts) { exit(1); } --=20 2.41.0 From nobody Fri May 17 23:19:55 2024 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=1699341683; cv=none; d=zohomail.com; s=zohoarc; b=CHD6zbchY9XtwQn/1UoAe/9V7K7rI69pQIQbAIArxTuSyq6PpuXRruS7NfU++mw47u3ycS8vdouAeqmmxTMsRP83X04HwYn2h4NgGMB9xqkvD7ZHJkzXVmBrBduS83gKYQmTEMZwv+hLzMw63R2xg2sC0O6NYgObgdCqb5roRfY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341683; 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=M54gQLSG4hl5cyIhNJVcqh5G5aW09v6yaGtld5kgbuA=; b=V0Bq7RIY8PGBSqJhyzP5YjrL02E49mBHsx3NwXie3Gx+X+RQ8GvJj08M86IQnBtRyaMsPQZ6299+/qaUrTcTj83UaJdxxEOralnZ/u3zVrq9ZncecGAP7H8IXMhU5BP2CNYlNmFhnkxLRSBraju8syvIUcZOqa0AWzmX/eY1OYE= 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 1699341683936286.3602599046966; Mon, 6 Nov 2023 23:21:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GNR-0007wh-St; Tue, 07 Nov 2023 02:19:57 -0500 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 1r0GNQ-0007wS-Sn for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:56 -0500 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 1r0GNP-0002gm-Ab for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:56 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-341-JN6wmPKwOBevixMbG7nTmQ-1; Tue, 07 Nov 2023 02:19:47 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DEFD93C10427; Tue, 7 Nov 2023 07:19:46 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id BCE6F40C6EB9; Tue, 7 Nov 2023 07:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341594; 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=M54gQLSG4hl5cyIhNJVcqh5G5aW09v6yaGtld5kgbuA=; b=EAc/VOaPseVhwTr3IptPSh5cyGQ8hx7W0kLyCcVLkHY+KFBeimfot7s0W+CEr3+S7/cEKp MWzOnmD+qn+opgENPrMA4mrnlgOrHG8jWAXndvqWYpSxibimolrxYhOEY0lVI7xyxGcvPE WtAUzRb4+sgbXHvu8wuE8o3J7EuL+Og= X-MC-Unique: JN6wmPKwOBevixMbG7nTmQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Subject: [PATCH v8 06/24] qemu-options: define -vnc only #ifdef CONFIG_VNC Date: Tue, 7 Nov 2023 11:18:56 +0400 Message-ID: <20231107071915.2459115-7-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-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: 1699341685887100003 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth --- system/vl.c | 13 +++++++++---- ui/vnc-stubs.c | 12 ------------ qemu-options.hx | 2 ++ 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/system/vl.c b/system/vl.c index fb0389e4d0..19aef762e4 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1095,13 +1095,14 @@ DisplayOptions *qmp_query_display_options(Error **e= rrp) =20 static void parse_display(const char *p) { - const char *opts; - if (is_help_option(p)) { qemu_display_help(); exit(0); } =20 +#ifdef CONFIG_VNC + const char *opts; + if (strstart(p, "vnc", &opts)) { /* * vnc isn't a (local) DisplayType but a protocol for remote @@ -1113,9 +1114,11 @@ static void parse_display(const char *p) error_report("VNC requires a display argument vnc=3D"= ); exit(1); } - } else { - parse_display_qapi(p); + return; } +#endif + + parse_display_qapi(p); } =20 static inline bool nonempty_str(const char *str) @@ -3344,9 +3347,11 @@ void qemu_init(int argc, char **argv) machine_parse_property_opt(qemu_find_opts("smp-opts"), "smp", optarg); break; +#ifdef CONFIG_VNC case QEMU_OPTION_vnc: vnc_parse(optarg); break; +#endif case QEMU_OPTION_no_acpi: warn_report("-no-acpi is deprecated, use '-machine acpi=3D= off' instead"); qdict_put_str(machine_opts_dict, "acpi", "off"); diff --git a/ui/vnc-stubs.c b/ui/vnc-stubs.c index b4eb3ce718..a96bc86236 100644 --- a/ui/vnc-stubs.c +++ b/ui/vnc-stubs.c @@ -10,15 +10,3 @@ int vnc_display_pw_expire(const char *id, time_t expires) { return -ENODEV; }; -void vnc_parse(const char *str) -{ - if (strcmp(str, "none") =3D=3D 0) { - return; - } - error_setg(&error_fatal, "VNC support is disabled"); -} -int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp) -{ - error_setg(errp, "VNC support is disabled"); - return -1; -} diff --git a/qemu-options.hx b/qemu-options.hx index 7809036d8c..5b6d16ed58 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2428,8 +2428,10 @@ SRST OBP. ERST =20 +#ifdef CONFIG_VNC DEF("vnc", HAS_ARG, QEMU_OPTION_vnc , "-vnc shorthand for -display vnc=3D\n", QEMU_ARCH_= ALL) +#endif SRST ``-vnc display[,option[,option[,...]]]`` Normally, if QEMU is compiled with graphical window support, it --=20 2.41.0 From nobody Fri May 17 23:19:55 2024 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=1699341695; cv=none; d=zohomail.com; s=zohoarc; b=ZIQiI6rJKzNB1pY4hPIg9euXiBE6QMdAmnLt684kHfX8yVlOzFsJuLbelcaCKV/J8hn7yVQd2tewev09H/MXSekfdJpS1eCIySAPK7A40ayoMUQRKpXkQXgxNC3aVNu4EOmaDZsSKSDVKr+cgW0FETha9eFYbvmAvTaJQKKoCI8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341695; 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=Zr8zAotEqX1zZhbLTs985HQlzifY6ujW9QIdplWN7/g=; b=gv5fipe0g+JPScLJX2ijCTtLKteNOw2E1JhqO0sl8ZQMHGm3kwDXqSbHWuWHFKUCX+OQYZJ32EB6JvgFUmTRYYxQggRsz7pfFWLGm88oxI25MgXl+b19E9dCctaMskuMtdmqMJrV7MMWcjFhlKH1SDx6w0/wTdNI+gSSL6CPIQI= 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 1699341695111795.6743585010887; Mon, 6 Nov 2023 23:21:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GNU-0007xX-Gd; Tue, 07 Nov 2023 02:20:00 -0500 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 1r0GNQ-0007wH-Gq for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:56 -0500 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 1r0GNP-0002gk-2z for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:19:56 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-510--a-LSRPxO1u9jS6wLl995Q-1; Tue, 07 Nov 2023 02:19:51 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DD1451C2B66B; Tue, 7 Nov 2023 07:19:50 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id E147BC1596F; Tue, 7 Nov 2023 07:19:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341594; 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=Zr8zAotEqX1zZhbLTs985HQlzifY6ujW9QIdplWN7/g=; b=GyZOQs+x/4FmBntBQ3o4baepJxkJc5sFZ+9SLThm4ayIr7WgLCxp2CFLH7iTA/UeBpkQrT dbI7a0rG/CxwFj1WXj3OX2JuYBqwiIOu+tLxtpmaYrV0/oReDuWi5lQAETXNJYFRHb+NUD ZswsM1YDZHoM8w4WAJu0bQfPMW9juo8= X-MC-Unique: -a-LSRPxO1u9jS6wLl995Q-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Subject: [PATCH v8 07/24] vl: simplify display_remote logic Date: Tue, 7 Nov 2023 11:18:57 +0400 Message-ID: <20231107071915.2459115-8-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341695929100002 From: Marc-Andr=C3=A9 Lureau Bump the display_remote variable when the -vnc option is parsed, just like -spice. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth --- system/vl.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/system/vl.c b/system/vl.c index 19aef762e4..e9819408df 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1401,11 +1401,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; @@ -3350,6 +3345,7 @@ void qemu_init(int argc, char **argv) #ifdef CONFIG_VNC case QEMU_OPTION_vnc: vnc_parse(optarg); + display_remote++; break; #endif case QEMU_OPTION_no_acpi: --=20 2.41.0 From nobody Fri May 17 23:19:55 2024 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=1699341695; cv=none; d=zohomail.com; s=zohoarc; b=J726ILjkpGjXAk8jj8/wc9JvZr9ppoeB0h0oVDaf0DhzX+AEpZAhi6fhRxE7tOhVEjp4p6g9LIW5WxqFL9AuU8ysDYKQOGQi3Jhq7Jyiyhnu+zVY19YbBm/vDXBCxYskfgjoiv0uckL47IoFMwp5dhVQh3ndR44vitA/9CRY0PY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341695; 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=jFWiW+q7/NUsYxRAkT/uCzkDHbVVeqZ11g2tKjRCj84=; b=BR0ngXXHOns3msDkYo7VKKDZHT1INZjGExJYHMWn4XgxMM5b6Zw6b3DQfRoDn+SpYQ/8LtnOG6MFujVnKKWDJgILofb005NvW8YRs1NZPFU1NIFpKM5EuhbXxMPIxQ5NsSVfX2OB00ERv5WN8E7pb+IO7PaHMgWtF7ZPOEf/6FA= 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 1699341695201875.4297345107146; Mon, 6 Nov 2023 23:21:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOc-0002IX-6q; Tue, 07 Nov 2023 02:21:10 -0500 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 1r0GOV-0001q3-VZ for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:21:06 -0500 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 1r0GOU-0003AA-90 for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:21:03 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-97-FAberSjON_SXz-HCdMdLOw-1; Tue, 07 Nov 2023 02:19:55 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4ABA11C2B67A; Tue, 7 Nov 2023 07:19:55 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BBAA2166B26; Tue, 7 Nov 2023 07:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341661; 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=jFWiW+q7/NUsYxRAkT/uCzkDHbVVeqZ11g2tKjRCj84=; b=cvwhtLkm/Yokla/c+4/4Ld84bKC5xHUkduOqWqQARJMfv55onbwzv5K0qi66I40FY8TvKL NDlwRsH/6kWuH5d+8LugRxaovuH4f1X/McpVw8RuMBtvYXFE2T8U+uJEZrIyi5YQmq+hyc fWqjMUVEEUa9WaKcjlrylCMSnXRUBtw= X-MC-Unique: FAberSjON_SXz-HCdMdLOw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Subject: [PATCH v8 08/24] vl: move display early init before default devices Date: Tue, 7 Nov 2023 11:18:58 +0400 Message-ID: <20231107071915.2459115-9-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-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: 1699341695926100001 From: Marc-Andr=C3=A9 Lureau The next commit needs to have the display registered itself before creating the default VCs. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth --- system/vl.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/system/vl.c b/system/vl.c index e9819408df..cf46e438cc 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1352,6 +1352,23 @@ static void qemu_disable_default_devices(void) } } =20 +static void qemu_setup_display(void) +{ + 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; + } + + qemu_display_early_init(&dpy); +} + static void qemu_create_default_devices(void) { MachineClass *machine_class =3D MACHINE_GET_CLASS(current_machine); @@ -1401,18 +1418,6 @@ static void qemu_create_default_devices(void) #endif } =20 - 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); @@ -1937,7 +1942,6 @@ static void qemu_create_early_backends(void) "ignoring option"); } =20 - qemu_display_early_init(&dpy); qemu_console_early_init(); =20 if (dpy.has_gl && dpy.gl !=3D DISPLAYGL_MODE_OFF && display_opengl =3D= =3D 0) { @@ -3666,6 +3670,7 @@ void qemu_init(int argc, char **argv) suspend_mux_open(); =20 qemu_disable_default_devices(); + qemu_setup_display(); qemu_create_default_devices(); qemu_create_early_backends(); =20 --=20 2.41.0 From nobody Fri May 17 23:19:55 2024 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=1699341940; cv=none; d=zohomail.com; s=zohoarc; b=FGYX2XwqtiS3jwD1wrnHmqOPWCeSzLsiR2GzYSalajVmMgeXvgBMyovmhihaoNVYZbLu5g99b9w6Wz8AQsvCP60a8cTfBoSdFgFqz4MN1Qx9ge79WhkbhJiRs/Tock6E1j9tOizKVdfsKJymZu2U0YUC0GIx2Xwi20SCyrXFYS4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341940; 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=bmV56O8rUuNhsZEmD3/vWvetTBu+YFNXX7Trndub2hs=; b=l61pTIKX2sORx3CaEMGj//QLgQ2mWfiWBISi6lbjQxHda5DjVPEqYa8N9O/s9fVAdfpZxdo80p5Wt8CZUJ7NFCWCApv5YWCOZCjSz2cqCCoM9j5nwRfQioeE3/uAR+r0hvMArkT59wz4o+oiVD/hkKoWypkJBUzogtXPF/UU+M8= 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 1699341940130143.626805993046; Mon, 6 Nov 2023 23:25:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GNd-0008Fo-2t; Tue, 07 Nov 2023 02:20:09 -0500 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 1r0GNa-0008AA-SO for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:06 -0500 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 1r0GNX-0002iu-Us for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:06 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-440-OarU53l_OPWj_0GCMmYJzA-1; Tue, 07 Nov 2023 02:19:59 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 389092999B2E; Tue, 7 Nov 2023 07:19:59 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27CF540C6EB9; Tue, 7 Nov 2023 07:19:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341603; 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=bmV56O8rUuNhsZEmD3/vWvetTBu+YFNXX7Trndub2hs=; b=fYGAVsM0DS0iay9xlzu8bY7IdGayCmXVLY52LS8aNo03UcQpla3uHmpkCT+NgzzbMD5edh UVNt4+IZC/v7zVqpFLbgptOV8KbIgf8byDOQjncCANnG6Zw15KBXqc34gFyQplVAnL3OQP E6HRAVkCv4N2oQYNnVVIXGmY4Uw3PDc= X-MC-Unique: OarU53l_OPWj_0GCMmYJzA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Subject: [PATCH v8 09/24] ui/console: allow to override the default VC Date: Tue, 7 Nov 2023 11:18:59 +0400 Message-ID: <20231107071915.2459115-10-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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.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, T_SCC_BODY_TEXT_LINE=-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: 1699341941544100005 From: Marc-Andr=C3=A9 Lureau If a display is backed by a specialized VC, allow to override the default "vc:80Cx24C". 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 (on TTY & not daemonized). Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth --- include/ui/console.h | 2 ++ system/vl.c | 27 +++++++++++++++++---------- ui/console.c | 14 ++++++++++++++ 3 files changed, 33 insertions(+), 10 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 cf46e438cc..bd7fad770b 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1372,6 +1372,7 @@ static void qemu_setup_display(void) static void qemu_create_default_devices(void) { MachineClass *machine_class =3D MACHINE_GET_CLASS(current_machine); + const char *vc =3D qemu_display_get_vc(&dpy); =20 if (is_daemonized()) { /* According to documentation and historically, -nographic redirec= ts @@ -1390,24 +1391,30 @@ static void qemu_create_default_devices(void) } } =20 - if (nographic) { - if (default_parallel) + 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) { 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 Fri May 17 23:19:55 2024 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=1699341672; cv=none; d=zohomail.com; s=zohoarc; b=jEUNz2oRjpASCvMg885P6GYM/GvSV6pLKfmzYm0bmtfy6y2iAycBVmRw1XXfqpxabSlO9IIZYtlMcgnnapQRBTrV6/Xs5Ap9Qfw/vd1FMvthoLERXE/ghYV9H/OSf/6wfXh+3lpE7V6yvgCXy7iWuX0jyMatpadS5oZE0C3phV8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341672; 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=6TPHZZbPX5YwmR+v8bRhw73QvmNTbMk63utWKnSQejU=; b=M+4rJWtklKVZujJRltSJ+SaQ/pJuqBFzjpaA2ZdR/O3CgpF7RnSz01QCqGLQpQkbeteu43RbJ1z4JQIEomRjHQN1c1ttf8bslj175hf7oUGIKwLwIvtfYyt+g38aq5pHN4TYD9TkIEYKhW2M45J7+PQ0Uhg39lwa1MI/TR/e6lk= 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 1699341672683345.8071185491202; Mon, 6 Nov 2023 23:21:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GNi-0008Ne-W8; Tue, 07 Nov 2023 02:20:15 -0500 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 1r0GNe-0008IQ-DH for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:10 -0500 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 1r0GNc-0002k4-6l for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:10 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-610-Qd5mwt5KN6qJ4-4hav63Kw-1; Tue, 07 Nov 2023 02:20:04 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 34E711C2B671; Tue, 7 Nov 2023 07:20:04 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE6B1502A; Tue, 7 Nov 2023 07:20:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341607; 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=6TPHZZbPX5YwmR+v8bRhw73QvmNTbMk63utWKnSQejU=; b=a7h5n/rEnFFO64CEVj1VR6VhPCAZ/sEgpJVJKzKoYVfjcIjSbMb1g5QBum3FOnJMGWouv/ 5oBW5499SJgQdeJRV2qDpBZ+PDNjIo8k3XztfUlTueW/o+C+wZm5t3p3NY7VGAvCRGxzUY giHXgUmeMBYXrlP1M/WlFKdDLptRZtI= X-MC-Unique: Qd5mwt5KN6qJ4-4hav63Kw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v8 10/24] ui/vc: console-vc requires PIXMAN Date: Tue, 7 Nov 2023 11:19:00 +0400 Message-ID: <20231107071915.2459115-11-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.5 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, T_SCC_BODY_TEXT_LINE=-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: 1699341673882100005 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 Reviewed-by: Thomas Huth --- ui/console-vc-stubs.c | 33 +++++++++++++++++++++++++++++++++ ui/console.c | 3 +++ ui/meson.build | 2 +- 3 files changed, 37 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..2afc52329f --- /dev/null +++ b/ui/console-vc-stubs.c @@ -0,0 +1,33 @@ +/* + * 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 Fri May 17 23:19:55 2024 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=1699341822; cv=none; d=zohomail.com; s=zohoarc; b=SW/Xumu6UpxRRQkanYwNKiGXcoo9yk/BJUBLUyes6egOUGPps51r0JJEyT5pVqwXBXBSoRPm7vL/HgRDntWH+mKkbCX5eHD+i76GMIiaqF073zGNWErwNOdMA1H+bJ76ZzPDwrwPi0Eg1H3DG9aYdq01PmD94MTiWBDxYFwS5IE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341822; 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=D7U0LgY5jcVOIxkM4/dKlmU2kksgWdPndfqcRX72f0k=; b=l+BICtvM6rYF2P3CSxqzvzlP+yj5IzMo7XozwxbeW1Be4W8NXBRj6ElKt7M7V62O5OytZZThs+8UoEVVVMUUfTqUUOYVXXDWuWdZ6UJ2VFUuzPC/GhdEvejENG15txiK8dUnZ83fOvdXLARCGcCggZSJmFhEE4mH2sCznYr2/BM= 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 1699341822001357.0618227898566; Mon, 6 Nov 2023 23:23:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOE-0000xH-65; Tue, 07 Nov 2023 02:20:46 -0500 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 1r0GNm-0008Ua-IB for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:21 -0500 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 1r0GNi-0002vF-0B for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:18 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-692-DbKiDZc9OaadY-rm8W8CQg-1; Tue, 07 Nov 2023 02:20:09 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0A372999B2B; Tue, 7 Nov 2023 07:20:08 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93E38492BE7; Tue, 7 Nov 2023 07:20:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341612; 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=D7U0LgY5jcVOIxkM4/dKlmU2kksgWdPndfqcRX72f0k=; b=HBDjyQ5twsK1euzlZu9xBSWQ8TSJ4DI2gZ9D96dWC3ply5+Exe+0pr/FbJd0g0TULs+Lla eZV72yQ2KcY6No0NscCfUG40U2qAn2SYayll0W/V/wm7x/vpRr1IIwNtGTuYZOQdVGS8G3 JFa97HVkfvTcEsOt4ay9W4+ZppLDL+E= X-MC-Unique: DbKiDZc9OaadY-rm8W8CQg-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "Dr. David Alan Gilbert" , Eric Blake , Markus Armbruster Subject: [PATCH v8 11/24] qmp/hmp: disable screendump if PIXMAN is missing Date: Tue, 7 Nov 2023 11:19:01 +0400 Message-ID: <20231107071915.2459115-12-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_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: 1699341823082100001 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 Reviewed-by: Thomas Huth --- 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 c0a27688b6..765349ed14 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 Fri May 17 23:19:55 2024 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=1699341781; cv=none; d=zohomail.com; s=zohoarc; b=acfOZUdt33EETWOEvtH14leed3iPq85jyjRAdbh+8FgIdVoDj2+bMh59fBnxQoEVi4ucR0bqtNLM4X4vmQPs3pjYpheoHgovqCvSZrC8wYsARug6GAIFMp7u6VWNShMCUYSf1WV+BsPy0nWkXyXlc6BcVG9Q55NyCpyl3qs1k7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341781; 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=yqSN8+W8/c4aLCxLECks8SFneUkghAjlyZ/wqudt2nQ=; b=hhYnvDFlSpFQyWHO6ha53hjRmGcWie+q/vNY9IXxHur7BmrOaBNVKCGLE95YoPzVHD46KG7aODuW0MlxekAIxdYJMJWS1A0fRCrXFLHNsnKFbXpfdP38Jt8rpETN42DCIEbI27biGqafdWttnyLG6E2Rg9RWkf1qAY9NaI+jOXE= 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 1699341781678148.5997415866011; Mon, 6 Nov 2023 23:23:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GO7-0000JT-Ul; Tue, 07 Nov 2023 02:20:39 -0500 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 1r0GNm-0008UO-49 for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:21 -0500 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 1r0GNk-0002vo-BX for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:17 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-250-_A46ommvNA2JH1Kwu9kEVA-1; Tue, 07 Nov 2023 02:20:14 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 874FD3C10429; Tue, 7 Nov 2023 07:20:13 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1CD5E492BE0; Tue, 7 Nov 2023 07:20:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341615; 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=yqSN8+W8/c4aLCxLECks8SFneUkghAjlyZ/wqudt2nQ=; b=MbHWrLXCY1owcKQ97K/7U+jjOrsSKFtjeJv5u89BQfQpGz5xrAR4F7UjQiO1aBYrNMJ9KP 5tWCVFjoMujsqlIZXwrBaSnxrBkRRCTLEh02wgRh2BgjF6N7GRS9MAHhzpxtXAFQkp49Ci qxWToX72n0oBr2ceRCLG+fHRhGrOnjA= X-MC-Unique: _A46ommvNA2JH1Kwu9kEVA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "Michael S. Tsirkin" Subject: [PATCH v8 12/24] virtio-gpu: replace PIXMAN for region/rect test Date: Tue, 7 Nov 2023 11:19:02 +0400 Message-ID: <20231107071915.2459115-13-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341782957100001 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 Acked-by: Michael S. Tsirkin --- include/ui/rect.h | 59 +++++++++++++++++++++++++++++++++++++++++ hw/display/virtio-gpu.c | 30 ++++++++------------- 2 files changed, 70 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..94898f92d0 --- /dev/null +++ b/include/ui/rect.h @@ -0,0 +1,59 @@ +/* + * 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, + uint16_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 2707bceea8..b016d3bac8 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" @@ -503,7 +504,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; @@ -565,34 +566,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 Fri May 17 23:19:55 2024 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=1699341937; cv=none; d=zohomail.com; s=zohoarc; b=Qhs2c+QR6izw6HNmAzaorjD/A2FgMB1SEhEl3J+k8deqNRM90VklgH9yLOi1/oxgZb9l2TKR8AyByjmxXJkSTPba5h5HHfJ7Evlq9u0AmwF61QuardLo382yRNX965n2p3lXeu3CrkRhabfGRWufEcCcGcNJl+GSP0sK1IH3z7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341937; 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=MUYXOavKjr3nBQePklqtEwSaDfyRGwnYpWD8MCr0umI=; b=GDfmjG725h216/9MopU4any+Wh2kmNBwKiH8VebZGRyM7uqpxR003ktSOKQjwvimCB6lEu9bZt++PZfS8wZqFyClTL5K9EzPkwWBNGkzpBFYOzQ74sjq6SX40FcpEXWIwB6nDqMF1azX4gUt9VS0bWul4ki315prx2QVqrTY25c= 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 1699341937267483.99901598751023; Mon, 6 Nov 2023 23:25:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOA-0000RM-BN; Tue, 07 Nov 2023 02:20:42 -0500 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 1r0GNw-00007L-Dx for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:35 -0500 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 1r0GNs-0002zu-Is for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:26 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-YFD4iawUOl6wA-PvY1tdPw-1; Tue, 07 Nov 2023 02:20:17 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 696B780C346; Tue, 7 Nov 2023 07:20:17 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7898540C6EB9; Tue, 7 Nov 2023 07:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341624; 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=MUYXOavKjr3nBQePklqtEwSaDfyRGwnYpWD8MCr0umI=; b=jU7dyAusk7zKdrSBPDeC8zkCnF+hA/RFAFM+aoy1aBctw1PFRlK4VW6MdmDQ2CJqRLF8bP ImGqhNxdO4rBScjj1Hv4sFdzO13cjFfb+0H19mVEkVTa9bBffsx8I1Z7J59JJG4/2650nM k/m3gmInMambpQZlX2zLWOjYevolAf4= X-MC-Unique: YFD4iawUOl6wA-PvY1tdPw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v8 13/24] ui/console: when PIXMAN is unavailable, don't draw placeholder msg Date: Tue, 7 Nov 2023 11:19:03 +0400 Message-ID: <20231107071915.2459115-14-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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.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, T_SCC_BODY_TEXT_LINE=-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: 1699341939599100003 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 Reviewed-by: Thomas Huth --- 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 Fri May 17 23:19:55 2024 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=1699341896; cv=none; d=zohomail.com; s=zohoarc; b=Qkr7a6HLBZxL7QkBEAsX4omCighsSSDCRyLSM+jVHH2hKIeZMiVygpDgGqrpzxBclefJ08zZZQ+JuzuTjRlMCglH3DnhmXUY4ZfxjI8mzNKaRwhgwGvCndIMAaWspuPKa8wJTFRY9oHGiiYd0I/Pc7k/FF5Azi5v/lbRnoSxIWo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341896; 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=8y5okX3QpysGx0N17ejN+rdipmBjYxxyu1XjxtJ2Ujk=; b=kXw7D+y8OeYy2/xIVpapn5xR/KP2PEMBvlm2HjW8B5wtRyTTLIa4SvvZ9SfekvJH4ncqmxXqqYNPtnWEoXSffo1yKsSGJ12aGs/10Im9imYmMQT/LKCbHyqovosoiKoujt5ilHrqBgErugZ0MYjF4t0PkZSURqS9dR7prpVBzUE= 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 1699341896475910.5032732331905; Mon, 6 Nov 2023 23:24:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOC-0000jY-PQ; Tue, 07 Nov 2023 02:20:44 -0500 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 1r0GO0-0000G4-F2 for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:37 -0500 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 1r0GNt-00030N-Lo for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:32 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-685-AvBFPzSCNMajXXAc06tZGA-1; Tue, 07 Nov 2023 02:20:22 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A4454811002; Tue, 7 Nov 2023 07:20:21 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id A54581C060AE; Tue, 7 Nov 2023 07:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341624; 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=8y5okX3QpysGx0N17ejN+rdipmBjYxxyu1XjxtJ2Ujk=; b=I5Rt4Z2fSiPjxTMHItRJ7yVJuzjSwIQDQukZZMlIIE6QH99vRXlhbaNn8bFoyK1VZfAidj lbX1PHK7BfQlJMcBKUrEvb3/wEN4pzfTSweKKbTWFAKQFjFX+QHTWM/BsMcvpfAip1qwuN mLhHuv5u8LoDXw6hab57E1QVly5xKQc= X-MC-Unique: AvBFPzSCNMajXXAc06tZGA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "Michael S. Tsirkin" Subject: [PATCH v8 14/24] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN Date: Tue, 7 Nov 2023 11:19:04 +0400 Message-ID: <20231107071915.2459115-15-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-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: 1699341897375100005 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 Acked-by: Michael S. Tsirkin --- 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 Fri May 17 23:19:55 2024 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=1699341926; cv=none; d=zohomail.com; s=zohoarc; b=cOFEvCzOEL056uWPv2j8FnxMhA7UYglCJWmfBSh1l3os/XWO2SUh0gksbyWJhMmT6/fkfpOSA/DmEkqpykLf1EI1hzrI38AsqDhTbsv+D+9+ew60ZggCu+frNUII9Cze8jWX+B+cwWbCJDcVlMCXH+m4S3KXaq8td1Uz6YpooAI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341926; 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=F3mgsPuN39q1Oq+jVqSXiAJMHeF91n6hytxBvAxxMklryAsfqlcFmbmROREFBqOyF1UCTWOCmRjgQZ6XZtyVdcwfjF9+X3l/X7WYVFXgmXIRZLdZn/+Ejf5tFYj4lxtAaAXdfCRwls3VTwHPZiBeWD7/05/A5PEPUesbWTkrKec= 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 169934192656466.53393599151036; Mon, 6 Nov 2023 23:25:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOA-0000Uu-PH; Tue, 07 Nov 2023 02:20:42 -0500 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 1r0GO5-0000HG-Vd for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:39 -0500 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 1r0GO3-00034q-Eu for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:37 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-196-GmLazMmUM46qg5Szp5F2dA-1; Tue, 07 Nov 2023 02:20:26 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E472289C944; Tue, 7 Nov 2023 07:20:25 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id F263BC1596F; Tue, 7 Nov 2023 07:20:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341634; 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=Azvdq1iemM4oYyBzkSYjNIszAG5k+y2NRJnOFyqqCUsFNxfn1TEreU/CXktDl2M2BGDkiO flywS/nLEzDRPxO7fsiJwJfFbxtlUtn+v6ixjhEJTLW7QYK8rCAURGAvB2ap6PXQAKzqFP 1+YyDr0zifr9iNiqraqAVsA/l3xh/N0= X-MC-Unique: GmLazMmUM46qg5Szp5F2dA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v8 15/24] ui/gl: opengl doesn't require PIXMAN Date: Tue, 7 Nov 2023 11:19:05 +0400 Message-ID: <20231107071915.2459115-16-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341927454100001 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 Fri May 17 23:19:55 2024 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=1699341672; cv=none; d=zohomail.com; s=zohoarc; b=fW0oQ/e4f9EwlWBLZVsE8dggnNDHg8NpIQRV4ncGBuczCeXMN4+b+KtBxyeGV8HIckmNp4320VfmFoHgX2H5PM3YmwPVDCt/AgtFhMCAZIY/7TryrdUY+ebTBveqk4eQdteuMuRw59OY3VTRBDTt34tNk0DtPq60BezU3gkXM2s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341672; 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=4t/Fh+VQOxRyV2ZW7oBgDit4sSkYUFTqL33WwV8ranY=; b=mDO2m9DDXTDppAdxSWahGb7mkMrJHaRh3p2hkxH9KvPpYlBduMpfgozrudJzkAzDjXAAZa7FAof1EvMOBpiNnBwZYLhmEWuyg643fTN9T7I+2Fmg59MzBYU9VZ5DfI5bvq/GhAO58BD9Zsbr3ACYefpZ/4yznEqNVo5NJCDV2Fw= 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 169934167232287.53599208809703; Mon, 6 Nov 2023 23:21:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOC-0000Yg-Ad; Tue, 07 Nov 2023 02:20:44 -0500 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 1r0GO5-0000H1-TJ for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:39 -0500 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 1r0GO3-00033u-0G for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:37 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-696-6Y9mQ-j4OKKqYHXj7GSHqw-1; Tue, 07 Nov 2023 02:20:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D80389C944; Tue, 7 Nov 2023 07:20:30 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 47DC440C6EB9; Tue, 7 Nov 2023 07:20:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341633; 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=4t/Fh+VQOxRyV2ZW7oBgDit4sSkYUFTqL33WwV8ranY=; b=HcQD39xp0HPphgijfV+qtChuHeNr4B/2CT2U5AZrDmLplxu+OUlzWH5sQyvO1ZVEwNqAc2 R4SPeQYBgr/pHnoAEzMYWGHMKPvw0Q4QyBVHpF5p/7jKCchr2BVZDdXOVc/HE466D+ASxa J9EfJ/iM64dji/+RX85i3x6eJ6xADZs= X-MC-Unique: 6Y9mQ-j4OKKqYHXj7GSHqw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth Subject: [PATCH v8 16/24] ui/vnc: VNC requires PIXMAN Date: Tue, 7 Nov 2023 11:19:06 +0400 Message-ID: <20231107071915.2459115-17-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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.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, T_SCC_BODY_TEXT_LINE=-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: 1699341673882100006 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth --- meson.build | 6 +++++- ui/meson.build | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 505cc591b9..3e60f42f94 100644 --- a/meson.build +++ b/meson.build @@ -1560,7 +1560,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..19723188b5 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -46,7 +46,7 @@ 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_all(when: [vnc, pixman], if_true: vnc_ss) system_ss.add(when: vnc, if_false: files('vnc-stubs.c')) =20 ui_modules =3D {} --=20 2.41.0 From nobody Fri May 17 23:19:55 2024 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=1699341895; cv=none; d=zohomail.com; s=zohoarc; b=ILuuac234+W0hUbPHgeY5HW0VI+vrNvZjHJdZBZKfRlXeu3TxtqLHiIUVPtNNXSyFRbKtPFB8DQz6ETOexMhpEslaV0/+H+14p9v/wcytHxJ/QWRaGipQ3zgXUe+DGcB/8qlfZyJyMt8uwa8hit45aXQ0uvzxqIKuleuqazwlqA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341895; 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=ZawjKItTklFgZVoyY3ICpuRo+M9PgXQiK5Kx+dg5iLc=; b=bxNKXSPjVHjI2FHYdBJa874rhPVATMnKIDwB95J5BUS1EEQDLqjqRA+FWiqSkgHdDkKdsFYIDWE5BBGD0J+eDmJjejkjJRaH78DULDduvkQ+Xzj9gUD8UPpnS2Vxn7BzaYuHDfDBnesu2d9SQp1eXCK5CNUWOFggepNezXsjw98= 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 1699341895415433.4560692063752; Mon, 6 Nov 2023 23:24:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOD-0000uY-St; Tue, 07 Nov 2023 02:20:45 -0500 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 1r0GO9-0000O5-1D for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:42 -0500 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 1r0GO6-00035K-7X for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:40 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-679-hOVh-GRbO7e0XaS97kUhFw-1; Tue, 07 Nov 2023 02:20:34 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1FAE6185A78A; Tue, 7 Nov 2023 07:20:34 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5FA2A2166B26; Tue, 7 Nov 2023 07:20:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341637; 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=ZawjKItTklFgZVoyY3ICpuRo+M9PgXQiK5Kx+dg5iLc=; b=cQER4Zqgzh9bW2AQAuK+idUwqw0CDqHSgV93Yo5Wtdk5sXu0m8k2O6TIaq8YWVcVnwRAMJ ui6WQK+LmvbqHkLn+65RkOy2Pwmh0PqSjNPNtS6s56O+GZXImkc+tQKe4e9yqI7y+tk1ph k7PVkLDSEqWzSq/GLMlCB73QiYUSe6I= X-MC-Unique: hOVh-GRbO7e0XaS97kUhFw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth Subject: [PATCH v8 17/24] ui/spice: SPICE/QXL requires PIXMAN Date: Tue, 7 Nov 2023 11:19:07 +0400 Message-ID: <20231107071915.2459115-18-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-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: 1699341897402100006 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth --- 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 3e60f42f94..0f578ddbf4 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 19723188b5..024f494faf 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 Fri May 17 23:19:55 2024 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=1699341772; cv=none; d=zohomail.com; s=zohoarc; b=cyeKb664BxhILQvHGbOBKavE2Fhx8Z74G5O0TuB3h1OSRI/t0/Ocohuhgy9VFPHc4eqfZXxkIUenzZeIVnLYB0r9Z1O76efEqNZ/Q1OiLptpdfMQT5WsR6N+3QCWeJ5frwaLCtM1Cae49JcwOYHMor3GzE7tDyZXmoR4big/Iio= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341772; 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=JTfabtnVl6oJbKA2QschTUav5LHRKAtBx8CC2JltGfI=; b=Jw2LZu1FrJWgww6ubTYyjP/boTWNKvN3nP3wHDBD494/7lSHWX69+MKiDYWRViNgsxvSqk0mBpxD7M+p+yWqNjuTS9ztJFyLaaUTVk1fKpYD4HcZnkjokYaxhOI49RTAEN+iYhHLKaT+U7ClORZVeoHMFlMHrxMmA5PKgVJbD1s= 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 1699341772322825.2590691871052; Mon, 6 Nov 2023 23:22:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOG-0001HV-JD; Tue, 07 Nov 2023 02:20:48 -0500 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 1r0GOF-00015w-F1 for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:47 -0500 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 1r0GOA-000374-Rm for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:47 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-29-3rYAseuhNLq1OdwQ6yV6AQ-1; Tue, 07 Nov 2023 02:20:38 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 88A5F3C10429; Tue, 7 Nov 2023 07:20:38 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 91CF8C1596F; Tue, 7 Nov 2023 07:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341642; 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=JTfabtnVl6oJbKA2QschTUav5LHRKAtBx8CC2JltGfI=; b=X27ca2S12/z7dD+/027zmLTi6937+3REiz101EOSJKvL/+Ebu27ojGWCzu9vMcv0wGJ2my DdnHDnOY8GAGiKqIpResgYQ0uVEaAToJ6szA8SZL5ZRZCnrQH19yb0iqFFAFjND9ye8QM3 UWip2wHUjyh3BpO/AdgozNDl9O31Hcw= X-MC-Unique: 3rYAseuhNLq1OdwQ6yV6AQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth Subject: [PATCH v8 18/24] ui/gtk: -display gtk requires PIXMAN Date: Tue, 7 Nov 2023 11:19:08 +0400 Message-ID: <20231107071915.2459115-19-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: 1699341774154100006 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 0f578ddbf4..8422e7da0c 100644 --- a/meson.build +++ b/meson.build @@ -1531,7 +1531,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 Fri May 17 23:19:55 2024 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=1699341778; cv=none; d=zohomail.com; s=zohoarc; b=Whp/SahPi/kDuRaB17x4DBPt390n3MQkS07x79keqZzvCoiFoumkRGNkfoPeb8yboCIy2VHeb+71vooPl6PwV2qXFE9DxVux70fBYEmHlaKikMz0z9wgq1U4/9/vBxviz1VDon5o6KV1ZcKmaAHDjGwO4vENyZqHm8X1tUvKeBQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341778; 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=YgZKMYWn3Wdc710ymth6R/fFVwX/oO2V2i44QoXo7BY=; b=GJXzLvlhiL7Xe1174mwqw0Gg5fERj82KDutnSDFZWapqlHNjI7yiOpkMCr+mTbF6fE9N1XGtYWYyh4bJdajWoAlDFwqs8VNdxxaNCZ69OqutOnrvEpLXD77t9CFuJbDeZg6jYntfyDla1dKH62H568y2d0qJ8XlxAY/o2KNmrYg= 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 1699341778482299.7945544626059; Mon, 6 Nov 2023 23:22:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOa-00025g-Ed; Tue, 07 Nov 2023 02:21:08 -0500 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 1r0GOL-0001c8-U4 for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:55 -0500 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 1r0GOI-000386-OQ for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:53 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-103-i7haQcLEOVq-jDG7apViKw-1; Tue, 07 Nov 2023 02:20:43 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 57BC71C2B660; Tue, 7 Nov 2023 07:20:43 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id C2C2A1121307; Tue, 7 Nov 2023 07:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341650; 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=YgZKMYWn3Wdc710ymth6R/fFVwX/oO2V2i44QoXo7BY=; b=UaRj/otDAYIoNxdfNE+/7F4sdOMSYr5acOwyWgBR8tReaFumGDnM5tEw1VAkR8ya4aXU7f V/dV3trVJ9Lj+q1dRH+GFyaljVg9oPCaszZVRGpPe8Ms1NsIxKoboQrwrIhoVFBcHe1vOQ mRAMPAQtK8dE/O2WO9H3J9v+/+9ChKA= X-MC-Unique: i7haQcLEOVq-jDG7apViKw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v8 19/24] ui/dbus: do not require PIXMAN Date: Tue, 7 Nov 2023 11:19:09 +0400 Message-ID: <20231107071915.2459115-20-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-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: 1699341779029100003 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 | 90 ++++++++++++++++++++++++++++++++-------------- ui/meson.build | 4 +-- 2 files changed, 65 insertions(+), 29 deletions(-) diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index 36548a7f52..18f556aa73 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,64 @@ 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 +671,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 +785,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 +823,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 024f494faf..0ccb3387ee 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', @@ -101,7 +101,7 @@ if dbus_display 'dbus-error.c', 'dbus-listener.c', 'dbus.c', - ), opengl, gbm]) + ), opengl, gbm, pixman]) ui_modules +=3D {'dbus' : dbus_ss} endif =20 --=20 2.41.0 From nobody Fri May 17 23:19:55 2024 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=1699341842; cv=none; d=zohomail.com; s=zohoarc; b=j0AE5jCeM72obsdbShpvxICur7n2vIRqljKTGovUh26c2Xx7MuMgRy9E8zyrwq267gv2FHIU+OepwQOBMfw5jhehtjeTqac6wmGbWycQur/g3bjoGEY7qKuwzQxiLo6Xw6AUblgS1dxeL5xGUxcSFyGJJgxbxGeX1ZgWQog8EHI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341842; 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=2dTeKlsF2I7zQAqovNNgVB/FgoobsTX2dh4aN4tFqx4=; b=Pw2SKAp1anStzCJ1MkHuTVjnzu6GXDfaSkWN8EHpLhqqUaE8QvxF5QAP5JtHRZxsVtriQQpxnta78EbO7ZLxw8avUp/DokiX7czmhNUqDRHtVYQNvuNpjghattW1ysGYW0r/FBmqsEhOQqEIllZuoUIOEdHaqJTwSGd61mDDZdM= 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 1699341842759273.0726085388362; Mon, 6 Nov 2023 23:24:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOZ-0001sJ-4O; Tue, 07 Nov 2023 02:21:07 -0500 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 1r0GOJ-0001YM-QI for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:53 -0500 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 1r0GOI-000382-AY for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:51 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-538-jA2LgMtcOeuZp8InmMIcAQ-1; Tue, 07 Nov 2023 02:20:48 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B4C26811004; Tue, 7 Nov 2023 07:20:47 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB23A2166B26; Tue, 7 Nov 2023 07:20:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341649; 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=2dTeKlsF2I7zQAqovNNgVB/FgoobsTX2dh4aN4tFqx4=; b=StPZ5reJKFm0QvkRYwHnBTnb6Q4Qorx68JX6DCJ+r094tmJ/OYkhp4qZRuBL8eAnSWPBgH DMoCYyviJtl5hXQyXhonH1EtgivoVG1nD+LFVQx3wiJa0XmwJc3Rom4pU4MrZH+FhtypKf Ho6l04mxO0jnNB2PMh/qAWPSj1TObH4= X-MC-Unique: jA2LgMtcOeuZp8InmMIcAQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PATCH v8 20/24] arm/kconfig: XLNX_ZYNQMP_ARM depends on PIXMAN Date: Tue, 7 Nov 2023 11:19:10 +0400 Message-ID: <20231107071915.2459115-21-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341843191100001 From: Marc-Andr=C3=A9 Lureau The Display Port has some strong PIXMAN dependency. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 e35007ed41..8ce288a40c 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 2b64fd9f9d..9c06aaee20 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 Fri May 17 23:19:55 2024 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=1699341778; cv=none; d=zohomail.com; s=zohoarc; b=iuQMdQ1WIAuIPfbnVPk/MvZzV37CcC0jrkgwap8xs/JGbIfyqfOWV8eKLMMLuIj47MzenrKDXhxIgVVauqtKbN4E60vTcf7gTzMQ58mgzIws7hHCkkXB9A5a+nIslpY6tdBPe3YzcThNWOK5EIU8/ixcnE8jGGIubGwpuM70PvY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341778; 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=Or88Qnnb1pNKafV+dN1nEsCv88CQRy2MEUGRfMqaD8E=; b=Ck6XrNfnFilid9RTwG2t6UfOVo0cZVjE+tmuOh5OxfNWbwR1K54N5vI2QNgvJmmP1oaAbXA3oqOaeaAAM612IHnUUhZ3SxyzyWwtiLWfdrEOBXdwGDHIl97r1yPFJf6afMMe4pQsLV4oTi4AsvPlGzgXTTWFzYDJq3uwBu+ylvg= 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 1699341778199556.8133109299467; Mon, 6 Nov 2023 23:22:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOe-0002ca-K6; Tue, 07 Nov 2023 02:21:12 -0500 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 1r0GOP-0001eH-EX for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:21:03 -0500 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 1r0GON-000398-Pk for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:20:57 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-133-WIxxbxgzN8O1lvt_xtdXow-1; Tue, 07 Nov 2023 02:20:51 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 817C9185A793; Tue, 7 Nov 2023 07:20:51 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 61176492BE0; Tue, 7 Nov 2023 07:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341655; 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=Or88Qnnb1pNKafV+dN1nEsCv88CQRy2MEUGRfMqaD8E=; b=BwwB0FvbJHHqWtrekZ17gT/2iJC17sN9CyVRwzWf5w0rX5TnWajvkTbBfxAo0gMtnOj+Np eXlxPutljty3ML2niggZ0pvrXx0kaeqq/dGThgoJAY1tQ1++O+WhMi0EZc3KAyyXZsqu68 CULgduvPtt9g7h6agW1AW5ep7HJUkco= X-MC-Unique: WIxxbxgzN8O1lvt_xtdXow-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v8 21/24] hw/sm501: allow compiling without PIXMAN Date: Tue, 7 Nov 2023 11:19:11 +0400 Message-ID: <20231107071915.2459115-22-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341779026100002 From: Marc-Andr=C3=A9 Lureau Change the "x-pixman" property default value and use the fallback path when PIXMAN support is disabled. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: BALATON Zoltan --- hw/display/sm501.c | 46 +++++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 0eecd00701..33fd08955d 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,20 +904,23 @@ 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)) { - /* 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; - for (y =3D 0; y < height; y++) { - i =3D (dst_x + (dst_y + y) * dst_pitch) * bypp; - for (x =3D 0; x < width; x++, i +=3D bypp) { - stn_he_p(&d[i], bypp, 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; + for (y =3D 0; y < height; y++) { + i =3D (dst_x + (dst_y + y) * dst_pitch) * bypp; + for (x =3D 0; x < width; x++, i +=3D bypp) { + stn_he_p(&d[i], bypp, color); + } } } - } break; } default: @@ -1878,6 +1891,12 @@ static void sm501_reset(SM501State *s) static void sm501_init(SM501State *s, DeviceState *dev, uint32_t local_mem_bytes) { +#ifndef CONFIG_PIXMAN + if (s->use_pixman !=3D 0) { + warn_report("x-pixman !=3D 0, not effective without PIXMAN"); + } +#endif + s->local_mem_size_index =3D get_local_mem_size_index(local_mem_bytes); =20 /* local memory */ @@ -2038,7 +2057,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), + /* this a debug option, prefer PROP_UINT over PROP_BIT for simplicity = */ + DEFINE_PROP_UINT8("x-pixman", SM501SysBusState, state.use_pixman, DEFA= ULT_X_PIXMAN), DEFINE_PROP_END_OF_LIST(), }; =20 @@ -2126,7 +2146,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 --=20 2.41.0 From nobody Fri May 17 23:19:55 2024 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=1699341765; cv=none; d=zohomail.com; s=zohoarc; b=Fn/UVZ/dbUNfNkJdmVo1QNflI5XgvoCkVlh5plSlHay6bmGI1FacNRXRTBlRZq7525WdIlehtFfWGyiF0Kfe0UOFPAysxTdPYJG7rB2COkryMMahhzhuJ5Nf8A0mUU4eplcgENPr/zARzOqf5MAZxdWDvapM/EmNvHt/IQUdCYo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341765; 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=X8dzZxcmIa3U/m37IAvb3mPPzYcvzMQZvbNikgINAMY=; b=Z+F9BrOl3P0i0OrLWGYLNN0c2cwplsjmN8OvHnrGF86T4hbynhu9sYgPUIB0btbiZdP+GXby7lIH2FahbNwMdVtn5WHhDp+KwqCklhpftSIifiqpCctOjqt6KdpjxBuleRE9/HotFbvGPfp/pKG2GsL1LSfKVoFBeOESLGZB3E8= 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 1699341765196412.29072196945083; Mon, 6 Nov 2023 23:22:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOc-0002QV-Vo; Tue, 07 Nov 2023 02:21:11 -0500 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 1r0GOS-0001hb-RK for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:21:04 -0500 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 1r0GOR-00039Y-CU for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:21:00 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-454-2nCT0DvNOguAAu79A-LC0g-1; Tue, 07 Nov 2023 02:20:56 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 98AFA811005; Tue, 7 Nov 2023 07:20:55 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id A571A2026D66; Tue, 7 Nov 2023 07:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341658; 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=X8dzZxcmIa3U/m37IAvb3mPPzYcvzMQZvbNikgINAMY=; b=GNlerOyY1T+04LV4P9aFv/PBoH1wFCA9zmTEZEre0F6qWZVRtMAcPdsAwgPFSdkqGW/slj WmLeaUbOBv11ogDUYVTH5Ll6CSI5pbCxWxpFlh9DZ8g5o5Oi6W+JJQcTXcRxXRAy4EvMff CCCryAcwoeTWrthP0qbfU7/KsGS4PIk= X-MC-Unique: 2nCT0DvNOguAAu79A-LC0g-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jiaxun Yang Subject: [PATCH v8 22/24] hw/mips: FULOONG depends on VT82C686 Date: Tue, 7 Nov 2023 11:19:12 +0400 Message-ID: <20231107071915.2459115-23-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341766357100003 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index ac1eb06a51..66ec536e06 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -33,6 +33,7 @@ config JAZZ config FULOONG bool select PCI_BONITO + select VT82C686 =20 config LOONGSON3V bool --=20 2.41.0 From nobody Fri May 17 23:19:55 2024 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=1699341856; cv=none; d=zohomail.com; s=zohoarc; b=BN3RImcJdW0m8xj7SeT4V4YLvZaYvCe5NPC1Z5/1yyjIIohkQYdKrUfAZvPQJLrnotcT2ord15t9br61pTsgEkEMLi3rE7WKcp8lijj0XIvwD1xMQPrc121S0DF13UEvdFpx/X2mcKBtxVIM6iVKe7Fg+D2sFt8E7D1w736ZBlQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341856; 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=KqlpcsnIz/mGd2vU8jh0UrFLVWlxoSxGRMh9REUS5lY=; b=jM/ZJBs1/2I3iKsL9WAm53yytZBaHHgFTKfKtO9TYak43Jwmf74s0bWo8FvtK+/KzxZvULS8G2b+9mCqcPCJp9H59EVImtC0+T48j4U19LVxteAYHQvreYeKJ7DRDs/6kr4TSx1VFYfcMmfgTwRSepuK1f8wpGMYv0KSq4biyIU= 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 169934185643640.12220817302443; Mon, 6 Nov 2023 23:24:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GP0-0003AM-IV; Tue, 07 Nov 2023 02:21:34 -0500 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 1r0GOn-0002y0-KC for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:21:25 -0500 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 1r0GOl-0003CL-C5 for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:21:21 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-48-7TR_vPz4P_uHyWgZoq2yhg-1; Tue, 07 Nov 2023 02:21:16 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 54A611C2B667; Tue, 7 Nov 2023 07:21:00 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8C01492BE0; Tue, 7 Nov 2023 07:20:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341677; 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=KqlpcsnIz/mGd2vU8jh0UrFLVWlxoSxGRMh9REUS5lY=; b=KhumiChI6IYp5GpmAfsRvwCNi+YAP2AHxuEeFJ3OC1l+TmP+INshYaK2Eafviy7RBM1dSW FCpJZz4KhGh45IZwjLkK3HA3hYciCRaof6wt+B9d4vlOX7aN19M7alLce2UuQqWplK6gmh L2VU5r8BnBvijdujFIworwTpinajEaI= X-MC-Unique: 7TR_vPz4P_uHyWgZoq2yhg-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v8 23/24] hw/display/ati: allow compiling without PIXMAN Date: Tue, 7 Nov 2023 11:19:13 +0400 Message-ID: <20231107071915.2459115-24-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341857270100002 From: Marc-Andr=C3=A9 Lureau Change the "x-pixman" property default value and use the fallback path when PIXMAN support is disabled. Signed-off-by: Marc-Andr=C3=A9 Lureau Acked-by: BALATON Zoltan --- hw/display/ati.c | 16 +++++++++++++++- hw/display/ati_2d.c | 11 +++++++---- hw/display/meson.build | 2 +- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index 9a87a5504a..51a3b156ac 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -32,6 +32,13 @@ =20 #define ATI_DEBUG_HW_CURSOR 0 =20 +#ifdef CONFIG_PIXMAN +#define DEFAULT_X_PIXMAN 3 +#else +#define DEFAULT_X_PIXMAN 0 +#endif + + static const struct { const char *name; uint16_t dev_id; @@ -946,6 +953,12 @@ static void ati_vga_realize(PCIDevice *dev, Error **er= rp) ATIVGAState *s =3D ATI_VGA(dev); VGACommonState *vga =3D &s->vga; =20 +#ifndef CONFIG_PIXMAN + if (s->use_pixman !=3D 0) { + warn_report("x-pixman !=3D 0, not effective without PIXMAN"); + } +#endif + if (s->model) { int i; for (i =3D 0; i < ARRAY_SIZE(ati_model_aliases); i++) { @@ -1033,7 +1046,8 @@ static Property ati_vga_properties[] =3D { DEFINE_PROP_UINT16("x-device-id", ATIVGAState, dev_id, PCI_DEVICE_ID_ATI_RAGE128_PF), DEFINE_PROP_BOOL("guest_hwcursor", ATIVGAState, cursor_guest_mode, fal= se), - DEFINE_PROP_UINT8("x-pixman", ATIVGAState, use_pixman, 3), + /* this a debug option, prefer PROP_UINT over PROP_BIT for simplicity = */ + DEFINE_PROP_UINT8("x-pixman", ATIVGAState, use_pixman, DEFAULT_X_PIXMA= N), DEFINE_PROP_END_OF_LIST() }; =20 diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c index 0e6b8e4367..e58acd0802 100644 --- a/hw/display/ati_2d.c +++ b/hw/display/ati_2d.c @@ -92,7 +92,7 @@ void ati_2d_blt(ATIVGAState *s) switch (s->regs.dp_mix & GMC_ROP3_MASK) { case ROP3_SRCCOPY: { - bool fallback =3D false; + bool fallback =3D true; unsigned src_x =3D (s->regs.dp_cntl & DST_X_LEFT_TO_RIGHT ? s->regs.src_x : s->regs.src_x + 1 - s->regs.dst_wid= th); unsigned src_y =3D (s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ? @@ -119,6 +119,7 @@ void ati_2d_blt(ATIVGAState *s) =20 src_stride /=3D sizeof(uint32_t); dst_stride /=3D sizeof(uint32_t); +#ifdef CONFIG_PIXMAN DPRINTF("pixman_blt(%p, %p, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d= )\n", src_bits, dst_bits, src_stride, dst_stride, bpp, bpp, src_x, src_y, dst_x, dst_y, @@ -147,9 +148,8 @@ void ati_2d_blt(ATIVGAState *s) s->regs.dst_width, s->regs.dst_heig= ht); } g_free(tmp); - } else { - fallback =3D true; } +#endif if (fallback) { unsigned int y, i, j, bypp =3D bpp / 8; unsigned int src_pitch =3D src_stride * sizeof(uint32_t); @@ -203,12 +203,15 @@ void ati_2d_blt(ATIVGAState *s) } =20 dst_stride /=3D sizeof(uint32_t); +#ifdef CONFIG_PIXMAN DPRINTF("pixman_fill(%p, %d, %d, %d, %d, %d, %d, %x)\n", dst_bits, dst_stride, bpp, dst_x, dst_y, s->regs.dst_width, s->regs.dst_height, filler); if (!(s->use_pixman & BIT(0)) || !pixman_fill((uint32_t *)dst_bits, dst_stride, bpp, dst_x, dst= _y, - s->regs.dst_width, s->regs.dst_height, filler)) { + s->regs.dst_width, s->regs.dst_height, filler)) +#endif + { /* fallback when pixman failed or we don't want to call it */ unsigned int x, y, i, bypp =3D bpp / 8; unsigned int dst_pitch =3D dst_stride * sizeof(uint32_t); diff --git a/hw/display/meson.build b/hw/display/meson.build index 9c06aaee20..344dfe3d8c 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 Fri May 17 23:19:55 2024 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=1699341788; cv=none; d=zohomail.com; s=zohoarc; b=je+YSDKOOMtw0F4KjUua7bVHCktmmFnfxvRbmI8URZAeesCS2y4RzGMsNhMuY5HzEfil6HviMPACf+eher5ohbzM9mVdwq4u6XIvCWz2Y0ObFZm50G23tCMA22qEA9hdNZoS8qX1sijxNSUd3FLZohYKPHRgN7jTN1PSXqN+NBw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699341788; 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=gs3B8q7RwEx467O5ATO4jTBVfcOemL4jMSXkGGVi/rs=; b=Hewizmam5vcZlVps0C6K4Ach92+H8e+GhhHCbWdQVZdXKWCd8puq2esepLbXyV2QDWGDaaxwEs1ucVssLk5uAS77djcXFCkhpp6fp8N9HNzvfpIAsTUUkxzQqpSVqnqFj6oW2EVcDPJRF926ftoAwKyNRD7PE9VVeHx09eYZas4= 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 1699341788905792.8392285474434; Mon, 6 Nov 2023 23:23:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0GOh-0002kU-7o; Tue, 07 Nov 2023 02:21:17 -0500 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 1r0GOd-0002WS-Eu for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:21:11 -0500 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 1r0GOa-0003Ay-SV for qemu-devel@nongnu.org; Tue, 07 Nov 2023 02:21:11 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-53-ONOkefOwM7i2-sjm6p2NhQ-1; Tue, 07 Nov 2023 02:21:04 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 532052999B2B; Tue, 7 Nov 2023 07:21:04 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 923A740C6EB9; Tue, 7 Nov 2023 07:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699341668; 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=gs3B8q7RwEx467O5ATO4jTBVfcOemL4jMSXkGGVi/rs=; b=Qhu7Ty/444yUi4vFLyc+GzMfSpKyAnTLXTmnwKVQLMB59P91MZ/oOpPdLkAOdvPWZ1uhhG Lg9Re1B9A/ET7sdx5HBiHjJhRMSjFOTvHfh2CpYv3VCYeYsfN+jOwMc0S9Wrr/Vt+v/gRv ahL7A9CyLE6m9zt74NDDkHsYdxvZjp0= X-MC-Unique: ONOkefOwM7i2-sjm6p2NhQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , stefanha@gmail.com, Gerd Hoffmann , qemu-ppc@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth Subject: [PATCH v8 24/24] build-sys: make pixman actually optional Date: Tue, 7 Nov 2023 11:19:14 +0400 Message-ID: <20231107071915.2459115-25-marcandre.lureau@redhat.com> In-Reply-To: <20231107071915.2459115-1-marcandre.lureau@redhat.com> References: <20231107071915.2459115-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.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1699341790946100003 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth --- meson.build | 3 --- 1 file changed, 3 deletions(-) diff --git a/meson.build b/meson.build index 8422e7da0c..4848930680 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