From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [PULL 02/13] virtio-gpu: Move fence_poll timer to VirtIOGPUGL
Date: Tue, 29 Oct 2024 12:10:19 +0000 [thread overview]
Message-ID: <20241029121030.4007014-3-alex.bennee@linaro.org> (raw)
In-Reply-To: <20241029121030.4007014-1-alex.bennee@linaro.org>
From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Move fence_poll timer to VirtIOGPUGL for consistency with cmdq_resume_bh
that are used only by GL device.
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Message-Id: <20241024210311.118220-3-dmitry.osipenko@collabora.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index e343110e23..48a67d662d 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -194,7 +194,6 @@ struct VirtIOGPU {
uint64_t hostmem;
bool processing_cmdq;
- QEMUTimer *fence_poll;
QEMUTimer *print_stats;
uint32_t inflight;
@@ -229,6 +228,8 @@ struct VirtIOGPUGL {
bool renderer_inited;
bool renderer_reset;
+
+ QEMUTimer *fence_poll;
};
struct VhostUserGPU {
diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 14091b191e..91dce90f91 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -594,11 +594,12 @@ static void virtio_gpu_print_stats(void *opaque)
static void virtio_gpu_fence_poll(void *opaque)
{
VirtIOGPU *g = opaque;
+ VirtIOGPUGL *gl = VIRTIO_GPU_GL(g);
virgl_renderer_poll();
virtio_gpu_process_cmdq(g);
if (!QTAILQ_EMPTY(&g->cmdq) || !QTAILQ_EMPTY(&g->fenceq)) {
- timer_mod(g->fence_poll, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 10);
+ timer_mod(gl->fence_poll, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 10);
}
}
@@ -626,6 +627,7 @@ int virtio_gpu_virgl_init(VirtIOGPU *g)
{
int ret;
uint32_t flags = 0;
+ VirtIOGPUGL *gl = VIRTIO_GPU_GL(g);
#if VIRGL_RENDERER_CALLBACKS_VERSION >= 4
if (qemu_egl_display) {
@@ -645,8 +647,8 @@ int virtio_gpu_virgl_init(VirtIOGPU *g)
return ret;
}
- g->fence_poll = timer_new_ms(QEMU_CLOCK_VIRTUAL,
- virtio_gpu_fence_poll, g);
+ gl->fence_poll = timer_new_ms(QEMU_CLOCK_VIRTUAL,
+ virtio_gpu_fence_poll, g);
if (virtio_gpu_stats_enabled(g->parent_obj.conf)) {
g->print_stats = timer_new_ms(QEMU_CLOCK_VIRTUAL,
--
2.39.5
next prev parent reply other threads:[~2024-10-29 12:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 12:10 [PULL 00/13] virtio-gpu vulkan support Alex Bennée
2024-10-29 12:10 ` [PULL 01/13] virtio-gpu: Use trace events for tracking number of in-flight fences Alex Bennée
2024-10-29 12:10 ` Alex Bennée [this message]
2024-10-29 12:10 ` [PULL 03/13] virtio-gpu: Move print_stats timer to VirtIOGPUGL Alex Bennée
2024-10-29 12:10 ` [PULL 04/13] virtio-gpu: Handle virtio_gpu_virgl_init() failure Alex Bennée
2024-10-29 12:10 ` [PULL 05/13] virtio-gpu: Unrealize GL device Alex Bennée
2024-10-29 12:10 ` [PULL 06/13] virtio-gpu: Use pkgconfig version to decide which virgl features are available Alex Bennée
2024-10-29 12:10 ` [PULL 07/13] virtio-gpu: Support context-init feature with virglrenderer Alex Bennée
2024-10-29 12:10 ` [PULL 08/13] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled Alex Bennée
2024-10-29 12:10 ` [PULL 09/13] virtio-gpu: Add virgl resource management Alex Bennée
2024-10-29 12:10 ` [PULL 10/13] virtio-gpu: Support suspension of commands processing Alex Bennée
2024-10-29 12:10 ` [PULL 11/13] virtio-gpu: Handle resource blob commands Alex Bennée
2024-11-01 15:35 ` Peter Maydell
2024-11-01 16:04 ` Dmitry Osipenko
2024-11-01 17:17 ` Alex Bennée
2024-11-01 17:16 ` Alex Bennée
2024-11-01 18:23 ` Dmitry Osipenko
2024-11-04 11:48 ` Alex Bennée
2024-11-04 13:50 ` BALATON Zoltan
2024-10-29 12:10 ` [PULL 12/13] virtio-gpu: Register capsets dynamically Alex Bennée
2024-10-29 12:10 ` [PULL 13/13] virtio-gpu: Support Venus context Alex Bennée
2024-10-31 11:29 ` [PULL 00/13] virtio-gpu vulkan support Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241029121030.4007014-3-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=dmitry.osipenko@collabora.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).