linux/drivers/firmware
Thomas Zimmermann 337bf0bbb0 sysfb: Fix screen_info type check for VGA
commit f670b50ef5 upstream.

Use the helper screen_info_video_type() to get the framebuffer
type from struct screen_info. Handle supported values in sorted
switch statement.

Reading orig_video_isVGA is unreliable. On most systems it is a
VIDEO_TYPE_ constant. On some systems with VGA it is simply set
to 1 to signal the presence of a VGA output. See vga_probe() for
an example. Retrieving the screen_info type with the helper
screen_info_video_type() detects these cases and returns the
appropriate VIDEO_TYPE_ constant. For VGA, sysfb creates a device
named "vga-framebuffer".

The sysfb code has been taken from vga16fb, where it likely didn't
work correctly either. With this bugfix applied, vga16fb loads for
compatible vga-framebuffer devices.

Fixes: 0db5b61e0d ("fbdev/vga16fb: Create EGA/VGA devices in sysfb code")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Zsolt Kajtar <soci@c64.rulez.org>
Cc: <stable@vger.kernel.org> # v6.1+
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250603154838.401882-1-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-06-27 11:11:23 +01:00
..
arm_ffa firmware: arm_ffa: Handle the presence of host partition in the partition info 2025-05-29 11:02:47 +02:00
arm_scmi firmware: arm_scmi: Ensure that the message-id supports fastchannel 2025-06-27 11:11:22 +01:00
broadcom MIPS: BCM47XX: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:51 -07:00
cirrus firmware: cs_dsp: Ensure cs_dsp_load[_coeff]() returns 0 on success 2025-04-10 14:39:32 +02:00
efi efi/libstub: Describe missing 'out' parameter in efi_load_initrd 2025-06-19 15:31:48 +02:00
google firmware: google: Unregister driver_info on failure 2024-12-05 14:01:16 +01:00
imx firmware: imx-scu: fix OF node leak in .probe() 2025-03-28 22:03:24 +01:00
meson firmware: meson_sm: add missing MODULE_DESCRIPTION() macro 2024-06-24 10:08:53 +02:00
microchip firmware: microchip: auto-update: fix poll_complete() to not report spurious timeout errors 2024-10-17 17:13:30 +01:00
psci firmware: psci: Fix refcount leak in psci_dt_init 2025-06-19 15:31:37 +02:00
qcom firmware: qcom: uefisecapp: fix efivars registration race 2025-03-28 22:03:30 +01:00
smccc arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint 2024-11-07 11:18:52 +00:00
tegra firmware: tegra: bpmp: Use scoped device node handling to simplify error paths 2024-08-27 15:58:38 +02:00
xilinx firmware: xilinx: Dont send linux address to get fpga config get status 2025-05-29 11:02:47 +02:00
arm_scpi.c firmware: arm_scpi: Check the DVFS OPP count returned by the firmware 2024-12-05 14:01:34 +01:00
arm_sdei.c firmware: SDEI: Allow sdei initialization without ACPI_APEI_GHES 2025-06-19 15:31:38 +02:00
dmi-id.c firmware: dmi-id: add a release callback function 2024-04-08 09:34:24 +02:00
dmi-sysfs.c firmware: dmi-sysfs: handle HAS_IOPORT=n 2023-05-31 19:17:29 +01:00
dmi_scan.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
edd.c edd: make kobj_type structure constant 2023-03-09 18:07:33 +01:00
iscsi_ibft.c iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic() 2025-03-22 12:54:14 -07:00
iscsi_ibft_find.c iscsi_ibft: Fix finding the iBFT under Xen Dom 0 2023-06-26 07:47:11 +02:00
Kconfig firmware: SDEI: Allow sdei initialization without ACPI_APEI_GHES 2025-06-19 15:31:38 +02:00
Makefile Core: 2024-01-12 13:54:25 -08:00
memmap.c firmware: memmap: use default_groups in kobj_type 2022-01-05 19:17:29 +01:00
mtk-adsp-ipc.c firmware: mtk-adsp-ipc: Convert to platform remove callback returning void 2024-01-04 17:01:14 +01:00
qemu_fw_cfg.c fw_cfg: Constify struct kobj_type 2024-09-25 07:07:44 -04:00
raspberrypi.c firmware: raspberrypi: Improve timeout warning 2024-08-13 13:21:28 -07:00
stratix10-rsu.c firmware: stratix10-rsu: Convert to platform remove callback returning void 2024-01-04 17:01:15 +01:00
stratix10-svc.c firmware: stratix10-svc: Add of_platform_default_populate() 2025-05-02 07:59:10 +02:00
sysfb.c sysfb: Fix screen_info type check for VGA 2025-06-27 11:11:23 +01:00
sysfb_simplefb.c firmware/sysfb: Set firmware-framebuffer parent device 2024-02-14 10:09:17 +01:00
ti_sci.c firmware: ti_sci: Unconditionally register reset handler 2024-04-09 11:05:10 -05:00
ti_sci.h firmware: ti_sci: fix TISCI protocol URL link 2024-06-27 17:44:48 -05:00
trusted_foundations.c firmware: tf: Different way of L2 cache enabling after LP2 suspend 2020-05-06 18:27:26 +02:00
turris-mox-rwtm.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00