{"id":2220030,"url":"http://patchwork.ozlabs.org/api/patches/2220030/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260406012031.335A0596A24@zero.eik.bme.hu/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","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":"<20260406012031.335A0596A24@zero.eik.bme.hu>","list_archive_url":null,"date":"2026-04-06T01:20:31","name":"ati-vga: Do not crash on 24 bits per pixel","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"0b2f1dfc085c1e9e9147f8aa212530f559f2fdc6","submitter":{"id":16148,"url":"http://patchwork.ozlabs.org/api/people/16148/?format=json","name":"BALATON Zoltan","email":"balaton@eik.bme.hu"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260406012031.335A0596A24@zero.eik.bme.hu/mbox/","series":[{"id":498811,"url":"http://patchwork.ozlabs.org/api/series/498811/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498811","date":"2026-04-06T01:20:31","name":"ati-vga: Do not crash on 24 bits per pixel","version":1,"mbox":"http://patchwork.ozlabs.org/series/498811/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2220030/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2220030/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 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 4fps3r4DDpz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 06 Apr 2026 11:21:26 +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 1w9Ydw-00076P-CY; Sun, 05 Apr 2026 21:20:44 -0400","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 <balaton@eik.bme.hu>)\n id 1w9Ydt-00075y-EX\n for qemu-devel@nongnu.org; Sun, 05 Apr 2026 21:20:41 -0400","from zero.eik.bme.hu ([2001:738:2001:2001::2001])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <balaton@eik.bme.hu>)\n id 1w9Ydq-0001zK-RY\n for qemu-devel@nongnu.org; Sun, 05 Apr 2026 21:20:41 -0400","from localhost (localhost [127.0.0.1])\n by zero.eik.bme.hu (Postfix) with ESMTP id 3BC8C596A2C;\n Mon, 06 Apr 2026 03:20:33 +0200 (CEST)","from zero.eik.bme.hu ([127.0.0.1])\n by localhost (zero.eik.bme.hu [127.0.0.1]) (amavis, port 10028) with ESMTP\n id hFlh91cczH3e; Mon,  6 Apr 2026 03:20:31 +0200 (CEST)","by zero.eik.bme.hu (Postfix, from userid 432)\n id 335A0596A24; Mon, 06 Apr 2026 03:20:31 +0200 (CEST)"],"X-Virus-Scanned":"amavis at eik.bme.hu","From":"BALATON Zoltan <balaton@eik.bme.hu>","Subject":"[PATCH] ati-vga: Do not crash on 24 bits per pixel","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","To":"qemu-devel@nongnu.org","Cc":"Gerd Hoffmann <kraxel@redhat.com>, marcandre.lureau@redhat.com,\n Chad Jablonski <chad@jablonski.xyz>,\n =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Peter Maydell <peter.maydell@linaro.org>","Message-Id":"<20260406012031.335A0596A24@zero.eik.bme.hu>","Date":"Mon, 06 Apr 2026 03:20:31 +0200 (CEST)","Received-SPF":"pass client-ip=2001:738:2001:2001::2001;\n envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu","X-Spam_score_int":"-18","X-Spam_score":"-1.9","X-Spam_bar":"-","X-Spam_report":"(-1.9 / 5.0 requ) BAYES_00=-1.9, 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":"The stn_he_p function only supports power of two sizes so it will\nassert if we call it with size 3 that happens with 24 bits per pixel.\nIt's not clear from the documentation if this should be supported or\nnot and drivers tested so far don't use it so refuse the parameters\nthat would crash QEMU for now.\n\nSigned-off-by: BALATON Zoltan <balaton@eik.bme.hu>\n---\n hw/display/ati_2d.c | 9 +++++++++\n 1 file changed, 9 insertions(+)","diff":"diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c\nindex 9baf6ff37b..f0f77cecc6 100644\n--- a/hw/display/ati_2d.c\n+++ b/hw/display/ati_2d.c\n@@ -265,6 +265,10 @@ static bool ati_2d_do_blt(ATI2DCtx *ctx, uint8_t use_pixman)\n     {\n         uint32_t filler = 0;\n \n+        if (ctx->bpp == 24) {\n+            qemu_log_mask(LOG_UNIMP, \"Fill blt unsupported in 24 bits\\n\");\n+            return false;\n+        }\n         switch (ctx->rop3) {\n         case ROP3_PATCOPY:\n             filler = make_filler(ctx->bpp, ctx->frgd_clr);\n@@ -362,6 +366,11 @@ bool ati_host_data_flush(ATIVGAState *s)\n \n     setup_2d_blt_ctx(s, &ctx);\n \n+    if (ctx.bpp == 24) {\n+        qemu_log_mask(LOG_UNIMP,\n+                      \"host_data_blt: unsupported in 24 bits mode\\n\");\n+        return false;\n+    }\n     if (!ctx.left_to_right || !ctx.top_to_bottom) {\n         qemu_log_mask(LOG_UNIMP,\n                       \"host_data_blt: unsupported blit direction %c%c\\n\",\n","prefixes":[]}