Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2145082rdb; Mon, 9 Oct 2023 14:20:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF724CMTsW70zDhMFk4lRgKETM98Wye0Y8rD+KR61Ico27P2YH5PFy9oM7HmZvLZXkFZIWo X-Received: by 2002:a05:6a00:3a02:b0:68f:bb02:fdf with SMTP id fj2-20020a056a003a0200b0068fbb020fdfmr18612293pfb.27.1696886457813; Mon, 09 Oct 2023 14:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696886457; cv=none; d=google.com; s=arc-20160816; b=jcdKn/kmOdnXumxqc27ubqOPfbRXV4JOpT8QJKslKncE8oxU1nrPPhAYcgi4kNCiUe L58/krctyNFfH/0th5AtQKk3NWYHgznVk5iIC9xyw8Xa5/V9/Z+iPbhZg8ErzRHUSmBk zKsOf7Rd3GmM/6Ei15O+qUHbn4HsNa1F/GCalqkVwCUmuVeL+xSFPdN2KzxS24zgWMHU 8zDmO61IcfOI+mckbpfrt0IgBV+pVhlXN7JzUD8sm7L6wNZfkmRv6evQqzBcutjqrc/E 0/n6LmxhTv4sB71LRMaacF8+T+EaKrenief4M5Wm046i4XzU3dwWtEpIZnm85kKgAGKj XOaQ== 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=1kpCBQORb1P5+GPxgnu2h4y/bSg3elgrJ3GEsxiFAMg=; fh=5rjrd9z1AwCU6K4zctiyztRWfSlrVT4HOR1EMu5XpZI=; b=IbWtSgLYwCG9WnG1K0XIsGF2ewqrCZQxZ+RMaL9AJSoNd4+O2DRkNJRWShg/bjN3eY sa1v//cZy3aZjoKv/brePxn5XBlloZ6dMRpHvLNU7f2dmxj9znwTkKk0D1X1yoXx36r/ unIgQkSrxQVot3rDXSoLXeUV9n/OsDzVJFTG0z5OIclURe/NqGiFbPz0h8fP+94/Phcl PI7jxA4Bsg5HmGrI6Q50ntUJ68AbxjftHO9unpWm/4CK6S10h3gCKQ2vk+rQtCAdizJD 6Km51A7r4e2VjaiNzaN43dFUj+C+1eIt5S2c4HID1T6B5hp9hP3H93W56Fe8bESpCXUh +FlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B5PakbMN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id fa40-20020a056a002d2800b00691023321ebsi8143694pfb.113.2023.10.09.14.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 14:20:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B5PakbMN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 7F5FD80BCEA7; Mon, 9 Oct 2023 14:20:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378792AbjJIVUK (ORCPT + 99 others); Mon, 9 Oct 2023 17:20:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234663AbjJIVTv (ORCPT ); Mon, 9 Oct 2023 17:19:51 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71687111; Mon, 9 Oct 2023 14:19:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F3F9C43395; Mon, 9 Oct 2023 21:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696886380; bh=uv5PTEar9IGaTmZ+Pn40pjQ09jkhWdf7PdXGXIEpx7c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B5PakbMNLhHZDv7DV3348t2Fbm4wnh46+GGLfgibxgl8s1+tQjFDsWVu/yC42x/+f p4V3KHJTUqxTWptLv89U/Zu3V1znVY1VRG2vR6Ef+IY0mBUXh5FvOEthG+TT+tfint XGoJO8ORRNT0qHLajaPszCk8aa+1/deONGsbBMwMm37pMhUAnqhW6uFMFOP52D26bj K8jjFrhNqQI/vxUdoNzYa+rpM2JxUKDh9hbSqBKAid2MpFRphHgkXHfhSSfuwJYtkV 1aEl+NwsoRuuceAjOAdxrPDdaJsdVQ/pFJrlFRgU5iKXsO/qjTsDIjjOiKB2+EXL5/ PURJydjgM7lcw== From: Arnd Bergmann To: Thomas Zimmermann , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org 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 , Helge Deller , Huacai Chen , Ingo Molnar , Javier Martinez Canillas , 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 Subject: [PATCH v3 3/9] dummycon: limit Arm console size hack to footbridge Date: Mon, 9 Oct 2023 23:18:39 +0200 Message-Id: <20231009211845.3136536-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231009211845.3136536-1-arnd@kernel.org> References: <20231009211845.3136536-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 09 Oct 2023 14:20:26 -0700 (PDT) X-Spam-Level: ** 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 Acked-by: Helge Deller 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 f474e7dbbe053..5e965cb94dd66 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 cbf303d76d39b..83c2d7329ca58 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