diff options
| author | Mark Brown <[email protected]> | 2023-05-19 12:32:04 +0900 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2023-05-19 12:32:04 +0900 |
| commit | af53b00fa3aca3410c89900a34e5d727a27c36e2 (patch) | |
| tree | 1b51641988e0ae56f8de4a693ab3d1aecc5491d4 /drivers/firmware/sysfb_simplefb.c | |
| parent | 98be58f2b517b212b57b8493dab92312a52614ac (diff) | |
| parent | f1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6 (diff) | |
Merge tag 'v6.4-rc2' into asoc-6.5 to get fixes for CI
Linux 6.4-rc2
Diffstat (limited to 'drivers/firmware/sysfb_simplefb.c')
| -rw-r--r-- | drivers/firmware/sysfb_simplefb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firmware/sysfb_simplefb.c b/drivers/firmware/sysfb_simplefb.c index 82c64cb9f531..74363ed7501f 100644 --- a/drivers/firmware/sysfb_simplefb.c +++ b/drivers/firmware/sysfb_simplefb.c @@ -51,7 +51,8 @@ __init bool sysfb_parse_mode(const struct screen_info *si, * * It's not easily possible to fix this in struct screen_info, * as this could break UAPI. The best solution is to compute - * bits_per_pixel here and ignore lfb_depth. In the loop below, + * bits_per_pixel from the color bits, reserved bits and + * reported lfb_depth, whichever is highest. In the loop below, * ignore simplefb formats with alpha bits, as EFI and VESA * don't specify alpha channels. */ @@ -60,6 +61,7 @@ __init bool sysfb_parse_mode(const struct screen_info *si, si->green_size + si->green_pos, si->blue_size + si->blue_pos), si->rsvd_size + si->rsvd_pos); + bits_per_pixel = max_t(u32, bits_per_pixel, si->lfb_depth); } else { bits_per_pixel = si->lfb_depth; } |