Re: [PATCH] firmware/sysfb: Fix wrong stride when bits-per-pixel is calculated
From: Javier Martinez Canillas
Date: Wed Apr 12 2023 - 13:32:24 EST
"Pierre Asselin" <pa@xxxxxxxxx> writes:
>> The commit f35cd3fa7729 ("firmware/sysfb: Fix EFI/VESA format selection")
>> fixed format selection, by calculating the bits-per-pixel instead of just
>> using the reported color depth.
>>
>> But unfortunately this broke some modes because the stride is always set
>> to the reported line length (in bytes), which could not match the actual
>> stride if the calculated bits-per-pixel doesn't match the reported depth.
>>
>> Fixes: f35cd3fa7729 ("firmware/sysfb: Fix EFI/VESA format selection")
>> Reported-by: Pierre Asselin <pa@xxxxxxxxx>
>> Signed-off-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>
>> ---
>>
>> drivers/firmware/sysfb_simplefb.c | 9 +++++++--
>> 1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/firmware/sysfb_simplefb.c
>> b/drivers/firmware/sysfb_simplefb.c
>> index 82c64cb9f531..5dc23e57089f 100644
>> --- a/drivers/firmware/sysfb_simplefb.c
>> +++ b/drivers/firmware/sysfb_simplefb.c
>>
>> [patch elided]
>
> NOOOOOO ! The 1024x768x32 screen is all garbled.
> (gfxpayload=keep, gfxpayload=1024x768x32 or vga=0x318).
>
That's suprising... I tested the patch with vga=ask and picked
1024x768x15, 1024x768x16, 1024x768x24 and 1024x768x32. For all
cases the bits-per-pixel and line length values were correct.
But I don't have a machine with legacy BIOS so I testee using QEMU and
SeaBIOS.
> The other modes work as before (but the dmesg has less information;
> I'll investigate.)
>
Interesting. So you don't have the simplefb output that you had before ?
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat