From nobody Thu Nov 28 16:35:12 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=chromium.org ARC-Seal: i=1; a=rsa-sha256; t=1691547119; cv=none; d=zohomail.com; s=zohoarc; b=Pbt79vfXPPRq7d0ar4FVQJc9QlbU//S2uaEewllcn0zAtaKTLtAT/uBp27jCul2tFEfdhmKbZYlydtxIgYNXxLBrjSe+3OCgcC7edjbI2nQIqgUTnFDLEd89m+Y4c1ChA4baOTQHeFn6OuvCBhrnPLJMmLZDvDfyBVYlUD3ijMw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691547119; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=931rh0wa3RHZAgrlOGpJ6kKrfpp+Qe5K9gpBq7Zj7ac=; b=ReLP5Hqan3KkI9eSz6Ijz3UvAHBnJFS5CcgpPxl39qb5bloz6aNtag7L7Qd0G713pEkmyKtweaIZIIKDiPs5SssB74OHSVzKtpK7GJW0BL08zF0xHXnuiA7BrHYjOdJElAZmTnwcrXLQBVlgIyPawsJ7+NiAZJiMIxXLVem//7s= 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 1691547119208211.575944234011; Tue, 8 Aug 2023 19:11:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTYfV-00076u-0H; Tue, 08 Aug 2023 22:11:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTYfT-00076X-DG for qemu-devel@nongnu.org; Tue, 08 Aug 2023 22:11:23 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTYfR-00016V-My for qemu-devel@nongnu.org; Tue, 08 Aug 2023 22:11:23 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-687ca37628eso1781538b3a.1 for ; Tue, 08 Aug 2023 19:11:21 -0700 (PDT) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:a7:2:a5a2:f074:e7af:41fe]) by smtp.gmail.com with ESMTPSA id a16-20020aa78650000000b00687494a59bfsm8681887pfo.61.2023.08.08.19.11.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 19:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1691547080; x=1692151880; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=931rh0wa3RHZAgrlOGpJ6kKrfpp+Qe5K9gpBq7Zj7ac=; b=e1+xtxbOirVUU/R38tUFkK0D2wvU6Il1aEo2Tusv+cCUcDgP6ssQI2U5HPwwW5p6Fq HhGnY/KFA3CKAmBqBuBTHm2PIzbqW/232m8UVKuCdQ56pon4SWP8u4TgraPPKBsX1j3V 4dzJ4i/1Zf4gP54BWrhVMXMYTOMYSEiW95RSQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691547080; x=1692151880; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=931rh0wa3RHZAgrlOGpJ6kKrfpp+Qe5K9gpBq7Zj7ac=; b=VFFkl0dnGYHxkm4JaKQBTStVZcX8688TW5S2OW3te7OJitQPFWirIieKfg4tilXI9h d4FutOQCo1FJ3oRqYNP8/+XcNy5uW8HkrLXY5+QSmvh2FO9N00VgkbRylZIauAlrLQsl tlgKbCWs67memoT951LvV67HwpSCEAeK37Z5rl/5+9O+Z/37k3QlL0FotHXJP4LwN1Fk DaFo9psSv5fc76uHA2anif+vS7Oxp/ZXMavo9+VNYygmLU53Ecp1FoZeqwxt4yqXa/Ut FQKUr5gzDVEtScmuellVmOF/qmFXj3OnqwXn/2d8FREdNExhJd91vR+a6k08M39ud3mP zN4A== X-Gm-Message-State: AOJu0YyigJoi2HiY6KQh5DZMKTQ710FRfIDbzfv7obNPg5GgB02BgGvc GL/7RM5a8c1SO68TwxBBg7Vil9OInCXxBTOU6ZDolA== X-Google-Smtp-Source: AGHT+IF+kJl7mNaJPBgWJHHVo98XGXYhBLkGkPm/Pe3CfoM6Hd2vADPyDuvYSjT9Z042qglYhU7Cdg== X-Received: by 2002:a05:6a00:1581:b0:686:babd:f5c1 with SMTP id u1-20020a056a00158100b00686babdf5c1mr1780711pfk.25.1691547080057; Tue, 08 Aug 2023 19:11:20 -0700 (PDT) From: Gurchetan Singh To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, kraxel@redhat.com, akihiko.odaki@gmail.com, ray.huang@amd.com, alex.bennee@linaro.org, shentey@gmail.com, hi@alyssa.is, ernunes@redhat.com Subject: [PATCH v4 7/9] gfxstream + rutabaga: meson support Date: Tue, 8 Aug 2023 19:11:06 -0700 Message-Id: <20230809021108.674-8-gurchetansingh@chromium.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20230809021108.674-1-gurchetansingh@chromium.org> References: <20230809021108.674-1-gurchetansingh@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::433; envelope-from=gurchetansingh@chromium.org; helo=mail-pf1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @chromium.org) X-ZM-MESSAGEID: 1691547121687100011 Content-Type: text/plain; charset="utf-8" - Add meson detection of rutabaga_gfx - Build virtio-gpu-rutabaga.c + associated vga/pci files when present Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross --- v3: Fix alignment issues (Akihiko) hw/display/meson.build | 22 ++++++++++++++++++++++ meson.build | 7 +++++++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 34 insertions(+) diff --git a/hw/display/meson.build b/hw/display/meson.build index 413ba4ab24..e362d625dd 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -79,6 +79,13 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU') if_true: [files('virtio-gpu-gl.c', 'virtio-gpu-vi= rgl.c'), pixman, virgl]) hw_display_modules +=3D {'virtio-gpu-gl': virtio_gpu_gl_ss} endif + + if rutabaga.found() + virtio_gpu_rutabaga_ss =3D ss.source_set() + virtio_gpu_rutabaga_ss.add(when: ['CONFIG_VIRTIO_GPU', rutabaga], + if_true: [files('virtio-gpu-rutabaga.c'), p= ixman]) + hw_display_modules +=3D {'virtio-gpu-rutabaga': virtio_gpu_rutabaga_ss} + endif endif =20 if config_all_devices.has_key('CONFIG_VIRTIO_PCI') @@ -95,6 +102,12 @@ if config_all_devices.has_key('CONFIG_VIRTIO_PCI') if_true: [files('virtio-gpu-pci-gl.c'), pixma= n]) hw_display_modules +=3D {'virtio-gpu-pci-gl': virtio_gpu_pci_gl_ss} endif + if rutabaga.found() + virtio_gpu_pci_rutabaga_ss =3D ss.source_set() + virtio_gpu_pci_rutabaga_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIR= TIO_PCI', rutabaga], + if_true: [files('virtio-gpu-pci-rutabag= a.c'), pixman]) + hw_display_modules +=3D {'virtio-gpu-pci-rutabaga': virtio_gpu_pci_rut= abaga_ss} + endif endif =20 if config_all_devices.has_key('CONFIG_VIRTIO_VGA') @@ -113,6 +126,15 @@ if config_all_devices.has_key('CONFIG_VIRTIO_VGA') virtio_vga_gl_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'), if_false: files('acpi-vga-stub= .c')) hw_display_modules +=3D {'virtio-vga-gl': virtio_vga_gl_ss} + + if rutabaga.found() + virtio_vga_rutabaga_ss =3D ss.source_set() + virtio_vga_rutabaga_ss.add(when: ['CONFIG_VIRTIO_VGA', rutabaga], + if_true: [files('virtio-vga-rutabaga.c'), p= ixman]) + virtio_vga_rutabaga_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-v= ga.c'), + if_false: files('acpi-= vga-stub.c')) + hw_display_modules +=3D {'virtio-vga-rutabaga': virtio_vga_rutabaga_ss} + endif endif =20 system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c')) diff --git a/meson.build b/meson.build index 98e68ef0b1..293f388e53 100644 --- a/meson.build +++ b/meson.build @@ -1069,6 +1069,12 @@ if not get_option('virglrenderer').auto() or have_sy= stem or have_vhost_user_gpu dependencies: virgl)) endif endif +rutabaga =3D not_found +if not get_option('rutabaga_gfx').auto() or have_system or have_vhost_user= _gpu + rutabaga =3D dependency('rutabaga_gfx_ffi', + method: 'pkg-config', + required: get_option('rutabaga_gfx')) +endif blkio =3D not_found if not get_option('blkio').auto() or have_block blkio =3D dependency('blkio', @@ -4272,6 +4278,7 @@ summary_info +=3D {'libtasn1': tasn1} summary_info +=3D {'PAM': pam} summary_info +=3D {'iconv support': iconv} summary_info +=3D {'virgl support': virgl} +summary_info +=3D {'rutabaga support': rutabaga} summary_info +=3D {'blkio support': blkio} summary_info +=3D {'curl support': curl} summary_info +=3D {'Multipath support': mpathpersist} diff --git a/meson_options.txt b/meson_options.txt index aaea5ddd77..dea3bf7d9c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -224,6 +224,8 @@ option('vmnet', type : 'feature', value : 'auto', description: 'vmnet.framework network backend support') option('virglrenderer', type : 'feature', value : 'auto', description: 'virgl rendering support') +option('rutabaga_gfx', type : 'feature', value : 'auto', + description: 'rutabaga_gfx support') option('png', type : 'feature', value : 'auto', description: 'PNG support with libpng') option('vnc', type : 'feature', value : 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 9da3fe299b..9a95b4f782 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -154,6 +154,7 @@ meson_options_help() { printf "%s\n" ' rbd Ceph block device driver' printf "%s\n" ' rdma Enable RDMA-based migration' printf "%s\n" ' replication replication support' + printf "%s\n" ' rutabaga-gfx rutabaga_gfx support' printf "%s\n" ' sdl SDL user interface' printf "%s\n" ' sdl-image SDL Image support for icons' printf "%s\n" ' seccomp seccomp support' @@ -419,6 +420,8 @@ _meson_option_parse() { --disable-replication) printf "%s" -Dreplication=3Ddisabled ;; --enable-rng-none) printf "%s" -Drng_none=3Dtrue ;; --disable-rng-none) printf "%s" -Drng_none=3Dfalse ;; + --enable-rutabaga-gfx) printf "%s" -Drutabaga_gfx=3Denabled ;; + --disable-rutabaga-gfx) printf "%s" -Drutabaga_gfx=3Ddisabled ;; --enable-safe-stack) printf "%s" -Dsafe_stack=3Dtrue ;; --disable-safe-stack) printf "%s" -Dsafe_stack=3Dfalse ;; --enable-sanitizers) printf "%s" -Dsanitizers=3Dtrue ;; --=20 2.41.0.640.ga95def55d0-goog