From nobody Sat Apr 11 20:14:03 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1775675554; cv=none; d=zohomail.com; s=zohoarc; b=WYUeNCv89GJNJKd+iWSqdMDu/OUPlrwuXCBLUiST7L8d/jiNupWEkPAzGfRdqYfE/C04lZ+8TtADoX2WkGGcyiVrY/oq49Z2h9AqWaXEJPTRkg9qIdGhEDfy4co1fORzMWAlAmW67xM3bCLGk9bWyneDqTnBOBBNed4ixoVs8dQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775675554; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=agmdtPgbKNlH9bAAj1AAHRxJL/aBymX0MFrBnGbacuc=; b=cAGrMRiRYRHnDmc6vpM/re7o6to7dKn0oVbFxXI0XhLx4NK4IfAPbalvyID/uq+cja5WgVkznfSXGiFb3i+/pbMUsU4qjVJHBvuLrmLye2yutfZYCWEEz/cZPnH0+Sx1JMPSYaYCuc/VLe6evHr+WFm8XHjM8mtHwW5dzIfQJ5A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775675554784995.6457164920247; Wed, 8 Apr 2026 12:12:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wAYJM-0007x2-DV; Wed, 08 Apr 2026 15:11:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wAYGn-0004S0-AD for qemu-devel@nongnu.org; Wed, 08 Apr 2026 15:08:57 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wAESY-0005Xk-DK for qemu-devel@nongnu.org; Tue, 07 Apr 2026 17:59:47 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-488c2690057so8708595e9.0 for ; Tue, 07 Apr 2026 14:59:46 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488c1c5291esm91154425e9.15.2026.04.07.14.59.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 07 Apr 2026 14:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1775599184; x=1776203984; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=agmdtPgbKNlH9bAAj1AAHRxJL/aBymX0MFrBnGbacuc=; b=NhZ+eN3SWHnww8pIvyqKKOzGUdO1TYrOLkztMddlTxJb87nZJqxhrOZ7T4BezsZRPy kKPXLg5x0U/fk3ClUL9BS15RqyzlEbY3fiSd2FpvV5wrdR/K/0CuUCQLjaWj8kgIGrjo D7zJN3QfK8ylg/mF0yXL47X4gZb4AzvXltoTfs15G/0sCel4y4+ewZSw/m6qMomV/t1P Y5QNecgHT8+3iThfMxTk14sSijkh9me50FgMH0lrYEc6xxA6UY3AaYyMKo24os4ZLZ8+ 2ZVL5gkrL/bxFXB/lLSUfPXmgx4EZNpSp3HHa7LHCLn77sh2eXMDD+Y0MHX8NlPOKbip vsVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775599184; x=1776203984; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=agmdtPgbKNlH9bAAj1AAHRxJL/aBymX0MFrBnGbacuc=; b=nWScz/LP31Je89HRGklS/9S+gMZhByQQ73cpnXP9AOc/WTmoqa2f19XG4ueVQ5SesU DwNyKBSsLdVFwH9gkg9zYeuu6/aGY5jODIJnHtd2MOA6fqT9ATQbToUVEU0JFIDWa+0O /SB+Rm9KWXsVpcDiL+B0uSmlLdNcFeAIYyX7OJl+woqnQRPH8+iGVMfRKBJIhgzP7B1D q6BvJQgyi5Yx1g3mpw5jpDprEIL2Y6TwIjIJRAc0F/FVTKqLTmeP4QYVrM8pGqF9CqUU nubpOrS1Li9M9HFikqNlDsdZJ4CHva40Xk5ssAKKUFXga9DWjmDoF0azYUAKxck0TgIy li6g== X-Gm-Message-State: AOJu0Ywik995ut2tgWmc+Jj3gSExnRUo/cRexjqlsnlFGSsWMKu8a/rf v9JvecPUq5fTMA8KrA0+D4L7l5QpRWFsTeKZkKxKWtNbdZHI84fWDXC+hjyQwloeu/rwDsRD7HO yc4UdT/0= X-Gm-Gg: AeBDiesirp9Zt+YWWslN/nd4OvryRJKB90e/pB3O+0aZYEVPgNG0HuXdo+LDuwFZnH9 b2dYda/GUgqPrOvIHs8O1ibJ1jBEvvKTLGJOutFLEYM0IbV5Om1z/2aXA0LQ/byOvzU5EE8+hkP 6VA2uECxbUMPEG/t8E9gFgxCT4tJd42Gb/VaAf8fu2zA8tJjQLF3A6H0vENGG8kCDcpzPQFg5O/ XRhzToVnyXxKIYQPQUFcwNtT/0abyse+GFK2bywwzHsNKpaX61z+LTL3hisutH8aEq7s4NKf6L4 P+ludPXIWWEckuMOA7KjSHQ9aEyTCIFi6ScmoTT+rOtPwNU6TPkS0X4P5liW4kRNKtUbaFILWwM ou4m9pEZvO1x3K7wj+T+leVl7NxpAmQhJa0Ncmy7hfyl5ayfVK7Ol3w62MiEDNxcySEB3JyJbtL dORPcS+9mBxhE86W5KV+vD20PXohjkovbS4Ix9wt7W40+J7fzc3zJfXxSaSMXTtRR19RoS8ygJ6 A69gYjk5cc= X-Received: by 2002:a05:600c:6286:b0:486:af22:4a2a with SMTP id 5b1f17b1804b1-488996dfebamr259333495e9.7.1775599184543; Tue, 07 Apr 2026 14:59:44 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jamin Lin , Pierrick Bouvier , Fabiano Rosas , Harsh Prateek Bora , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH-for-11.0 6/6] ati-vga: Do not crash on 24 bits per pixel Date: Tue, 7 Apr 2026 23:59:00 +0200 Message-ID: <20260407215900.63390-7-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: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1775675557176154100 From: BALATON Zoltan The stn_he_p function only supports power of two sizes so it will assert if we call it with size 3 that happens with 24 bits per pixel. It's not clear from the documentation if this should be supported or not and drivers tested so far don't use it so refuse the parameters that would crash QEMU for now. Signed-off-by: BALATON Zoltan Reviewed-by: Chad Jablonski Message-ID: <20260406012031.335A0596A24@zero.eik.bme.hu> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/display/ati_2d.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c index 9baf6ff37b0..f0f77cecc65 100644 --- a/hw/display/ati_2d.c +++ b/hw/display/ati_2d.c @@ -265,6 +265,10 @@ static bool ati_2d_do_blt(ATI2DCtx *ctx, uint8_t use_p= ixman) { uint32_t filler =3D 0; =20 + if (ctx->bpp =3D=3D 24) { + qemu_log_mask(LOG_UNIMP, "Fill blt unsupported in 24 bits\n"); + return false; + } switch (ctx->rop3) { case ROP3_PATCOPY: filler =3D make_filler(ctx->bpp, ctx->frgd_clr); @@ -362,6 +366,11 @@ bool ati_host_data_flush(ATIVGAState *s) =20 setup_2d_blt_ctx(s, &ctx); =20 + if (ctx.bpp =3D=3D 24) { + qemu_log_mask(LOG_UNIMP, + "host_data_blt: unsupported in 24 bits mode\n"); + return false; + } if (!ctx.left_to_right || !ctx.top_to_bottom) { qemu_log_mask(LOG_UNIMP, "host_data_blt: unsupported blit direction %c%c\n", --=20 2.53.0