Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2230380/?format=api
{ "id": 2230380, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230380/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260429175434.474429-1-chad@jablonski.xyz/", "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": "<20260429175434.474429-1-chad@jablonski.xyz>", "date": "2026-04-29T17:54:34", "name": "[v2] ati-vga: fix ati_set_dirty address calculation", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "95af32e069648039ac9610a985d58e1e315514b7", "submitter": { "id": 91805, "url": "http://patchwork.ozlabs.org/api/1.1/people/91805/?format=api", "name": "Chad Jablonski", "email": "chad@jablonski.xyz" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260429175434.474429-1-chad@jablonski.xyz/mbox/", "series": [ { "id": 502118, "url": "http://patchwork.ozlabs.org/api/1.1/series/502118/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502118", "date": "2026-04-29T17:54:34", "name": "[v2] ati-vga: fix ati_set_dirty address calculation", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/502118/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2230380/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2230380/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=jablonski.xyz header.i=@jablonski.xyz\n header.a=rsa-sha256 header.s=fm1 header.b=IeSPa0xs;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=messagingengine.com header.i=@messagingengine.com\n header.a=rsa-sha256 header.s=fm2 header.b=q7p+m/8g;\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=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.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 4g5Q2F6xLbz1yK5\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 03:55:32 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wI97l-00043p-4n; Wed, 29 Apr 2026 13:55:01 -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 <chad@jablonski.xyz>)\n id 1wI97j-00043c-5r\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 13:54:59 -0400", "from fout-a2-smtp.messagingengine.com ([103.168.172.145])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <chad@jablonski.xyz>)\n id 1wI97h-0004b1-9z\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 13:54:58 -0400", "from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45])\n by mailfout.phl.internal (Postfix) with ESMTP id 41F47EC00DD;\n Wed, 29 Apr 2026 13:54:56 -0400 (EDT)", "from phl-frontend-04 ([10.202.2.163])\n by phl-compute-05.internal (MEProxy); Wed, 29 Apr 2026 13:54:56 -0400", "by mail.messagingengine.com (Postfix) with ESMTPA; Wed,\n 29 Apr 2026 13:54:55 -0400 (EDT)", "from localhost (chomposaur [local])\n by chomposaur (OpenSMTPD) with ESMTPA id bbd843ad;\n Wed, 29 Apr 2026 17:54:54 +0000 (UTC)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=jablonski.xyz;\n h=cc:cc:content-transfer-encoding:content-type:date:date:from\n :from:in-reply-to:message-id:mime-version:reply-to:subject\n :subject:to:to; s=fm1; t=1777485296; x=1777571696; bh=DSx2jEGCym\n 9AXEhGI+vByw+KQISlBYyUyne3gZ0gINA=; b=IeSPa0xsj+pWyu84POnir6yCdm\n 2cwLTZ+soln5+LqzNx+4grKhlD09JHECvtiYyMVKeY+Cmpa6RwQ8v6rRtRk5Tusa\n fHrmybeeIpGqvak0SOj+Su40y5clD58XlcQfMdBweoXIRIS3Ryr1cLn9v+l9/MSn\n W8xbwfKO/UzaJz4i3EZwwDAuw9pahtSWfcadEtJ0i7eotw0bkJcBGoNPnjuEVh2a\n 886styxD5dh/DqzBTr7NjMvtpBRakllSgeRSWuLxNO1KQjrWytWoflTdQSTkFvub\n 8mPixUOVjcrUfQDN8RFTtuj0CSIwtVd4+/KBbWxycmZ4ssyCCwZBPAzUYlMw==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:cc:content-transfer-encoding\n :content-type:date:date:feedback-id:feedback-id:from:from\n :in-reply-to:message-id:mime-version:reply-to:subject:subject:to\n :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=\n 1777485296; x=1777571696; bh=DSx2jEGCym9AXEhGI+vByw+KQISlBYyUyne\n 3gZ0gINA=; b=q7p+m/8g3/12PCaYC5Z3CDXs8f6Uy03Rv56MVhshsiO5DKBYvxT\n blVuM3waTw0CMt7rotIyF1ylqfvqA0ifKEm3WVOutTdSIDx2HWOOPWLbQlRtK3t4\n dSUgS1/FoByA7ose1FYsD/WDaT1m6GsP+kyhjXOkqe/S6SA2oAx9aFKBUjIjKTVw\n 9kU6VqNwTSHl1iKa6ZMddCKTQNvja+xe99Xs2KkrVMVq5mqeExhPIYlLNTF+a0jr\n FwxbW8J8wCOCQ5yviw0o9fHjNMb7gOrEPhYIbz+U0J3a006P8Ixue+QcDmfzaEIX\n lq1yGCB0R0SyzMcPHolZYxYCTO9QZad5AAQ==" ], "X-ME-Sender": "<xms:70XyafCPI7XXI2b9vhBqu00WCroocrBsI2zQ74mXAubHNDoPEgwanw>\n <xme:70XyacbP4v_FyUzK8O-rMw22ElRW3dY7lvy5iqm6gzHH3dIuYLJbgSbracOG_GNHW\n gjbogLZSXMbQqXVTmeUpXb_hOw-uICNwxWhQ-QtQx8eRbbgF1ow20o>", "X-ME-Received": "\n <xmr:70XyaS7u2JsGu8v9v6EjVXmpYefzehbulK5qUHys-YxLVTTw5qPznyp0VOCi>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdekhedtlecutefuodetggdotefrod\n ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr\n ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh\n cuvffnffculdejtddmnecujfgurhephffvvefufffkofgggfestdekredtredttdenucfh\n rhhomhepvehhrgguucflrggslhhonhhskhhiuceotghhrggusehjrggslhhonhhskhhird\n ighiiiqeenucggtffrrghtthgvrhhnpefhteeugfeujeelteeggfeigeevjeelgeegudfg\n uedvheeghfffudffledukeeiveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh\n epmhgrihhlfhhrohhmpegthhgrugesjhgrsghlohhnshhkihdrgiihiidpnhgspghrtghp\n thhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepkhhrrgigvghlsehrvg\n guhhgrthdrtghomhdprhgtphhtthhopehqvghmuhdquggvvhgvlhesnhhonhhgnhhurdho\n rhhgpdhrtghpthhtohepmhgrrhgtrghnughrvgdrlhhurhgvrghusehrvgguhhgrthdrtg\n homhdprhgtphhtthhopegthhgrugesjhgrsghlohhnshhkihdrgiihiidprhgtphhtthho\n pegsrghlrghtohhnsegvihhkrdgsmhgvrdhhuh", "X-ME-Proxy": "<xmx:70XyadbnYz2jP3S-qoPOyDgLYCFHdJzUgmJIi0O3-Ofe9zKpkBZzbA>\n <xmx:70XyaRi3MWh8S5vJLsIcD60snzmjOyGEbwRJ0N5EpLmUX7OpCQnwWw>\n <xmx:70Xyae_exqUySM4VEBoBybDb1crsY2Db8ASm8mc4IaizpDJi9u_lkQ>\n <xmx:70XyacrthF7FAnDKzg3gkukK6WqggPlC4hGsf6rWScq4kPRWjh30vA>\n <xmx:8EXyaX3Nfs8Uk44uNeqRAWJkwKPaItrImhbf-zcnlmsav4bGLS1vSuLa>", "Feedback-ID": "ib26944c1:Fastmail", "From": "Chad Jablonski <chad@jablonski.xyz>", "To": "qemu-devel@nongnu.org", "Cc": "BALATON Zoltan <balaton@eik.bme.hu>, Gerd Hoffmann <kraxel@redhat.com>,\n\t=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n Chad Jablonski <chad@jablonski.xyz>", "Subject": "[PATCH v2] ati-vga: fix ati_set_dirty address calculation", "Date": "Wed, 29 Apr 2026 13:54:34 -0400", "Message-ID": "<20260429175434.474429-1-chad@jablonski.xyz>", "X-Mailer": "git-send-email 2.53.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=103.168.172.145;\n envelope-from=chad@jablonski.xyz;\n helo=fout-a2-smtp.messagingengine.com", "X-Spam_score_int": "17", "X-Spam_score": "1.7", "X-Spam_bar": "+", "X-Spam_report": "(1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1,\n DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499,\n FROM_SUSPICIOUS_NTLD_FP=1.999, PDS_OTHER_BAD_TLD=1.999,\n RCVD_IN_DNSWL_LOW=-0.7,\n SPF_HELO_PASS=-0.001, SPF_PASS=-0.001,\n UNPARSEABLE_RELAY=0.001 autolearn=no 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": "This fixes three bugs with the ati_set_dirty address calculation.\n\nFirst, vbe_start_addr is a word offset. All other values in the\ncalculation are byte offsets. It must be converted to bytes.\n\nSecond, when setting the dirty region with memory_region_set_dirty\nthe vbe_start_addr is used to calculate the start of the dirty region.\nThis is a problem because the vbe_start_addr is the offset at which scan out\nbegins. This puts it in the visible screen coordinate system. The dirty\nregion however is in the virtual screen coordinate system. This can cause both\novermarking and missed updates. This is removed from the calculation.\n\nThird, when the start address of a blit is outside of the bounds check\nthe entire blit is missed and not set to dirty. This happens even if the\nblit does partially overlap with the visible screen. The fix here is to\nfind the intersection of the visible screen and the blit and mark only\nthat region as dirty.\n\nThis does not attempt to apply clipping to the blit. So there will be\novermarking in some cases.\n\nSigned-off-by: Chad Jablonski <chad@jablonski.xyz>\n---\n hw/display/ati_2d.c | 26 +++++++++++++++++++-------\n 1 file changed, 19 insertions(+), 7 deletions(-)", "diff": "diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c\nindex 504d1c5708..3192b864fd 100644\n--- a/hw/display/ati_2d.c\n+++ b/hw/display/ati_2d.c\n@@ -69,19 +69,31 @@ typedef struct {\n static void ati_set_dirty(VGACommonState *vga, const ATI2DCtx *ctx)\n {\n DisplaySurface *ds = qemu_console_surface(vga->con);\n+ unsigned int bypp = ctx->bpp / 8;\n+ unsigned long dirty_size = ((ctx->dst.height - 1) * ctx->dst_stride) +\n+ (ctx->dst.width * bypp);\n+ uint8_t *dirty_start = ctx->dst_bits + (ctx->dst.y * ctx->dst_stride) +\n+ (ctx->dst.x * bypp);\n+ uint8_t *dirty_end = dirty_start + dirty_size;\n+ /*\n+ * The blit may be outside of the visible screen (e.g. virtual desktops.)\n+ * Dirty only the intersection of the visible screen and the blit.\n+ */\n+ uint8_t *vis_start = vga->vram_ptr + (vga->vbe_start_addr * 4);\n+ uint8_t *vis_end = vis_start + vga->vbe_regs[VBE_DISPI_INDEX_YRES] *\n+ vga->vbe_line_offset;\n+ uint8_t *start = MAX(vis_start, dirty_start);\n+ uint8_t *end = MIN(vis_end, dirty_end);\n \n (void)ds;\n DPRINTF(\"%p %u ds: %p %d %d rop: %x\\n\", vga->vram_ptr, vga->vbe_start_addr,\n surface_data(ds), surface_stride(ds), surface_bits_per_pixel(ds),\n ctx->rop3 >> 16);\n- if (ctx->dst_bits >= vga->vram_ptr + vga->vbe_start_addr &&\n- ctx->dst_bits < vga->vram_ptr + vga->vbe_start_addr +\n- vga->vbe_regs[VBE_DISPI_INDEX_YRES] * vga->vbe_line_offset) {\n- memory_region_set_dirty(&vga->vram,\n- vga->vbe_start_addr + ctx->dst_offset +\n- ctx->dst.y * ctx->dst_stride,\n- ctx->dst.height * ctx->dst_stride);\n+\n+ if (start >= end) {\n+ return;\n }\n+ memory_region_set_dirty(&vga->vram, start - vga->vram_ptr, end - start);\n }\n \n static void setup_2d_blt_ctx(const ATIVGAState *s, ATI2DCtx *ctx)\n", "prefixes": [ "v2" ] }