From nobody Thu Nov 28 10:37:16 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=1693269490; cv=none; d=zohomail.com; s=zohoarc; b=b9coUoUjlj0jvM8yw2REyGiNv4lCiJ6DqauakPCqc3weQLkSi4IK53nfeYJ6F7BfBt9xlic74rPXYVzLiTE/V2n/y3DfBrxNW1MoD7zToRUO/u31ksHxNNuhqikd3b3QQ4AIFeFcWYOW+sRXiQJzqQNYl/cjpiWmRiCFaofJlwA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693269490; 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=jBPbz5UswTdyudRwZYjsLbj+doOaRpaNqhDKZjM5v5A=; b=nboJJcxVyuEyARtCM+nrcW5ccGqiNEK5xBnZRZ7JGXca990sUWXWuXGRU3UQ9Rx/3LQtBh0Lngn3oxUdCbkCwiwyA58HSKdXk/jnJ8gtn6f1MrFmdIeecEQ7bVMDqew0zzxcENPJ0BALFrvA/XTt7mpbNr6qfr5/m+MxBLULGbc= 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 1693269490688413.7775423351226; Mon, 28 Aug 2023 17:38:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qamjM-0007ft-RD; Mon, 28 Aug 2023 20:37:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qamj6-0007dV-Mf for qemu-devel@nongnu.org; Mon, 28 Aug 2023 20:37:04 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qamin-0007eo-4E for qemu-devel@nongnu.org; Mon, 28 Aug 2023 20:36:43 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-68a41031768so2689526b3a.3 for ; Mon, 28 Aug 2023 17:36:40 -0700 (PDT) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:a7:2:5fa1:f455:2676:5eee]) by smtp.gmail.com with ESMTPSA id c3-20020aa78c03000000b0068890c19c49sm7214782pfd.180.2023.08.28.17.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 17:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1693269399; x=1693874199; 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=jBPbz5UswTdyudRwZYjsLbj+doOaRpaNqhDKZjM5v5A=; b=PqQL+Ayro+3sghplaeTdG6TwOYrgnHaxvzcrQ+KoF98T0Q6irVSfdxnX8R/R2WAYrb RNpSzPJpdA6t+6uP/nZUTN+o+rdWAmw6PLLWYoDY9jOze9zMpmHfKcdaCZ2c6YsLZRpJ /hbY2x4nxCuRM/Ei76Qi59ZzS9XPWrAHijP4I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693269399; x=1693874199; 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=jBPbz5UswTdyudRwZYjsLbj+doOaRpaNqhDKZjM5v5A=; b=gwz9w3eg9rn8HfcJGT0Os6XW1GaiZNS4ZYZQruWkkTFOc1333BNGz/jBu0tQwYjDJ+ LsuZe+m9xDKOYLZsV/wrrYO992f1utxajr25KaU1Wx5cuwz8yJmV9BFkUdJ4tOMMfK2A 1e8jIcTDVNEfxXFng94sdFFvEj1Svm38j8MvqKXr+ottUVOyCCT1B5kHrEXbbLwscgxy a5Gkukiqa6qAxwl0W7CCIzthnf5Za24nZnN+wJlA//p+OcwA23yrFKiS9xm/UwDbWzKv 1UmEKrWCWe7BTwNLq3QHRZrhw9hBMAFeW9R+wzcuGHIW4Jv10lQMdojcQS5kF+W66Ffc fCSw== X-Gm-Message-State: AOJu0YxaUd9vaPPtko5kttNCjCnZA+ZOZdTH18ZMGqaUn+E1hLUiyQgi pX4UlGP5Qpoy4jgdukhPM5k5TCaYWW+746unxdY= X-Google-Smtp-Source: AGHT+IFdRw6Z9qLUo00/9iJ0q+oJEnvCVhoId26GV1MP0X54NPVJveuWkBfpE15NMm+aWVL3gop1OA== X-Received: by 2002:a05:6a00:14c9:b0:68a:3e68:f8ab with SMTP id w9-20020a056a0014c900b0068a3e68f8abmr23807878pfu.14.1693269398898; Mon, 28 Aug 2023 17:36:38 -0700 (PDT) From: Gurchetan Singh To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, akihiko.odaki@gmail.com, ray.huang@amd.com, alex.bennee@linaro.org, shentey@gmail.com, hi@alyssa.is, ernunes@redhat.com, manos.pitsidianakis@linaro.org, philmd@linaro.org, mark.cave-ayland@ilande.co.uk Subject: [PATCH v13 5/9] gfxstream + rutabaga prep: added need defintions, fields, and options Date: Mon, 28 Aug 2023 17:36:25 -0700 Message-Id: <20230829003629.410-6-gurchetansingh@chromium.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20230829003629.410-1-gurchetansingh@chromium.org> References: <20230829003629.410-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::432; envelope-from=gurchetansingh@chromium.org; helo=mail-pf1-x432.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: 1693269491546100001 Content-Type: text/plain; charset="utf-8" This modifies the common virtio-gpu.h file have the fields and defintions needed by gfxstream/rutabaga, by VirtioGpuRutabaga. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil Pitsidianakis Reviewed-by: Antonio Caggiano Reviewed-by: Akihiko Odaki --- include/hw/virtio/virtio-gpu.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h index 55973e112f..de06bcdba4 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -38,6 +38,9 @@ OBJECT_DECLARE_SIMPLE_TYPE(VirtIOGPUGL, VIRTIO_GPU_GL) #define TYPE_VHOST_USER_GPU "vhost-user-gpu" OBJECT_DECLARE_SIMPLE_TYPE(VhostUserGPU, VHOST_USER_GPU) =20 +#define TYPE_VIRTIO_GPU_RUTABAGA "virtio-gpu-rutabaga-device" +OBJECT_DECLARE_SIMPLE_TYPE(VirtIOGPURutabaga, VIRTIO_GPU_RUTABAGA) + struct virtio_gpu_simple_resource { uint32_t resource_id; uint32_t width; @@ -94,6 +97,7 @@ enum virtio_gpu_base_conf_flags { VIRTIO_GPU_FLAG_DMABUF_ENABLED, VIRTIO_GPU_FLAG_BLOB_ENABLED, VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED, + VIRTIO_GPU_FLAG_RUTABAGA_ENABLED, }; =20 #define virtio_gpu_virgl_enabled(_cfg) \ @@ -108,6 +112,8 @@ enum virtio_gpu_base_conf_flags { (_cfg.flags & (1 << VIRTIO_GPU_FLAG_BLOB_ENABLED)) #define virtio_gpu_context_init_enabled(_cfg) \ (_cfg.flags & (1 << VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED)) +#define virtio_gpu_rutabaga_enabled(_cfg) \ + (_cfg.flags & (1 << VIRTIO_GPU_FLAG_RUTABAGA_ENABLED)) #define virtio_gpu_hostmem_enabled(_cfg) \ (_cfg.hostmem > 0) =20 @@ -232,6 +238,28 @@ struct VhostUserGPU { bool backend_blocked; }; =20 +#define MAX_SLOTS 4096 + +struct MemoryRegionInfo { + int used; + MemoryRegion mr; + uint32_t resource_id; +}; + +struct rutabaga; + +struct VirtIOGPURutabaga { + VirtIOGPU parent_obj; + + struct MemoryRegionInfo memory_regions[MAX_SLOTS]; + char *capset_names; + char *wayland_socket_path; + char *wsi; + bool headless; + uint32_t num_capsets; + struct rutabaga *rutabaga; +}; + #define VIRTIO_GPU_FILL_CMD(out) do { \ size_t s; \ s =3D iov_to_buf(cmd->elem.out_sg, cmd->elem.out_num, 0, \ --=20 2.42.0.rc2.253.gd59a3bf2b4-goog