linux/drivers/video/fbdev
Thomas Zimmermann c2bc958b2b fbdev: vesafb: Detect VGA compatibility from screen info's VESA attributes
Test the vesa_attributes field in struct screen_info for compatibility
with VGA hardware. Vesafb currently tests bit 1 in screen_info's
capabilities field which indicates a 64-bit lfb address and is
unrelated to VGA compatibility.

Section 4.4 of the Vesa VBE 2.0 specifications defines that bit 5 in
the mode's attributes field signals VGA compatibility. The mode is
compatible with VGA hardware if the bit is clear. In that case, the
driver can access VGA state of the VBE's underlying hardware. The
vesafb driver uses this feature to program the color LUT in palette
modes. Without, colors might be incorrect.

The problem got introduced in commit 89ec4c238e ("[PATCH] vesafb: Fix
incorrect logo colors in x86_64"). It incorrectly stores the mode
attributes in the screen_info's capabilities field and updates vesafb
accordingly. Later, commit 5e8ddcbe86 ("Video mode probing support for
the new x86 setup code") fixed the screen_info, but did not update vesafb.
Color output still tends to work, because bit 1 in capabilities is
usually 0.

Besides fixing the bug in vesafb, this commit introduces a helper that
reads the correct bit from screen_info.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 5e8ddcbe86 ("Video mode probing support for the new x86 setup code")
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Cc: <stable@vger.kernel.org> # v2.6.23+
Signed-off-by: Helge Deller <deller@gmx.de>
2024-06-18 14:04:03 +02:00
..
aty Merge tag 'drm-misc-next-2023-10-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-10-31 10:47:50 +10:00
core - Fix-ups 2024-05-22 10:45:12 -07:00
geode video/nomodeset: Select nomodeset= parameter with CONFIG_VIDEO 2024-01-23 10:11:38 +01:00
i810 fbdev/i810fb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:55:32 +02:00
kyro fbdev: kyro: add missing MODULE_DESCRIPTION() macro 2024-06-13 23:10:41 +02:00
matrox fbdev: matroxfb: add missing MODULE_DESCRIPTION() macros 2024-06-13 23:10:41 +02:00
mb862xx fbdev: mb862xxfb: Fix defined but not used error 2024-03-15 10:01:27 +01:00
mmp video: fbdev: mmp: Follow renaming of SPI "master" to "controller" 2024-02-08 11:54:58 +00:00
nvidia fbdev/nvidiafb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:55:53 +02:00
omap fbdev: omap: lcd_ams_delta: Constify lcd_ops 2024-05-03 10:45:50 +01:00
omap2 fbdev: omapfb: use of_graph_get_remote_port() 2024-06-18 14:04:03 +02:00
riva fbdev/rivafb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:56:16 +02:00
savage fbdev: savage: Handle err return when savagefb_check_var failed 2024-04-25 12:04:18 +02:00
sis fbdev: sisfb: hide unused variables 2024-04-03 14:38:07 +02:00
via fbdev: viafb: add missing MODULE_DESCRIPTION() macro 2024-06-13 23:10:41 +02:00
68328fb.c fbdev/68328fb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:54:16 +02:00
acornfb.c fbdev/acornfb: Fix name of fb_ops initializer macro 2023-11-29 12:20:08 +01:00
acornfb.h
amifb.c fbdev: amifb: Convert to platform remove callback returning void 2023-11-10 09:16:02 +01:00
arcfb.c fbdev/arcfb: Use generator macros for deferred I/O 2023-11-29 12:20:14 +01:00
arkfb.c fbcon: Increase maximum font width x height to 64 x 128 2024-03-16 08:29:48 +01:00
asiliantfb.c fbdev/asiliantfb: Use fbdev I/O helpers 2023-08-04 15:54:34 +02:00
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atafb.c fbdev/atafb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:54:38 +02:00
atafb.h
atmel_lcdfb.c backlight: Remove fb_blank from struct backlight_properties 2024-03-28 10:16:26 +00:00
au1100fb.c fbdev: Push pgprot_decrypted() into mmap implementations 2023-11-29 12:20:44 +01:00
au1100fb.h video: fbdev: au1100fb: Spelling s/palette/palette/ 2022-02-16 10:54:42 +01:00
au1200fb.c fbdev: au1200fb: replace deprecated strncpy with strscpy 2024-04-25 11:56:48 +02:00
au1200fb.h
broadsheetfb.c fbdev: Align deferred I/O with naming of helpers 2023-07-31 20:07:24 +02:00
bt431.h
bt455.h
bw2.c Merge tag 'drm-misc-next-2023-09-11-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-22 16:28:36 +10:00
c2p_core.h
c2p_iplan2.c
c2p_planar.c
c2p.h
carminefb_regs.h
carminefb.c fbdev/carminefb: Use fbdev I/O helpers 2023-08-04 15:54:35 +02:00
carminefb.h
cg3.c Merge tag 'drm-misc-next-2023-09-11-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-22 16:28:36 +10:00
cg6.c Merge tag 'drm-misc-next-2023-09-11-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-22 16:28:36 +10:00
cg14.c Merge tag 'drm-misc-next-2023-09-11-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-22 16:28:36 +10:00
chipsfb.c fbdev/chipsfb: Include <linux/backlight.h> 2024-03-07 13:33:34 +01:00
cirrusfb.c fbdev/cirrusfb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:54:52 +02:00
clps711x-fb.c fbdev: clps711x: Constify lcd_ops 2024-05-03 10:45:40 +01:00
cobalt_lcdfb.c fbdev/cobalt-lcd: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:54:56 +02:00
controlfb.c fbdev/controlfb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:54:59 +02:00
controlfb.h
cyber2000fb.c This cycle, I2C removes the currently unused CLASS_DDC support 2024-01-18 17:29:01 -08:00
cyber2000fb.h
da8xx-fb.c fbdev/da8xx-fb: Use fbdev I/O helpers 2023-08-04 15:54:35 +02:00
dnfb.c fbdev/dnfb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:55:07 +02:00
edid.h
efifb.c fbdev/efifb: Remove framebuffer relocation tracking 2024-02-14 10:09:21 +01:00
ep93xx-fb.c fbdev: Push pgprot_decrypted() into mmap implementations 2023-11-29 12:20:44 +01:00
ffb.c Merge tag 'drm-misc-next-2023-09-11-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-22 16:28:36 +10:00
fm2fb.c fbdev/fm2fb: Use fbdev I/O helpers 2023-08-04 15:54:35 +02:00
fsl-diu-fb.c fbdev: fsl-diu-fb: replace deprecated strncpy with strscpy_pad 2024-04-25 11:53:26 +02:00
g364fb.c fbdev/g364fb: fix build failure with mips 2023-09-02 08:18:40 -07:00
gbefb.c fbdev: Push pgprot_decrypted() into mmap implementations 2023-11-29 12:20:44 +01:00
goldfishfb.c fbdev: goldfishfb: add missing MODULE_DESCRIPTION() macro 2024-06-13 23:10:41 +02:00
grvga.c Linux 6.5-rc7 2023-08-24 07:26:06 +10:00
gxt4500.c fbdev/gxt4500: Use fbdev I/O helpers 2023-08-04 15:54:36 +02:00
hecubafb.c fbdev: Align deferred I/O with naming of helpers 2023-07-31 20:07:24 +02:00
hgafb.c Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
hitfb.c fbdev/hitfb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:55:23 +02:00
hpfb.c fbdev/hpfb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:55:27 +02:00
hyperv_fb.c fbdev/hyperv_fb: Fix logic error for Gen2 VMs in hvfb_getmem() 2024-03-01 08:19:11 +00:00
i740_reg.h
i740fb.c fbdev: remove I2C_CLASS_DDC support 2024-01-18 21:10:41 +01:00
imsttfb.c fbdev: imsttfb: fix a resource leak in probe 2023-11-07 14:42:34 +01:00
imxfb.c fbdev: imx: Constify lcd_ops 2024-05-03 10:45:46 +01:00
Kconfig fbdev fixes and cleanups for 6.10-rc1: 2024-05-15 09:53:06 -07:00
leo.c Merge tag 'drm-misc-next-2023-09-11-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-22 16:28:36 +10:00
macfb.c fbdev/macfb: Use fbdev I/O helpers 2023-08-04 15:54:36 +02:00
macmodes.c fbdev: macmodes: add missing MODULE_DESCRIPTION() macro 2024-06-13 23:10:41 +02:00
macmodes.h
Makefile fbdev: amba-clcd: Delete the old CLCD driver 2024-01-12 12:38:37 +01:00
maxinefb.c fbdev/maxinefb: Use fbdev I/O helpers 2023-08-04 15:54:36 +02:00
metronomefb.c fbdev: Align deferred I/O with naming of helpers 2023-07-31 20:07:24 +02:00
n411.c
neofb.c fbdev/neofb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:55:48 +02:00
ocfb.c fbdev/ocfb: Use fbdev I/O helpers 2023-08-04 15:54:37 +02:00
offb.c fbdev: offb: add missing MODULE_DESCRIPTION() macro 2024-06-15 12:30:14 +02:00
p9100.c Merge tag 'drm-misc-next-2023-09-11-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-22 16:28:36 +10:00
platinumfb.c Linux 6.5-rc7 2023-08-24 07:26:06 +10:00
platinumfb.h
pm2fb.c fbdev/pm2fb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:56:00 +02:00
pm3fb.c fbdev/pm3fb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:56:04 +02:00
pmag-aa-fb.c fbdev/pmag-aa-fb: Use fbdev I/O helpers 2023-08-04 15:54:37 +02:00
pmag-ba-fb.c fbdev/pmag-ba-fb: Use fbdev I/O helpers 2023-08-04 15:54:37 +02:00
pmagb-b-fb.c fbdev/pmagb-b-fb: Use fbdev I/O helpers 2023-08-04 15:54:37 +02:00
ps3fb.c fbdev: Push pgprot_decrypted() into mmap implementations 2023-11-29 12:20:44 +01:00
pvr2fb.c fbdev/pvr2fb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:56:08 +02:00
pxa3xx-gcu.c fbdev: pxa3xx-gcu: Convert to platform remove callback returning void 2023-04-24 11:48:31 +02:00
pxa3xx-gcu.h
pxa3xx-regs.h ARM: pxa: move regs-lcd.h into driver 2022-04-19 16:29:03 +02:00
pxa168fb.c fbdev/pxa168fb: Use fbdev I/O helpers 2023-08-04 15:54:37 +02:00
pxa168fb.h
pxafb.c fbdev: omap2: replace of_graph_get_next_endpoint() 2024-03-25 05:49:05 +01:00
pxafb.h
q40fb.c fbdev/q40fb: Use fbdev I/O helpers 2023-08-04 15:54:38 +02:00
s1d13xxxfb.c fbdev/s1d13xxxfb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:56:23 +02:00
s3c-fb.c fbdev/s3cfb: Use fbdev I/O helpers 2023-08-04 15:54:38 +02:00
s3fb.c fbcon: Increase maximum font width x height to 64 x 128 2024-03-16 08:29:48 +01:00
sa1100fb.c fbdev: Push pgprot_decrypted() into mmap implementations 2023-11-29 12:20:44 +01:00
sa1100fb.h
sbuslib.c fbdev: Push pgprot_decrypted() into mmap implementations 2023-11-29 12:20:44 +01:00
sbuslib.h fbdev/sbus: Add initializer macros and Kconfig tokens for SBUS support 2023-08-28 09:43:53 +02:00
sh7760fb.c fbdev/sh7760fb: Use fbdev I/O helpers 2023-08-04 15:54:38 +02:00
sh_mobile_lcdcfb.c - Fix-ups 2024-05-22 10:45:12 -07:00
sh_mobile_lcdcfb.h
simplefb.c fbdev/simplefb: change loglevel when the power domains cannot be parsed 2023-12-14 10:31:45 +01:00
skeletonfb.c fbdev: Remove FBINFO_DEFAULT from framebuffer_alloc()'ed structs 2023-07-24 16:50:38 +02:00
sm501fb.c fbdev/sm501fb: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:56:43 +02:00
sm712.h
sm712fb.c fbdev/sm712fb: Use correct initializer macros for struct fb_ops 2023-11-29 12:20:10 +01:00
smscufx.c fbdev: Push pgprot_decrypted() into mmap implementations 2023-11-29 12:20:44 +01:00
ssd1307fb.c fbdev: ssd1307fb: Remove struct backlight_ops.check_fb 2024-03-28 10:09:05 +00:00
sstfb.c fbdev/sstfb: Use fbdev I/O helpers 2023-08-04 15:54:38 +02:00
stifb.c fbdev: stifb: Fix crash in stifb_blank() 2024-01-23 09:13:24 +01:00
sunxvr500.c fbdev/sunxvr500: Initialize fb_ops to fbdev I/O-memory helpers 2023-10-19 12:56:55 +02:00
sunxvr1000.c Linux 6.5-rc7 2023-08-24 07:26:06 +10:00
sunxvr2500.c Linux 6.5-rc7 2023-08-24 07:26:06 +10:00
tcx.c Merge tag 'drm-misc-next-2023-09-11-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-22 16:28:36 +10:00
tdfxfb.c fbdev: remove I2C_CLASS_DDC support 2024-01-18 21:10:41 +01:00
tgafb.c vt: remove superfluous CONFIG_HW_CONSOLE 2024-01-27 19:03:51 -08:00
tridentfb.c fbdev: remove I2C_CLASS_DDC support 2024-01-18 21:10:41 +01:00
udlfb.c fbdev: Push pgprot_decrypted() into mmap implementations 2023-11-29 12:20:44 +01:00
uvesafb.c fbdev: uvesafb: replace deprecated strncpy with strscpy_pad 2024-04-25 11:57:45 +02:00
valkyriefb.c fbdev/valkyriefb: Use fbdev I/O helpers 2023-08-04 15:54:38 +02:00
valkyriefb.h
vesafb.c fbdev: vesafb: Detect VGA compatibility from screen info's VESA attributes 2024-06-18 14:04:03 +02:00
vfb.c fbdev: vfb: add missing MODULE_DESCRIPTION() macro 2024-06-13 23:10:41 +02:00
vga16fb.c fbcon: Increase maximum font width x height to 64 x 128 2024-03-16 08:29:48 +01:00
vt8500lcdfb.c fbdev: vt8500lcdfb: Remove unnecessary print function dev_err() 2024-01-21 08:49:56 +01:00
vt8500lcdfb.h
vt8623fb.c fbcon: Increase maximum font width x height to 64 x 128 2024-03-16 08:29:48 +01:00
wm8505fb_regs.h
wm8505fb.c fbdev/wm8505fb: Initialize fb_ops to fbdev I/O-memory helpers 2023-11-29 12:20:38 +01:00
wmt_ge_rops.c fbdev: Include <linux/io.h> in various drivers 2023-05-18 11:06:19 +02:00
wmt_ge_rops.h
xen-fbfront.c fbdev: Align deferred I/O with naming of helpers 2023-07-31 20:07:24 +02:00
xilinxfb.c Linux 6.5-rc7 2023-08-24 07:26:06 +10:00