[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[QEMU PATCH v5 02/13] virtio-gpu: CONTEXT_INIT feature
- To: Gerd Hoffmann <kraxel@xxxxxxxxxx>, "Michael S . Tsirkin" <mst@xxxxxxxxxx>, Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Antonio Caggiano" <quic_acaggian@xxxxxxxxxxx>, "Dr . David Alan Gilbert" <dgilbert@xxxxxxxxxx>, Robert Beckett <bob.beckett@xxxxxxxxxxxxx>, "Dmitry Osipenko" <dmitry.osipenko@xxxxxxxxxxxxx>, Alex Bennée <alex.bennee@xxxxxxxxxx>, <qemu-devel@xxxxxxxxxx>
- From: Huang Rui <ray.huang@xxxxxxx>
- Date: Fri, 15 Sep 2023 19:11:19 +0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zoU819C3EvFSCxJXSmgKzjiOaCAsYDwvlFmZ/iIX7+s=; b=ch8ADWiQbQn9Tam47pwjihxrKb8Zw3j3pGDib7OIFyc+2QSVJO53s4DsC5jz0CQMc5I7GBb8RYGlv8wrQSgxYre8BsX9glgxfL5eYHxWmyPHgsvicrjIb9npCUiEykRuYwbA211BsBfO8+TL5h0Lb4VS8Zb5VN6N4UCOD7GtmKnVaC4yeT+6+OzB0IJjBbBKuwU423wPcN8r4350FsKbzrBdLD0CmvnLnO72ZmCE88HkdrsC6TKCr4AAqXz4XMo5qhsqyeJQT8x3knffPOxHeMUFz67CjUw7x5nouq7b7O4lsKf+JryssddYdVGFnpq8MlX3vY8eq7YoGWHEZvonwQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MV2xAtSQONNzk5CMqBCCnrxu8k7fdOnMiZRRuAm9AY4cB8A+MbbKzRBGlMduZ50IrIUDiEzzG3qP/Ds7vAxBAYqLGV8ZBbx+pNYo2WYHV3OeWTPCcKHnGGoJ6hX6H56ewEW26IAGeTlJaND/4mPW7q8rf3ZPK1iFlNOTLDPA+L5nloNYSN4yCYVCZShcBpV5Gl/sNF5ko4ydy2TG9OsspOPklhTvaoxzK99p3rA6aaag5xvLqfH8q58m6uCJF+5iYmD0i1s4moDYJmYRo3J8fJhKc+IZL82FOAlFBVt42vlVzI1Jvv/hzOnCHQVrUW8Qr5+4bQM1oKHVXBDtNpFwxQ==
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Gurchetan Singh <gurchetansingh@xxxxxxxxxxxx>, Albert Esteve <aesteve@xxxxxxxxxx>, <ernunes@xxxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, Alyssa Ross <hi@xxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Alex Deucher <alexander.deucher@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@xxxxxxx>, "Honglei Huang" <honglei1.huang@xxxxxxx>, Julia Zhang <julia.zhang@xxxxxxx>, "Chen Jiqian" <Jiqian.Chen@xxxxxxx>, Antonio Caggiano <antonio.caggiano@xxxxxxxxxxxxx>, Huang Rui <ray.huang@xxxxxxx>, Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
- Delivery-date: Fri, 15 Sep 2023 11:12:37 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
From: Antonio Caggiano <antonio.caggiano@xxxxxxxxxxxxx>
The feature can be enabled when a backend wants it.
Signed-off-by: Antonio Caggiano <antonio.caggiano@xxxxxxxxxxxxx>
Signed-off-by: Gurchetan Singh <gurchetansingh@xxxxxxxxxxxx>
Tested-by: Alyssa Ross <hi@xxxxxxxxx>
Tested-by: Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>
Tested-by: Huang Rui <ray.huang@xxxxxxx>
Acked-by: Huang Rui <ray.huang@xxxxxxx>
Reviewed-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
Reviewed-by: Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>
Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
---
This patch is already under review as part of the "rutabaga_gfx + gfxstream"
series (already in v13) and has been included here because of dependency.
hw/display/virtio-gpu-base.c | 3 +++
include/hw/virtio/virtio-gpu.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c
index ca1fb7b16f..4f2b0ba1f3 100644
--- a/hw/display/virtio-gpu-base.c
+++ b/hw/display/virtio-gpu-base.c
@@ -232,6 +232,9 @@ virtio_gpu_base_get_features(VirtIODevice *vdev, uint64_t
features,
if (virtio_gpu_blob_enabled(g->conf)) {
features |= (1 << VIRTIO_GPU_F_RESOURCE_BLOB);
}
+ if (virtio_gpu_context_init_enabled(g->conf)) {
+ features |= (1 << VIRTIO_GPU_F_CONTEXT_INIT);
+ }
return features;
}
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 390c4642b8..8377c365ef 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -93,6 +93,7 @@ enum virtio_gpu_base_conf_flags {
VIRTIO_GPU_FLAG_EDID_ENABLED,
VIRTIO_GPU_FLAG_DMABUF_ENABLED,
VIRTIO_GPU_FLAG_BLOB_ENABLED,
+ VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED,
};
#define virtio_gpu_virgl_enabled(_cfg) \
@@ -105,6 +106,8 @@ enum virtio_gpu_base_conf_flags {
(_cfg.flags & (1 << VIRTIO_GPU_FLAG_DMABUF_ENABLED))
#define virtio_gpu_blob_enabled(_cfg) \
(_cfg.flags & (1 << VIRTIO_GPU_FLAG_BLOB_ENABLED))
+#define virtio_gpu_context_init_enabled(_cfg) \
+ (_cfg.flags & (1 << VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED))
struct virtio_gpu_base_conf {
uint32_t max_outputs;
--
2.34.1
|