Message ID | 20230719123944.3438363-2-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2417219vqt; Wed, 19 Jul 2023 05:58:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlEpw565lJUCD65LI1YQGHLyCnC7E2rU4qepRk2J4kadE7k2PhLLJtCuCCZWC3O9RccZmNMx X-Received: by 2002:aa7:d615:0:b0:51e:1643:5ad0 with SMTP id c21-20020aa7d615000000b0051e16435ad0mr2490371edr.8.1689771508258; Wed, 19 Jul 2023 05:58:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689771508; cv=none; d=google.com; s=arc-20160816; b=FztmSrcEljdDY5JNRAmRf1FYrGo5wa84VrP+zm1bgxTmDOxN9nmLzqqDBNKXcC2XRC hM27N5RD1UOtV0N9FyPpH5ZU1zZlUXa8L4C+KQP6crs3s42IC8Gd1lCdLWv7tOSu0TzV kT7NeB4GdpvWHCFEK5/pt7UfJ38FgpCsB2LKJl2bXT+oJVg5AbMOvVJAvah2TDuRYVJL Qzy8tRXtVfHaHcxAaBpOk2HBnX2NEbGBtXa9lt7a6nl1diBU+CGCdHNZ+jc036K4a9q2 1p7ALaajkyxhRIcGQqUoP4gJgKhJrOPqFSMyLNIjLHdcEQDDX7PR2Q4i3KExtfbr3oiI HmOA== 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=B5PJfXzia2A2Q+HTsWHVf9AO+h0BAIdhIjCOyGJuJ3I=; fh=4WFkd0SKC531xjglIUi33C1n6bFXFguLuCICsINSE7Y=; b=UxsCAg+CNH9PzWBMra1qn4Vaog8p4GOLiinJGGKBE5qX66FIZ84wOoAwAMQ1DrsJR7 dn4LwLUO/5WZotZC0DTurgRoFrmoCVTc1ME8x8wHwPVz/+o1N7KiD/tPEH+Jvs7sMIWU AkDf9IipWwHWaAk5lRc05SSKvwHC6mDC8k/T4WVB2qMlcoM8mmkn/LGFdtIqOd9cFyY9 cp4UjSVMkpg7rEl1niDLf67syTUdI2DUxysmHZZc1j4fY1hlmeCD5xicj9eYJIXcOh/9 P6nXKS2HGKtwg+nw3D7R7qG2k3ZCmW/9I5GJURwRFOJisnA/vAX9VBtYvBIIGjQY6phi hi9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kdnJnXZB; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m15-20020aa7c48f000000b0051ddf359991si2959959edq.344.2023.07.19.05.58.03; Wed, 19 Jul 2023 05:58:28 -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=kdnJnXZB; 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 S229804AbjGSMkY (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Wed, 19 Jul 2023 08:40:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229933AbjGSMkT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Jul 2023 08:40:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BD7E172A; Wed, 19 Jul 2023 05:40:17 -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 8D08061638; Wed, 19 Jul 2023 12:40:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91CEEC433C7; Wed, 19 Jul 2023 12:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689770415; bh=2Mh2IaKPPNhzRZYphoca+mrfCEIgr8Qop4RzoTlfeXY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kdnJnXZBopbW8ulNYqpU/DMRLnFvRdebMFTyM5ZbUz9uphIDnfM1bwXcJy4q98hV1 YvkNVBvKC8yohU9kFV2O9rZzsV6BHo+Gp7r57jtuzwT2EGjbSI3SGel3uViBRPEhBb ip/PIfXyASkYOykVmYw18TlYUqquf6JTgcIuRtHIZikFIK7mW6+f54j0fN2gBg6Mo9 33y9RPC8lI3s6GaxlRiG4j0ziax6mnCs9g+lTmKKsuJzAhAhhCpC6roDYXyvQfy8DJ QnH2m6TVUl1aV/rdXInE2gIEgG+xSamAjI3mkmHoaGPYauUBjJf5u1R0YwiqgRL3Hb 2sr2V6misyjqQ== From: Arnd Bergmann <arnd@kernel.org> To: linux-fbdev@vger.kernel.org, Thomas Zimmermann <tzimmermann@suse.de>, Helge Deller <deller@gmx.de>, Javier Martinez Canillas <javierm@redhat.com> Cc: Arnd Bergmann <arnd@arndb.de>, "David S. Miller" <davem@davemloft.net>, "K. Y. Srinivasan" <kys@microsoft.com>, Ard Biesheuvel <ardb@kernel.org>, Borislav Petkov <bp@alien8.de>, Brian Cain <bcain@quicinc.com>, Catalin Marinas <catalin.marinas@arm.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, Daniel Vetter <daniel@ffwll.ch>, Dave Hansen <dave.hansen@linux.intel.com>, David Airlie <airlied@gmail.com>, Deepak Rawat <drawat.floss@gmail.com>, Dexuan Cui <decui@microsoft.com>, Dinh Nguyen <dinguyen@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Guo Ren <guoren@kernel.org>, Haiyang Zhang <haiyangz@microsoft.com>, Huacai Chen <chenhuacai@kernel.org>, Ingo Molnar <mingo@redhat.com>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, Khalid Aziz <khalid@gonehiking.org>, Linus Walleij <linus.walleij@linaro.org>, Matt Turner <mattst88@gmail.com>, Max Filippov <jcmvbkbc@gmail.com>, Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>, Palmer Dabbelt <palmer@dabbelt.com>, Russell King <linux@armlinux.org.uk>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Thomas Gleixner <tglx@linutronix.de>, WANG Xuerui <kernel@xen0n.name>, Wei Liu <wei.liu@kernel.org>, Will Deacon <will@kernel.org>, 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 1/9] vgacon: rework Kconfig dependencies Date: Wed, 19 Jul 2023 14:39:36 +0200 Message-Id: <20230719123944.3438363-2-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771853849288773959 X-GMAIL-MSGID: 1771853849288773959 |
Series |
video: screen_info cleanups
|
|
Commit Message
Arnd Bergmann
July 19, 2023, 12:39 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> The list of dependencies here is phrased as an opt-out, but this is missing a lot of architectures that don't actually support VGA consoles, and some of the entries are stale: - powerpc used to support VGA consoles in the old arch/ppc codebase, but the merged arch/powerpc never did - arm lists footbridge, integrator and netwinder, but netwinder is actually part of footbridge, and integrator does not appear to have an actual VGA hardware, or list it in its ATAG or DT. - mips has a few platforms (malta, sibyte, and sni) that initialize screen_info, on everything else the console is selected but cannot actually work. - csky, hexgagon, loongarch, nios2, riscv and xtensa are not listed in the opt-out table and declare a screen_info to allow building vga_con, but this cannot work because the console is never selected. Replace this with an opt-in table that lists only the platforms that remain. This is effectively x86, plus a couple of historic workstation and server machines that reused parts of the x86 system architecture. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/video/console/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On 7/19/23 6:39 AM, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > The list of dependencies here is phrased as an opt-out, but this is missing > a lot of architectures that don't actually support VGA consoles, and some > of the entries are stale: > > - powerpc used to support VGA consoles in the old arch/ppc codebase, but > the merged arch/powerpc never did > > - arm lists footbridge, integrator and netwinder, but netwinder is actually > part of footbridge, and integrator does not appear to have an actual > VGA hardware, or list it in its ATAG or DT. > > - mips has a few platforms (malta, sibyte, and sni) that initialize > screen_info, on everything else the console is selected but cannot > actually work. > > - csky, hexgagon, loongarch, nios2, riscv and xtensa are not listed > in the opt-out table and declare a screen_info to allow building > vga_con, but this cannot work because the console is never selected. > > Replace this with an opt-in table that lists only the platforms that > remain. This is effectively x86, plus a couple of historic workstation > and server machines that reused parts of the x86 system architecture. > > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> > Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Khalid Aziz <khalid@gonehiking.org> > --- > drivers/video/console/Kconfig | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig > index 1b5a319971ed0..6af90db6d2da9 100644 > --- a/drivers/video/console/Kconfig > +++ b/drivers/video/console/Kconfig > @@ -7,9 +7,9 @@ menu "Console display driver support" > > config VGA_CONSOLE > bool "VGA text console" if EXPERT || !X86 > - depends on !4xx && !PPC_8xx && !SPARC && !M68K && !PARISC && !SUPERH && \ > - (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \ > - !ARM64 && !ARC && !MICROBLAZE && !OPENRISC && !S390 && !UML > + depends on ALPHA || IA64 || X86 || \ > + (ARM && ARCH_FOOTBRIDGE) || \ > + (MIPS && (MIPS_MALTA || SIBYTE_BCM112X || SIBYTE_SB1250 || SIBYTE_BCM1x80 || SNI_RM)) > select APERTURE_HELPERS if (DRM || FB || VFIO_PCI_CORE) > default y > help
Arnd Bergmann <arnd@kernel.org> writes: > From: Arnd Bergmann <arnd@arndb.de> > > The list of dependencies here is phrased as an opt-out, but this is missing > a lot of architectures that don't actually support VGA consoles, and some > of the entries are stale: > > - powerpc used to support VGA consoles in the old arch/ppc codebase, but > the merged arch/powerpc never did Not disputing this, but how did you come to that conclusion? I grepped around and couldn't convince myself whether it can work on powerpc or not. ie. currently it's possible to enable CONFIG_VGA_CONSOLE and powerpc does have a struct screen_info defined which seems like it would allow vgacon_startup() to complete. My only concern is that someone could be using it with Qemu? cheers
On Fri, Jul 21, 2023, at 06:59, Michael Ellerman wrote: > Arnd Bergmann <arnd@kernel.org> writes: >> From: Arnd Bergmann <arnd@arndb.de> >> >> The list of dependencies here is phrased as an opt-out, but this is missing >> a lot of architectures that don't actually support VGA consoles, and some >> of the entries are stale: >> >> - powerpc used to support VGA consoles in the old arch/ppc codebase, but >> the merged arch/powerpc never did > > Not disputing this, but how did you come to that conclusion? I grepped > around and couldn't convince myself whether it can work on powerpc or > not. ie. currently it's possible to enable CONFIG_VGA_CONSOLE and > powerpc does have a struct screen_info defined which seems like it would > allow vgacon_startup() to complete. The VGA console needs both screen_info and vga_con to work. In arch/ppc we had both, but in arch/powerpc we only retained the screen_info: $ git grep vga_con v2.6.26 -- arch/ppc arch/ppc64 arch/powerpc v2.6.26:arch/ppc/platforms/pplus.c: conswitchp = &vga_con; v2.6.26:arch/ppc/platforms/prep_setup.c: conswitchp = &vga_con; so after arch/ppc was removed, this became impossible to use on both pplus and prep. These two platforms were also (as far as I can tell) the only ones to support vga16fb as an alternative to vgacon, but both platforms were removed later on. > My only concern is that someone could be using it with Qemu? I have not yet ruled out anyone using vga16fb on qemu before commit 0db5b61e0dc07 ("fbdev/vga16fb: Create EGA/VGA devices in sysfb code"), but I can see that this has been broken for 12 months without anyone complaining about it, since vga16fb no longer works with the "orig_video_isVGA == 1" setting in arch/powerpc (the device is not created). In the qemu sources, I see five powerpc machines that intialize VGA support: mac_newworld, mac_oldworld, pegasos2, prep, and spapr. I think we can exclude prep (which was removed from the kernel) and spapr (64-bit VGA_MAP_MEM() looks broken). I think the macs always come up in graphical mode and only use offb/atifb/rivafb/matroxfb but not vga16fb that would require running the x86 VGA BIOS initialization. I suppose it's possible to use vga16fb (not vgacon) with "qemu-system-ppc -M pegasos2 -vga std" if that still boots at all. Support for pegasos2 hardware appears to have been removed with commit 04debf21fa174 ("powerpc: Remove core support for Marvell mv64x60 hostbridges"), but it's possible that this did not break qemu support if that only uses devices under arch/powerpc/platforms/chrp/pci.c. I could not get it to boot, but did not try very hard. Arnd
Hi Arnd, On Fri, Jul 21, 2023 at 10:29 AM Arnd Bergmann <arnd@arndb.de> wrote: > On Fri, Jul 21, 2023, at 06:59, Michael Ellerman wrote: > > Arnd Bergmann <arnd@kernel.org> writes: > >> From: Arnd Bergmann <arnd@arndb.de> > >> > >> The list of dependencies here is phrased as an opt-out, but this is missing > >> a lot of architectures that don't actually support VGA consoles, and some > >> of the entries are stale: > >> > >> - powerpc used to support VGA consoles in the old arch/ppc codebase, but > >> the merged arch/powerpc never did > > > > Not disputing this, but how did you come to that conclusion? I grepped > > around and couldn't convince myself whether it can work on powerpc or > > not. ie. currently it's possible to enable CONFIG_VGA_CONSOLE and > > powerpc does have a struct screen_info defined which seems like it would > > allow vgacon_startup() to complete. > > The VGA console needs both screen_info and vga_con to work. In arch/ppc > we had both, but in arch/powerpc we only retained the screen_info: > > $ git grep vga_con v2.6.26 -- arch/ppc arch/ppc64 arch/powerpc > v2.6.26:arch/ppc/platforms/pplus.c: conswitchp = &vga_con; > v2.6.26:arch/ppc/platforms/prep_setup.c: conswitchp = &vga_con; > > so after arch/ppc was removed, this became impossible to use on both > pplus and prep. These two platforms were also (as far as I can tell) > the only ones to support vga16fb as an alternative to vgacon, but > both platforms were removed later on. I did use vgacon and vga16fb on CHRP on a second video card (initialized using Gabriel Paubert's x86 BIOS emulator), but that was definitely before the advent of arch/powerpc/. Gr{oetje,eeting}s, Geert
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index 1b5a319971ed0..6af90db6d2da9 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -7,9 +7,9 @@ menu "Console display driver support" config VGA_CONSOLE bool "VGA text console" if EXPERT || !X86 - depends on !4xx && !PPC_8xx && !SPARC && !M68K && !PARISC && !SUPERH && \ - (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \ - !ARM64 && !ARC && !MICROBLAZE && !OPENRISC && !S390 && !UML + depends on ALPHA || IA64 || X86 || \ + (ARM && ARCH_FOOTBRIDGE) || \ + (MIPS && (MIPS_MALTA || SIBYTE_BCM112X || SIBYTE_SB1250 || SIBYTE_BCM1x80 || SNI_RM)) select APERTURE_HELPERS if (DRM || FB || VFIO_PCI_CORE) default y help