diff options
author | Pierre Asselin <[email protected]> | 2023-04-19 00:48:34 -0400 |
---|---|---|
committer | Thomas Zimmermann <[email protected]> | 2023-04-21 14:27:31 +0200 |
commit | 1b617bc93178912fa36f87a957c15d1f1708c299 (patch) | |
tree | 60d30fa12b316ac456d883b31088e87da53b12b7 /lib/mpi/mpi-mul.c | |
parent | c8687694bb1f5c48134f152f8c5c2e53483eb99d (diff) |
firmware/sysfb: Fix VESA format selection
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.
v3 fixes space and formatting blips pointed out by Javier, and change
the bit_per_pixel assignment back to a single statement using two casts.
v4 go back to v2 and use max_t()
Signed-off-by: Pierre Asselin <[email protected]>
Fixes: f35cd3fa7729 ("firmware/sysfb: Fix EFI/VESA format selection")
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Tested-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'lib/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions