From patchwork Wed Jul 19 12:39:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 122600 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2409094vqt; Wed, 19 Jul 2023 05:43:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlE6hMS/gpqbMstd/wp1Jr6kNngQ0NYbBBl7+pZH7kCPP6utSRgEJp9Bub26Hxip7cyh2eAS X-Received: by 2002:a17:907:3fa7:b0:992:7594:e6b2 with SMTP id hr39-20020a1709073fa700b009927594e6b2mr2221258ejc.77.1689770597868; Wed, 19 Jul 2023 05:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689770597; cv=none; d=google.com; s=arc-20160816; b=hLh0M8HHdDd7zwgkaBKv9hsx+dZSRV/PJ9cSBtHGVcRoAXafvQkGZE4ELOSwqYG6Yv d9u2unqFJza/XWGySbspBq3aitTFX4CAtrIT3wm6BJk8PRR1X+WWvKjWoj/PQ8DHFpSL Wschv1BDuvmfA1vWZF87qGSaKbyds0enr4rlDvlvKyu3o8m+iObz4WaicxG+yIgh+/+c ehxdxMqkub/6OTBy475yFWzyYlHqPK3SpmjQIw5NIXhHpk3NWUC0LRVaICvirKUNgEwW L9dtP2afTG4cuAuZJnKl9oFleuu52DV3ikYqrqBcwxtIabvxIARKZ+qeYEIyfzblvdHG 09yA== 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=zfIDB+eLS3MyoNh8QY5FxsffyHCWTz675+Bl2ivwJGQ=; fh=4WFkd0SKC531xjglIUi33C1n6bFXFguLuCICsINSE7Y=; b=D40zOOs5TdLrvjw2oOyEC6V4XxiyJFX4jKJXvjPK35OuuGlGzHILdndXf6Ru932t6q Pc62uSQ6YQ/tyjzAhwvvBhTd73RPB3uXKnUFM0WS6N8i4f64+Ts9Pp+6fc/7A3guXG+6 EZ1WbqQkxPt6qNEr/FAcAljR+9A8CtVXmYBZjQ0wX7rHUTj2pV2foRHGfEN6ekDBfhm1 6iUjlhlgNo15jZW1qEtVbsPSQFKEM1Eni8Z5tb6FRf6Mn8tPYgK2zRxibyOwEfFTBnwz DWJvyMPVgWo3NmNTgSqHGmPs9rISXJgt4GC72TG1MEv8ZMUnxSsbxSyTtliHC+0Aov5z DH9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vKNV9sNT; 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 jt18-20020a170906dfd200b0098da8d0ce54si2813933ejc.834.2023.07.19.05.42.53; Wed, 19 Jul 2023 05:43:17 -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=vKNV9sNT; 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 S229884AbjGSMmC (ORCPT + 99 others); Wed, 19 Jul 2023 08:42:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbjGSMli (ORCPT ); Wed, 19 Jul 2023 08:41:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EB241737; Wed, 19 Jul 2023 05:41:22 -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 DE212616DA; Wed, 19 Jul 2023 12:41:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B72B0C43395; Wed, 19 Jul 2023 12:41:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689770481; bh=v4M0j8Y9+LzNwuF8nVwMAulIi63E5C7p3UByRxJEuxo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vKNV9sNTUJTcnOk/TL1KoiaHwQQWXHhoPLKo9L7gVUY2yHAnPr3rQfnX/Hso6oJB+ CVdZjSwY/u59qA7uEwriqWsna0VDWCA/aNy3xTaAcHxVapcawxYk8rr49rerGskgYx EJQDb1y5KekinNzg4lX8z5NxO4z5mTup06SfWlkpBZ68CgccaIITSkVOcz/btQ61id eAtCGgCQBOga8OpRGnTyyB54IQWyww6fUqyA5eClL00d32lpYcqM2IQB1PufsqqvYg 1quMka/+qOF+lFoyojoKihE+OHdIXdpDavOUO4HdjzNycQivZ6VIEN22J9iVg/xnEl TF7iPTAVjg67A== 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 7/9] vga16fb: drop powerpc support Date: Wed, 19 Jul 2023 14:39:42 +0200 Message-Id: <20230719123944.3438363-8-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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771852894331716741 X-GMAIL-MSGID: 1771852894331716741 From: Arnd Bergmann I noticed that commit 0db5b61e0dc07 ("fbdev/vga16fb: Create EGA/VGA devices in sysfb code") broke vga16fb on non-x86 platforms, because the sysfb code never creates a vga-framebuffer device when screen_info.orig_video_isVGA is set to '1' instead of VIDEO_TYPE_VGAC. However, it turns out that the only architecture that has allowed building vga16fb in the past 20 years is powerpc, and this only worked on two 32-bit platforms and never on 64-bit powerpc. The last machine that actually used this was removed in linux-3.10, so this is all dead code and can be removed. The big-endian support in vga16fb.c could also be removed, but I'd just leave this in place. Fixes: 933ee7119fb14 ("powerpc: remove PReP platform") Signed-off-by: Arnd Bergmann Reviewed-by: Javier Martinez Canillas --- arch/powerpc/kernel/setup-common.c | 16 ---------------- drivers/video/fbdev/Kconfig | 2 +- drivers/video/fbdev/vga16fb.c | 9 +-------- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index d2a446216444f..81a6313927228 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -98,21 +97,6 @@ int boot_cpu_hwid = -1; int dcache_bsize; int icache_bsize; -/* - * This still seems to be needed... -- paulus - */ -struct screen_info screen_info = { - .orig_x = 0, - .orig_y = 25, - .orig_video_cols = 80, - .orig_video_lines = 25, - .orig_video_isVGA = 1, - .orig_video_points = 16 -}; -#if defined(CONFIG_FB_VGA16_MODULE) -EXPORT_SYMBOL(screen_info); -#endif - /* Variables required to store legacy IO irq routing */ int of_i8042_kbd_irq; EXPORT_SYMBOL_GPL(of_i8042_kbd_irq); diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 9169ee532baf7..ebc3cdfdfca07 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -368,7 +368,7 @@ config FB_IMSTT config FB_VGA16 tristate "VGA 16-color graphics support" - depends on FB && (X86 || PPC) + depends on FB && X86 select APERTURE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA diff --git a/drivers/video/fbdev/vga16fb.c b/drivers/video/fbdev/vga16fb.c index 34d00347ad58a..8e28f9dd19044 100644 --- a/drivers/video/fbdev/vga16fb.c +++ b/drivers/video/fbdev/vga16fb.c @@ -185,8 +185,6 @@ static inline void setindex(int index) /* Check if the video mode is supported by the driver */ static inline int check_mode_supported(const struct screen_info *si) { - /* non-x86 architectures treat orig_video_isVGA as a boolean flag */ -#if defined(CONFIG_X86) /* only EGA and VGA in 16 color graphic mode are supported */ if (si->orig_video_isVGA != VIDEO_TYPE_EGAC && si->orig_video_isVGA != VIDEO_TYPE_VGAC) @@ -197,7 +195,7 @@ static inline int check_mode_supported(const struct screen_info *si) si->orig_video_mode != 0x10 && /* 640x350/4 (EGA) */ si->orig_video_mode != 0x12) /* 640x480/4 (VGA) */ return -ENODEV; -#endif + return 0; } @@ -1338,12 +1336,7 @@ static int vga16fb_probe(struct platform_device *dev) printk(KERN_INFO "vga16fb: mapped to 0x%p\n", info->screen_base); par = info->par; -#if defined(CONFIG_X86) par->isVGA = si->orig_video_isVGA == VIDEO_TYPE_VGAC; -#else - /* non-x86 architectures treat orig_video_isVGA as a boolean flag */ - par->isVGA = si->orig_video_isVGA; -#endif par->palette_blanked = 0; par->vesa_blanked = 0;