[PATCH] sysfb: Fix screen_info type check for VGA
Tzung-Bi Shih
tzungbi at kernel.org
Wed Jun 4 10:51:16 UTC 2025
On Tue, Jun 03, 2025 at 05:48:20PM +0200, Thomas Zimmermann wrote:
> 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: 0db5b61e0dc0 ("fbdev/vga16fb: Create EGA/VGA devices in sysfb code")
> Cc: Thomas Zimmermann <tzimmermann at suse.de>
> Cc: Javier Martinez Canillas <javierm at redhat.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Tzung-Bi Shih <tzungbi at kernel.org>
> Cc: Helge Deller <deller at gmx.de>
> Cc: "Uwe Kleine-König" <u.kleine-koenig at baylibre.com>
> Cc: Zsolt Kajtar <soci at c64.rulez.org>
> Cc: <stable at vger.kernel.org> # v6.1+
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Reviewed-by: Tzung-Bi Shih <tzungbi at kernel.org>
More information about the dri-devel
mailing list