Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8128699rwp; Wed, 19 Jul 2023 05:48:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlHn9nPkEjkN/E35+XTEoF7lRyPfI2V7yR3bzCwbM1h65tVG8es6VlPj+miydjolEp/OaOzC X-Received: by 2002:a17:906:10cd:b0:993:db29:d27e with SMTP id v13-20020a17090610cd00b00993db29d27emr2377425ejv.25.1689770928896; Wed, 19 Jul 2023 05:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689770928; cv=none; d=google.com; s=arc-20160816; b=ugcNmDiHBQPCzyZaRUZxJ6gjlM9A8tEe4+DHLw/E9Rbyz24lB6laTl828myIFafYz9 XBD1d2GWvmEhWxCH5KE2ImeeiH2nvKKoHUrnUyRetq53ndA1Cq5g9KSqknU0sQ6EuNdb +JWPs0LlgnCE9IC+WNtU64OF41lfdV5gPWLPOfg484lXkY00AMu56qTklOsu4ZIrcmzF XXcaXOFtRca2LZbmp+17SBWiKk+T438MiOXxe+CIf01aRBc+wXcslivZCb/XYNf9mzn+ vfksf+5hcKJpkH8aXpVqMxM1pWgZNqUQ9Pi3YNxKs974ti4qR2BJ02795LUTLJS728uJ 3GJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jS16gYjhPzUeEVnhauc9se+2ahiz7Jh3TVrOoWfSZm0=; fh=4WFkd0SKC531xjglIUi33C1n6bFXFguLuCICsINSE7Y=; b=TAwJEnI8GHVuenZG3nupLG4eTY2nqNsmic1g+3fyJhZ41gV6prgiOYlpIypG4dWkWH aaLwmc4QHYZAEh8o2dyxSvD/ro70biAdMV/5iFrqjre6QfDDmWSLmJS4X/k42u1gDx7m w3+4cXA2MfKn8jAKbfrbdVim3P8YykspdbMio3Im7aIRacpjKFkXf/xl/wkDtRu7lhhn lybRzI8PonifVG4PD64I7pLgPk7q+ABucg8bQQWG8TSo4JkJRCMbQBP17X4K3KO2miRy 9JxmQCtgmAiR3qyyQPt6DlRA5Oc3mtoYsZCXQb05hfE699xiX1NMPcVLTpFgcBwVLqDN H6Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kLu0o+AM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt18-20020a170906b79200b009930c925bd9si2658471ejb.945.2023.07.19.05.48.22; Wed, 19 Jul 2023 05:48:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kLu0o+AM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229761AbjGSMkx (ORCPT + 99 others); Wed, 19 Jul 2023 08:40:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbjGSMkl (ORCPT ); Wed, 19 Jul 2023 08:40:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD47A171A; Wed, 19 Jul 2023 05:40:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 44E2B6163F; Wed, 19 Jul 2023 12:40:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DC10C433C7; Wed, 19 Jul 2023 12:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689770437; bh=VpF6OsRFZPIlruH3a+6MdFFoHowjkcTVP3QV/GMSTJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kLu0o+AM59zDqOSuHvQf1xyyht6DA3UDDCMzWz8oOzgZwgfUqBZah/BCAR6IYAx2G Zovn7/vsuxpAzgzbGPUlv4oXIILODdQ1iQWmupu6B2FjYNoOlKM0BwJqgrfh33SkDV avkW7+6w7HuGQpm0j775UN3Y0NbEQTTz8CjefhtC5WB+IK8I8BajFX7UnXVEqYA6aV nGcCxf0nLaBPIIj7I8+Rn004bgs9Ug5KA6530Q5m8RBKmJjI0LhSkW7TgdCXQ9BzS0 VLKJwrGdui8TogUJYxmulPomi18zSuJD1mkvC33kR3VGy6c19VnjM9GCXn6NTqMK3g 5Nq81f8bKBVHg== From: Arnd Bergmann To: linux-fbdev@vger.kernel.org, Thomas Zimmermann , Helge Deller , Javier Martinez Canillas Cc: Arnd Bergmann , "David S. Miller" , "K. Y. Srinivasan" , Ard Biesheuvel , Borislav Petkov , Brian Cain , Catalin Marinas , Christophe Leroy , Daniel Vetter , Dave Hansen , David Airlie , Deepak Rawat , Dexuan Cui , Dinh Nguyen , Greg Kroah-Hartman , Guo Ren , Haiyang Zhang , Huacai Chen , Ingo Molnar , John Paul Adrian Glaubitz , Khalid Aziz , Linus Walleij , Matt Turner , Max Filippov , Michael Ellerman , Nicholas Piggin , Palmer Dabbelt , Russell King , Thomas Bogendoerfer , Thomas Gleixner , WANG Xuerui , Wei Liu , Will Deacon , x86@kernel.org, linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 3/9] dummycon: limit Arm console size hack to footbridge Date: Wed, 19 Jul 2023 14:39:38 +0200 Message-Id: <20230719123944.3438363-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230719123944.3438363-1-arnd@kernel.org> References: <20230719123944.3438363-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann The dummycon default console size used to be determined by architecture, but now this is a Kconfig setting on everything except ARM. Tracing this back in the historic git trees, this was used to match the size of VGA console or VGA framebuffer on early machines, but nowadays that code is no longer used, except probably on the old footbridge/netwinder since that is the only one that supports vgacon. On machines with a framebuffer, booting with DT so far results in always using the hardcoded 80x30 size in dummycon, while on ATAGS the setting can come from a bootloader specific override. Both seem to be worse choices than the Kconfig setting, since the actual text size for fbcon also depends on the selected font. Make this work the same way as everywhere else and use the normal Kconfig setting, except for the footbridge with vgacon, which keeps using the traditional code. If vgacon is disabled, footbridge can also ignore the setting. This means the screen_info only has to be provided when either vgacon or EFI are enabled now. To limit the amount of surprises on Arm, change the Kconfig default to the previously used 80x30 setting instead of the usual 80x25. Reviewed-by: Thomas Zimmermann Tested-by: Linus Walleij Reviewed-by: Javier Martinez Canillas Signed-off-by: Arnd Bergmann --- arch/arm/kernel/atags_parse.c | 2 +- arch/arm/kernel/setup.c | 3 +-- drivers/video/console/Kconfig | 5 +++-- drivers/video/console/dummycon.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c index 33f6eb5213a5a..4c815da3b77b0 100644 --- a/arch/arm/kernel/atags_parse.c +++ b/arch/arm/kernel/atags_parse.c @@ -69,7 +69,7 @@ static int __init parse_tag_mem32(const struct tag *tag) __tagtable(ATAG_MEM, parse_tag_mem32); -#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) +#if defined(CONFIG_ARCH_FOOTBRIDGE) && defined(CONFIG_VGA_CONSOLE) static int __init parse_tag_videotext(const struct tag *tag) { screen_info.orig_x = tag->u.videotext.x; diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index c66b560562b30..40326a35a179b 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -928,8 +928,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc) request_resource(&ioport_resource, &lp2); } -#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) || \ - defined(CONFIG_EFI) +#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_EFI) struct screen_info screen_info = { .orig_video_lines = 30, .orig_video_cols = 80, diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index 6af90db6d2da9..b575cf54174af 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -52,7 +52,7 @@ config DUMMY_CONSOLE config DUMMY_CONSOLE_COLUMNS int "Initial number of console screen columns" - depends on DUMMY_CONSOLE && !ARM + depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE default 160 if PARISC default 80 help @@ -62,8 +62,9 @@ config DUMMY_CONSOLE_COLUMNS config DUMMY_CONSOLE_ROWS int "Initial number of console screen rows" - depends on DUMMY_CONSOLE && !ARM + depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE default 64 if PARISC + default 30 if ARM default 25 help On PA-RISC, the default value is 64, which should fit a 1280x1024 diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index f1711b2f9ff05..70549fecee12c 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c @@ -18,7 +18,7 @@ * Dummy console driver */ -#if defined(__arm__) +#if defined(CONFIG_ARCH_FOOTBRIDGE) && defined(CONFIG_VGA_CONSOLE) #define DUMMY_COLUMNS screen_info.orig_video_cols #define DUMMY_ROWS screen_info.orig_video_lines #else -- 2.39.2