{"id":2197033,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2197033/?format=json","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.0/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":""},"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-devel/patch/20260216213121.47122-7-philmd@linaro.org/mbox/","series":[{"id":492356,"url":"http://patchwork.ozlabs.org/api/1.0/series/492356/?format=json","date":"2026-02-16T21:31:14","name":"system: Absorb globals-target.c within common globals.c","version":2,"mbox":"http://patchwork.ozlabs.org/series/492356/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2197033/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=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-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 4fFGG42jYSz1xwC\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 08:32:44 +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-devel-bounces@nongnu.org>)\n\tid 1vs6Cs-0002GH-UM; Mon, 16 Feb 2026 16:32:39 -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-00016f-SG\n for qemu-devel@nongnu.org; Mon, 16 Feb 2026 16:32:24 -0500","from mail-wm1-x334.google.com ([2a00:1450:4864:20::334])\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-00044P-9L\n for qemu-devel@nongnu.org; Mon, 16 Feb 2026 16:32:11 -0500","by mail-wm1-x334.google.com with SMTP id\n 5b1f17b1804b1-48378136adcso18390125e9.1\n for <qemu-devel@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=gXg0pbW/nd6F6mHbzRgFMRHiQvnmJcpKvZNi10O1ElhUnlldGf5EodB1AYn6dzE5OJ\n DholMtUI6LOmaO/oMeLby2ZGuugulkdJfMq4U2XUU7GQtIVAqM7Y5zsjKZoyi1J/g4hy\n pObAfK8CTNxVeZlbqISVGz7gJJKER3/4poypCl/Z1jo2dFT070/nW3aXVGE+YOE0mdz9\n k7fjBJeMnsOi/4IAEBZ17UbTjxKzN4MKvY59GF9axv5txyXGcm/KKrMDj18/2Ycw8JOF\n 812MAAmLWMrUGQsYsmG68fr3R48lZrwXMcmX+PEU5+z/SzB/FkQlP9AFP5U/+Klju89B\n n0jw==","X-Gm-Message-State":"AOJu0YwMetkwLHIBljvaHae2PYRW6XJ48j4OgrKLnfVXpceOp7JSp/3R\n GUr+WfmBFSK68t8MoiBaabOLqBn7qB2Ab9qdlqVYRCf18s6Mue6OcMl2MjRzltD64BRwWsB5kgA\n xWXlPlnQ=","X-Gm-Gg":"AZuq6aK2Duf0AUv5hPmeYKcJZ2KcJHIDBB9GwsXG/tFAsy2p9imObxgQqA8Nwh8zrG4\n s/K9JbTVWEj+nnGASPdH7x0Pzg8wLOukyAVLZjiBNvAXfqtCye0j230CJHBGpQgpR+h95rsSKBe\n zvH62Eqe5iOBtRRq3gZQxA6nJROqNlxNLUu3csy0PZjAfETQn4m6vHGWFdwsvUb8WI6YuMPKz0c\n EuSNPPwfrX5vAKdwgG73HkLix/X0+a+j2IJHwtzkQqId7IyVDTFtGzQkoS6f7w8cgngd9RuTmYL\n hdDSSKcAxPtswqA8KT3Ts00RupItIrknah/uJb/A7ojmuMZu0QjOqi1ZSSzveE3TO2ie6z6mPbV\n GHVCuty2P4MKb/pMHuypam+3JM2x44o8Kay+xQKWeLapQ8sHjjDtR33FttSngjDgqPnxGH4mNzJ\n AXu0httm242X3BvCUjBarHYF0gzH7gVDMuvWOsi5tKCQuE7QoiWAJrpO9eeoCFZu7HgWv8hlNY","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::334;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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-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":"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"]}