Re: [PATCH] firmware/sysfb: Fix wrong stride when bits-per-pixel is calculated
From: Javier Martinez Canillas
Date: Mon Apr 17 2023 - 05:39:52 EST
Thomas Zimmermann <tzimmermann@xxxxxxx> writes:
[...]
>>
>> stride = DIV_ROUND_UP(si->lfb_width * bits_per_pixel, 8)
>
> I'd rather keep the code as-is until we get an actual bug report.
>
Ok. After all if the pixel format is chosen correctly, the reported line
length should match anyways. So is really a corner case what Pierre had.
> For example, DRM framebuffer sizes are often multiples of 64. Creating a
> framebuffer of 800x600 will create a framebuffer with
> stride/pitch/linelength of 832. I can imagine that some BIOSes out
> there do something similar with the system framebuffer. Messing with the
> stride would break them.
>
I see, is not that simple then. Thanks a lot for the clarification.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat