[PATCH v3 01/13] firmware/sysfb: Fix EFI/VESA format selection

Pierre Asselin pa at panix.com
Thu Apr 6 15:45:06 UTC 2023


Thomas Zimmermann <tzimmermann at suse.de> wrote:

> Select color format for EFI/VESA firmware scanout buffer from the
> number of bits per pixel and the position of the individual color
> components. Fixes the selected format for the buffer in several odd
> cases. For example, XRGB1555 has been reported as ARGB1555 because
> of the different use of depth and transparency in VESA and Linux.
>
> Bits-per-pixel is always the pixel's raw number of bits; including
> alpha and filler bits. It is preferred over color depth, which has a
> different meaning among various components and standards.
>
> Also do not compare reserved bits and transparency bits to each other.
> These values have different meanings, as reserved bits include filler
> bits while transparency does not.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>
> ---
>  drivers/firmware/sysfb_simplefb.c | 43 ++++++++++++++++++++++++++-----
>  1 file changed, 37 insertions(+), 6 deletions(-)
>
[patch elided]

Starting at linux-6.3-rc1 my simplefb picks the wrong mode and garbles
the display This is on a 16-year old i686 laptop.  I can post lshw or
dmidecode output if it helps.

The issue is still present in 6.3-rc5.

Screenshot: https://www.panix.com/~pa/linux-6.3-simplefb/bug-simplefb-bad.jpg
Compare: https://www.panix.com/~pa/linux-6.3-simplefb/bug-simplefb-good.jpg

This happens during early boot.  Grub picks a 1024x786 mode and leaves
it for the kernel.  The screenshots are from a rescueshell in early
userspace.  The dmesg excerpts at the bottom might give some clues.

I bisected it to f35cd3fa77293c2cd03e94b6a6151e1a7d9309cf
    firmware/sysfb: Fix EFI/VESA format selection
which is this patch.

It's not the end of the world:
1) I have a workaround, booting with vga=0x318;
2) the screen is usable even without the workaround;
3) the final fbcon driver takes over after the switch_root.
Nevertheless, it would be nice to get this fixed this before 6.3.

I may be the only one with this problem.  Who else runs -rc kernels on
such old hardware ?  I'll answer questions as best I can and test any
patches thrown at me.

--pa


More information about the dri-devel mailing list