[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 03/10] virtio-gpu: Handle virgl fence creation errors
From: |
Dmitry Osipenko |
Subject: |
[PATCH v6 03/10] virtio-gpu: Handle virgl fence creation errors |
Date: |
Sun, 26 Jan 2025 23:11:14 +0300 |
Print out error messages when virgl fence creation fails to aid debugging
of the fence-related bugs.
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
hw/display/virtio-gpu-virgl.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 145a0b387956..2eb6aaab4e84 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -872,6 +872,7 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
bool cmd_suspended = false;
+ int ret;
VIRTIO_GPU_FILL_CMD(cmd->cmd_hdr);
@@ -970,7 +971,17 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
}
trace_virtio_gpu_fence_ctrl(cmd->cmd_hdr.fence_id, cmd->cmd_hdr.type);
- virgl_renderer_create_fence(cmd->cmd_hdr.fence_id, cmd->cmd_hdr.type);
+
+ /*
+ * Unlike other virglrenderer functions, this one returns a positive
+ * error code.
+ */
+ ret = virgl_renderer_create_fence(cmd->cmd_hdr.fence_id, 0);
+ if (ret) {
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: virgl_renderer_create_fence error: %s",
+ __func__, strerror(ret));
+ }
}
static void virgl_write_fence(void *opaque, uint32_t fence)
--
2.47.1
- [PATCH v6 00/10] Support virtio-gpu DRM native context, Dmitry Osipenko, 2025/01/26
- [PATCH v6 01/10] ui/sdl2: Restore original context after new context creation, Dmitry Osipenko, 2025/01/26
- [PATCH v6 02/10] ui/sdl2: Implement dpy dmabuf functions, Dmitry Osipenko, 2025/01/26
- [PATCH v6 03/10] virtio-gpu: Handle virgl fence creation errors,
Dmitry Osipenko <=
- [PATCH v6 04/10] virtio-gpu: Support asynchronous fencing, Dmitry Osipenko, 2025/01/26
- [PATCH v6 05/10] virtio-gpu: Support DRM native context, Dmitry Osipenko, 2025/01/26
- [PATCH v6 06/10] ui/sdl2: Don't disable scanout when display is refreshed, Dmitry Osipenko, 2025/01/26
- [PATCH v6 07/10] ui/gtk: Don't disable scanout when display is refreshed, Dmitry Osipenko, 2025/01/26
- [PATCH v6 08/10] docs/system: virtio-gpu: Add link to Mesa VirGL doc, Dmitry Osipenko, 2025/01/26
- [PATCH v6 09/10] docs/system: virtio-gpu: Update Venus link, Dmitry Osipenko, 2025/01/26
- [PATCH v6 10/10] docs/system: virtio-gpu: Document host/guest requirements, Dmitry Osipenko, 2025/01/26