{"id":2197046,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2197046/?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":"<20260216213121.47122-7-philmd@linaro.org>","date":"2026-02-16T21:31:19","name":"[v2,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/20260216213121.47122-7-philmd@linaro.org/mbox/","series":[{"id":492354,"url":"http://patchwork.ozlabs.org/api/1.0/series/492354/?format=json","date":"2026-02-16T21:31:13","name":"system: Absorb globals-target.c within common globals.c","version":2,"mbox":"http://patchwork.ozlabs.org/series/492354/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2197046/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=utzVSv5s;\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 4fFGGq2BmXz1xwC\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 08:33:23 +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 1vs6Cr-00025w-En; Mon, 16 Feb 2026 16:32:37 -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 1vs6CR-00016e-Qn\n for qemu-ppc@nongnu.org; Mon, 16 Feb 2026 16:32:24 -0500","from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b])\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 1vs6CQ-00044F-94\n for qemu-ppc@nongnu.org; Mon, 16 Feb 2026 16:32:11 -0500","by mail-wm1-x32b.google.com with SMTP id\n 5b1f17b1804b1-48372efa020so25336755e9.2\n for <qemu-ppc@nongnu.org>; Mon, 16 Feb 2026 13:32:09 -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-48371a3f835sm91275755e9.25.2026.02.16.13.32.06\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Mon, 16 Feb 2026 13:32:07 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1771277528; x=1771882328; 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=pMtVGcZy0xyurJAQ1/i7z0i0Ln6l5I0t8FfNIVKbubI=;\n b=utzVSv5s5IquZl2aUXN35VMXZ930vmTL4geek7Lmj/QudWiyMpOc0/nVOqscWM6GCa\n MNgePc7XrjgNqS2iVKiKy3BornpJHwXwCyO0YA4SpQ6ur6zgB55W5qmmW8VnDsqnlYHj\n hWFP7FksyvDxPRMlxAXAiOCu7lAVMRPqeCIGelImkG7r8q9p2r1Oc4DILz+N7E1qP2c4\n F9Dcl7g9DwnY/rg1GMplOlT4+B6fULr1QlaPROahm3Lbzsk4netq7mgQXNYWqZl0aa3W\n HSJtkn9H9E9R35MuU/ILfdXzdluZB343y6ZDXdaew2uwV9uzxS3PVyBMT8r8Mn3VR9tN\n gkgg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771277528; x=1771882328;\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=pMtVGcZy0xyurJAQ1/i7z0i0Ln6l5I0t8FfNIVKbubI=;\n b=GTzkcbUHjyHPXadfg5C6iRk/88JyDAEYDObKp0MWhfRLuCsgRhKXEeThOY0i+B1tJ7\n fQqHP/fcn96HI59JpLyBGeGQILVYMCBH4c+ID6yVHsz73jVYcTQSKKl6O5v1C5bJB99v\n mvKyRqGADqvmH1wscKPLMeDL6eUfpwUF+3Bd1aEijD5xJ5qaZ8wneuHqDYvF0tUBqxWL\n VP8uDvOpwKKv8RuXQ8QgyoclQDmlxBN7IuHUEhjVooBm5bRLyDVdidwaHZuV48g8THqH\n SITaO1/Hgs5B5cXYg18EChM6fKh53xUuwrTC2qAhLK2d+Ja6Pa6spXfJooDNe7Olcp1h\n 5V3Q==","X-Forwarded-Encrypted":"i=1;\n AJvYcCUh8IhJ3ckNPK7Auq+eUe2yvwhJjjDrsF6Fl3LQCkfvH7TCj89/sgZhpnfKLR2qnMpAD3/mQF6MBg==@nongnu.org","X-Gm-Message-State":"AOJu0Yyiqa/3lWD8aqKUfeYqvO1i5AiEsh3VZjK7vrzeCFAptAFP/wBM\n cPKZeZkv26idsYnzsFeUXu8E4v0aH27J7Ts1kqQF1LKNJwzuTTLCbzAed9g0rrgfzBw=","X-Gm-Gg":"AZuq6aLm5GSuuI/kJcg197p/NMqcsDNYoZfvC1DCUHQ8jUbQg5MGlGl25Uut+YHUw1A\n WcL/NVjifYf1/jhr5/5DgMxX+m7QaLEGDoD8+jUxWJTlfsmdXqKcMRTiahlQSUIvKE/Q+eHd02q\n Syr7Pni68DtFkPCHl46kMAMCEPNAYZffNOP/MPjTFPLHCrkXOEaTBdYKgYGEqpl/BTJvta0uJf7\n v6G41SAV09STojJg6fOhWZAK79zHlZkMqQFa63Fgn+eXjoZDRwZkRCl/WjTlECFJcETplb6wdEX\n qIV994/gj9wHvyDMOPilihzpzhZmS+tn51aw5q9IlGHsj5U2N8s+B66Oo2sxQn/aiKVlNSdkDp4\n 9r/eOL2Ak++g5gXCkWehU9+3ONe14r15Sf5qF2VgojntOpaQxNu0KdCXyZnwuCt0wzFjBemf9sC\n pI0yJtGzbqdZNMaWJH3iQre5sg8wjtlBtWB7VhLfl7QvrIolffJjlIPa6gWa6Wv5Sp/sZONKxN","X-Received":"by 2002:a05:600c:3e06:b0:482:e5d4:b7ca with SMTP id\n 5b1f17b1804b1-48379bac81dmr147236465e9.8.1771277528002;\n Mon, 16 Feb 2026 13:32:08 -0800 (PST)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>","To":"qemu-devel@nongnu.org","Cc":"Nicholas Piggin <npiggin@gmail.com>,\n =?utf-8?q?Herv=C3=A9_Poussineau?= <hpoussin@reactos.org>,\n Paolo Bonzini <pbonzini@redhat.com>, Chinmay Rath <rathc@linux.ibm.com>,\n Artyom Tarasenko <atar4qemu@gmail.com>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>,\n Laurent Vivier <laurent@vivier.eu>, qemu-ppc@nongnu.org,\n Harsh Prateek Bora <harshpb@linux.ibm.com>,\n Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, =?utf-8?q?Philippe_Mathie?=\n\t=?utf-8?q?u-Daud=C3=A9?= <philmd@linaro.org>","Subject":"[PATCH v2 6/8] hw/sparc: Set graphic display dimensions generically","Date":"Mon, 16 Feb 2026 22:31:19 +0100","Message-ID":"<20260216213121.47122-7-philmd@linaro.org>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20260216213121.47122-1-philmd@linaro.org>","References":"<20260216213121.47122-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::32b;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 values.\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nReviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>\nReviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>\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":["v2","6/8"]}