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>
Subject: [PATCH v2 7/9] vga16fb: drop powerpc support
Date: Wed, 19 Jul 2023 14:39:42 +0200 [thread overview]
Message-ID: <20230719123944.3438363-8-arnd@kernel.org> (raw)
In-Reply-To: <20230719123944.3438363-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
---
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 <linux/seq_file.h>
#include <linux/ioport.h>
#include <linux/console.h>
-#include <linux/screen_info.h>
#include <linux/root_dev.h>
#include <linux/cpu.h>
#include <linux/unistd.h>
@@ -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;
--
2.39.2
WARNING: multiple messages have this Message-ID (diff)
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 7/9] vga16fb: drop powerpc support
Date: Wed, 19 Jul 2023 14:39:42 +0200 [thread overview]
Message-ID: <20230719123944.3438363-8-arnd@kernel.org> (raw)
In-Reply-To: <20230719123944.3438363-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
---
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 <linux/seq_file.h>
#include <linux/ioport.h>
#include <linux/console.h>
-#include <linux/screen_info.h>
#include <linux/root_dev.h>
#include <linux/cpu.h>
#include <linux/unistd.h>
@@ -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;
--
2.39.2
WARNING: multiple messages have this Message-ID (diff)
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 7/9] vga16fb: drop powerpc support
Date: Wed, 19 Jul 2023 14:39:42 +0200 [thread overview]
Message-ID: <20230719123944.3438363-8-arnd@kernel.org> (raw)
In-Reply-To: <20230719123944.3438363-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
---
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 <linux/seq_file.h>
#include <linux/ioport.h>
#include <linux/console.h>
-#include <linux/screen_info.h>
#include <linux/root_dev.h>
#include <linux/cpu.h>
#include <linux/unistd.h>
@@ -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;
--
2.39.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
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: linux-hyperv@vger.kernel.org, x86@kernel.org,
linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
Linus Walleij <linus.walleij@linaro.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
dri-devel@lists.freedesktop.org, linux-mips@vger.kernel.org,
Max Filippov <jcmvbkbc@gmail.com>, Will Deacon <will@kernel.org>,
linux-efi@vger.kernel.org, Guo Ren <guoren@kernel.org>,
linux-csky@vger.kernel.org, sparclinux@vger.kernel.org,
linux-hexagon@vger.kernel.org, WANG Xuerui <kernel@xen0n.name>,
"K. Y. Srinivasan" <kys@microsoft.com>,
David Airlie <airlied@gmail.com>,
Ard Biesheuvel <ardb@kernel.org>, Wei Liu <wei.liu@kernel.org>,
Huacai Chen <chenhuacai@kernel.org>,
Dexuan Cui <decui@microsoft.com>,
Russell King <linux@armlinux.org.uk>,
Deepak Rawat <drawat.floss@gmail.com>,
Ingo Molnar <mingo@redhat.com>, Matt Turner <mattst88@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Haiyang Zhang <haiyangz@microsoft.com>,
Nicholas Piggin <npiggin@gmail.com>,
Bor islav Petkov <bp@alien8.de>,
loongarch@lists.linux.dev,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org,
Khalid Aziz <khalid@gonehiking.org>,
Brian Cain <bcain@quicinc.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, Dinh Nguyen <dinguyen@kernel.org>,
linux-riscv@lists.infradead.org,
Palmer Dabbelt <palmer@dabbelt.com>,
Daniel Vetter <daniel@ffwll.ch>,
linux-alpha@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH v2 7/9] vga16fb: drop powerpc support
Date: Wed, 19 Jul 2023 14:39:42 +0200 [thread overview]
Message-ID: <20230719123944.3438363-8-arnd@kernel.org> (raw)
In-Reply-To: <20230719123944.3438363-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
---
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 <linux/seq_file.h>
#include <linux/ioport.h>
#include <linux/console.h>
-#include <linux/screen_info.h>
#include <linux/root_dev.h>
#include <linux/cpu.h>
#include <linux/unistd.h>
@@ -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;
--
2.39.2
WARNING: multiple messages have this Message-ID (diff)
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: linux-hyperv@vger.kernel.org, x86@kernel.org,
linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
dri-devel@lists.freedesktop.org, linux-mips@vger.kernel.org,
Max Filippov <jcmvbkbc@gmail.com>, Will Deacon <will@kernel.org>,
linux-efi@vger.kernel.org, Guo Ren <guoren@kernel.org>,
linux-csky@vger.kernel.org, sparclinux@vger.kernel.org,
linux-hexagon@vger.kernel.org, WANG Xuerui <kernel@xen0n.name>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Ard Biesheuvel <ardb@kernel.org>, Wei Liu <wei.liu@kernel.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Huacai Chen <chenhuacai@kernel.org>,
Dexuan Cui <decui@microsoft.com>,
Russell King <linux@armlinux.org.uk>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Deepak Rawat <drawat.floss@gmail.com>,
Ingo Molnar <mingo@redhat.com>, Matt Turner <mattst88@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Haiyang Zhang <haiyangz@microsoft.com>,
Nicholas Piggin <npiggin@gmail.com>,
Borislav Petkov <bp@alien8.de>,
loongarch@lists.linux.dev,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org,
Khalid Aziz <khalid@gonehiking.org>,
Brian Cain <bcain@quicinc.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, Dinh Nguyen <dinguyen@kernel.org>,
linux-riscv@lists.infradead.org,
Palmer Dabbelt <palmer@dabbelt.com>,
linux-alpha@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH v2 7/9] vga16fb: drop powerpc support
Date: Wed, 19 Jul 2023 14:39:42 +0200 [thread overview]
Message-ID: <20230719123944.3438363-8-arnd@kernel.org> (raw)
In-Reply-To: <20230719123944.3438363-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
---
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 <linux/seq_file.h>
#include <linux/ioport.h>
#include <linux/console.h>
-#include <linux/screen_info.h>
#include <linux/root_dev.h>
#include <linux/cpu.h>
#include <linux/unistd.h>
@@ -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;
--
2.39.2
next prev parent reply other threads:[~2023-07-19 12:39 UTC|newest]
Thread overview: 135+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 12:39 [PATCH v2 0/9] video: screen_info cleanups Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` [PATCH v2 1/9] vgacon: rework Kconfig dependencies Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-20 18:48 ` Khalid Aziz
2023-07-20 18:48 ` Khalid Aziz
2023-07-20 18:48 ` Khalid Aziz
2023-07-20 18:48 ` Khalid Aziz
2023-07-20 18:48 ` Khalid Aziz
2023-07-21 4:59 ` Michael Ellerman
2023-07-21 4:59 ` Michael Ellerman
2023-07-21 4:59 ` Michael Ellerman
2023-07-21 4:59 ` Michael Ellerman
2023-07-21 4:59 ` Michael Ellerman
2023-07-21 8:26 ` Arnd Bergmann
2023-07-21 8:26 ` Arnd Bergmann
2023-07-21 8:26 ` Arnd Bergmann
2023-07-21 8:26 ` Arnd Bergmann
2023-07-21 8:26 ` Arnd Bergmann
2023-07-24 12:07 ` Geert Uytterhoeven
2023-07-24 12:07 ` Geert Uytterhoeven
2023-07-24 12:07 ` Geert Uytterhoeven
2023-07-24 12:07 ` Geert Uytterhoeven
2023-07-24 12:07 ` Geert Uytterhoeven
2023-07-19 12:39 ` [PATCH v2 2/9] vgacon: rework screen_info #ifdef checks Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-20 18:49 ` Khalid Aziz
2023-07-20 18:49 ` Khalid Aziz
2023-07-20 18:49 ` Khalid Aziz
2023-07-20 18:49 ` Khalid Aziz
2023-07-20 18:49 ` Khalid Aziz
2023-07-19 12:39 ` [PATCH v2 3/9] dummycon: limit Arm console size hack to footbridge Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` [PATCH v2 4/9] vgacon, arch/*: remove unused screen_info definitions Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 13:34 ` Philippe Mathieu-Daudé
2023-07-19 13:34 ` Philippe Mathieu-Daudé
2023-07-19 13:34 ` Philippe Mathieu-Daudé
2023-07-19 13:34 ` Philippe Mathieu-Daudé
2023-07-19 13:34 ` Philippe Mathieu-Daudé
2023-07-19 12:39 ` [PATCH v2 5/9] vgacon: remove screen_info dependency Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 13:49 ` Javier Martinez Canillas
2023-07-19 13:49 ` Javier Martinez Canillas
2023-07-19 13:49 ` Javier Martinez Canillas
2023-07-19 13:49 ` Javier Martinez Canillas
2023-07-19 13:49 ` Javier Martinez Canillas
2023-07-19 13:49 ` Philippe Mathieu-Daudé
2023-07-19 13:49 ` Philippe Mathieu-Daudé
2023-07-19 13:49 ` Philippe Mathieu-Daudé
2023-07-19 13:49 ` Philippe Mathieu-Daudé
2023-07-19 13:49 ` Philippe Mathieu-Daudé
2023-07-19 14:38 ` Arnd Bergmann
2023-07-19 14:38 ` Arnd Bergmann
2023-07-19 14:38 ` Arnd Bergmann
2023-07-19 14:38 ` Arnd Bergmann
2023-07-19 14:38 ` Arnd Bergmann
2023-07-20 18:51 ` Khalid Aziz
2023-07-20 18:51 ` Khalid Aziz
2023-07-20 18:51 ` Khalid Aziz
2023-07-20 18:51 ` Khalid Aziz
2023-07-20 18:51 ` Khalid Aziz
2023-07-19 12:39 ` [PATCH v2 6/9] vgacon: clean up global screen_info instances Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 14:17 ` Javier Martinez Canillas
2023-07-19 14:17 ` Javier Martinez Canillas
2023-07-19 14:17 ` Javier Martinez Canillas
2023-07-19 14:17 ` Javier Martinez Canillas
2023-07-19 14:17 ` Javier Martinez Canillas
2023-07-20 18:53 ` Khalid Aziz
2023-07-20 18:53 ` Khalid Aziz
2023-07-20 18:53 ` Khalid Aziz
2023-07-20 18:53 ` Khalid Aziz
2023-07-20 18:53 ` Khalid Aziz
2023-07-19 12:39 ` Arnd Bergmann [this message]
2023-07-19 12:39 ` [PATCH v2 7/9] vga16fb: drop powerpc support Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 14:23 ` Javier Martinez Canillas
2023-07-19 14:23 ` Javier Martinez Canillas
2023-07-19 14:23 ` Javier Martinez Canillas
2023-07-19 14:23 ` Javier Martinez Canillas
2023-07-19 14:23 ` Javier Martinez Canillas
2023-07-19 12:39 ` [PATCH v2 8/9] hyperv: avoid dependency on screen_info Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 14:25 ` Javier Martinez Canillas
2023-07-19 14:25 ` Javier Martinez Canillas
2023-07-19 14:25 ` Javier Martinez Canillas
2023-07-19 14:25 ` Javier Martinez Canillas
2023-07-19 14:25 ` Javier Martinez Canillas
2023-07-19 12:39 ` [PATCH v2 9/9] efi: move screen_info into efi init code Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 12:39 ` Arnd Bergmann
2023-07-19 13:19 ` Ard Biesheuvel
2023-07-19 13:19 ` Ard Biesheuvel
2023-07-19 13:19 ` Ard Biesheuvel
2023-07-19 13:19 ` Ard Biesheuvel
2023-07-19 13:19 ` Ard Biesheuvel
2023-07-19 14:35 ` Javier Martinez Canillas
2023-07-19 14:35 ` Javier Martinez Canillas
2023-07-19 14:35 ` Javier Martinez Canillas
2023-07-19 14:35 ` Javier Martinez Canillas
2023-07-19 14:35 ` Javier Martinez Canillas
2023-07-19 14:57 ` [PATCH v2 0/9] video: screen_info cleanups Helge Deller
2023-07-19 14:57 ` Helge Deller
2023-07-19 14:57 ` Helge Deller
2023-07-19 14:57 ` Helge Deller
2023-07-19 14:57 ` Helge Deller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230719123944.3438363-8-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=airlied@gmail.com \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=bcain@quicinc.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=daniel@ffwll.ch \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=deller@gmx.de \
--cc=dinguyen@kernel.org \
--cc=drawat.floss@gmail.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=gregkh@linuxfoundation.org \
--cc=guoren@kernel.org \
--cc=haiyangz@microsoft.com \
--cc=javierm@redhat.com \
--cc=khalid@gonehiking.org \
--cc=kys@microsoft.com \
--cc=linus.walleij@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=mingo@redhat.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.