get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2221115,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2221115/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260407215900.63390-5-philmd@linaro.org/",
    "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": "<20260407215900.63390-5-philmd@linaro.org>",
    "date": "2026-04-07T21:58:58",
    "name": "[PATCH-for-11.0,4/6] ati-vga: Fix setting CRTC_OFFSET",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "e4d92ee879822805fcacd54ece50c73a4c7a5137",
    "submitter": {
        "id": 85046,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/85046/?format=api",
        "name": "Philippe Mathieu-Daudé",
        "email": "philmd@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260407215900.63390-5-philmd@linaro.org/mbox/",
    "series": [
        {
            "id": 499182,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/499182/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499182",
            "date": "2026-04-07T21:58:54",
            "name": "[PATCH-for-11.0,1/6] docs/about/removed-features: Replace 'since' -> 'removed in'",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499182/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2221115/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2221115/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=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=csyioh4U;\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 4frXss6Vstz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 05:18:41 +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 1wAYOY-00008d-0J; Wed, 08 Apr 2026 15:17:02 -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 <philmd@linaro.org>) id 1wAYK8-0002Gt-Oh\n for qemu-devel@nongnu.org; Wed, 08 Apr 2026 15:12:24 -0400",
            "from mail-wm1-x336.google.com ([2a00:1450:4864:20::336])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1wAESJ-0005VJ-Ki\n for qemu-devel@nongnu.org; Tue, 07 Apr 2026 17:59:32 -0400",
            "by mail-wm1-x336.google.com with SMTP id\n 5b1f17b1804b1-48897fd88ebso41857445e9.2\n for <qemu-devel@nongnu.org>; Tue, 07 Apr 2026 14:59:31 -0700 (PDT)",
            "from localhost.localdomain (88-187-86-199.subs.proxad.net.\n [88.187.86.199]) by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43d1e4f5016sm57075155f8f.33.2026.04.07.14.59.28\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Tue, 07 Apr 2026 14:59:29 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1775599170; x=1776203970; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=lhn2eC+DMoiExYnjeUurcV+Nld88cdr8TS7kyXuZAbU=;\n b=csyioh4UJfR+ATnIXGJLW73VxeW3X8PAwpBUzRptus9mWC7qCnEPrB3rcS2DSIBbAB\n 1V0WWqrCnZyAvIspYCDgtkcaC1cDi3feVu2ZzQmjXCCCiFgmJIFXft/3mxPI674iJU5z\n NNzCaJt0fg/xHi2jxlUAZMEf4sfLYFtwL9ErEOGOrMW+LHpIa1clT+ZG8qFZl7TwZvzp\n w+TyNM0WLmWGUfv/NXTOO0qCVHbGsleJMLtaRx/uoWGPpbyA9/lNCqUrBVQCTDkxE/+O\n rab8iPQKT/O5kud+iu605luw1VFHGxeaM+vIwh9XZpqfd2L/WUyp2JBJdGeXW0aer3lS\n Au7w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775599170; x=1776203970;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=lhn2eC+DMoiExYnjeUurcV+Nld88cdr8TS7kyXuZAbU=;\n b=WHqpslVprOzjD5V0Mrd+NkBh+9/pZ8ExQb4MIvVFAAd74ng5RKW+38ne6kGixGT67R\n XZudFxgo/9yKfwTCYrJEHB155fgQar15Jrh9LKOMJc5cO2psqAIU72kElRczR/rqgMxd\n 7HfKhG0thsii5O2KwDjGUcXDa/i9ikdKmgXkbm7o3OyWWBSBtgKFFxtmo0T9Ntcxesp4\n hy+mB6iYVb/bS+/4k1igTxAD+rNOAkCAZeqb3prt9b9UidhmP/y+q1v9rN9JTbnvgo/x\n 0pmC9GxT7osT6P35efJWbPHtpfQhqS5FHK5k40uNJq/TKZWgWiWivVYSnlfW8vvXVmzX\n PS3A==",
        "X-Gm-Message-State": "AOJu0YxIyuIOhupboOnE9usUenzqz8A3ZpBgV+isixVP/0GwvRl3Y20y\n cN+YZcPGZVIIsWFfvALZyryKrnT0Wrwhe/dUB6ei6YwNI5AfY0by+l7hCJyErWxRe84+p8K1KvP\n m0obW+mA=",
        "X-Gm-Gg": "AeBDiesVn8Os4LuRQY/QifVemMkiKvUWugP5EOj1j58O+7yIL6Xjgmc3adNgUUjqDY+\n +qKhnqQUiUce+LjM94i/RJAZ6q6TczB0t9zoIkENauUBUJxFlbqEgqV75f0nu7Q2e0N60R+qd7I\n BiEaP06y4UIdDQPQ7se/daleTzM6OfNbkR6PJT5Fho1YDYWU4JDniVQ/U6t7a6m3jnYQX37SNum\n SBqhCH4gAy7zdDuaJv9WGjPpVKPxuc8I4nv2aS0zPsC8YTN4/kZzNiBbGutDLTPvmpD/lGxUoZw\n EMMJuHQLKT3oQQYErQqBztD85y1b6bYmrFiGp0+/L6QzEo9QA3SiR0ih9jlxxAZky0TN9yH4Upr\n wipvn1NyA/hcUJ8f8NcoCAhOKw5PYnrYIhhZiSnvt+0P8tZ87/Q7LTztmVym30r9dr2vW91dKwu\n 5i9EvvxfrdKDvi5nuu0SGrlGgzyNjwMlZsxFcGH+696H8+6skuQtAv4VEnMdd6m26rRYga7chl",
        "X-Received": "by 2002:a05:600c:4447:b0:480:1c69:9d36 with SMTP id\n 5b1f17b1804b1-48899785c7bmr292690955e9.17.1775599169827;\n Tue, 07 Apr 2026 14:59:29 -0700 (PDT)",
        "From": "=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Jamin Lin <jamin_lin@aspeedtech.com>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>,\n Fabiano Rosas <farosas@suse.de>, Harsh Prateek Bora <harshpb@linux.ibm.com>,\n\t=?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@redhat.com>",
        "Subject": "[PATCH-for-11.0 4/6] ati-vga: Fix setting CRTC_OFFSET",
        "Date": "Tue,  7 Apr 2026 23:58:58 +0200",
        "Message-ID": "<20260407215900.63390-5-philmd@linaro.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260407215900.63390-1-philmd@linaro.org>",
        "References": "<20260407215900.63390-1-philmd@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::336;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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-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: BALATON Zoltan <balaton@eik.bme.hu>\n\nOffset (display start address) should also be updated when changing\nthe register value not only on mode change. Fix the register write\nmask to hard code bits 0:2 to 0 as the chip docs say and update the\nstart address on register write. This fixes virtual screen panning for\nscreens larger than displayed resolution.\n\nAs this register allows values that cannot be handled by the VBE_DISPI\nX and Y offsets (which is restricted by line length) we add a function\nto set it directly not through the VBE offsets.\n\nSigned-off-by: BALATON Zoltan <balaton@eik.bme.hu>\nTested-by: Chad Jablonski <chad@jablonski.xyz>\nReviewed-by: Chad Jablonski <chad@jablonski.xyz>\nMessage-ID: <2b8af6022aba06aa98a249ae67922de29d82d86f.1775228029.git.balaton@eik.bme.hu>\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\n---\n hw/display/ati.c | 34 +++++++++++++++++-----------------\n 1 file changed, 17 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/hw/display/ati.c b/hw/display/ati.c\nindex 97d871b1e22..a283afbfff5 100644\n--- a/hw/display/ati.c\n+++ b/hw/display/ati.c\n@@ -48,6 +48,19 @@ static const struct {\n \n enum { VGA_MODE, EXT_MODE };\n \n+static void ati_vga_set_offset(VGACommonState *vga, uint32_t offs)\n+{\n+    int bypp = DIV_ROUND_UP(vga->vbe_regs[VBE_DISPI_INDEX_BPP], BITS_PER_BYTE);\n+\n+    if (!bypp ||\n+        vga->vbe_regs[VBE_DISPI_INDEX_YRES] *\n+        vga->vbe_regs[VBE_DISPI_INDEX_VIRT_WIDTH] * bypp + offs >\n+        vga->vbe_size) {\n+        return;\n+    }\n+    vga->vbe_start_addr = offs / 4;\n+}\n+\n static void ati_vga_switch_mode(ATIVGAState *s)\n {\n     DPRINTF(\"%d -> %d\\n\",\n@@ -109,26 +122,12 @@ static void ati_vga_switch_mode(ATIVGAState *s)\n             vbe_ioport_write_data(&s->vga, 0, VBE_DISPI_ENABLED |\n                 VBE_DISPI_LFB_ENABLED | VBE_DISPI_NOCLEARMEM |\n                 (s->regs.dac_cntl & DAC_8BIT_EN ? VBE_DISPI_8BIT_DAC : 0));\n-            /* now set offset and stride after enable as that resets these */\n+            /* now set offset and stride because enable resets these */\n             if (stride) {\n-                int bypp = DIV_ROUND_UP(bpp, BITS_PER_BYTE);\n-\n                 vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_VIRT_WIDTH);\n                 vbe_ioport_write_data(&s->vga, 0, stride);\n-                stride *= bypp;\n-                if (offs % stride) {\n-                    DPRINTF(\"CRTC offset is not multiple of pitch\\n\");\n-                    vbe_ioport_write_index(&s->vga, 0,\n-                                           VBE_DISPI_INDEX_X_OFFSET);\n-                    vbe_ioport_write_data(&s->vga, 0, offs % stride / bypp);\n-                }\n-                vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_Y_OFFSET);\n-                vbe_ioport_write_data(&s->vga, 0, offs / stride);\n-                DPRINTF(\"VBE offset (%d,%d), vbe_start_addr=%x\\n\",\n-                        s->vga.vbe_regs[VBE_DISPI_INDEX_X_OFFSET],\n-                        s->vga.vbe_regs[VBE_DISPI_INDEX_Y_OFFSET],\n-                        s->vga.vbe_start_addr);\n             }\n+            ati_vga_set_offset(&s->vga, offs);\n         }\n     } else {\n         /* VGA mode enabled */\n@@ -737,7 +736,8 @@ static void ati_mm_write(void *opaque, hwaddr addr,\n         s->regs.crtc_v_sync_strt_wid = data & 0x9f0fff;\n         break;\n     case CRTC_OFFSET:\n-        s->regs.crtc_offset = data & 0xc7ffffff;\n+        s->regs.crtc_offset = data & 0x87fffff8;\n+        ati_vga_set_offset(&s->vga, s->regs.crtc_offset & 0x07ffffff);\n         break;\n     case CRTC_OFFSET_CNTL:\n         s->regs.crtc_offset_cntl = data; /* FIXME */\n",
    "prefixes": [
        "PATCH-for-11.0",
        "4/6"
    ]
}