Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2221539/?format=api
{ "id": 2221539, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2221539/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260409144639.3610-1-benno.fuenfstueck@neodyme.io/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.1/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260409144639.3610-1-benno.fuenfstueck@neodyme.io>", "date": "2026-04-09T14:46:39", "name": "virtio-gpu: fix inverted mouse cursor", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a4a487603b507d4f9c937b29971fc3f3162bb17a", "submitter": { "id": 93105, "url": "http://patchwork.ozlabs.org/api/1.1/people/93105/?format=api", "name": "Benno Fünfstück", "email": "benno.fuenfstueck@neodyme.io" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260409144639.3610-1-benno.fuenfstueck@neodyme.io/mbox/", "series": [ { "id": 499333, "url": "http://patchwork.ozlabs.org/api/1.1/series/499333/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499333", "date": "2026-04-09T14:46:39", "name": "virtio-gpu: fix inverted mouse cursor", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499333/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2221539/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2221539/checks/", "tags": {}, "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=neodyme.io header.i=@neodyme.io header.a=rsa-sha256\n header.s=google header.b=YjjEklQO;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fs6Lb4XWGz211P\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 03:27:02 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wAt9F-0008SE-0Z; Thu, 09 Apr 2026 13:26:33 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <benno.fuenfstueck@neodyme.io>)\n id 1wAqeg-0000X8-Fs\n for qemu-devel@nongnu.org; Thu, 09 Apr 2026 10:46:50 -0400", "from mail-wm1-x331.google.com ([2a00:1450:4864:20::331])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <benno.fuenfstueck@neodyme.io>)\n id 1wAqee-0003Pz-7m\n for qemu-devel@nongnu.org; Thu, 09 Apr 2026 10:46:49 -0400", "by mail-wm1-x331.google.com with SMTP id\n 5b1f17b1804b1-482f454be5bso10436715e9.0\n for <qemu-devel@nongnu.org>; Thu, 09 Apr 2026 07:46:47 -0700 (PDT)", "from i-cube.fritz.box.net\n (p200300c27729d60078e64648c83f9ad2.dip0.t-ipconnect.de.\n [2003:c2:7729:d600:78e6:4648:c83f:9ad2])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488cd0eaeecsm26248105e9.8.2026.04.09.07.46.43\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 09 Apr 2026 07:46:43 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=neodyme.io; s=google; t=1775746004; x=1776350804; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=tzOL7FDl1K7aen5hTdBzUNU7jyLuiNQRylvYSYEPqdw=;\n b=YjjEklQO0UuGIaisY8fphsQFPq+Ldr/VfwoMKkVRletztrcfYQQVs7cWH3SWVR1hCK\n ktbTJSgfAPA0i3JCk4FBykRe2RK7LiEwXpEnqfrKYJiLRgb+qHDqAbg69XA+l6ZFfrfW\n uvtQwL3mLC5iRCR2U9L77IFa8skWipMxp7AmUM7XpS6SOXPnMmqPFIOXH5cYwzLO1IIG\n KMMHrepclYOHQ2lQFRouam6cn1P/rXS4vBt6GQkb9AMj0Yz6yle52QazI/UdaCL/dCdu\n UKg8WXBBuFWYjOlXtq/I91QZsHuBUWhgvoPWVpWNTkP6e6FGLxxwfO5bjrdUbOivXfZe\n eEHA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775746004; x=1776350804;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=tzOL7FDl1K7aen5hTdBzUNU7jyLuiNQRylvYSYEPqdw=;\n b=ZEfNUHdOmJRVtaBcXZdvofGvJ+jlTy5f9OmNQZzKKwYGko7HxphYIIFyAEct5zhmKa\n J78mCrSKVAdxQC0K/MnGq1Z1/IbZ9tTsq1xDVLR9YCofyP7JUxQ6l+kvZ+fw/117pb4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e4 with SMTP id\n 5b1f17b1804b1-488d08efdf2mr32906005e9.12.1775746004198;\n Thu, 09 Apr 2026 07:46:44 -0700 (PDT)", "From": "=?utf-8?q?Benno_F=C3=BCnst=C3=BCck?= <benno.fuenfstueck@neodyme.io>", "To": "qemu-devel@nongnu.org", "Cc": "\"Michael S. Tsirkin\" <mst@redhat.com>,\n =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>,\n Dmitry Osipenko <dmitry.osipenko@collabora.com>, =?utf-8?b?QmVubm8gRsO8bmZz?=\n\t=?utf-8?b?dMO8Y2s=?= <benno.fuenfstueck@neodyme.io>", "Subject": "[PATCH] virtio-gpu: fix inverted mouse cursor", "Date": "Thu, 9 Apr 2026 16:46:39 +0200", "Message-ID": "<20260409144639.3610-1-benno.fuenfstueck@neodyme.io>", "X-Mailer": "git-send-email 2.53.0", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"UTF-8\"", "Content-Transfer-Encoding": "quoted-printable", "Received-SPF": "pass client-ip=2a00:1450:4864:20::331;\n envelope-from=benno.fuenfstueck@neodyme.io; helo=mail-wm1-x331.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, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no", "X-Spam_action": "no action", "X-Mailman-Approved-At": "Thu, 09 Apr 2026 13:26:29 -0400", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "From: Benno Fünfstück <benno.fuenfstueck@neodyme.io>\n\nWhen using virtio-gpu-gl, if the guest uses hardware mouse cursor acceleration then the mouse cursor can end up being a resource with the flag Y_0_TOP set. In this case, we need to make sure to flip the cursor data such that display clients render it correctly.\n\nFor example, this fixes mouse cursor rendering for wlroots-based window managers (like Sway) in Linux guests.\n\nResolves: https://gitlab.com/qemu-project/qemu/-/work_items/2315\nSigned-off-by: Benno Fünfstück <benno.fuenfstueck@neodyme.io>\n---\n hw/display/virtio-gpu-gl.c | 20 +++++++++++++++++++-\n 1 file changed, 19 insertions(+), 1 deletion(-)", "diff": "diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c\nindex 2b7a41c466..4562d3405e 100644\n--- a/hw/display/virtio-gpu-gl.c\n+++ b/hw/display/virtio-gpu-gl.c\n@@ -33,6 +33,9 @@ static void virtio_gpu_gl_update_cursor_data(VirtIOGPU *g,\n VirtIOGPUGL *gl = VIRTIO_GPU_GL(g);\n uint32_t width, height;\n uint32_t pixels, *data;\n+ bool y_0_top = true;\n+ int ret;\n+ struct virgl_renderer_resource_info info;\n \n if (gl->renderer_state != RS_INITED) {\n return;\n@@ -49,8 +52,23 @@ static void virtio_gpu_gl_update_cursor_data(VirtIOGPU *g,\n return;\n }\n \n+ memset(&info, 0, sizeof(info));\n+ ret = virgl_renderer_resource_get_info(resource_id, &info);\n+ if (ret == 0) {\n+ y_0_top = info.flags & VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP;\n+ }\n+\n pixels = s->current_cursor->width * s->current_cursor->height;\n- memcpy(s->current_cursor->data, data, pixels * sizeof(uint32_t));\n+ if (y_0_top) {\n+ memcpy(s->current_cursor->data, data, pixels * sizeof(uint32_t));\n+ } else {\n+ uint32_t *dst = s->current_cursor->data;\n+ for (uint32_t y = 0; y < height; y++) {\n+ memcpy(dst + y * width,\n+ data + (height - 1 - y) * width,\n+ width * sizeof(uint32_t));\n+ }\n+ }\n free(data);\n }\n \n", "prefixes": [] }