Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2145313rdb; Mon, 9 Oct 2023 14:21:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDgVOvsUCGdgAfTwKAc6LJqn5EXHTql1DOn1Pdcq/uchzrp6Parkw1xwvca1ZcyZCXWS/Z X-Received: by 2002:a17:902:cecb:b0:1c3:411c:9b7d with SMTP id d11-20020a170902cecb00b001c3411c9b7dmr16638974plg.57.1696886497095; Mon, 09 Oct 2023 14:21:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696886497; cv=none; d=google.com; s=arc-20160816; b=ySmHkdFI5RHadYUOmzQOMCHLoVa8PVCJqrV0Jnv+dr9vnIC9LrYQCX2oid4sz5mfkU R4lPlaJhB/zrR41EiJe2eLz8L/IdCsJuJ+JA+fWEtcowBPVN4FvyRVirIveEES6Ux1gU TG8YgXCdrsZQYAXXefcYB4GN24UdQs8G1trTc+CtABtDxxkKG45VJKwjifRt8UBsmIME N5OZOWrIa23sUHKTXFlVUH9zgqcefdjZzj+7qZHqOy+nqR82jmRG73sPBOGdGskJ1aP9 xtBWpGAqHTs+4xiDDJdXVdediLIFwq067fbruWHQHkYo27iFFmVkuSvfGFkuhUC8LhyF NndQ== 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=Ey6aF19cQdZpIu5vrA6bfiegTQplSfdd/QCkLQhYD/E=; fh=5rjrd9z1AwCU6K4zctiyztRWfSlrVT4HOR1EMu5XpZI=; b=VbNQwUkXUqreGI0hw+uY3hanPIgQPVQ64ku7kRaPbqivwmH9uWF7r8Inaoo1ZVwpV8 VEt3K36lKjbNj8S0ZYAfupD/s+4GNvKXaEj6BtJvST+sS+heiBJpO8WLcI2JCpXuOzyZ 50Or2UhPBgBQnAnx9uNy2ABoipGxGW9SG0YjzvE+Hcc+362LiKpYREWN+wdW1KLvC4au oV6hmdGW48NL2D1E//rtopBKJYlybDoJro3oNaKkkppOKAGAUojQpN++CUNseqWHlTKZ b9UcAhzWJkAk86GlVHXSq8XaAbrRx5VKoTnWDLlBXDmuXMu8cZnIiB4NqszwBO0TzT1a BIbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UT3LTAkF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id k4-20020a170902d58400b001c7845637eesi10281416plh.168.2023.10.09.14.21.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 14:21:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UT3LTAkF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 04E6A80E73C4; Mon, 9 Oct 2023 14:21:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378542AbjJIVVb (ORCPT + 99 others); Mon, 9 Oct 2023 17:21:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234637AbjJIVU4 (ORCPT ); Mon, 9 Oct 2023 17:20:56 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B7C2121; Mon, 9 Oct 2023 14:20:24 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A8BCC43397; Mon, 9 Oct 2023 21:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696886423; bh=qv+Y57MlZMLwkqB8O60+0DiPLEkUZWkKZe9KzhoJldc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UT3LTAkFViz27WO2a1m/giMM3usPYkfzypcwZepfADL9BLFOYD1xV49Y8R83EHv9d U/lhj0L7pR89Dap4i9W1pFwEUKsiLm3GOAhPqXi7aE3QEvFJ/734gTflNsEJfWm2w4 njavechlp0UoJJlTm0q667uw+TWTV3RycMm7i0H/841ADy7IHGfbpupktL2PF75gmU WBJRDVA3CL33jAJjHhRa0RIwPDR3kChFa+bgx1aw1KfIZCXO3Fh2dtrJ8tMoguvVEE zL+j0gjEBRl8jzm90qcbA4AlVl+vMFffaF0tIghzZUgaXxpLivnkGDQtZFzudGBMhl FHkZ1NMn75L+g== 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 7/9] vga16fb: drop powerpc support Date: Mon, 9 Oct 2023 23:18:43 +0200 Message-Id: <20231009211845.3136536-8-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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 09 Oct 2023 14:21:36 -0700 (PDT) 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") Reviewed-by: Javier Martinez Canillas Acked-by: Helge Deller Signed-off-by: Arnd Bergmann --- 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 2f1026fba00d5..22d48a5430611 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 5bea59f29d2fe..ab40ff33a8495 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -364,7 +364,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 b43c874c199f6..6094080852a53 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; -- 2.39.2