Skip to content

Commit b858a97

Browse files
arndbgregkh
authored andcommitted
vga16fb: drop powerpc support
I noticed that commit 0db5b61 ("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: 933ee71 ("powerpc: remove PReP platform") Reviewed-by: Javier Martinez Canillas <[email protected]> Acked-by: Helge Deller <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 555624c commit b858a97

File tree

3 files changed

+2
-25
lines changed

3 files changed

+2
-25
lines changed

arch/powerpc/kernel/setup-common.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <linux/seq_file.h>
2323
#include <linux/ioport.h>
2424
#include <linux/console.h>
25-
#include <linux/screen_info.h>
2625
#include <linux/root_dev.h>
2726
#include <linux/cpu.h>
2827
#include <linux/unistd.h>
@@ -98,21 +97,6 @@ int boot_cpu_hwid = -1;
9897
int dcache_bsize;
9998
int icache_bsize;
10099

101-
/*
102-
* This still seems to be needed... -- paulus
103-
*/
104-
struct screen_info screen_info = {
105-
.orig_x = 0,
106-
.orig_y = 25,
107-
.orig_video_cols = 80,
108-
.orig_video_lines = 25,
109-
.orig_video_isVGA = 1,
110-
.orig_video_points = 16
111-
};
112-
#if defined(CONFIG_FB_VGA16_MODULE)
113-
EXPORT_SYMBOL(screen_info);
114-
#endif
115-
116100
/* Variables required to store legacy IO irq routing */
117101
int of_i8042_kbd_irq;
118102
EXPORT_SYMBOL_GPL(of_i8042_kbd_irq);

drivers/video/fbdev/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ config FB_IMSTT
363363

364364
config FB_VGA16
365365
tristate "VGA 16-color graphics support"
366-
depends on FB && (X86 || PPC)
366+
depends on FB && X86
367367
select APERTURE_HELPERS
368368
select FB_CFB_FILLRECT
369369
select FB_CFB_COPYAREA

drivers/video/fbdev/vga16fb.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ static inline void setindex(int index)
185185
/* Check if the video mode is supported by the driver */
186186
static inline int check_mode_supported(const struct screen_info *si)
187187
{
188-
/* non-x86 architectures treat orig_video_isVGA as a boolean flag */
189-
#if defined(CONFIG_X86)
190188
/* only EGA and VGA in 16 color graphic mode are supported */
191189
if (si->orig_video_isVGA != VIDEO_TYPE_EGAC &&
192190
si->orig_video_isVGA != VIDEO_TYPE_VGAC)
@@ -197,7 +195,7 @@ static inline int check_mode_supported(const struct screen_info *si)
197195
si->orig_video_mode != 0x10 && /* 640x350/4 (EGA) */
198196
si->orig_video_mode != 0x12) /* 640x480/4 (VGA) */
199197
return -ENODEV;
200-
#endif
198+
201199
return 0;
202200
}
203201

@@ -1338,12 +1336,7 @@ static int vga16fb_probe(struct platform_device *dev)
13381336
printk(KERN_INFO "vga16fb: mapped to 0x%p\n", info->screen_base);
13391337
par = info->par;
13401338

1341-
#if defined(CONFIG_X86)
13421339
par->isVGA = si->orig_video_isVGA == VIDEO_TYPE_VGAC;
1343-
#else
1344-
/* non-x86 architectures treat orig_video_isVGA as a boolean flag */
1345-
par->isVGA = si->orig_video_isVGA;
1346-
#endif
13471340
par->palette_blanked = 0;
13481341
par->vesa_blanked = 0;
13491342

0 commit comments

Comments
 (0)