Re: [PATCH v2] firmware/sysfb: Fix VESA format selection

From: Javier Martinez Canillas
Date: Wed Apr 19 2023 - 04:22:02 EST


Pierre Asselin <pa@xxxxxxxxx> writes:

Hello Pierre,

> Some legacy BIOSes report no reserved bits in their 32-bit rgb mode,
> breaking the calculation of bits_per_pixel in commit f35cd3fa7729
> [firmware/sysfb: Fix EFI/VESA format selection]. However they report
> lfb_depth correctly for those modes. Keep the computation but
> set bits_per_pixel to lfb_depth if the latter is larger.
>
> v2 fixes the warnings from a max3() macro with arguments of different
> types; split the bits_per_pixel assignment to avoid uglyfing the code
> with too many typecasts.
>
> Link: https://lore.kernel.org/r/4Psm6B6Lqkz1QXM@xxxxxxxxxxxxxxxx
> Link: https://lore.kernel.org/r/20230412150225.3757223-1-javierm@xxxxxxxxxx
> Fixes: f35cd3fa7729 [firmware/sysfb: Fix EFI/VESA format selection]

The convention is f35cd3fa7729 ("firmware/sysfb: Fix EFI/VESA format selection")

> Signed-off-by: Pierre Asselin <pa@xxxxxxxxx>
> ---

[...]

> + bits_per_pixel= max(bits_per_pixel, (u32)si->lfb_depth);

You are missing a space here.

--
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat