get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2195095/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2195095,
    "url": "http://patchwork.ozlabs.org/api/patches/2195095/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260210123038.2332364-2-ankeesler@google.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/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": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260210123038.2332364-2-ankeesler@google.com>",
    "list_archive_url": null,
    "date": "2026-02-10T12:30:38",
    "name": "[v5,1/1] Support per-head resolutions with virtio-gpu",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "efed3527184e3befcd17fcd8056d8300411b6860",
    "submitter": {
        "id": 89553,
        "url": "http://patchwork.ozlabs.org/api/people/89553/?format=api",
        "name": "Andrew Keesler",
        "email": "ankeesler@google.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260210123038.2332364-2-ankeesler@google.com/mbox/",
    "series": [
        {
            "id": 491665,
            "url": "http://patchwork.ozlabs.org/api/series/491665/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=491665",
            "date": "2026-02-10T12:30:38",
            "name": "[v5,1/1] Support per-head resolutions with virtio-gpu",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/491665/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2195095/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2195095/checks/",
    "tags": {},
    "related": [],
    "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=google.com header.i=@google.com header.a=rsa-sha256\n header.s=20230601 header.b=Yjj9JqKL;\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 (lists.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 4f9LXY4Y3bz1xvb\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 23:31:40 +1100 (AEDT)",
            "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 1vpmtZ-00077n-Fw; Tue, 10 Feb 2026 07:31:11 -0500",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from\n <3-CSLaQkKCsEhurllzslynvvnsl.jvtxlt1-kl2lsuvunu1.vyn@flex--ankeesler.bounces.google.com>)\n id 1vpmtM-00072A-JK\n for qemu-devel@nongnu.org; Tue, 10 Feb 2026 07:30:56 -0500",
            "from mail-qk1-x749.google.com ([2607:f8b0:4864:20::749])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from\n <3-CSLaQkKCsEhurllzslynvvnsl.jvtxlt1-kl2lsuvunu1.vyn@flex--ankeesler.bounces.google.com>)\n id 1vpmtH-0005eN-V8\n for qemu-devel@nongnu.org; Tue, 10 Feb 2026 07:30:53 -0500",
            "by mail-qk1-x749.google.com with SMTP id\n af79cd13be357-8c6a87029b6so246924785a.1\n for <qemu-devel@nongnu.org>; Tue, 10 Feb 2026 04:30:49 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=google.com; s=20230601; t=1770726649; x=1771331449; darn=nongnu.org;\n h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n :date:from:to:cc:subject:date:message-id:reply-to;\n bh=kyNRXINSUTBLxrJLZZH047zYsNH4CQmHf2WvnCpbFRA=;\n b=Yjj9JqKLDssNYHPSY4mA08FHopkQe1j3Oi1Ba5HimpZiedsAv5nr+TzEApR8spVsvA\n KBrwNnbFU/Q//gN3DPrVVmLnCMcL/6TZ2jLDRY7wKLewSG1ng6CiX98ISKG422ELEQY3\n QdKRMwk9eBw+iMDSfXosTrVm46AqXdKgkk9mr1/h66d5nyc6i0BRwtqx+tyraczHSETF\n nxDYlEyxGLIhvIGEOMbtYpGXR/5xrxgsjk3mBCqU118kfaf/bVQp+b37X4jEI/l1mjnF\n NEEStxdzEaDv+ieVQ5EYkNGcgqlJtUP2LuBJRXgdB3y0dHxiaTWPaWDSfCwWCOvaGm4f\n p86Q==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770726649; x=1771331449;\n h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n bh=kyNRXINSUTBLxrJLZZH047zYsNH4CQmHf2WvnCpbFRA=;\n b=hqce4LQLYIoxD3pp4dE3D6eP3gWxtbuQX6LM493Se9BPMPX6hOLdYaUt0rEMmbyopN\n Rd653/ypH+jz4xFIVGuTw/ElgFfHgVozBf4EMlyDxKE22VshatSxVOV0N2gmAY4rriuq\n pCSid0UHtwcsfFjWJ9mqkZo2OGTS9lhHXJsnKqf+oN0FI+udMpSrWoD1d6f7s78EGbsv\n lXn63GPkegTleIT2dQDK2o7VSc1ZsHbJ8t1/RYmQRQGZZarYQ0UHQc87BWQ3ZCccOBaK\n 88EVP94fBrbMAdi2zW7RdSgqoA1Bh4Q9P0NpQcU3NNCi1Mu3urlRIWjzJpDSXf8SwRjy\n 44GA==",
        "X-Gm-Message-State": "AOJu0YxpPRSfQ/4xwGaV6iBZ1qXSz6rawWhs2qJuiKUlmzQRuy/iy5Uz\n 9D2IHnxMIPVl0yrv89KMhq7D266xhiQucc7sQ1O1yhak5H2YhSZdbJDWmXTsTy6gKDvoP7sitxI\n u7HN2gI3sGlcHhteq",
        "X-Received": "from qvbnh18.prod.google.com\n ([2002:a05:6214:3912:b0:894:7038:8d75])\n (user=ankeesler job=prod-delivery.src-stubby-dispatcher) by\n 2002:a05:620a:22e5:b0:8ca:fe5c:ea6d with SMTP id\n af79cd13be357-8cafe5cec8emr1309346585a.59.1770726648982;\n Tue, 10 Feb 2026 04:30:48 -0800 (PST)",
        "Date": "Tue, 10 Feb 2026 12:30:38 +0000",
        "In-Reply-To": "<20260210123038.2332364-1-ankeesler@google.com>",
        "Mime-Version": "1.0",
        "References": "<20260210123038.2332364-1-ankeesler@google.com>",
        "X-Mailer": "git-send-email 2.53.0.239.g8d8fc8a987-goog",
        "Message-ID": "<20260210123038.2332364-2-ankeesler@google.com>",
        "Subject": "[PATCH v5 1/1] Support per-head resolutions with virtio-gpu",
        "From": "Andrew Keesler <ankeesler@google.com>",
        "To": "alex.bennee@linaro.org, armbru@redhat.com",
        "Cc": "qemu-devel@nongnu.org, Andrew Keesler <ankeesler@google.com>",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::749;\n envelope-from=3-CSLaQkKCsEhurllzslynvvnsl.jvtxlt1-kl2lsuvunu1.vyn@flex--ankeesler.bounces.google.com;\n helo=mail-qk1-x749.google.com",
        "X-Spam_score_int": "-95",
        "X-Spam_score": "-9.6",
        "X-Spam_bar": "---------",
        "X-Spam_report": "(-9.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001,\n DKIM_SIGNED=0.1, 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, SPF_PASS=-0.001,\n USER_IN_DEF_DKIM_WL=-7.5 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": "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": "In 454f4b0f, we started down the path of supporting separate\nconfigurations per display head (e.g., you have 2 heads - one with\nEDID name \"AAA\" and the other with EDID name \"BBB\").\n\nIn this change, we add resolution to this configuration surface (e.g.,\nyou have 2 heads - one with resolution 111x222 and the other with\nresolution 333x444).\n\n  -display vnc=localhost:0,id=aaa,display=vga,head=0 \\\n  -display vnc=localhost:1,id=bbb,display=vga,head=1 \\\n  -device '{\"driver\":\"virtio-vga\",\n            \"max_outputs\":2,\n            \"id\":\"vga\",\n            \"outputs\":[\n              {\n                 \"name\":\"AAA\",\n                 \"xres\":111,\n                 \"yres\":222\n              },\n              {\n                 \"name\":\"BBB\",\n                 \"xres\":333,\n                 \"yres\":444\n              }\n            ]}'\n\nHere is the behavior matrix of the current resolution configuration\nsurface (xres/yres) with the new resolution configuration surface\n(outputs[i].xres/yres).\n\nNote - we use \"xres\" and \"yres\" (instead of, say, \"width\" and \"height\")\nto match analogous virtio_gpu_base_conf.xres/yres.\n\nCase: !(xres || yres) && !(outputs[i].has_xres && outputs[i].has_yres)\nBehavior: current behavior - outputs[0] enabled with default xres/yres\n\nCase: (xres || yres) && !(outputs[i].has_xres && outputs[i].has_yres)\nBehavior: current behavior - outputs[0] enabled with xres/yres\n\nCase: outputs[i].has_xres && outputs[i].has_yres\nBehavior: new behavior - outputs[i] enabled with outputs[i].xres/yres\n\nCase: outputs[i].has_xres != outputs[i].has_yres\nBehavior: error\n\nSigned-off-by: Andrew Keesler <ankeesler@google.com>\n---\n hw/display/virtio-gpu-base.c | 16 ++++++++++++++++\n qapi/virtio.json             | 13 +++++++++++--\n 2 files changed, 27 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c\nindex 7269477a1c..4bd2311182 100644\n--- a/hw/display/virtio-gpu-base.c\n+++ b/hw/display/virtio-gpu-base.c\n@@ -233,6 +233,22 @@ virtio_gpu_base_device_realize(DeviceState *qdev,\n     g->req_state[0].width = g->conf.xres;\n     g->req_state[0].height = g->conf.yres;\n \n+    for (output_idx = 0, node = g->conf.outputs;\n+         node && output_idx < g->conf.max_outputs;\n+         output_idx++, node = node->next) {\n+        if (node->value->has_xres != node->value->has_yres) {\n+            error_setg(errp,\n+                       \"must set both outputs[%lu].xres and outputs[%lu].yres\",\n+                       output_idx, output_idx);\n+            return false;\n+        }\n+        if (node->value->has_xres && node->value->has_yres) {\n+            g->enabled_output_bitmask |= (1 << output_idx);\n+            g->req_state[output_idx].width = node->value->xres;\n+            g->req_state[output_idx].height = node->value->yres;\n+        }\n+    }\n+\n     g->hw_ops = &virtio_gpu_ops;\n     for (i = 0; i < g->conf.max_outputs; i++) {\n         g->scanout[i].con =\ndiff --git a/qapi/virtio.json b/qapi/virtio.json\nindex cd67c4f52e..09dd0e6d05 100644\n--- a/qapi/virtio.json\n+++ b/qapi/virtio.json\n@@ -970,15 +970,24 @@\n ##\n # @VirtIOGPUOutput:\n #\n-# Describes configuration of a VirtIO GPU output.\n+# Describes configuration of a VirtIO GPU output.  If both @xres and\n+# @yres are set, they take precedence over root virtio-gpu resolution\n+# configuration and enable the corresponding output.  If none of @xres\n+# and @yres are set, root virtio-gpu resolution configuration takes\n+# precedence and only the first output is enabled.  Only setting one\n+# of @xres or @yres is an error.\n #\n # @name: the name of the output\n #\n+# @xres: horizontal resolution of the output in pixels (since 11.0)\n+#\n+# @yres: vertical resolution of the output in pixels (since 11.0)\n+#\n # Since: 10.1\n ##\n \n { 'struct': 'VirtIOGPUOutput',\n-  'data': { 'name': 'str' } }\n+  'data': { 'name': 'str', '*xres': 'uint16', '*yres': 'uint16' } }\n \n ##\n # @DummyVirtioForceArrays:\n",
    "prefixes": [
        "v5",
        "1/1"
    ]
}