{"id":2196465,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2196465/?format=json","project":{"id":69,"url":"http://patchwork.ozlabs.org/api/1.0/projects/69/?format=json","name":"QEMU powerpc development","link_name":"qemu-ppc","list_id":"qemu-ppc.nongnu.org","list_email":"qemu-ppc@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260214021240.58657-7-philmd@linaro.org>","date":"2026-02-14T02:12:37","name":"[6/8] hw/sparc: Set graphic display dimensions generically","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"826dfd1ce47d6e4055576a2a5548bb89b628041f","submitter":{"id":85046,"url":"http://patchwork.ozlabs.org/api/1.0/people/85046/?format=json","name":"Philippe Mathieu-Daudé","email":"philmd@linaro.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-ppc/patch/20260214021240.58657-7-philmd@linaro.org/mbox/","series":[{"id":492153,"url":"http://patchwork.ozlabs.org/api/1.0/series/492153/?format=json","date":"2026-02-14T02:12:32","name":"system: Absorb globals-target.c within common globals.c","version":1,"mbox":"http://patchwork.ozlabs.org/series/492153/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2196465/checks/","tags":{},"headers":{"Return-Path":"<qemu-ppc-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=oKRQMkC8;\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-ppc-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 4fCXfK2b4Zz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 13:14:17 +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-ppc-bounces@nongnu.org>)\n\tid 1vr5A6-0003o7-1Q; Fri, 13 Feb 2026 21:13:34 -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 <philmd@linaro.org>) id 1vr5A4-0003nZ-Dp\n for qemu-ppc@nongnu.org; Fri, 13 Feb 2026 21:13:32 -0500","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 1vr5A2-0004ca-T3\n for qemu-ppc@nongnu.org; Fri, 13 Feb 2026 21:13:32 -0500","by mail-wm1-x336.google.com with SMTP id\n 5b1f17b1804b1-4806e0f6b69so11912545e9.3\n for <qemu-ppc@nongnu.org>; Fri, 13 Feb 2026 18:13:30 -0800 (PST)","from localhost.localdomain (88-187-86-199.subs.proxad.net.\n [88.187.86.199]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-48370a41be2sm50789865e9.1.2026.02.13.18.13.28\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Fri, 13 Feb 2026 18:13:28 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1771035209; x=1771640009; 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=ZOdWgV2/IOn9a1EHv9glZetOs4gjLWtVaCBAgnLarRY=;\n b=oKRQMkC8n8hUD50KRmgWRsWnysiK31Pu9E+MPYsSpZi2fYbhwtp9DxgqHTztEsfgdj\n lUi0krpYACm5rgegDAyqiLNE/0MSa6ND+NXKje5/AkUt0GL14j6WVzAqJT7D4ZPLedr2\n DwLQRdbxEQwqqf3JNnk9mhz+lcwWR4VVb4xeVdGHSWgeSZtR7VQ5s/xjE3Pjw24yz4FO\n P//0IwxsRzgnLij6AFpGkGQgH+aDICrZN7J3fcvC3HntSIBKKVVCGsiVPwiliBPtti67\n hGGZJ8l7fobDVR29o91aJEU2UlDeRklJVNJrVYNWHrr0zFBuESFQdzrCEdqXzu0Bc2AT\n MYxA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771035209; x=1771640009;\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=ZOdWgV2/IOn9a1EHv9glZetOs4gjLWtVaCBAgnLarRY=;\n b=oC9VcSgBKc1Ej1MVCmefljlMMGbk3EmFczPxk1xrsaZNnZO6DmqIFf3t2E8s+ITsqT\n Hu6XIzeeNppnDU8os0CNafnsuwT1YaVwAqOhJgJE7n2rw9JZpRoameDPWXoWeMNgHs/G\n MwjXuHNndRHheXhszGyUVJve6tWQKffmAaaP6XibLu7xIlJrO9e3+CowHBTDiwMGKbVZ\n SfTltYWovzTGNpvu/IKa7hhPiIzKmvC646ZF5TKI5R0mkQXNXfLXFlWx7vGPI5wOnXYa\n iLok/5ri6BrdDt+e841PUnSJIpBGDfR5wIlHg2b9xvlNxjh081uERpk93HpB59IpNkGF\n FNfg==","X-Forwarded-Encrypted":"i=1;\n AJvYcCXDzmN4uxKYpMQ/JU/Kt/Ffkutm4015c3FYAZu1+zd/6aTvKSbKuoBlRhaUdxDf5S3g65Mf8JgtHw==@nongnu.org","X-Gm-Message-State":"AOJu0YzIzMDjYej7hhycWfxVTzx50GGaBoc+JS+lJXc2HcDG4/tecZt4\n QfJMmaPixjxsgwJ3Y40A9A3ihA2m0ul4/9CQ3KxQZv3X6osvALiT3ie8WFBb9U+R3Ac=","X-Gm-Gg":"AZuq6aJ76xG3JQ7UrXfidy7TaZFTX6V73tXDT7NO8c35PUzO39raQ3SgoL+vcZYtUIZ\n QS/Ita5ihB/BAkYNLhccbCpzI/Qri4RnwcsuHnyZUtqCyOQfloLQ6iRzmKFhZSqRdMxWEjCZcDD\n v+EFJ/zYA4KUDddCDXLVtEA257sZ2VZt0RwjgwAAGlypj1shwGSX4pzYQbfltKXDuwJdmo9nNfO\n 9bSMczvdY8kzJbSkG8e0hI6C8AhYw7kpcChnuk4ci5S+XiMMR0hga5/1cZCIyjxUiIKR+SVSVC5\n +JWDmaR35FphlX8D/XzOJ9i+LuBC4AXltYxPk+putIUoFhQUhySiJlt7SZcwj55Pf88uj+zHar6\n NFjK/pRsFYCnvVWQiI2IYfEys/otS0oiOANabB+xgnULeIr53ZLmJfWm1GQtxI/76t/O88ek2Fh\n 3WIHSFY6DVkFPUTnjzHIvGcp6mpICF2V/6lJvh5OzBs3z0KH0746O7u3QJGbNkxieMIs2Wg7p+B\n XNaFpdTogQ=","X-Received":"by 2002:a05:600c:468d:b0:47e:e20e:bbb4 with SMTP id\n 5b1f17b1804b1-4837108fcf1mr80633225e9.26.1771035209399;\n Fri, 13 Feb 2026 18:13:29 -0800 (PST)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>","To":"qemu-devel@nongnu.org","Cc":"Chinmay Rath <rathc@linux.ibm.com>,\n =?utf-8?q?Herv=C3=A9_Poussineau?= <hpoussin@reactos.org>,\n Harsh Prateek Bora <harshpb@linux.ibm.com>,\n Nicholas Piggin <npiggin@gmail.com>, Artyom Tarasenko <atar4qemu@gmail.com>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>, qemu-ppc@nongnu.org,\n Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n Laurent Vivier <laurent@vivier.eu>,\n =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>","Subject":"[PATCH 6/8] hw/sparc: Set graphic display dimensions generically","Date":"Sat, 14 Feb 2026 03:12:37 +0100","Message-ID":"<20260214021240.58657-7-philmd@linaro.org>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20260214021240.58657-1-philmd@linaro.org>","References":"<20260214021240.58657-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-ppc@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<qemu-ppc.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-ppc>,\n <mailto:qemu-ppc-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-ppc>","List-Post":"<mailto:qemu-ppc@nongnu.org>","List-Help":"<mailto:qemu-ppc-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-ppc>,\n <mailto:qemu-ppc-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"If a dimension is not set, have the machine init code\nset the default value.\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\n---\n hw/sparc/sun4m.c        |  9 +++++++++\n hw/sparc64/sun4u.c      | 10 ++++++++++\n system/globals-target.c |  6 +-----\n 3 files changed, 20 insertions(+), 5 deletions(-)","diff":"diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c\nindex 0c0d658d301..a17bdb36927 100644\n--- a/hw/sparc/sun4m.c\n+++ b/hw/sparc/sun4m.c\n@@ -892,6 +892,15 @@ static void sun4m_hw_init(MachineState *machine)\n                      hwdef->esp_base, slavio_irq[18],\n                      hwdef->le_base, slavio_irq[16], &hostid);\n \n+    if (!graphic_width) {\n+        graphic_width = 1024;\n+    }\n+    if (!graphic_height) {\n+        graphic_height = 768;\n+    }\n+    if (!graphic_depth) {\n+        graphic_depth = 8;\n+    }\n     if (graphic_depth != 8 && graphic_depth != 24) {\n         error_report(\"Unsupported depth: %d\", graphic_depth);\n         exit (1);\ndiff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c\nindex 5d7787fc1a5..b8bda1eb816 100644\n--- a/hw/sparc64/sun4u.c\n+++ b/hw/sparc64/sun4u.c\n@@ -666,6 +666,16 @@ static void sun4uv_init(MemoryRegion *address_space_mem,\n                                 sysbus_mmio_get_region(s, 0));\n     nvram = NVRAM(dev);\n  \n+    if (!graphic_width) {\n+        graphic_width = 1024;\n+    }\n+    if (!graphic_height) {\n+        graphic_height = 768;\n+    }\n+    if (!graphic_depth) {\n+        graphic_depth = 8;\n+    }\n+\n     initrd_size = 0;\n     initrd_addr = 0;\n     kernel_size = sun4u_load_kernel(machine->kernel_filename,\ndiff --git a/system/globals-target.c b/system/globals-target.c\nindex e3f7d846ac0..17a27a06218 100644\n--- a/system/globals-target.c\n+++ b/system/globals-target.c\n@@ -9,11 +9,7 @@\n #include \"qemu/osdep.h\"\n #include \"system/system.h\"\n \n-#ifdef TARGET_SPARC\n-int graphic_width = 1024;\n-int graphic_height = 768;\n-int graphic_depth = 8;\n-#elif defined(TARGET_M68K)\n+#if defined(TARGET_SPARC) || defined(TARGET_M68K)\n int graphic_width;\n int graphic_height;\n int graphic_depth;\n","prefixes":["6/8"]}